|
|
(self.AMP=self.AMP||[]).push({m:0,v:"2402231941000",n:"amp-script",ev:"0.1",l:!0,f:function(t,n){!function(){function n(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function e(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}var r;function i(){return r||(r=Promise.resolve(void 0))}var o=function(){var t=this;this.promise=new Promise((function(n,e){t.resolve=n,t.reject=e}))};function a(t,n){return(a=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,n){if(n&&("object"===c(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function l(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,i,o=[],a=!0,u=!1;try{for(e=e.call(t);!(a=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);a=!0);}catch(t){u=!0,i=t}finally{try{a||null==e.return||e.return()}finally{if(u)throw i}}return o}}(t,n)||e(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t,n,e){return n&&h(t.prototype,n),e&&h(t,e),t}function m(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||e(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var d=function(t,n,e,r,i){var o=i.executorsAllowed.includes(8);return{execute:function(t,r,i){return o&&i&&(t=n.getNode(t[r+1]))&&(i=t.transferControlToOffscreen(),e.messageToWorker({12:9,13:[t._index_],38:i},[i])),r+2}}},v=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],b=function(t,n){return Array.prototype.forEach.call(t,n)},g=function(){function t(t,n){var e=this;this.nodes=this.count=this.stringContext=this.baseElement=void 0,this.createNodes=function(t,n){for(var r=(t=new Uint16Array(t)).length,i=0;i<r;i+=5){var o=void 0;if(3===t[i+1])o=document.createTextNode(e.stringContext.get(t[i+3]));else if(8===t[i+1])o=document.createComment(e.stringContext.get(t[i+3]));else if(11===t[i+1])o=document.createDocumentFragment();else if(o=e.stringContext.get(t[i+2]),o=0!==t[i+4]?document.createElementNS(e.stringContext.get(t[i+4]),o):document.createElement(o),n&&!n.sanitize(o))continue;e.storeNode(o,t[i])}},this.getNode=function(t){return(t=e.nodes.get(t))&&"BODY"===t.nodeName?e.baseElement:t},this.storeNodes=function(t){e.storeNode(t,++e.count),b(t.childNodes,(function(t){return e.storeNodes(t)}))},this.count=2,this.stringContext=t,this.nodes=new Map([[1,n],[2,n]]),this.baseElement=n,n._index_=2,b(n.childNodes,(function(t){return e.storeNodes(t)}))}return t.prototype.storeNode=function(t,n){t._index_=n,this.nodes.set(n,t)},t}(),y=new Map,w=function(t,n){n&&"value"in n&&null===n.oninput&&(n.oninput=function(){return k(t,n)})},x=function(t,n){n&&"value"in n&&!y.get(n)&&(new MutationObserver((function(n){return n.map((function(n){return k(t,n.target)}))})).observe(n,{attributes:!0}),y.set(n,!0))},k=function(t,n){return t.messageToWorker({12:4,40:{7:n._index_,21:n.value}})},O=function(t){return Object.values(t).map((function(t){return[t.identifier,t.screenX,t.screenY,t.clientX,t.clientY,t.pageX,t.pageY,t.target._index_]}))},S=function(t,n,e,r,i){var o=[],a=i.executorsAllowed.includes(4),u=[window.innerWidth,window.innerHeight],s=function(t,n){return function(r){n&&r.preventDefault();var i=r.currentTarget;if(i&&"value"in i)k(e,r.currentTarget);else if("resize"===r.type){var o=window,a=o.innerWidth,s=o.innerHeight;if(u[0]===a&&u[1]===s)return;u=[window.innerWidth,window.innerHeight],e.messageToWorker({12:5,40:u})}e.messageToWorker({12:1,39:{7:t,25:r.bubbles,26:r.cancelable,27:r.cancelBubble,28:[r.currentTarget._index_||0],29:r.defaultPrevented,30:r.eventPhase,31:r.isTrusted,32:r.returnValue,13:[r.target._index_||0],33:r.timeStamp,12:r.type,35:"keyCode"in r?r.keyCode:void 0,60:"pageX"in r?r.pageX:void 0,61:"pageY"in r?r.pageY:void 0,65:"offsetX"in r?r.offsetX:void 0,66:"offsetY"in r?r.offsetY:void 0,62:"touches"in r?O(r.touches):void 0,63:"changedTouches"in r?O(r.changedTouches):void 0}})}};return{execute:function(r,i,u){var c=r[i+2],f=i+4+2*c;if(c=i+4+6*r[i+3]+2*c,a&&u&&(u=n.getNode(r[i+1])))for(var l=i+4;l<c;){var h=l<=f;i=u;var p=h,m=r,d=l,v=t.get(m[d]),b=m[d+1];if(i!==n.baseElement){var g=null!==i.oninput,y="change"===v;p?(y&&(g=!0,i.onchange=null),i.addEventListener(v,o[b]=s(i._index_,!!m[d+5]))):(y&&(g=!1),i.removeEventListener(v,o[b])),i&&"value"in i&&(g||w(e,i),x(e,i))}else p?addEventListener(v,o[b]=s(1,!!m[d+5])):removeEventListener(v,o[b]);l+=h?2:6}return c}}},j=function(t,n,e,r,i){var o=i.executorsAllowed.includes(5);return{execute:function(t,r,i){return o&&i&&(t=n.getNode(t[r+1]))&&(i=t.getBoundingClientRect(),e.messageToWorker({12:6,13:[t._index_],38:[i.top,i.right,i.bottom,i.left,i.width,i.height]})),r+2}}},A=function(t,n,e,r,i){var o=n.getNode,a=i.executorsAllowed.includes(2);return{execute:function(t,n,r){var i=t[n+4],u=t[n+5];if(a&&r){var s=o(t[n+1]);s&&(0<u&&t.slice(n+6+i,n+6+i+u).forEach((function(t){(t=o(t))&&t.remove()})),0<i&&t.slice(n+6,n+6+i).forEach((function(r){var i=t[n+2];(r=o(r))&&(s.insertBefore(r,i&&o(i)||null),w(e,r),x(e,r))})))}return n+6+i+u}}},E=function(t,n,e,r,i){var o=i.executorsAllowed.includes(0);return{execute:function(e,r,a){if(o&&a){a=n.getNode(e[r+1]);var u=t.get(e[r+2]);e=0!==(e=e[r+4])?t.get(e-1):null,a&&null!=u&&(i.sanitizer?i.sanitizer.setAttribute(a,u,e):null==e?a.removeAttribute(u):a.setAttribute(u,e))}return r+5}}},R=function(t,n,e,r,i){var o=i.executorsAllowed.includes(1);return{execute:function(e,r,i){return o&&i&&(i=n.getNode(e[r+1]),e=e[r+2],i&&e&&(i.textContent=t.get(e))),r+3}}},T=function(t,n,e,r,i){var o=i.executorsAllowed.includes(3);return{execute:function(e,r,a){if(o&&a){a=n.getNode(e[r+1]);var u=t.get(e[r+2]),s=e[r+4];e=1===e[r+3]?1===s:0!==s?t.get(s):null,a&&u&&null!=e&&(i.sanitizer?i.sanitizer.setProperty(a,u,String(e)):a[u]=e)}return r+5}}},_=function(t,n,e,r,o){var a,u=o.executorsAllowed.includes(6),s=0;return{execute:function(t,n,e){if(u&&e&&o.longTask)if(6===t[n]){if(s++,!a){var r=new Promise((function(t){return a=t}));i().then((function(){return o.longTask&&o.longTask(r)}))}}else 7===t[n]&&(s--,a&&0>=s&&(a(),a=null,s=0));return n+2},get active(){return null!==a}}},M=new Float32Array(1),z=new Uint16Array(M.buffer);function D(t,n,e,r,i,o){for(var a=[],u=0;u<e;u++)switch(t[n++]){case 1:a.push(t[n++]);break;case 2:z[0]=t[n++],z[1]=t[n++],a.push(M[0]);break;case 3:a.push(r.get(t[n++]));break;case 4:var s=t[n++];n=D(t,n,s,r,i,o),a.push(n.args),n=n.offset;break;case 5:if(!o)throw Error("objectContext not provided.");a.push(o.get(t[n++]));break;case 6:s=i.getNode(t[n++]),a.push(s.getContext("2d"));break;case 7:a.push(i.getNode(t[n++]));break;default:throw Error("Cannot deserialize argument.")}return{args:a,offset:n}}var C=function(t,n,e,r,i){var o=i.executorsAllowed.includes(9);return{execute:function(e,i,a){var u,s=t.get(e[i+1]),c=e[i+2],f=D(e,i+3,1,t,n,r),l=f.offset;i=f.args[0];var h=D(e,l,c,t,n,r),p=h.offset,d=h.args;return o&&a&&(L(i,s)?i[s]=d[0]:(u=i)[s].apply(u,m(d))),p}}};function L(t,n){if(!t)throw Error("Property ".concat(n," does not exist on ").concat(t,"."));var e=Object.getOwnPropertyDescriptor(t,n);return void 0!==e?"set"in e:L(Object.getPrototypeOf(t),n)}var I=function(t,n,e,r,i){var o=i.executorsAllowed.includes(10);if(!r)throw Error("objectContext is not defined.");return{execute:function(e,i,a){var u,s=t.get(e[i+1]),c=e[i+2],f=e[i+3],l=D(e,i+4,1,t,n,r),h=l.offset;i=l.args[0];var p=D(e,h,f,t,n,r),d=p.offset,v=p.args;return o&&a&&"new"!==s&&r.store(c,(u=i)[s].apply(u,m(v))),d}}},N=function(t,n,e,r,i){var o=i.executorsAllowed.includes(11);return{execute:function(t,r,i){return o&&i&&(i=n.getNode(t[r+1]))&&self.createImageBitmap(i).then((function(n){e.messageToWorker({12:10,73:t[r+2],38:n},[n])})),r+3}}},F=function(t,n,e,r,i){var o=i.executorsAllowed.includes(12);return{execute:function(n,r,a){if(o&&a){a=n[r+1];var u=n[r+2],s=n[r+3],c=n[r+4];if(n=0<s?t.get(s-1):"",s=0<c?t.get(c-1):null,1===a)l=u,h=n,i.sanitizer&&2===l&&i.sanitizer.getStorage(l,h).then((function(t){e.messageToWorker({12:11,74:h,75:l,21:t})}));else if(2===a)if(a=u,u=n,n=s,i.sanitizer)i.sanitizer.setStorage(a,u,n);else{var f;if(0===a?f=window.localStorage:1===a&&(f=window.sessionStorage),f)if(null==u){if(null!=n)throw Error("Unexpected storage operation.");f.clear()}else null==n?f.removeItem(u):f.setItem(u,n)}}var l,h;return r+5}}},U=0,P={},B=function(t,n,e,r,i){var o=i.executorsAllowed.includes(13);return{execute:function(n,e){if(o){var r=n[e+1],i=n[e+2];n=n[e+3],n=t.hasIndex(n)?JSON.parse(t.get(n)):void 0,1===r?P[i].resolve(n):P[i].reject(n),delete P[i]}return e+4}}},W=function(t,n,e,r,i){var o=i.executorsAllowed.includes(14);return{execute:function(t,e,r){return o&&r&&(t=n.getNode(t[e+1]))&&t.scrollIntoView(),e+2}}},q=function(){function t(t,n,e,r,i){var o=this;this.nodeContext=this.stringContext=void 0,this.mutationQueue=[],this.pendingMutations=!1,this.executors=this.sanitizer=this.mutationPumpFunction=void 0,this.syncFlush=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=[];return o.mutationQueue.forEach((function(e){for(var r=e.length,i=0;i<r;){var a,u=e[i];if(!(a=t)){t:switch(u){case 4:case 5:case 6:case 7:case 12:case 8:case 13:a=!1;break t;default:a=!0}a=!a}a||n.push(u),i=o.executors[u].execute(e,i,a)}})),o.mutationQueue=[],o.pendingMutations=!1,n},this.stringContext=t,this.nodeContext=n,this.sanitizer=r.sanitizer,this.mutationPumpFunction=r.mutationPump,n=_.apply(null,t=[t,n,e,i,r]),this.executors={2:A.apply(null,t),0:E.apply(null,t),1:R.apply(null,t),3:T.apply(null,t),4:S.apply(null,t),5:j.apply(null,t),6:n,7:n,8:d.apply(null,t),9:C.apply(null,t),10:I.apply(null,t),11:N.apply(null,t),12:F.apply(null,t),13:B.apply(null,t),14:W.apply(null,t)}}return t.prototype.mutate=function(t,n,e,r){this.stringContext.storeValues(e),this.nodeContext.createNodes(n,this.sanitizer),this.mutationQueue=this.mutationQueue.concat(r),this.pendingMutations||(this.pendingMutations=!0,this.mutationPumpFunction(this.syncFlush,t))},t}(),J=function(){function t(){this.strings=[]}var n=t.prototype;return n.get=function(t){return this.strings[t]||""},n.hasIndex=function(t){return void 0!==this.strings[t]},n.store=function(t){return this.strings.push(t),this.strings.length-1},n.storeValues=function(t){var n=this;t.forEach((function(t){return n.store(t)}))},t}(),G=[8,3];function Y(t,n,e,r){var i=[].slice.call(t.childNodes).filter(e);return i={7:t._index_,11:0,0:t.nodeType,1:n(t.localName||t.nodeName),4:i.map((function(t){return Y(t,n,e,r)})),2:[].map.call(t.attributes||[],(function(t){return[n(t.namespaceURI||"null"),n(t.name),n(t.value)]}))},null!=t.namespaceURI&&(i[6]=n(t.namespaceURI)),G.includes(t.nodeType)&&null!==t.textContent&&(i[5]=n(t.textContent)),w(r,t),x(r,t),i}function $(){return $=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e,r=arguments[n];for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},$.apply(this,arguments)}var H=function(){function t(t,n){var e=this;this.readyPromiseResolve=this.iframe=this.readyPromise=this.onmessageerror=this.onmessage=this.onerror=this.url=void 0,this.url=t,this.iframe=window.document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-scripts"),this.iframe.setAttribute("style","display:none"),this.iframe.setAttribute("src",n),this.url=t,this.readyPromise=new Promise((function(t){e.readyPromiseResolve=t})),this.setupInit(),this.proxyFromWorker(),window.document.body.appendChild(this.iframe)}var n=t.prototype;return n.setupInit=function(){var t=this;window.addEventListener("message",(function n(e){e.source==t.iframe.contentWindow&&fetch(t.url.toString()).then((function(t){return t.text()})).then((function(r){var i=e.data;"iframe-ready"==i.type?t.iframe.contentWindow.postMessage({type:"init-worker",code:r},"*"):"worker-ready"===i.type&&(t.readyPromiseResolve(),window.removeEventListener("message",n))}))}))},n.proxyFromWorker=function(){var t=this;window.addEventListener("message",(function(n){if(n.source==t.iframe.contentWindow){var e=n.data,r=e.type,i=e.message;"onmessage"==r&&t.onmessage?t.onmessage($({},n,{data:i})):"onerror"===r&&t.onerror?t.onerror(i):"onmessageerror"===r&&t.onmessageerror&&t.onmessageerror($({},n,{data:i}))}}))},n.postMessage=function(t,n){var e=this,r={type:"postMessage",message:t};this.readyPromise.then((function(){e.iframe.contentWindow.postMessage(r,"*",n)}))},n.terminate=function(){this.iframe.contentWindow.postMessage({type:"terminate"},"*"),this.iframe.remove()},t}(),X=function(){function t(t,n,e,r,i){this[55]=void 0,this.nodeContext=n,this.config=i;var o=function(t,n,e){n=n.hydrateFilter||function(){return!0};var r=[],i=new Map;return{skeleton:Y(t,(function(t){if(i.has(t))return i.get(t);var n=r.length;return i.set(t,n),r.push(t),n}),n,e),strings:r}}(t,i,this),a=o.skeleton,u=o.strings;n=[];var s=[],c=V("localStorage"),f=V("sessionStorage");for(var l in t.style)n.push(l);for(var h in t)h.startsWith("on")&&s.push(h);e="'use strict';(function(){".concat(e,"self['window']=self;var workerDOM=WorkerThread.workerDOM;WorkerThread.hydrate(workerDOM.document,").concat(JSON.stringify(u),",").concat(JSON.stringify(a),",").concat(JSON.stringify(n),",").concat(JSON.stringify(s),",[").concat(window.innerWidth,",").concat(window.innerHeight,"],").concat(JSON.stringify(c),",").concat(JSON.stringify(f),");workerDOM.document[59](this);Object.assign(self,workerDOM);}).call(self);").concat(r,"//# sourceURL=").concat(encodeURI(i.authorURL)),this[55]=i.sandbox?new H(URL.createObjectURL(new Blob([e])),i.sandbox.iframeUrl):new Worker(URL.createObjectURL(new Blob([e]))),i.onCreateWorker&&i.onCreateWorker(t,u,a,n)}var n=t.prototype;return n.ready=function(){return this.worker.readyPromise||i()},n.messageToWorker=function(t,n){this.config.onSendMessage&&this.config.onSendMessage(t),this.worker.postMessage(t,n||[])},p(t,[{key:"worker",get:function(){return this[55]}}]),t}();function V(t,n){try{return n?{storage:n.getStorage("localStorage"==t?0:1),errorMsg:null}:{storage:window[t],errorMsg:null}}catch(t){return{errorMsg:t.message,storage:null}}}var K=function(){function t(){this.objects=void 0,this.objects=new Map}var n=t.prototype;return n.store=function(t,n){this.objects.set(t,n)},n.get=function(t){var n=this.objects.get(t);if(n)return n;throw Error("Object with id ("+t+") does not exist.")},t}(),Z=function(){function t(t,n){this.workerContext_=t,this.config=n}var n=t.prototype;return n.callFunction=function(t){if(!this.config.executorsAllowed.includes(13))throw Error("[worker-dom]: Error calling ".concat(t,". You must enable the FUNCTION_CALL executor within the config."));for(var n=function(){var t,n,e=new Promise((function(e,r){t=e,n=r}));U>=Number.MAX_VALUE&&(U=0);var r=U++;return P[r]={promise:e,resolve:t,reject:n},{promise:e,index:r}}(),e=n.promise,r=n.index,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t={12:12,77:t,78:JSON.stringify(o),7:r},this.workerContext_.messageToWorker(t),e},n.terminate=function(){this.workerContext_.worker.terminate()},p(t,[{key:"onerror",set:function(t){this.workerContext_.worker.onerror=t}}]),t}(),Q=[3,2],tt=function(t){return null===t.parentNode||(t=(t.parentNode.localName||t.parentNode.nodeName).toLowerCase(),!/amp-/.test(t)||"amp-script"===t)};function nt(t,n){for(var e=[],r=0,i=0;i<t.length;i++){var o=t[i];n(o,i,t)?e.push(o):(r<i&&(t[r]=o),r++)}return r<t.length&&(t.length=r),e}Array.isArray;var et=Object.prototype;function rt(t){var n=Object.create(null);return t&&Object.assign(n,t),n}function it(t){return 1==(null==t?void 0:t.nodeType)}function ot(t){return it(t)?t.tagName.toLowerCase()+(t.id?"#".concat(t.id):""):t}function at(t,n,e,r,i,o,a,u,s,c,f){return t}function ut(t,n){return t}function st(t,n,e,r,i,o,a,u,s,c,f){return function(t,n){var e,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Assertion failed";if(n)return n;t&&-1==i.indexOf(t)&&(i+=t);for(var o=3,a=i.split("%s"),u=a.shift(),s=[u];a.length;){var c=arguments[o++],f=a.shift();u+=ot(c)+f,s.push(c,f.trim())}var l=new Error(u);throw l.messageArray=nt(s,(function(t){return""!==t})),null===(e=(r=self).__AMP_REPORT_ERROR)||void 0===e||e.call(r,l),l}("",t,n,e,r,i,o,a,u,s,c,f)}function ct(t){return"fixed"==t||"fixed-height"==t||"responsive"==t||"fill"==t||"flex-item"==t||"fluid"==t||"intrinsic"==t}function ft(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function lt(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function ht(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?lt(Object(e),!0).forEach((function(n){ft(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):lt(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function pt(t,n,e){return(pt=s()?Reflect.construct:function(t,n,e){var r=[null];r.push.apply(r,n);var i=new(Function.bind.apply(t,r));return e&&a(i,e.prototype),i}).apply(null,arguments)}et.hasOwnProperty,et.toString;var mt=Object.entries,dt=Object.setPrototypeOf,vt=Object.isFrozen,bt=Object.getPrototypeOf,gt=Object.getOwnPropertyDescriptor,yt=Object.freeze,wt=Object.seal,xt=Object.create,kt="undefined"!=typeof Reflect&&Reflect,Ot=kt.apply,St=kt.construct;Ot||(Ot=function(t,n,e){return t.apply(n,e)}),yt||(yt=function(t){return t}),wt||(wt=function(t){return t}),St||(St=function(t,n){return pt(t,m(n))});var jt,At=Nt(Array.prototype.forEach),Et=Nt(Array.prototype.pop),Rt=Nt(Array.prototype.push),Tt=Nt(String.prototype.toLowerCase),_t=Nt(String.prototype.toString),Mt=Nt(String.prototype.match),zt=Nt(String.prototype.replace),Dt=Nt(String.prototype.indexOf),Ct=Nt(String.prototype.trim),Lt=Nt(RegExp.prototype.test),It=(jt=TypeError,function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return St(jt,n)});function Nt(t){return function(n){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return Ot(t,n,r)}}function Ft(t,n,e){e=e||Tt,dt&&dt(t,null);for(var r=n.length;r--;){var i=n[r];if("string"==typeof i){var o=e(i);o!==i&&(vt(n)||(n[r]=o),i=o)}t[i]=!0}return t}function Ut(t){for(var n,r=xt(null),i=function(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=e(t))||t&&"number"==typeof t.length){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(mt(t));!(n=i()).done;){var o=l(n.value,2),a=o[0],u=o[1];r[a]=u}return r}function Pt(t,n){for(;null!==t;){var e=gt(t,n);if(e){if(e.get)return Nt(e.get);if("function"==typeof e.value)return Nt(e.value)}t=bt(t)}return function(t){return console.warn("fallback value for",t),null}}var Bt=yt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Wt=yt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),qt=yt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Jt=yt(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Gt=yt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Yt=yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$t=yt(["#text"]),Ht=yt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Xt=yt(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Vt=yt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Kt=yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Zt=wt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Qt=wt(/<%[\w\W]*|[\w\W]*%>/gm),tn=wt(/\${[\w\W]*}/gm),nn=wt(/^data-[\-\w.\u00B7-\uFFFF]/),en=wt(/^aria-[\-\w]+$/),rn=wt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),on=wt(/^(?:\w+script|data):/i),an=wt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),un=wt(/^html$/i),sn=Object.freeze({__proto__:null,MUSTACHE_EXPR:Zt,ERB_EXPR:Qt,TMPLIT_EXPR:tn,DATA_ATTR:nn,ARIA_ATTR:en,IS_ALLOWED_URI:rn,IS_SCRIPT_OR_DATA:on,ATTR_WHITESPACE:an,DOCTYPE_NAME:un}),cn=function(){return"undefined"==typeof window?null:window},fn=function(t,n){if("object"!==c(t)||"function"!=typeof t.createPolicy)return null;var e=null,r="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(r)&&(e=n.currentScript.getAttribute(r));var i="dompurify"+(e?"#"+e:"");try{return t.createPolicy(i,{createHTML:function(t){return t},createScriptURL:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},ln=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:cn(),e=function(n){return t(n)};if(e.version="3.0.2",e.removed=[],!n||!n.document||9!==n.document.nodeType)return e.isSupported=!1,e;var r=n.document,i=n.document,o=n.DocumentFragment,a=n.HTMLTemplateElement,u=n.Node,s=n.Element,f=n.NodeFilter,l=n.NamedNodeMap,h=void 0===l?n.NamedNodeMap||n.MozNamedAttrMap:l,p=n.HTMLFormElement,d=n.DOMParser,v=n.trustedTypes,b=s.prototype,g=Pt(b,"cloneNode"),y=Pt(b,"nextSibling"),w=Pt(b,"childNodes"),x=Pt(b,"parentNode");if("function"==typeof a){var k=i.createElement("template");k.content&&k.content.ownerDocument&&(i=k.content.ownerDocument)}var O=fn(v,r),S=O?O.createHTML(""):"",j=i,A=j.implementation,E=j.createNodeIterator,R=j.createDocumentFragment,T=j.getElementsByTagName,_=r.importNode,M={};e.isSupported="function"==typeof mt&&"function"==typeof x&&A&&void 0!==A.createHTMLDocument;var z,D,C=sn.MUSTACHE_EXPR,L=sn.ERB_EXPR,I=sn.TMPLIT_EXPR,N=sn.DATA_ATTR,F=sn.ARIA_ATTR,U=sn.IS_SCRIPT_OR_DATA,P=sn.ATTR_WHITESPACE,B=sn.IS_ALLOWED_URI,W=null,q=Ft({},[].concat(m(Bt),m(Wt),m(qt),m(Gt),m($t))),J=null,G=Ft({},[].concat(m(Ht),m(Xt),m(Vt),m(Kt))),Y=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,H=null,X=!0,V=!0,K=!1,Z=!0,Q=!1,tt=!1,nt=!1,et=!1,rt=!1,it=!1,ot=!1,at=!0,ut=!1,st="user-content-",ct=!0,ft=!1,lt={},ht=null,pt=Ft({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),dt=null,vt=Ft({},["audio","video","img","source","image","track"]),bt=null,gt=Ft({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),wt="http://www.w3.org/1998/Math/MathML",xt="http://www.w3.org/2000/svg",kt="http://www.w3.org/1999/xhtml",Ot=kt,St=!1,jt=null,Nt=Ft({},[wt,xt,kt],_t),Zt=["application/xhtml+xml","text/html"],Qt="text/html",tn=null,nn=i.createElement("form"),en=function(t){return t instanceof RegExp||t instanceof Function},on=function(t){tn&&tn===t||(t&&"object"===c(t)||(t={}),t=Ut(t),z=z=-1===Zt.indexOf(t.PARSER_MEDIA_TYPE)?Qt:t.PARSER_MEDIA_TYPE,D="application/xhtml+xml"===z?_t:Tt,W="ALLOWED_TAGS"in t?Ft({},t.ALLOWED_TAGS,D):q,J="ALLOWED_ATTR"in t?Ft({},t.ALLOWED_ATTR,D):G,jt="ALLOWED_NAMESPACES"in t?Ft({},t.ALLOWED_NAMESPACES,_t):Nt,bt="ADD_URI_SAFE_ATTR"in t?Ft(Ut(gt),t.ADD_URI_SAFE_ATTR,D):gt,dt="ADD_DATA_URI_TAGS"in t?Ft(Ut(vt),t.ADD_DATA_URI_TAGS,D):vt,ht="FORBID_CONTENTS"in t?Ft({},t.FORBID_CONTENTS,D):pt,$="FORBID_TAGS"in t?Ft({},t.FORBID_TAGS,D):{},H="FORBID_ATTR"in t?Ft({},t.FORBID_ATTR,D):{},lt="USE_PROFILES"in t&&t.USE_PROFILES,X=!1!==t.ALLOW_ARIA_ATTR,V=!1!==t.ALLOW_DATA_ATTR,K=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Q=t.SAFE_FOR_TEMPLATES||!1,tt=t.WHOLE_DOCUMENT||!1,rt=t.RETURN_DOM||!1,it=t.RETURN_DOM_FRAGMENT||!1,ot=t.RETURN_TRUSTED_TYPE||!1,et=t.FORCE_BODY||!1,at=!1!==t.SANITIZE_DOM,ut=t.SANITIZE_NAMED_PROPS||!1,ct=!1!==t.KEEP_CONTENT,ft=t.IN_PLACE||!1,B=t.ALLOWED_URI_REGEXP||rn,Ot=t.NAMESPACE||kt,Y=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&en(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Y.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&en(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Y.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Y.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&(V=!1),it&&(rt=!0),lt&&(W=Ft({},m($t)),J=[],!0===lt.html&&(Ft(W,Bt),Ft(J,Ht)),!0===lt.svg&&(Ft(W,Wt),Ft(J,Xt),Ft(J,Kt)),!0===lt.svgFilters&&(Ft(W,qt),Ft(J,Xt),Ft(J,Kt)),!0===lt.mathMl&&(Ft(W,Gt),Ft(J,Vt),Ft(J,Kt))),t.ADD_TAGS&&(W===q&&(W=Ut(W)),Ft(W,t.ADD_TAGS,D)),t.ADD_ATTR&&(J===G&&(J=Ut(J)),Ft(J,t.ADD_ATTR,D)),t.ADD_URI_SAFE_ATTR&&Ft(bt,t.ADD_URI_SAFE_ATTR,D),t.FORBID_CONTENTS&&(ht===pt&&(ht=Ut(ht)),Ft(ht,t.FORBID_CONTENTS,D)),ct&&(W["#text"]=!0),tt&&Ft(W,["html","head","body"]),W.table&&(Ft(W,["tbody"]),delete $.tbody),yt&&yt(t),tn=t)},an=Ft({},["mi","mo","mn","ms","mtext"]),ln=Ft({},["foreignobject","desc","title","annotation-xml"]),hn=Ft({},["title","style","font","a","script"]),pn=Ft({},Wt);Ft(pn,qt),Ft(pn,Jt);var mn=Ft({},Gt);Ft(mn,Yt);var dn=function(t){var n=x(t);n&&n.tagName||(n={namespaceURI:Ot,tagName:"template"});var e=Tt(t.tagName),r=Tt(n.tagName);return!!jt[t.namespaceURI]&&(t.namespaceURI===xt?n.namespaceURI===kt?"svg"===e:n.namespaceURI===wt?"svg"===e&&("annotation-xml"===r||an[r]):Boolean(pn[e]):t.namespaceURI===wt?n.namespaceURI===kt?"math"===e:n.namespaceURI===xt?"math"===e&&ln[r]:Boolean(mn[e]):t.namespaceURI===kt?!(n.namespaceURI===xt&&!ln[r])&&!(n.namespaceURI===wt&&!an[r])&&!mn[e]&&(hn[e]||!pn[e]):!("application/xhtml+xml"!==z||!jt[t.namespaceURI]))},vn=function(t){Rt(e.removed,{element:t});try{t.parentNode.removeChild(t)}catch(n){t.remove()}},bn=function(t,n){try{Rt(e.removed,{attribute:n.getAttributeNode(t),from:n})}catch(t){Rt(e.removed,{attribute:null,from:n})}if(n.removeAttribute(t),"is"===t&&!J[t])if(rt||it)try{vn(n)}catch(t){}else try{n.setAttribute(t,"")}catch(t){}},gn=function(t){var n,e;if(et)t="<remove></remove>"+t;else{var r=Mt(t,/^[\r\n\t ]+/);e=r&&r[0]}"application/xhtml+xml"===z&&Ot===kt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var o=O?O.createHTML(t):t;if(Ot===kt)try{n=(new d).parseFromString(o,z)}catch(t){}if(!n||!n.documentElement){n=A.createDocument(Ot,"template",null);try{n.documentElement.innerHTML=St?S:o}catch(t){}}var a=n.body||n.documentElement;return t&&e&&a.insertBefore(i.createTextNode(e),a.childNodes[0]||null),Ot===kt?T.call(n,tt?"html":"body")[0]:tt?n.documentElement:a},yn=function(t){return E.call(t.ownerDocument||t,t,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null,!1)},wn=function(t){return t instanceof p&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof h)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},xn=function(t){return"object"===c(u)?t instanceof u:t&&"object"===c(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},kn=function(t,n,r){M[t]&&At(M[t],(function(t){t.call(e,n,r,tn)}))},On=function(t){var n;if(kn("beforeSanitizeElements",t,null),wn(t))return vn(t),!0;var r=D(t.nodeName);if(kn("uponSanitizeElement",t,{tagName:r,allowedTags:W}),t.hasChildNodes()&&!xn(t.firstElementChild)&&(!xn(t.content)||!xn(t.content.firstElementChild))&&Lt(/<[/\w]/g,t.innerHTML)&&Lt(/<[/\w]/g,t.textContent))return vn(t),!0;if(!W[r]||$[r]){if(!$[r]&&jn(r)){if(Y.tagNameCheck instanceof RegExp&&Lt(Y.tagNameCheck,r))return!1;if(Y.tagNameCheck instanceof Function&&Y.tagNameCheck(r))return!1}if(ct&&!ht[r]){var i=x(t)||t.parentNode,o=w(t)||t.childNodes;if(o&&i)for(var a=o.length-1;a>=0;--a)i.insertBefore(g(o[a],!0),y(t))}return vn(t),!0}return t instanceof s&&!dn(t)?(vn(t),!0):"noscript"!==r&&"noembed"!==r||!Lt(/<\/no(script|embed)/i,t.innerHTML)?(Q&&3===t.nodeType&&(n=t.textContent,n=zt(n,C," "),n=zt(n,L," "),n=zt(n,I," "),t.textContent!==n&&(Rt(e.removed,{element:t.cloneNode()}),t.textContent=n)),kn("afterSanitizeElements",t,null),!1):(vn(t),!0)},Sn=function(t,n,e){if(at&&("id"===n||"name"===n)&&(e in i||e in nn))return!1;if(V&&!H[n]&&Lt(N,n));else if(X&&Lt(F,n));else if(!J[n]||H[n]){if(!(jn(t)&&(Y.tagNameCheck instanceof RegExp&&Lt(Y.tagNameCheck,t)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(t))&&(Y.attributeNameCheck instanceof RegExp&&Lt(Y.attributeNameCheck,n)||Y.attributeNameCheck instanceof Function&&Y.attributeNameCheck(n))||"is"===n&&Y.allowCustomizedBuiltInElements&&(Y.tagNameCheck instanceof RegExp&&Lt(Y.tagNameCheck,e)||Y.tagNameCheck instanceof Function&&Y.tagNameCheck(e))))return!1}else if(bt[n]);else if(Lt(B,zt(e,P,"")));else if("src"!==n&&"xlink:href"!==n&&"href"!==n||"script"===t||0!==Dt(e,"data:")||!dt[t])if(K&&!Lt(U,zt(e,P,"")));else if(e)return!1;return!0},jn=function(t){return t.indexOf("-")>0},An=function(t){var n,r,i,o;kn("beforeSanitizeAttributes",t,null);var a=t.attributes;if(a){var u={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:J};for(o=a.length;o--;){var s=n=a[o],f=s.name,l=s.namespaceURI;if(r="value"===f?n.value:Ct(n.value),i=D(f),u.attrName=i,u.attrValue=r,u.keepAttr=!0,u.forceKeepAttr=void 0,kn("uponSanitizeAttribute",t,u),r=u.attrValue,!u.forceKeepAttr&&(bn(f,t),u.keepAttr))if(Z||!Lt(/\/>/i,r)){Q&&(r=zt(r,C," "),r=zt(r,L," "),r=zt(r,I," "));var h=D(t.nodeName);if(Sn(h,i,r)){if(!ut||"id"!==i&&"name"!==i||(bn(f,t),r=st+r),O&&"object"===c(v)&&"function"==typeof v.getAttributeType)if(l);else switch(v.getAttributeType(h,i)){case"TrustedHTML":r=O.createHTML(r);break;case"TrustedScriptURL":r=O.createScriptURL(r)}try{l?t.setAttributeNS(l,f,r):t.setAttribute(f,r),Et(e.removed)}catch(t){}}}else bn(f,t)}kn("afterSanitizeAttributes",t,null)}},En=function t(n){var e,r=yn(n);for(kn("beforeSanitizeShadowDOM",n,null);e=r.nextNode();)kn("uponSanitizeShadowNode",e,null),On(e)||(e.content instanceof o&&t(e.content),An(e));kn("afterSanitizeShadowDOM",n,null)};return e.sanitize=function(t){var n,i,a,s,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((St=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!xn(t)){if("function"!=typeof t.toString)throw It("toString is not a function");if("string"!=typeof(t=t.toString()))throw It("dirty is not a string, aborting")}if(!e.isSupported)return t;if(nt||on(c),e.removed=[],"string"==typeof t&&(ft=!1),ft){if(t.nodeName){var f=D(t.nodeName);if(!W[f]||$[f])throw It("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)1===(i=(n=gn("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?n=i:n.appendChild(i);else{if(!rt&&!Q&&!tt&&-1===t.indexOf("<"))return O&&ot?O.createHTML(t):t;if(!(n=gn(t)))return rt?null:ot?S:""}n&&et&&vn(n.firstChild);for(var l=yn(ft?t:n);a=l.nextNode();)On(a)||(a.content instanceof o&&En(a.content),An(a));if(ft)return t;if(rt){if(it)for(s=R.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(J.shadowroot||J.shadowrootmod)&&(s=_.call(r,s,!0)),s}var h=tt?n.outerHTML:n.innerHTML;return tt&&W["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&Lt(un,n.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+h),Q&&(h=zt(h,C," "),h=zt(h,L," "),h=zt(h,I," ")),O&&ot?O.createHTML(h):h},e.setConfig=function(t){on(t),nt=!0},e.clearConfig=function(){tn=null,nt=!1},e.isValidAttribute=function(t,n,e){tn||on({});var r=D(t),i=D(n);return Sn(r,i,e)},e.addHook=function(t,n){"function"==typeof n&&(M[t]=M[t]||[],Rt(M[t],n))},e.removeHook=function(t){if(M[t])return Et(M[t])},e.removeHooks=function(t){M[t]&&(M[t]=[])},e.removeAllHooks=function(){M={}},e}();function hn(t){return function(t,n){var e=n.documentElement;return["⚡4email","amp4email"].some((function(t){return e.hasAttribute(t)}))}(0,t)}var pn=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function mn(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(t)}catch(t){return n}}function dn(t){var n,e=rt();if(!t)return e;for(;n=pn.exec(t);){var r=mn(n[1],n[1]),i=n[2]?mn(n[2].replace(/\+/g," "),n[2]):"";e[r]=i}return e}function vn(t){var n=(t||self).location;return dn(n.originalHash||n.hash)}var bn="";function gn(t){var n;return bn||(bn=(null===(n=t.AMP_CONFIG)||void 0===n?void 0:n.v)||"01".concat("2402231941000")),bn}function yn(t,n){var e=n||vn(t);return["1","actions","amp","amp4ads","amp4email"].includes(e.development)||!!t.AMP_DEV_MODE}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var wn=self.__AMP_LOG;function xn(t,n){throw new Error("failed to call initLogConstructor")}function kn(t){return wn.user||(wn.user=On()),function(t,n){return n&&n.ownerDocument.defaultView!=t}(wn.user.win,t)?wn.userForEmbed||(wn.userForEmbed=On()):wn.user}function On(t){return xn()}function Sn(){return wn.dev||(wn.dev=xn())}function jn(t,n,e,r,i,o,a,u,s,c,f){return t}function An(t,n,e,r,i,o,a,u,s,c,f){return kn().assert(t,n,e,r,i,o,a,u,s,c,f)}var En=/(\S+)(?:\s+(?:(-?\d+(?:\.\d+)?)([a-zA-Z]*)))?\s*(?:,|$)/g,Rn=function(){function t(t){st(t.length>0,"Srcset must have at least one source"),this.KT=t;for(var n=!1,e=!1,r=0;r<t.length;r++){var i=t[r];n=n||!!i.width,e=e||!!i.dpr}st(!(n===e),"Srcset must have width or dpr sources, but not both"),t.sort(n?Tn:_n),this.aR=n}var n=t.prototype;return n.select=function(t,n){var e;return at(t),at(n),e=this.aR?this.uR(t*n):this.sR(n),this.KT[e].url},n.uR=function(t){for(var n=this.KT,e=0,r=1/0,i=1/0,o=0;o<n.length;o++){var a,u=null!==(a=n[o].width)&&void 0!==a?a:0,s=Math.abs(u-t);if(!(s<=1.1*r||t/i>1.2))break;e=o,r=s,i=u}return e},n.sR=function(t){for(var n=this.KT,e=0,r=1/0,i=0;i<n.length;i++){var o=Math.abs(n[i].dpr-t);if(!(o<=r))break;e=i,r=o}return e},n.getUrls=function(){return this.KT.map((function(t){return t.url}))},n.stringify=function(t){for(var n=[],e=this.KT,r=0;r<e.length;r++){var i=e[r],o=i.url;t&&(o=t(o)),this.aR?o+=" ".concat(i.width,"w"):o+=" ".concat(i.dpr,"x"),n.push(o)}return n.join(", ")},t}();function Tn(t,n){return st(t.width!=n.width,"Duplicate width: %s",t.width),t.width-n.width}function _n(t,n){return st(t.dpr!=n.dpr,"Duplicate dpr: %s",t.dpr),t.dpr-n.dpr}var Mn=function(){function t(t){this.Lt=t,this.Ht=0,this.Ft=0,this.Gt=rt()}var n=t.prototype;return n.has=function(t){return!!this.Gt[t]},n.get=function(t){var n=this.Gt[t];if(n)return n.access=++this.Ft,n.payload},n.put=function(t,n){this.has(t)||this.Ht++,this.Gt[t]={payload:n,access:this.Ft},this.zt()},n.zt=function(){if(!(this.Ht<=this.Lt)){var t,n=this.Gt,e=this.Ft+1;for(var r in n){var i=n[r].access;i<e&&(e=i,t=r)}void 0!==t&&(delete n[t],this.Ht--)}},t}(),zn=function(){return self.AMP.config.urls}();function Dn(t,n){return Un(t=In(t),n)}function Cn(t,n){var e=Fn(Nn(t));return Wn(e,n)?Un(e,n):null}function Ln(t,n){return Pn(Fn(t),n)}function In(t){return t.__AMP_TOP||(t.__AMP_TOP=t)}function Nn(t){return t.nodeType?(e=t,n=(e.ownerDocument||e).defaultView,Dn(n,"ampdoc")).getAmpDoc(t):t;var n,e}function Fn(t){var n=Nn(t);return n.isSingleDoc()?n.win:n}function Un(t,n){jn(Wn(t,n));var e=Bn(t)[n];return e.obj||(jn(e.ctor),jn(e.context),e.obj=new e.ctor(e.context),jn(e.obj),e.context=null,e.resolve&&e.resolve(e.obj)),e.obj}function Pn(t,n){var e=Bn(t)[n];return e?e.promise?e.promise:(Un(t,n),e.promise=Promise.resolve(e.obj)):null}function Bn(t){var n=t.__AMP_SERVICES;return n||(n=t.__AMP_SERVICES={}),n}function Wn(t,n){var e=t.__AMP_SERVICES&&t.__AMP_SERVICES[n];return!(!e||!e.ctor)}function qn(t,n,e,r){var i=Ln(t,n);if(i)return i;var a=Nn(t);return a.whenExtensionsKnown().then((function(){var t=a.getExtensionVersion(e);return t?Dn(a.win,"extensions").waitForExtension(e,t):null})).then((function(e){return e?r?Ln(t,n):function(t,n){return function(t,n){var e=Pn(t,n);if(e)return e;var r,i,a,u,s=Bn(t);return s[n]=(i=(r=new o).promise,a=r.reject,u=r.resolve,i.catch((function(){})),{obj:null,promise:i,resolve:u,reject:a,context:null,ctor:null}),s[n].promise}(Fn(t),n)}(t,n):null}))}var Jn,Gn,Yn=function(t){return function(t,n,e){var r=Cn(t,n);return r?Promise.resolve(r):qn(t,n,"amp-bind")}(t,"bind")},$n=function(t){return Dn(t,"xhr")},Hn=function(){return self.AMP.config.urls}(),Xn=new Set(["c","v","a","ad"]),Vn=function(t){return"string"==typeof t?Kn(t):t};function Kn(t,n){return Jn||(Jn=self.document.createElement("a"),Gn=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new Mn(100))),function(t,n,e){if(e&&e.has(n))return e.get(n);t.href=n,t.protocol||(t.href=t.href);var r,i={href:t.href,protocol:t.protocol,host:t.host,hostname:t.hostname,port:"0"==t.port?"":t.port,pathname:t.pathname,search:t.search,hash:t.hash,origin:null};"/"!==i.pathname[0]&&(i.pathname="/"+i.pathname),("http:"==i.protocol&&80==i.port||"https:"==i.protocol&&443==i.port)&&(i.port="",i.host=i.hostname),r=t.origin&&"null"!=t.origin?t.origin:"data:"!=i.protocol&&i.host?i.protocol+"//"+i.host:i.href,i.origin=r;var o=i;return e&&e.put(n,o),o}(Jn,t,n?null:Gn)}function Zn(t){return Hn.cdnProxyRegex.test(Vn(t).origin)}function Qn(t,n){return n=Vn(n),"function"==typeof URL?new URL(t,n.href).toString():function(t,n){n=Vn(n);var e=Kn(t=t.replace(/\\/g,"/"));return t.toLowerCase().startsWith(e.protocol)?e.href:t.startsWith("//")?n.protocol+t:t.startsWith("/")?n.origin+t:n.origin+n.pathname.replace(/\/[^/]*$/,"/")+t}(t,n)}var te=function(){return self.AMP.config.urls}();function ne(t,n,e){return ee(n)?function(t,n,e,r){var i;An(!("__amp_source_origin"in dn(Kn(i=e).search)),"Source origin is not allowed in %s",i);var o=Zn(r),a=Kn(function(t){if(!Zn(t=Vn(t)))return t.href;var n=t.pathname.split("/"),e=n[1];An(Xn.has(e),"Unknown path prefix in url %s",t.href);var r=n[2],i="s"==r?"https://"+decodeURIComponent(n[3]):"http://"+decodeURIComponent(r);return An(i.indexOf(".")>0,"Expected a . in origin %s",i),n.splice(1,"s"==r?3:2),i+n.join("/")+function(t,n){if(!t||"?"==t)return"";var e=new RegExp("[?&]".concat("(amp_(js[^&=]*|gsa|r|kit)|usqp)","\\b[^&]*"),"g"),r=t.replace(e,"").replace(/^[?&]/,"");return r?"?"+r:""}(t.search)+(t.hash||"")}(r));if("href"==n&&!e.startsWith("#"))return Qn(e,a);if("src"==n)return"amp-img"==t?re(e,a,o):Qn(e,a);if("srcset"==n){var u;try{u=function(t){for(var n,e=[];n=En.exec(t);){var r=n[1],i=void 0,o=void 0;if(n[2]){var a=n[3].toLowerCase();if("w"==a)i=parseInt(n[2],10);else{if("x"!=a)continue;o=parseFloat(n[2])}}else o=1;e.push({url:r,width:i,dpr:o})}return new Rn(e)}(e)}catch(t){return kn().error("URL-REWRITE","Failed to parse srcset: ",t),e}return u.stringify((function(t){return re(t,a,o)}))}return e}(t,n,e,self.location):e}function ee(t){return"src"==t||"href"==t||"xlink:href"==t||"srcset"==t}function re(t,n,e){var r=Kn(Qn(t,n));return"data:"==r.protocol||Zn(r)||!e?r.href:"".concat(te.cdn,"/i/")+("https:"==r.protocol?"s/":"")+encodeURIComponent(r.host)+r.pathname+(r.search||"")+(r.hash||"")}var ie="data-amp-bind-",oe="i-amphtml-key",ae={"AMP-IMG":["src","srcset","layout","width","height"]},ue={"applet":!0,"audio":!0,"base":!0,"embed":!0,"frame":!0,"frameset":!0,"iframe":!0,"img":!0,"link":!0,"meta":!0,"object":!0,"style":!0,"video":!0},se={"amp-accordion":!0,"amp-anim":!0,"amp-bind-macro":!0,"amp-carousel":!0,"amp-fit-text":!0,"amp-img":!0,"amp-layout":!0,"amp-selector":!0,"amp-sidebar":!0,"amp-timeago":!0},ce=["a","amp-img","article","aside","b","blockquote","br","caption","code","col","colgroup","dd","del","details","div","dl","dt","em","figcaption","figure","footer","h1","h2","h3","header","hr","i","ins","li","main","mark","nav","ol","p","pre","q","s","section","small","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","u","ul"],fe=["a","article","aside","b","blockquote","br","caption","code","col","colgroup","dd","del","details","div","dl","dt","em","figcaption","figure","footer","h1","h2","h3","header","hr","i","ins","li","main","mark","nav","ol","p","pre","q","s","section","small","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","u","ul"],le=["amp-fx","fallback","heights","layout","min-font-size","max-font-size","on","option","placeholder","submitting","submit-success","submit-error","validation-for","verify-error","visible-when-invalid","href","style","text","subscriptions-action","subscriptions-actions","subscriptions-decorate","subscriptions-dialog","subscriptions-display","subscriptions-section","subscriptions-service","subscriptions-google-rtc","amp-nested-submenu","amp-nested-submenu-open","amp-nested-submenu-close","itemprop"],he={"a":["rel","target"],"div":["template"],"form":["action-xhr","verify-xhr","custom-validation-reporting","target"],"input":["mask-output"],"template":["type"],"textarea":["autoexpand"]},pe=["_top","_blank"],me=/^(?:\w+script|data|blob):/i,de=/^(?:blob):/i,ve=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,be=Object.freeze({"input":{"type":/(?:image|button)/i}}),ge=Object.freeze({"input":{"type":/(?:button|file|image|password)/i}}),ye=Object.freeze(["form","formaction","formmethod","formtarget","formnovalidate","formenctype"]),we=Object.freeze({"input":ye,"textarea":ye,"select":ye}),xe=Object.freeze({"amp-anim":["controls"],"form":["name"]}),ke=/!important|position\s*:\s*fixed|position\s*:\s*sticky/i;function Oe(t,n,e,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=e?e.replace(ve,""):"";if(!i){if(n.startsWith("on")&&"on"!=n)return!1;var a=o.toLowerCase();if(a.indexOf("<script")>=0||a.indexOf("</script")>=0)return!1;if(me.test(o))return!1}if(de.test(o))return!1;if("style"==n)return!ke.test(e);if("class"==n&&e&&/(^|\W)i-amphtml-/i.test(e))return!1;if(ee(n)&&/__amp_source_origin/.test(e))return!1;var u=hn(r),s=Object.assign(rt(),we,u?xe:{})[t];if(s&&-1!=s.indexOf(n))return!1;var c=Object.assign(rt(),be,u?ge:{})[t];if(c){var f=c[n];if(f&&-1!=e.search(f))return!1}return!0}var Se="purifier",je={"script":{"attribute":"type","values":["application/json","application/ld+json"]}},Ae={USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}},Ee=function(){function t(t,n,e){this.zl=t,this.cR=1,this.fR=ln(self),this.lR=ln(self);var r=Object.assign(n||{},ht(ht({},Ae),{},{ADD_ATTR:le,ADD_TAGS:["use"],FORBID_TAGS:Object.keys(ue),FORCE_BODY:!0,RETURN_DOM:!0,ALLOW_UNKNOWN_PROTOCOLS:!0}));this.fR.setConfig(r),this.pR(this.fR,e),this.mR(this.lR)}var n=t.prototype;return n.purifyHtml=function(t){return this.fR.sanitize(t)},n.purifyTagsForTripleMustache=function(t){var n=this.lR.sanitize(t,{"ALLOWED_TAGS":hn(this.zl)?fe:ce,"FORCE_BODY":!0,"RETURN_DOM_FRAGMENT":!0}),e=this.zl.createElement("div");return e.appendChild(n),e.innerHTML},n.getAllowedTags=function(){var t={};this.fR.addHook("uponSanitizeElement",(function(n,e){Object.assign(t,e.allowedTags)}));var n=this.zl.createElement("p");return this.fR.sanitize(n),Object.keys(ue).forEach((function(n){t[n]=!1})),this.fR.removeHook("uponSanitizeElement"),t},n.validateAttributeChange=function(t,n,e){var r=t.nodeName.toLowerCase(),i=je[r];if(i){var o=i.attribute,a=i.values;if(o===n&&(null==e||!a.includes(e)))return!1}if("a"===r&&"target"===n&&(null==e||!pe.includes(e)))return!1;if(null==e)return!0;if(Te(n)!==Re.NONE)return!1;if(!this.fR.isValidAttribute(r,n,e)){var u=he[r];if(!(u&&u.includes(n)||r.startsWith("amp-")))return!1}var s=t.ownerDocument?t.ownerDocument:t;return!(e&&!Oe(r,n,e,s,!0))},n.pR=function(t,n){var e,r,i=this,o=hn(this.zl),a=[],u=[];t.addHook("uponSanitizeElement",(function(t,n){var r=n.tagName;if(e=n.allowedTags,r.startsWith("amp-")&&(e[r]=!o||se[r]),"a"===r){var i=ut(t);i.hasAttribute("href")&&!i.hasAttribute("target")&&i.setAttribute("target","_top")}var u=je[r];if(u){var s=u.attribute,c=u.values,f=ut(t);f.hasAttribute(s)&&c.includes(f.getAttribute(s))&&(e[r]=!0,a.push(r))}})),t.addHook("afterSanitizeElements",(function(t){a.forEach((function(t){delete e[t]})),a.length=0})),t.addHook("uponSanitizeAttribute",(function(t,e){var o=t.nodeName.toLowerCase(),a=e.attrName,s=e.attrValue;r=e.allowedAttributes;var c=function(){r[a]||(r[a]=!0,u.push(a))};if(o.startsWith("amp-"))c();else{if("a"==o&&"target"==a){var f=s.toLowerCase();s=pe.includes(f)?f:"_top"}var l=he[o];l&&l.includes(a)&&c()}var h=Te(a);if(h===Re.CLASSIC){var p=a.substring(1,a.length-1);t.setAttribute("".concat(ie).concat(p),s)}h!==Re.NONE&&t.setAttribute("i-amphtml-binding",""),Oe(o,a,s,i.zl,!0)?n&&s&&!a.startsWith(ie)&&(s=n(o,a,s)):(e.keepAttr=!1,kn().error(Se,'Removed invalid attribute %s[%s="%s"].',o,a,s)),e.attrValue=s})),t.addHook("afterSanitizeAttributes",(function(t){!function(t,n){var e=t.tagName.startsWith("AMP-"),r=t.hasAttribute("i-amphtml-binding");!r&&ae[t.tagName]?t.setAttribute("i-amphtml-ignore",""):(r||e)&&(t.hasAttribute(oe)||t.setAttribute(oe,String(i.cR++)))}(t),u.forEach((function(t){delete r[t]})),u.length=0,"use"===t.nodeName.toLowerCase()&&["href","xlink:href"].forEach((function(n){t.hasAttribute(n)&&!t.getAttribute(n).startsWith("#")&&(function(t){var n;null===(n=t.parentElement)||void 0===n||n.removeChild(t)}(t),kn().error(Se,'Removed invalid <use>. use[href] must start with "#".'))}))}))},n.mR=function(t){var n;t.addHook("uponSanitizeElement",(function(t,e){var r=e.tagName;if(n=e.allowedTags,"template"===r){var i=t.getAttribute("type");i&&"amp-mustache"===i.toLowerCase()&&(n.template=!0)}})),t.addHook("afterSanitizeElements",(function(t){n.template=!1}))},t}(),Re={NONE:0,CLASSIC:1,ALTERNATIVE:2};function Te(t){return"["==t[0]&&"]"==t[t.length-1]?Re.CLASSIC:t.startsWith(ie)?Re.ALTERNATIVE:Re.NONE}var _e=["change","click","dblclick","input","keypress","submit","keydown"],Me=function(){function t(t){var n=this;this.Fe=t,this.OW=this.SW.bind(this),this.jW=0,this.AW=!1,_e.forEach((function(t){n.Fe.addEventListener(t,n.OW,!0)}))}var n=t.prototype;return n.dispose=function(){var t=this;_e.forEach((function(n){t.Fe.removeEventListener(n,t.OW,!0)}))},n.hasBeenActive=function(){return this.jW>0},n.isActive=function(){return this.jW>0&&Date.now()-this.jW<=5e3||this.AW},n.getLastActivationTime=function(){return this.jW},n.expandLongTask=function(t){var n=this;if(this.isActive()){jn(!this.AW),this.AW=!0;var e=function(){n.AW=!1,n.jW=Date.now()};t.then(e,e)}},n.isInLongTask=function(){return this.AW},n.SW=function(t){t.isTrusted&&(this.jW=Date.now())},t}(),ze=self.__AMP_ERRORS||[];self.__AMP_ERRORS=ze;var De=function(){return self.AMP.config.urls}(),Ce="amp-script",Le=15e4,Ie=3e5,Ne=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&a(t,n)}(i,t);var n,e,r=(n=i,e=s(),function(){var t,r=u(n);if(e){var i=u(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return f(this,t)});function i(t){var n;return(n=r.call(this,t))._o=Dn(n.win,"vsync"),n.EW=null,n.RW=null,n.TW=null,n._W="amp-script[unknown].js",n.MW=!1,n.zW=!1,n.Pe=new o,n.DW=!1,n.LW=!1,n.IW=!1,n}var c=i.prototype;return c.isLayoutSupported=function(t){return"container"==t||ct(t)},c.buildCallback=function(){var t,n,e,r=this;return this.IW=this.element.hasAttribute("sandboxed"),this.LW=this.IW||this.element.hasAttribute("nodom"),this.DW=this.element.hasAttribute("data-ampdevmode")||this.element.ownerDocument.documentElement.hasAttribute("data-ampdevmode"),this.DW&&kn().warn(Ce,"JavaScript size and script hash requirements are disabled in development mode.",this.element),this.LW&&(this.element.hasAttribute("width")||this.element.hasAttribute("height")||this.element.hasAttribute("layout"))&&kn().warn(Ce,"Cannot set width, height, or layout of a nodom <amp-script>",this.element),(t=this.element,n=Ce,e=Ce,qn(t,n,e,undefined).then((function(t){return function(t,n,e){return An(t,"Service %s was requested to be provided through %s, but %s is not loaded in the current page. To fix this problem load the JavaScript file for %s in this page.","amp-script",e,e,e)}(t,0,e)}))).then((function(t){r.setService(t)}))},c.onLayoutMeasure=function(){if(!this.MW&&!this.zW){var t=this.getLayoutSize(),n=t.height;t.width*n!=0||this.LW||(this.zW=!0,kn().warn(Ce,"Skipped initializing amp-script due to zero width or height.",this.element))}},c.setService=function(t){this.TW=t},c.getUserActivation=function(){return this.RW},c.callFunction=function(t,n){var e=arguments,r=this;return this.Pe.promise.then((function(){return r.EW?r.EW.callFunction.apply(r.EW,e):Promise.reject(new Error("Attempted to call a function on an amp-script which failed initialization."))}))},c.layoutCallback=function(){var t,n,e=this;if(this.MW=!0,this.element.sizerElement){(n=t=this.win.document.createElement("div")).classList.add("i-amphtml-fill-content"),n.classList.add("i-amphtml-replaced-content");for(var r=function(t){return function(t,n){for(var e=[],r=t.firstElementChild;r;r=r.nextElementSibling)void 0,a=void 0,"string"==typeof(o=i=r)?a=o:it(o)&&(a=o.tagName),!(a&&a.toLowerCase().startsWith("i-")||i.nodeType===Node.ELEMENT_NODE&&(ut(i),i.hasAttribute("placeholder")||i.hasAttribute("fallback")||i.hasAttribute("overflow")))&&e.push(r);var i,o,a;return e}(t)}(this.element),i=0;i<r.length;i++)t.appendChild(r[i]);this.element.appendChild(t)}this.RW=new Me(this.element),this._W=this.element.hasAttribute("src")?'amp-script[src="'.concat(this.element.getAttribute("src"),'"].js'):'amp-script[script="'.concat(this.element.getAttribute("script"),'"].js');var o=this.NW(this._W);if(!o)return kn().error(Ce,'"src" or "script" attribute is required.'),Promise.reject(new Error("CANCELLED"));var a,u=Promise.all([this.FW(),o]).then((function(t){var n=t[0],r=t[1];return!e.DW&&e.TW.sizeLimitExceeded(r.length,e.IW)?(kn().error(Ce,"Maximum total script size exceeded (%s). %s is disabled. See https://amp.dev/documentation/components/amp-script/#size-of-javascript-code.",e.IW?Ie:Le,e._W),e.element.classList.add("i-amphtml-broken"),[]):[n,r]})),s=(this.element.getAttribute("sandbox")||"").split(" ").map((function(t){return t.trim()}));a="".concat(De.thirdParty,"/").concat("2402231941000","/amp-script-proxy-iframe.html");var c,f,h,p={authorURL:this._W,mutationPump:this.UW.bind(this),longTask:function(t){e.RW.expandLongTask(t)},sanitizer:new Pe(this,s),onCreateWorker:function(t){Sn().info(Ce,"Create worker:",t)},onSendMessage:function(t){Sn().info(Ce,"To worker:",t)},onReceiveMessage:function(t){Sn().info(Ce,"From worker:",t)},sandbox:this.IW&&{iframeUrl:a}};return(c=t||this.element,f=u,h=p,h.hydrateFilter=tt,function(t,n,e){var r=n.dataset.shadowDom;if("open"===r||"closed"===r){r=n.attachShadow({mode:r});var i=n.cloneNode(!0);r.appendChild(i),n=i}var o,a=new J,u=new K,s=new g(a,n),c=(o=e,Object.assign({},{mutationPump:requestAnimationFrame.bind(null),executorsAllowed:v},o));return t.then((function(t){var r=l(t,2),i=r[0],o=r[1];if(i&&o&&e.authorURL){var f=new X(n,s,i,o,c),h=new q(a,s,f,c,u);return f.worker.onmessage=function(t){var n=t.data;Q.includes(n[12])&&(h.mutate(n[54],n[37],n[41],new Uint16Array(n[36])),e.onReceiveMessage)&&e.onReceiveMessage(t)},f.ready().then((function(){return new Z(f,c)}))}return null}))}(f,c,h)).then((function(t){e.EW=t,e.Pe.resolve(),e.EW&&(e.EW.onerror=function(t){t.preventDefault(),kn().error(Ce,"".concat(t.message,"\n at (").concat(t.filename,":").concat(t.lineno,")"))})}))},c.FW=function(){var t,n,e,r,i,o,a,u=(t=this.win.location,n=this.LW?"amp-script-worker-nodom":"amp-script-worker",e="0.1",i=function(t,n){if(n){var e="".concat(t.protocol,"//").concat(t.host);return"about:"!=t.protocol&&"blob:"!=t.protocol&&"data:"!=t.protocol||(e=""),"".concat(e,"/dist")}return zn.cdn}(t,!1),o=(r=self,r.__AMP_MODE?r.__AMP_MODE:r.__AMP_MODE=function(t){return{localDev:!1,development:yn(t,vn(t)),esm:!1,test:!1,rtvVersion:gn(t),ssrReady:!1}}(r)).rtvVersion,a=e?"-"+e:"","".concat(i,"/rtv/").concat(o,"/v0/").concat(n).concat(a).concat(".js"));return $n(this.win).fetchText(u,{ampCors:!1}).then((function(t){return t.text()}))},c.NW=function(t){var n=this.element.getAttribute("src");if(n)return this.PW(n,t);var e=this.element.getAttribute("script");if(e){var r=this.getAmpDoc().getElementById(e);An(r,"[%s] %s could not find element with #%s.",Ce,t,e),An("amp-script"===r.getAttribute("target"),'[%s] script#%s must have target="amp-script".',Ce,e);var i=r.textContent;return this.DW||this.IW?Promise.resolve(i):this.TW.checkSha384(i,t).then((function(){return i}))}return null},c.PW=function(t,n){var e=this;return $n(this.win).fetchText(t,{ampCors:!1}).then((function(t){if(t.url&&e.BW(t.url)){var r=t.headers.get("Content-Type");if(!r||!r.startsWith("application/javascript")&&!r.startsWith("text/javascript"))throw kn().createError(Ce,'Same-origin "src" requires "Content-Type: text/javascript" or "Content-Type: application/javascript". '+"Fetched source for ".concat(n,' has "Content-Type: ').concat(r,'". ')+"See https://amp.dev/documentation/components/amp-script/#security-features.");return t.text()}return e.DW||e.IW?t.text():t.text().then((function(t){return e.TW.checkSha384(t,n).then((function(){return t}))}))}))},c.BW=function(t){var n=Cn(this.element,"url");return n.getSourceOrigin(this.getAmpDoc().getUrl())===n.parse(t).origin},c.isMutationAllowedByFixedSize=function(){return ct(this.getLayout())},c.isMutationAllowedByUserGesture=function(){return this.RW.isActive()},c.UW=function(t,n){var e=this;1==n&&this._o.mutate((function(){return e.element.classList.add("i-amphtml-hydrated")}));var r=this.isMutationAllowedByFixedSize()||this.isMutationAllowedByUserGesture();this._o.mutate((function(){var i=t(r),o=rt();i.forEach((function(t){o[t]=o[t]+1||1})),Object.keys(o).forEach((function(t){var n=o[t];kn().error(Ce,e.WW(t,n))})),i.length>0&&2===n&&(e.EW.terminate(),e.element.classList.remove("i-amphtml-hydrated"),e.element.classList.add("i-amphtml-broken"),kn().error(Ce,"%s was terminated due to illegal mutation.",e._W))}))},c.WW=function(t,n){var e;switch(t){case"0":case"3":e="DOM element attributes or styles";break;case"1":e="textContent or the like";break;case"2":e="DOM element children, innerHTML, or the like";break;default:e="the DOM"}return"Blocked ".concat(n," attempts to modify ").concat(e,".")+" For variable-sized <amp-script> containers, a user action has to happen first."},i}(t.BaseElement),Fe=function(){function t(t){this.Ki=t,this.qW=0,this.JW=0,this.KT=[];var n=t.getMetaByName("amp-script-src");n&&(this.KT=n.split(/\s+/).filter(Boolean)),this.tJ=Dn(t.win,"crypto")}var n=t.prototype;return n.checkSha384=function(t,n){var e,r=this,i=(e=t,"undefined"!=typeof TextEncoder?(new TextEncoder).encode(e):function(t){for(var n=new Uint8Array(t.length),e=0;e<t.length;e++){var r=t.charCodeAt(e);at(r<=255),n[e]=r}return n}(unescape(encodeURIComponent(e))));return this.tJ.sha384Base64(i).then((function(t){if(!t||!r.KT.includes("sha384-"+t))throw kn().createError(Ce,"Script hash not found or incorrect for ".concat(n,'. You must include <meta name="amp-script-src" content="sha384-').concat(t,'">. ')+'During development, you can disable this check by adding the "data-ampdevmode" attribute to '.concat(n,", or the root html node")+"See https://amp.dev/documentation/components/amp-script/#script-hash.")}))},n.sizeLimitExceeded=function(t,n){return n?this.JW+=t:this.qW+=t,n?this.JW>Ie:this.qW>Le},n.fetch=function(t,n){var e=t.slice("amp-script:".length).split(".");An(2===e.length&&e[0].length>0&&e[1].length>0,"[".concat(Ce,']: "amp-script" URIs must be of the format "scriptId.functionIdentifier".'));var r=e[0],i=e[1],o=this.Ki.getElementById(r);An(o&&"AMP-SCRIPT"===o.tagName,"[".concat(Ce,"]: could not find <amp-script> with script set to ").concat(r));var a=Array.prototype.slice.call(arguments,1);return o.getImpl().then((function(t){return t.callFunction.apply(t,[i].concat(a))}))},t}(),Ue=["form","button","fieldset","input","object","output","select","textarea"],Pe=function(){function t(t,n){var e,r,i,o=this;this.t=t.win,this.el=t.element,r="purifier-inplace",i=function(){return new Ee(t.win.document,{"IN_PLACE":!0},ne)},function(t,n,e,r,i,o){var a=Bn(t),u=a[e];u||(u=a[e]={obj:null,promise:null,resolve:null,reject:null,context:null,ctor:null,sharedInstance:!1}),u.ctor||(u.ctor=r,u.context=n,u.sharedInstance=!1,u.resolve&&Un(t,e))}(e=In(e=this.t),e,r,i),this.hR=Dn(this.t,"purifier-inplace"),this.GW=this.hR.getAllowedTags(),this.YW=function(){return t.isMutationAllowedByUserGesture()},this.$W=function(){return!o.YW()&&t.isMutationAllowedByFixedSize()},this.GW["amp-img"]=!0,this.GW["amp-layout"]=!0,this.GW["amp-pixel"]=!1,this.HW=n.includes("allow-forms"),Ue.forEach((function(t){o.GW[t]=o.HW}))}var n=t.prototype;return n.sanitize=function(t){var n=t.nodeName.toLowerCase(),e=this.GW[n];return e||this.XW(n)||kn().warn(Ce,"Sanitized node:",t),e},n.setAttribute=function(t,n,e){var r=t.nodeName.toLowerCase();if(this.GW[r]){var i=n.toLowerCase();if(this.hR.validateAttributeChange(t,i,e)){if(null==e)t.removeAttribute(i);else{var o=ne(r,i,e);t.setAttribute(i,o)}return"a"===r&&t.hasAttribute("href")&&!t.hasAttribute("target")&&t.setAttribute("target","_top"),!0}}return this.XW(r)||kn().warn(Ce,'Sanitized [%s]="%s":',n,e,t),!1},n.XW=function(t){return!(this.HW||!Ue.includes(t)||(kn().warn(Ce,'Form elements (%s) cannot be mutated unless your <amp-script> includes the attribute sandbox="allow-forms".',t),0))},n.setProperty=function(t,n,e){var r=n.toLowerCase();return!!this.hR.validateAttributeChange(t,r,e)&&(t[n]=e,!0)},n.getStorage=function(t,n){if(2===t)return Yn(this.el).then((function(t){if(t)return t.getStateValue(n||".")}));for(var e=this.VW(t),r={},i=0;i<e.length;i++){var o=e.key(i);o&&!o.startsWith("amp-")&&(r[o]=e.getItem(o))}return r},n.setStorage=function(t,n,e){var r=this;if(2===t)return Yn(this.el).then((function(t){if(t){var n=function(t,n){try{return function(t){return JSON.parse(t)}(t)}catch(t){return null==n||n(),null}}(e,(function(){Sn().error(Ce,"Invalid AMP.setState() argument: %s",e)}));if(n){var i=r.YW(),o=r.$W()?[r.el]:void 0;i||o||kn().warn(Ce,"AMP.setState only updated page state and did not reevaluate bindings due to lack of recent user interaction."),t.setState(n,{skipEval:!i&&!o,skipAmpState:!1,constrain:o})}}}));var o=this.VW(t);return null===n?null===e&&kn().error(Ce,"Storage.clear() is not supported in amp-script."):n.startsWith("amp-")?kn().error(Ce,'Invalid "amp-" prefix for storage key: %s',n):null===e?o.removeItem(n):o.setItem(n,e),i()},n.VW=function(t){return 0===t?this.t.localStorage:1===t?this.t.sessionStorage:null},t}();t.registerServiceForDoc(Ce,Fe),t.registerElement(Ce,Ne,"amp-script{opacity:0.7}amp-script.i-amphtml-hydrated{opacity:1}\n/*# sourceURL=/extensions/amp-script/0.1/amp-script.css*/")}();
|