;
(self.AMP=self.AMP||[]).push({m:1,v:"2601162341000",n:"amp-story-page-attachment",ev:"0.1",l:!1,f:function(t,a){(()=>{function a(t,a,i){return a in t?Object.defineProperty(t,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[a]=i,t}function i(t,a){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),i.push.apply(i,r)}return i}function r(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?i(Object(o),!0).forEach((function(i){a(t,i,o[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(o,a))}))}return t}function o(t,a,i){return null==a||""===a?"":`${t}:${i&&"number"==typeof a?`${a}px`:a};`}function n(t){return t?Array.prototype.slice.call(t):[]}var e,{isArray:m}=Array,{hasOwnProperty:s,toString:p}=Object.prototype;function l(t,a,i,r,o,n,e,m,s,p,l){return t}function h(t){return(t.ownerDocument||t).defaultView}function c(t){return CSS.escape(t)}function d(t,a,i){let r;for(r=t;r&&r!==i;r=r.parentElement)if(a(r))return r;return null}function g(t,a){return t.closest(a)}function u(t,a,i){const r=t.hasAttribute(a),o=void 0!==i?i:!r;return o!==r&&(o?t.setAttribute(a,""):t.removeAttribute(a)),o}function b(t,a){if(!!a===a||null==a)return;if(Array.isArray(a))return void a.forEach((a=>{b(t,a)}));const i=a;t.appendChild(i.nodeType?i:self.document.createTextNode(String(a)))}function f(t,a,...i){if("string"!=typeof t)return t(r(r({},a),{},{children:i}));const o=null==a?void 0:a.xmlns;o&&delete a.xmlns;const n=o?self.document.createElementNS(o,t):self.document.createElement(t);return b(n,i),a&&Object.keys(a).forEach((t=>{!function(t,a,i){if(!1!==i&&null!=i)if("function"!=typeof i||"o"!==a[0]||"n"!==a[1])t.setAttribute(a,!0===i?"":String(i));else{const r=a.toLowerCase().substring(2);t.addEventListener(r,i)}}(n,t,a[t])})),n}var y=["Webkit","webkit","Moz","moz","ms","O","o"],w={"getPropertyPriority":()=>"","getPropertyValue":()=>""};function v(t){const a=t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()));return y.some((t=>a.startsWith(t+"-")))?`-${a}`:a}function x(t,a,i){if(a.startsWith("--"))return a;e||(e=Object.create(null));let r=e[a];if(!r||i){if(r=a,void 0===t[a]){const i=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(a),o=function(t,a){for(let i=0;i<y.length;i++){const r=y[i]+a;if(void 0!==t[r])return r}return""}(t,i);void 0!==t[o]&&(r=o)}i||(e[a]=r)}return r}function k(t,a){const{style:i}=t;for(const t in a)i.setProperty(v(x(i,t)),String(a[t]),"important")}function A(t,a,i,r,o){const n=x(t.style,a,o);if(!n)return;const e=r?i+r:i;t.style.setProperty(v(n),e)}function _(t,a){void 0===a&&(a=t.hasAttribute("hidden")),a?t.removeAttribute("hidden"):t.setAttribute("hidden","")}function P(t,a){for(let i=0;i<a.length;i++)A(t,a[i],null)}function T(t){try{return t.state}catch(t){return null}}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var R=self.__AMP_LOG;function M(t){return function(t,a){throw new Error("failed to call initLogConstructor")}()}function E(t,a,i,r,o,n,e,m,s,p,l){return t}function O(t,a){return Y(t=V(t),a)}function I(t,a){return C(t=V(t),a)?Y(t,a):null}function z(t,a){return Y(j(L(t)),a)}function S(t,a){const i=j(L(t));return C(i,a)?Y(i,a):null}function V(t){return t.__AMP_TOP||(t.__AMP_TOP=t)}function L(t){return t.nodeType?(a=h(t),O(a,"ampdoc")).getAmpDoc(t):t;var a}function j(t){const a=L(t);return a.isSingleDoc()?a.win:a}function Y(t,a){E(C(t,a));const i=function(t){let a=t.__AMP_SERVICES;return a||(a=t.__AMP_SERVICES={}),a}(t)[a];return i.obj||(E(i.ctor),E(i.context),i.obj=new i.ctor(i.context),E(i.obj),i.context=null,i.resolve&&i.resolve(i.obj)),i.obj}function C(t,a){const i=t.__AMP_SERVICES&&t.__AMP_SERVICES[a];return!(!i||!i.ctor)}var $,F=t=>z(t,"owners"),U=t=>I(t,"story-store"),D=t=>S(t,"localization"),N=t=>S(t,"url");function B(t,a){const i=D(a),r=O(h(a),"vsync"),o=[];return t.querySelectorAll("[i-amphtml-i18n-aria-label]").forEach((t=>{o.push(i.getLocalizedStringAsync(t.getAttribute("i-amphtml-i18n-aria-label")).then((a=>t.setAttribute("aria-label",a)))),t.removeAttribute("i-amphtml-i18n-aria-label")})),t.querySelectorAll("[i-amphtml-i18n-text-content]").forEach((a=>{o.push(i.getLocalizedStringAsync(a.getAttribute("i-amphtml-i18n-text-content")).then((i=>t.isConnected?r.mutatePromise((()=>{a.textContent=i})):a.textContent=i))),a.removeAttribute("i-amphtml-i18n-text-content")})),Promise.all(o)}function G(t){const a=t.tagName;return a.startsWith("AMP-")&&!("AMP-STICKY-AD-TOP-PADDING"==a||"AMP-BODY"==a)}function H(t,a,i,r){return function(t,a,i,r){let o=t,n=i,e=t=>{try{return n(t)}catch(t){var a,i;throw null===(a=(i=self).__AMP_REPORT_ERROR)||void 0===a||a.call(i,t),t}};const m=function(){if(void 0!==$)return $;$=!1;try{const t={get capture(){return $=!0,!1}};self.addEventListener("test-options",null,t),self.removeEventListener("test-options",null,t)}catch(t){}return $}(),s=!(null==r||!r.capture);return o.addEventListener(a,e,m?r:s),()=>{null==o||o.removeEventListener(a,e,m?r:s),n=null,o=null,e=null}}(t,a,i,r)}var X,K,Z="none",J="v0";function W(t){return void 0===X&&(a=t||Element,X=a.prototype.attachShadow?"v1":a.prototype.createShadowRoot?J:Z),X;var a}function q(t,a,i){var r="";return t&&Array.prototype.forEach.call(t,(function(t){if(t.selectorText&&t.style&&void 0!==t.style.cssText)r+=function(t,a,i){var r=[];return t.split(",").forEach((function(t){t=t.trim(),i&&(t=i(t)),function(t,a){var i=function(t){return t=t.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+t+")"+at,"m")}(a);return!t.match(i)}(t,a)&&(t=function(t,a){return function(t,a){return t.match(rt)?(t=t.replace(it,a)).replace(rt,a+" "):a+" "+t}(t,a)}(t,a)),r.push(t)})),r.join(", ")}(t.selectorText,a,i)+" {\n\t",r+=function(t){var a=t.style.cssText;t.style.content&&!t.style.content.match(/['"]+|attr/)&&(a=a.replace(/content:[^;]*;/g,"content: '"+t.style.content+"';"));var i=t.style;for(var r in i)"initial"===i[r]&&(a+=r+": initial; ");return a}(t)+"\n}\n\n";else if(t.type===CSSRule.MEDIA_RULE)r+="@media "+t.media.mediaText+" {\n",r+=q(t.cssRules,a),r+="\n}\n\n";else try{t.cssText&&(r+=t.cssText+"\n\n")}catch(t){}})),r}var Q="-shadowcsshost",tt=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",at=(new RegExp("("+Q+tt,"gim"),new RegExp("(-shadowcsscontext"+tt,"gim"),"([>\\s~+[.,{:][\\s\\S]*)?$"),it=Q+"-no-combinator",rt=new RegExp(Q,"gim");new RegExp("-shadowcsscontext","gim");var ot=/[^\.\-\_0-9a-zA-Z]/,nt=/[^\-\_0-9a-zA-Z]/;function et(t){const a=h(t),i=t.shadowRoot||t.__AMP_SHADOW_ROOT;if(i){if(self.trustedTypes&&self.trustedTypes.createPolicy){const t=self.trustedTypes.createPolicy("shadow-embed#createShadowRoot",{createHTML:function(t){return""}});i.innerHTML=t.createHTML("")}else i.innerHTML="";return i}let r;const o=W();if("v1"==o?(r=t.attachShadow({mode:"open"}),r.styleSheets||Object.defineProperty(r,"styleSheets",{get:function(){const t=[];return r.childNodes.forEach((a=>{"STYLE"===a.tagName&&t.push(a.sheet)})),t}})):r=o==J?t.createShadowRoot():function(t){const a=t.ownerDocument;t.classList.add("i-amphtml-shadow-host-polyfill");const i=a.createElement("style");i.textContent=".i-amphtml-shadow-host-polyfill>:not(i-amphtml-shadow-root){display:none!important}",t.appendChild(i);const r=a.createElement("i-amphtml-shadow-root");return t.appendChild(r),t.__AMP_SHADOW_ROOT=r,Object.defineProperty(t,"shadowRoot",{enumerable:!0,configurable:!0,value:r}),r.host=t,r.getElementById=function(t){const a=c(t);return r.querySelector(`#${a}`)},Object.defineProperty(r,"styleSheets",{get:()=>a.styleSheets?n(a.styleSheets).filter((t=>r.contains(t.ownerNode))):[]}),r}(t),!function(){if(void 0!==K)return K;if(W()==Z)K=!1;else{const a=W()===J?self.document.createElement("div").createShadowRoot():self.document.createElement("div").attachShadow({mode:"open"});t=ShadowRoot,K=!!t&&-1!=t.toString().indexOf("[native code]")&&a instanceof ShadowRoot}var t;return K}()){const t=`i-amphtml-sd-${a.Math.floor(1e4*a.Math.random())}`;r.id=t,r.host.classList.add(t),e=t=>function(t,a){return function(t,a){const i=E(t.id),r=t.ownerDocument;let o=null;try{o=pt(r.implementation.createHTMLDocument(""),a)}catch(t){}if(!o)try{o=pt(r,a)}catch(t){}return o?q(o,`.${i}`,mt):a}(t,a)}(r,t),r.__AMP_CSS_TR=e}var e;return r}function mt(t){return t.replace(/(html|body)/g,st)}function st(t,a,i,r){const o=r.charAt(i-1),n=r.charAt(i+t.length);return o&&!ot.test(o)||n&&!nt.test(n)?t:"amp-"+t}function pt(t,a){const i=t.createElement("style");i.textContent=a;try{return(t.head||t.documentElement).appendChild(i),i.sheet?i.sheet.cssRules:null}finally{i.parentNode&&i.parentNode.removeChild(i)}}function lt(t,a,i){const r=self.document.createElement("style");r.textContent=i;const o=et(t);return o.appendChild(r),o.appendChild(a),t}var ht=class extends t.BaseElement{static prerenderAllowed(){return!1}constructor(t){super(t),this.tmt=[],this.containerEl=null,this.contentEl=null,this.amt=1/0,this.headerEl=null,this.imt=!1,this.state=0,this.storeService=l(U(this.win)),this.localizationService=l(D(this.element)),this.Of={startX:0,startY:0,lastY:0,swipingUp:null,isSwipeY:null},this.rmt=[],this.omt=1/0,this.nmt=null}isLayoutSupported(t){return"nodisplay"===t}buildCallback(){this.element.classList.add("amp-story-draggable-drawer-root");const t=f("div",{class:"i-amphtml-story-draggable-drawer"},f("div",{class:"i-amphtml-story-draggable-drawer-container"},f("div",{class:"i-amphtml-story-draggable-drawer-content"})));this.headerEl=f("div",{class:"i-amphtml-story-draggable-drawer-header"}),this.containerEl=t.querySelector(".i-amphtml-story-draggable-drawer-container"),_(this.containerEl,!1),this.contentEl=this.containerEl.querySelector(".i-amphtml-story-draggable-drawer-content");const a=f("button",{role:"button",class:"i-amphtml-story-draggable-drawer-spacer i-amphtml-story-system-reset","i-amphtml-i18n-aria-label":"87"});this.containerEl.insertBefore(a,this.contentEl),this.contentEl.appendChild(lt(f("div",null),this.headerEl,':host{all:initial!important;color:initial!important}:host{border-radius:inherit!important}.i-amphtml-story-draggable-drawer-header{display:-ms-flexbox!important;display:flex!important;-ms-flex-pack:center!important;justify-content:center!important;position:sticky!important;top:0!important;border-radius:inherit!important;z-index:1!important;--i-amphtml-draggable-drawer-background-color:#fff!important;--i-amphtml-draggable-drawer-text-color:#202125!important;--i-amphtml-draggable-drawer-header-twenty-percent-gray:rgba(0,0,0,.2)!important;--i-amphtml-draggable-drawer-header-font-family:"Roboto",sans-serif!important;--i-amphtml-draggable-drawer-header-font-size:18px!important;--i-amphtml-draggable-drawer-header-title-height:44px!important;background:var(--i-amphtml-draggable-drawer-background-color)!important}.i-amphtml-story-draggable-drawer-header.i-amphtml-story-page-attachment-with-form{padding-bottom:40px!important}:not([desktop]).i-amphtml-story-draggable-drawer-header:before{content:""!important;position:absolute!important;top:8px!important;width:40px!important;height:3px!important;background-color:var(--i-amphtml-draggable-drawer-header-twenty-percent-gray)!important;border-radius:3px!important}[theme=dark].i-amphtml-story-draggable-drawer-header{--i-amphtml-draggable-drawer-background-color:#202125!important;--i-amphtml-draggable-drawer-text-color:#fff!important;--i-amphtml-draggable-drawer-header-twenty-percent-gray:hsla(0,0%,100%,.2)!important}:not([desktop]).i-amphtml-story-draggable-drawer-header{height:20px!important}.i-amphtml-story-page-attachment-close-button{display:block!important;padding:15px!important;width:14px!important;height:14px!important;background-origin:content-box!important;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" fill="rgba(0, 0, 0, .4)" viewBox="0 0 14 14"><path d="M13.3 2.1A1 1 0 1 0 11.9.7L7 5.6 2.1.7A1 1 0 1 0 .7 2.1L5.6 7 .7 11.9a1 1 0 1 0 1.4 1.4L7 8.4l4.9 4.9a1 1 0 1 0 1.4-1.4L8.4 7z"/></svg>\')!important;background-repeat:no-repeat!important;cursor:pointer!important;margin-inline-start:auto!important;box-sizing:content-box!important;border:none!important;background-color:transparent!important}[theme=dark] .i-amphtml-story-page-attachment-close-button{background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" fill="rgba(255, 255, 255, .4)" viewBox="0 0 14 14"><path d="M13.3 2.1A1 1 0 1 0 11.9.7L7 5.6 2.1.7A1 1 0 1 0 .7 2.1L5.6 7 .7 11.9a1 1 0 1 0 1.4 1.4L7 8.4l4.9 4.9a1 1 0 1 0 1.4-1.4L8.4 7z"/></svg>\')!important}.i-amphtml-story-page-attachment-domain-label{background:var(--i-amphtml-draggable-drawer-background-color)!important;color:var(--i-amphtml-draggable-drawer-text-color)!important;display:block!important;font-family:var(--i-amphtml-draggable-drawer-header-font-family)!important;font-size:calc(var(--i-amphtml-draggable-drawer-header-font-size) - 3px)!important;font-weight:300!important;overflow:hidden!important;position:absolute!important;text-align:center!important;text-overflow:ellipsis!important;top:35px!important;white-space:nowrap!important;width:calc(100% - 112px)!important}.i-amphtml-story-draggable-drawer-header .i-amphtml-story-draggable-drawer-header-title-and-close{opacity:1!important;height:var(--i-amphtml-draggable-drawer-header-title-height)!important;width:100%!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-align:center!important;align-items:center!important;-ms-flex-pack:center!important;justify-content:center!important;background:var(--i-amphtml-draggable-drawer-background-color)!important;border-radius:inherit!important;box-shadow:0px 0px 1px var(--i-amphtml-draggable-drawer-header-twenty-percent-gray)!important}:not([desktop]).i-amphtml-story-draggable-drawer-header .i-amphtml-story-draggable-drawer-header-title-and-close{position:absolute!important;opacity:0!important;transition:opacity .3s,visibility .3s!important;visibility:hidden!important}:not([desktop]).i-amphtml-story-draggable-drawer-header.i-amphtml-story-draggable-drawer-header-stuck .i-amphtml-story-draggable-drawer-header-title-and-close{opacity:1!important;visibility:visible!important}.i-amphtml-story-page-attachment-title{position:absolute!important;font-family:var(--i-amphtml-draggable-drawer-header-font-family)!important;width:calc(100% - 80px)!important;color:var(--i-amphtml-draggable-drawer-text-color)!important;font-size:var(--i-amphtml-draggable-drawer-header-font-size)!important;font-weight:500!important;line-height:40px!important;overflow:hidden!important;text-align:center!important;text-overflow:ellipsis!important;white-space:nowrap!important}.i-amphtml-story-draggable-drawer-header-attachment-remote{display:none!important}\n/*# sourceURL=/extensions/amp-story-page-attachment/0.1/amp-story-draggable-drawer-header.css*/')),B(this.containerEl,this.element),this.element.appendChild(t),this.element.setAttribute("aria-hidden",!0)}layoutCallback(){this.bT();const t=this.win.document.createTreeWalker(this.element,NodeFilter.SHOW_ELEMENT,null,!1);for(;t.nextNode();){const a=t.currentNode;G(a)&&(this.tmt.push(a),F(this.element).setOwner(a,this.element))}_(this.containerEl,!0)}bT(){this.storeService.subscribe(32,(t=>{this.qI(t)}),!0);const t=this.element.querySelector(".i-amphtml-story-draggable-drawer-spacer");t.addEventListener("click",(()=>{this.uS()}));const a=O(this.win,"platform");a.isSafari()||a.isIos()||new this.win.IntersectionObserver((t=>{this.headerEl.classList.toggle("i-amphtml-story-draggable-drawer-header-stuck",!t[0].isIntersecting)})).observe(t),new this.win.ResizeObserver((t=>{this.nmt=t[0].contentRect.height})).observe(t),this.element.addEventListener("transitionend",(t=>{"transform"===t.propertyName&&0===this.state&&(this.containerEl.scrollTop=0)}))}qI(t){const a=0===t;a?this.emt():this.mmt(),u(this.headerEl,"desktop",!a)}emt(){const t=this.element.parentElement;let a;a="AMP-STORY-PAGE"===t.tagName?t:"AMP-STORY-SHOPPING-ATTACHMENT"===t.tagName?this.element.closest("amp-story-page"):this.element,this.rmt.push(H(a,"touchstart",this.yp.bind(this),{capture:!0})),this.rmt.push(H(a,"touchmove",this._p.bind(this),{capture:!0})),this.rmt.push(H(a,"touchend",this.gp.bind(this),{capture:!0}))}mmt(){this.rmt.forEach((t=>t())),this.rmt=[]}om(t){const{touches:a}=t;if(!a||a.length<1)return null;const{clientX:i,clientY:r}=a[0];return{x:i,y:r}}yp(t){const a=this.om(t);a&&(this.Of.startX=a.x,this.Of.startY=a.y)}_p(t){if(!1===this.Of.isSwipeY)return;const a=this.om(t);if(!a)return;const{x:i,y:r}=a;this.Of.swipingUp=r<this.Of.lastY,this.Of.lastY=r,(0!==this.state||this.Of.swipingUp)&&(this.XV()&&t.stopPropagation(),(null!==this.Of.isSwipeY||(this.Of.isSwipeY=Math.abs(this.Of.startY-r)>Math.abs(this.Of.startX-i),this.Of.isSwipeY))&&this.smt({event:t,data:{swipingUp:this.Of.swipingUp,deltaY:r-this.Of.startY,last:!1}}))}XV(){return 0!==this.state||0===this.state&&this.Of.swipingUp}gp(t){!0===this.Of.isSwipeY&&this.smt({event:t,data:{swipingUp:this.Of.swipingUp,deltaY:this.Of.lastY-this.Of.startY,last:!0}}),this.Of.startX=0,this.Of.startY=0,this.Of.lastY=0,this.Of.swipingUp=null,this.Of.isSwipeY=null}smt(t){const{data:a}=t;if(this.imt)return void(this.imt=!a.last);const{deltaY:i,swipingUp:r}=a;if(3===this.state){const a=this.pmt(t.event.target);if(a&&i<0||a&&i>0&&this.containerEl.scrollTop>0)return void(this.imt=!0)}if(t.event.preventDefault(),!0===a.last)return 1===this.state&&(!r&&i>50?this.uS():this.open()),void(2===this.state&&(r&&-i>50?this.open():this.uS()));2===this.state&&r&&-i>this.omt?this.open():this.um(i)}pmt(t){return!!d(t,(t=>t.classList.contains("i-amphtml-story-draggable-drawer-content")),this.element)}lmt(t){this.omt=t}hmt(t){this.amt=t}um(t){let a;switch(this.state){case 0:case 2:if(t>0)return;this.state=2;const i=Math.max(t,-this.amt)-this.nmt;a=`translate3d(0, calc(100% + ${i}px), 0)`;break;case 3:case 1:if(t<0)return;this.state=1,a=`translate3d(0, ${t}px, 0)`}this.mutateElement((()=>{k(this.element,{transform:a,transition:"none",visibility:"visible"})}))}open(t=!0){3!==this.state&&(this.state=3,this.storeService.dispatch(27,!0),this.mutateElement((()=>{this.element.setAttribute("aria-hidden",!1),P(this.element,["transform","transition","visibility"]),t||(k(this.element,{transition:"initial"}),this.mutateElement((()=>P(this.element,["transition"])))),this.element.classList.add("i-amphtml-story-draggable-drawer-open"),this.hideOrShowSiblingContent(),setTimeout((()=>{this.element.querySelector(".i-amphtml-story-draggable-drawer-spacer").focus()}),400),_(this.containerEl,!0)})).then((()=>{const t=F(this.element);t.scheduleLayout(this.element,this.tmt),t.scheduleResume(this.element,this.tmt)})))}hideOrShowSiblingContent(){this.mutateElement((()=>{n(this.element.parentElement.children).forEach((t=>{var a;t!==this.element&&(a=t,0===this.state?(a.removeAttribute("tab-index"),a.removeAttribute("aria-hidden")):(a.setAttribute("tab-index","-1"),a.setAttribute("aria-hidden","true")))}))}))}uS(){this.cmt()}cmt(t=!0){0!==this.state&&(this.state=0,this.storeService.dispatch(27,!1),this.dmt(),this.hideOrShowSiblingContent(),this.mutateElement((()=>{this.element.setAttribute("aria-hidden",!0),P(this.element,["transform","transition"]),t||(k(this.element,{transition:"initial"}),this.mutateElement((()=>P(this.element,["transition"])))),this.element.classList.remove("i-amphtml-story-draggable-drawer-open")})).then((()=>{F(this.element).schedulePause(this.element,this.tmt)})))}dmt(){var t;null===(t=this.win.document.activeElement)||void 0===t||t.blur(),this.gmt()}gmt(){d(this.element,(t=>"AMP-STORY-PAGE"===t.tagName)).scrollTo(0,0)}},ct={"submitting":()=>{return!0!==(t=f("div",{class:"i-amphtml-story-spinner","aria-hidden":"true"},f("div",{class:"i-amphtml-story-spinner-container"},f("div",{class:"i-amphtml-story-spinner-layer"},f("div",{class:"i-amphtml-story-spinner-circle-clipper left"}),f("div",{class:"i-amphtml-story-spinner-circle-clipper right"}))))).hasAttribute("active")&&(t.setAttribute("aria-hidden",String(!1)),t.setAttribute("active","")),t;var t},"submit-success":()=>dt("99"),"submit-error":()=>dt("98")};function dt(t){return[f("div",{class:"i-amphtml-story-page-attachment-form-submission-status-icon"}),f("div",{"i-amphtml-i18n-text-content":t})]}var gt="dark",ut=()=>f("svg",{class:"i-amphtml-story-page-open-attachment-link-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},f("path",{"fill-opacity":".1",d:"M12 0c6.6 0 12 5.4 12 12s-5.4 12-12 12S0 18.6 0 12 5.4 0 12 0z",xmlns:"http://www.w3.org/2000/svg"}),f("path",{d:"m13.8 14.6.2.5-.2.5-1.5 1.4c-.7.7-1.7 1.1-2.7 1.1A4 4 0 0 1 6.9 17a3.9 3.9 0 0 1-1.1-2.7 4 4 0 0 1 1.1-2.7l1.5-1.5.5-.1.5.2.2.5-.2.5-1.5 1.5c-.5.5-.7 1.1-.7 1.7 0 .6.3 1.3.7 1.7.5.5 1.1.7 1.7.7s1.3-.3 1.7-.7l1.5-1.5c.3-.3.7-.3 1 0zM17 7a3.9 3.9 0 0 0-2.7-1.1A4 4 0 0 0 11.6 7l-1.5 1.5-.1.4.2.5.5.2.5-.2 1.5-1.5c.5-.5 1.1-.7 1.7-.7.6 0 1.3.3 1.7.7.5.5.7 1.1.7 1.7 0 .6-.3 1.3-.7 1.7l-1.5 1.5-.2.5.2.5.5.2.5-.2 1.5-1.5c.7-.7 1.1-1.7 1.1-2.7-.1-1-.5-1.9-1.2-2.6zm-7.9 7.2.2.5.5.2.5-.2 4.5-4.5.2-.5-.2-.5c-.3-.2-.8-.2-1 .1l-4.5 4.5-.2.4z",xmlns:"http://www.w3.org/2000/svg"})),bt=t=>t.getAttribute("cta-text")||t.getAttribute("data-cta-text"),ft=(t,a)=>{if(a){const t=a.trim();if(t)return Promise.resolve(t)}return D(t).getLocalizedStringAsync("35")},yt="amp-story-state",wt="ampStoryAttachmentPageId";function vt(t,a){try{t.localStorage.setItem(yt,JSON.stringify(a))}catch(t){}}var xt,kt=(xt=class extends ht{constructor(t){super(t),this.MV=l(g(this.element,"amp-story")),this.umt=l(g(this.element,"amp-story-page")),this.Ek=I(this.win,"story-analytics"),this.bmt=z(this.element,"history"),this.lC=null,this.fmt=null,this.ymt=null}buildCallback(){super.buildCallback(),this.wmt(),this.vmt(this.headerEl),this.vmt(this.element);const t="AMP-STORY-PAGE-OUTLINK"===this.element.tagName||this.element.hasAttribute("href");this.lC=t?1:0,0===this.lC&&this.xmt(),this.win.addEventListener("pageshow",(t=>{t.persisted&&this.cmt(!1)})),_(this.element,!0),this.element.setAttribute("aria-live","assertive")}layoutCallback(){if(super.layoutCallback(),1===this.lC)return this.kmt()}wmt(){var t,a;this.element.hasAttribute("title")&&(this.element.setAttribute("data-title",this.element.getAttribute("title")),this.element.removeAttribute("title")),this.Amt||(t=this.umt,a=this.element,"AMP-STORY-PAGE-OUTLINK"===a.tagName||a.getAttribute("href")?((t,a)=>{var i;const r=("amp-story-page-outlink a",t.querySelector(function(t,a){return t.replace(/^|,/g,"$&:scope ")}("amp-story-page-outlink a"))),n=(null==r?void 0:r.getAttribute("title"))||a.getAttribute("data-title"),e=null===(i=a.getAttribute("theme"))||void 0===i?void 0:i.toLowerCase(),m=a.getAttribute("cta-image"),s="31067119"==((p=h(t)).__AMP_EXPERIMENT_BRANCHES?p.__AMP_EXPERIMENT_BRANCHES["story-ad-auto-advance"]:null);var p;return ft(t,(null==r?void 0:r.textContent)||bt(a)).then((t=>{const i=f("a",{class:"i-amphtml-story-page-open-attachment i-amphtml-story-page-open-attachment-outlink"+(s?" i-amphtml-story-page-open-attachment-outlink-no-animation-exp":""),role:"button",target:"_top",title:n,theme:e,"aria-label":t},f("svg",{class:"i-amphtml-story-outlink-page-attachment-arrow",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 8",width:"20px",height:"8px"},f("path",{d:"m18 7.7-.7-.2-7.3-4-7.3 4c-.7.4-1.6.2-2-.6-.4-.7-.1-1.6.6-2l8-4.4a2 2 0 0 1 1.5 0l8 4.4c.7.4 1 1.3.6 2-.4.5-.9.8-1.4.8z",xmlns:"http://www.w3.org/2000/svg"})),f("div",{class:"i-amphtml-story-outlink-page-attachment-outlink-chip"},m&&"none"!==m?f("div",{class:"i-amphtml-story-outlink-page-attachment-img",style:o("background-image",`url(${m}) !important`,!0)}):m?null:ut(),f("span",{class:"i-amphtml-story-page-attachment-label"},t)));"custom"===e&&((t,a)=>{t.hasAttribute("cta-accent-color");const i=t.getAttribute("cta-accent-color")||"#000000";let r=null;var o,n;k(t,{"background-color":i}),r=function(t){const{b:a,g:i,r:r}=t,o=t=>(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4);return.2126*o(r)+.7152*o(i)+.0722*o(a)>.179?"#000":"#FFF"}(function(t){const a=/rgba?\((\d{1,3}), (\d{1,3}), (\d{1,3})/;if(!t.match(a))return(R.user||(R.user=M()),void R.user.win?R.userForEmbed||(R.userForEmbed=M()):R.user).error("UTILS",`getRGBFromCssColorValue expects a parameter in the form of 'rgba(0, 0, 0, 1)' or 'rgb(0, 0, 0)' but got ${t}`),{r:0,g:0,b:0};const i=a.exec(t);return{r:Number(i[1]),g:Number(i[2]),b:Number(i[3])}}((o=h(t),n=t,o.getComputedStyle(n)||w)["background-color"])),k(t,{"background-color":""}),"background"===t.getAttribute("cta-accent-element")?(k(a,{"--i-amphtml-outlink-cta-background-color":i,"--i-amphtml-outlink-cta-text-color":r}),k(t,{"--i-amphtml-outlink-cta-background-color":i,"--i-amphtml-outlink-cta-text-color":r})):(k(a,{"--i-amphtml-outlink-cta-background-color":r,"--i-amphtml-outlink-cta-text-color":i}),k(t,{"--i-amphtml-outlink-cta-background-color":r,"--i-amphtml-outlink-cta-text-color":i}))})(a,i);const p=(null==r?void 0:r.getAttribute("href"))||a.getAttribute("href");return p&&i.setAttribute("href",p),i}))})(t,a):((t,a)=>{var i;const r=i=>{const r=a.getAttribute(i);if(!r)return;const n=((t,a)=>{const i=N(a),r=a.win.location;if(!i.isProxyOrigin(r.origin)||i.isProxyOrigin(t))return t;const o=i.resolveRelativeUrl(t,i.getSourceOrigin(r.href));return r.origin+"/i/s/"+o.replace(/https?:\/\//,"")})(r,t.getAmpDoc());return f("div",{class:"i-amphtml-story-inline-page-attachment-img",style:o("background-image",`url(${n}) !important`,!0)})},n=null===(i=a.getAttribute("theme"))||void 0===i?void 0:i.toLowerCase();return ft(t,bt(a)).then((t=>f("a",{class:"i-amphtml-story-page-open-attachment i-amphtml-story-page-open-attachment-inline",role:"button",theme:gt===n&&n,"aria-label":t},f("div",{class:"i-amphtml-story-inline-page-attachment-chip"},r("cta-image"),r("cta-image-2"),f("div",{class:"i-amphtml-story-inline-page-attachment-arrow"})),"none"!==t&&f("span",{class:"i-amphtml-story-page-attachment-label"},t))))})(t,a)).then((t=>{this.Amt=t,this.MV.hasAttribute("active")&&this.Amt.setAttribute("active","");const a=f("div",{class:"i-amphtml-story-page-open-attachment-host",role:"button",onClick:t=>{t.preventDefault(),this.open()}});this.mutateElement((()=>{this.umt.appendChild(lt(a,this.Amt,'.i-amphtml-story-page-open-attachment{-ms-flex-align:center!important;align-items:center!important;-ms-flex-direction:column!important;flex-direction:column!important;position:absolute!important;bottom:0!important;left:0!important;width:100%!important;pointer-events:none!important;z-index:3!important;-webkit-touch-callout:default!important;text-decoration:none!important;--i-amphtml-chip-background-color:hsla(0,0%,100%,.5)!important;--i-amphtml-img-background-color:#fff!important;--i-amphtml-label-text-color:#fff!important;--i-amphtml-arrow-color:#000!important;--i-amphtml-page-attachment-ui-animation-delay:1s!important;--i-amphtml-page-attachment-ui-animation-duration:.6s!important;display:none!important}[theme=dark].i-amphtml-story-page-open-attachment{--i-amphtml-chip-background-color:rgba(0,0,0,.5)!important;--i-amphtml-img-background-color:#000!important;--i-amphtml-label-text-color:#000!important;--i-amphtml-arrow-color:#fff!important}.i-amphtml-story-page-open-attachment[active]{display:-ms-flexbox!important;display:flex!important}.i-amphtml-story-page-open-attachment>*{cursor:pointer!important;pointer-events:auto!important}.i-amphtml-story-page-open-attachment-label{position:relative!important;padding:12px 32px 20px!important;height:16px!important;max-width:calc(100% - 64px)!important;color:#fff!important;line-height:16px!important;text-shadow:0px 0px 6px rgba(0,0,0,.36)!important}.i-amphtml-story-page-attachment-label,.i-amphtml-story-page-open-attachment-label{font-family:Roboto,sans-serif!important;font-size:16px!important;font-weight:700!important;letter-spacing:0.3px;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.i-amphtml-story-page-attachment-label{max-width:210px!important;line-height:20px!important}.i-amphtml-story-page-open-attachment-label{color:var(--i-amphtml-label-text-color)!important}.i-amphtml-story-inline-page-attachment-chip{background-color:var(--i-amphtml-chip-background-color)!important;display:-ms-flexbox!important;display:flex!important;border-radius:24px!important;-ms-flex-align:center!important;align-items:center!important;overflow:hidden!important;margin-bottom:12px!important}.i-amphtml-story-page-open-attachment-inline[active] .i-amphtml-story-inline-page-attachment-chip{animation:i-amphtml-tap-scale var(--i-amphtml-page-attachment-ui-animation-duration) var(--i-amphtml-page-attachment-ui-animation-delay) both!important}.i-amphtml-story-inline-page-attachment-chip:only-child{margin-bottom:20px!important}.i-amphtml-story-inline-page-attachment-img{background-size:contain!important;background-repeat:no-repeat!important;height:48px!important;width:48px!important;background-color:var(--i-amphtml-img-background-color)!important}.i-amphtml-story-inline-page-attachment-img:nth-child(2){margin-inline-start:1px!important}.i-amphtml-story-inline-page-attachment-arrow{position:relative!important;height:32px!important;width:32px!important;border-radius:50%!important;background-color:var(--i-amphtml-img-background-color)!important}.i-amphtml-story-inline-page-attachment-arrow:not(:only-child){margin:8px!important}.i-amphtml-story-inline-page-attachment-arrow:before{content:""!important;position:absolute!important;top:0!important;left:0!important;width:100%!important;height:100%!important;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="8"><path d="m18 7.7-.7-.2-7.3-4-7.3 4c-.7.4-1.6.2-2-.6-.4-.7-.1-1.6.6-2l8-4.4a2 2 0 0 1 1.5 0l8 4.4c.7.4 1 1.3.6 2-.4.5-.9.8-1.4.8"/></svg>\')!important;background-position:50%!important;background-size:auto!important;background-repeat:no-repeat!important}.i-amphtml-story-page-open-attachment-inline[active] .i-amphtml-story-inline-page-attachment-arrow:before{animation:i-amphtml-move-up-arrow-in-circle var(--i-amphtml-page-attachment-ui-animation-duration) var(--i-amphtml-page-attachment-ui-animation-delay) both!important}[theme=dark] .i-amphtml-story-inline-page-attachment-arrow:before{background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="8" fill="%23fff"><path d="m18 7.7-.7-.2-7.3-4-7.3 4c-.7.4-1.6.2-2-.6-.4-.7-.1-1.6.6-2l8-4.4a2 2 0 0 1 1.5 0l8 4.4c.7.4 1 1.3.6 2-.4.5-.9.8-1.4.8"/></svg>\')!important}.i-amphtml-story-page-open-attachment-inline .i-amphtml-story-page-attachment-label{margin-bottom:20px!important;color:var(--i-amphtml-label-text-color)!important}.i-amphtml-story-page-open-attachment-inline{background:linear-gradient(0,rgba(0,0,0,.15),transparent)!important;border:none!important;padding:0!important}[theme=dark].i-amphtml-story-page-open-attachment-inline{background:linear-gradient(0,hsla(0,0%,100%,.25),hsla(0,0%,100%,0))!important}.i-amphtml-story-page-open-attachment-outlink{--i-amphtml-outlink-cta-background-color:#fff!important;--i-amphtml-outlink-cta-text-color:#000!important}[theme=dark].i-amphtml-story-page-open-attachment-outlink{--i-amphtml-outlink-cta-background-color:#000!important;--i-amphtml-outlink-cta-text-color:#fff!important}.i-amphtml-story-page-open-attachment-outlink[active]:not(.i-amphtml-story-page-open-attachment-outlink-no-animation-exp) .i-amphtml-story-outlink-page-attachment-outlink-chip{animation:i-amphtml-tap-scale var(--i-amphtml-page-attachment-ui-animation-duration) var(--i-amphtml-page-attachment-ui-animation-delay) both!important}.i-amphtml-story-outlink-page-attachment-arrow{display:block!important;cursor:pointer!important;margin-bottom:10px!important;fill:var(--i-amphtml-outlink-cta-background-color)!important;filter:drop-shadow(0px 2px 6px rgba(0,0,0,0.3))!important}.i-amphtml-story-page-open-attachment[active]:not(.i-amphtml-story-page-open-attachment-outlink-no-animation-exp) .i-amphtml-story-outlink-page-attachment-arrow{animation:i-amphtml-move-up-arrow var(--i-amphtml-page-attachment-ui-animation-duration) var(--i-amphtml-page-attachment-ui-animation-delay) both!important}@keyframes i-amphtml-move-up-arrow{0%,to{opacity:1;transform:translateY(0)}45%{opacity:0;transform:translateY(-7px)}45.01%{transform:translateY(5px)}}@keyframes i-amphtml-move-up-arrow-in-circle{0%,to{opacity:1;transform:translateY(0)}45%{opacity:0;transform:translateY(-4px)}45.01%{transform:translateY(3px)}}@keyframes i-amphtml-tap-scale{0%,to{transform:scale(1)}45%{transform:scale(.9)}}.i-amphtml-story-outlink-page-attachment-outlink-chip{display:-ms-flexbox!important;display:flex!important;position:relative!important;padding:10px 6px!important;margin:0 0 20px!important;height:16px!important;max-width:calc(100% - 64px)!important;border-radius:30px!important;background:var(--i-amphtml-outlink-cta-background-color)!important;place-items:center!important;box-shadow:0px 4px 10px rgba(0,0,0,.15)!important}.i-amphtml-story-outlink-page-attachment-img{height:24px!important;width:24px!important;vertical-align:middle!important;background-size:cover!important;background-repeat:no-repeat!important;background-position:50%!important;border-radius:50%!important}.i-amphtml-story-page-open-attachment-outlink .i-amphtml-story-page-attachment-label{padding-inline-start:6px!important;padding-inline-end:8px!important;color:var(--i-amphtml-outlink-cta-text-color)!important}.i-amphtml-story-outlink-page-attachment-label:only-child,.i-amphtml-story-page-open-attachment-outlink .i-amphtml-story-page-attachment-label:only-child{padding-inline-start:8px!important}.i-amphtml-story-page-open-attachment-link-icon{width:24px!important;height:24px!important;fill:var(--i-amphtml-outlink-cta-text-color)!important}\n/*# sourceURL=/extensions/amp-story-page-attachment/0.1/amp-story-open-page-attachment.css*/'))}))}))}xmt(){const t=this.element.getAttribute("title")||this.element.getAttribute("data-title");this.headerEl.appendChild(f("div",{class:"i-amphtml-story-draggable-drawer-header-title-and-close"},f("button",{class:"i-amphtml-story-page-attachment-close-button","i-amphtml-i18n-aria-label":"87",role:"button",onClick:()=>this.uS(),tabindex:"-1"}),t&&f("span",{class:"i-amphtml-story-page-attachment-title"},t))),B(this.headerEl,this.element);const a=this.element.querySelectorAll("form");var i;a.length>0&&(i=this.win,U(i).dispatch(5,[{tagOrTarget:"FORM",method:"clear"},{tagOrTarget:"FORM",method:"submit"}]),a.forEach((t=>{(function(t,a){const i=Object.keys(ct).map((a=>{const i=t.querySelector(`[${c(a)}]`);if(i)return i;const r=f("div",null,f("div",{class:"i-amphtml-story-page-attachment-form-submission-status"},ct[a]()));return r.setAttribute(a,""),t.appendChild(r)}));return B(t,a),i})(t,this.MV).forEach((t=>{new this.win.ResizeObserver((a=>{3===this.state&&a[0].contentRect.height>0&&t.scrollIntoView({behavior:"smooth",block:"nearest"})})).observe(t)}))})),this.headerEl.append(this._mt()),this.headerEl.classList.add("i-amphtml-story-page-attachment-with-form"));const r=this.element.querySelector(".i-amphtml-story-draggable-drawer");for(;this.element.firstChild&&this.element.firstChild!==r;)this.contentEl.appendChild(this.element.firstChild)}kmt(){this.hmt(56),this.lmt(150),this.headerEl.classList.add("i-amphtml-story-draggable-drawer-header-attachment-remote"),this.element.classList.add("i-amphtml-story-page-attachment-remote");const t="AMP-STORY-PAGE-OUTLINK"===this.element.tagName,a=t?this.element.querySelector("a").getAttribute("href"):this.element.getAttribute("href"),i=this.element.getAttribute("cta-image"),r=i&&"none"!==i?f("div",{class:"i-amphtml-story-page-attachment-remote-img",style:o("background-image",`url(${i}) !important`,!0)}):ut(),n=f("a",{class:"i-amphtml-story-page-attachment-remote-content",target:"_blank",onClick:t=>t.preventDefault()},r,f("span",{class:"i-amphtml-story-page-attachment-remote-title"},f("span",{"i-amphtml-i18n-text-content":"97"}),f("span",null,a)),f("svg",{class:"i-amphtml-story-page-attachment-remote-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},f("path",{d:"M38 38H10V10h14V6H10a4 4 0 0 0-4 4v28a4 4 0 0 0 4 4h28a4 4 0 0 0 4-4V24h-4v14zM28 6v4h7.2L15.5 29.7l2.8 2.8L38 12.8V20h4V6H28z",xmlns:"http://www.w3.org/2000/svg"})));return t&&this.element.querySelector("a").setAttribute("target","_top"),n.setAttribute("href",a),B(n,this.element).then((()=>this.mutateElement((()=>this.contentEl.appendChild(n)))))}setOpenAttachmentActive(t){this.Amt&&u(this.Amt,"active",t)}bT(){if(super.bT(),this.contentEl.addEventListener("click",(t=>{const{target:a}=t;"a"===a.tagName.toLowerCase()&&a.setAttribute("target","_blank")}),!0),this.element.addEventListener("click",(t=>{"amp-story-page-attachment"===t.target.tagName.toLowerCase()&&this.uS()}),!0),1===this.lC){const t=this.getAmpDoc();t.onVisibilityChanged((()=>{t.isVisible()&&3===this.state&&this.cmt(!1)}))}this.storeService.subscribe(36,(t=>{this.setOpenAttachmentActive(t===this.umt.id)}),!0)}Pmt(){var t;return this.fmt||(this.fmt=null===(t=this.element.parentElement.querySelector("amp-story-page-outlink"))||void 0===t?void 0:t.querySelector("a")),this.fmt}Tmt(){var t,a;return this.ymt||(this.ymt=null===(t=this.element.parentElement.querySelector(".i-amphtml-story-page-open-attachment-host"))||void 0===t||null===(a=t.shadowRoot)||void 0===a?void 0:a.querySelector("a.i-amphtml-story-page-open-attachment")),this.ymt}Rmt(t,a){return!(!t||!a)&&t.split("#")[0]===a.split("#")[0]}Mmt(){const t=this.Pmt(),a=this.Tmt();t?t.click():a&&function(t,a){const i=t.cloneNode();_(i,!1),a.appendChild(i),i.click(),i.remove()}(a,this.element)}open(t=!0){const a=this.Pmt()||this.Tmt();if(this.Rmt(window.location.href,null==a?void 0:a.href)&&null!=a&&a.href.includes("#page="))window.location.href===a.href?window.location.reload(!0):this.Mmt();else if(3!==this.state){if(super.open(t),this.storeService.dispatch(22,!0),this.storeService.dispatch(34,!1),1!==this.lC){const t=r(r({},T(this.win.history)),{},{[wt]:this.storeService.get(36)});this.bmt.push((()=>this.cmt()),t)}this.Emt(!0),this.Omt(!0),this.Ek.triggerEvent("story-open",this.element),this.Ek.triggerEvent("story-page-attachment-enter"),1===this.lC&&this.Imt()}}Imt(){var t;0===this.storeService.get(32)?(t=this.win,Y(t,"timer")).delay((()=>{this.Mmt()}),500):this.Mmt()}uS(){switch(this.state){case 3:case 1:this.bmt.goBack();break;case 2:this.cmt()}}cmt(t=!0){if(0===this.state)return;super.cmt(t),this.Emt(!1),this.Omt(!1),this.storeService.dispatch(22,!1),this.storeService.dispatch(34,!0);const a=d(this.element,(t=>"AMP-STORY"===t.tagName)).querySelector(".i-amphtml-story-page-attachment-expand");a&&this.mutateElement((()=>{var t,i;null===(i=(t=a).parentElement)||void 0===i||i.removeChild(t)})),function(t,a,i){const{history:o}=t,n=r(r({},T(o)||{}),{},{ampStoryAttachmentPageId:null});o.replaceState(n,""),function(t,a){const i=function(t){const a=function(t){try{return a=t.localStorage.getItem(yt),JSON.parse(a)}catch(t){return null}var a}(t);if(!a)return{};const i=Date.now();let r=!1;return Object.keys(a).forEach((t=>{const o=a[t];i>o.time+6e5&&(delete a[t],r=!0)})),r&&vt(t,a),a}(t);i[function(t){return t.location.href.replace(/\#.*/,"")}(t)]={state:a,time:Date.now()},vt(t,i)}(t,n)}(this.win),this.Ek.triggerEvent("story-close",this.element),this.Ek.triggerEvent("story-page-attachment-exit")}Emt(t){const a=d(this.element,(t=>"AMP-STORY-PAGE"===t.tagName));this.mutateElement((()=>{a.classList.toggle("i-amphtml-story-page-attachment-active",t)}))}Omt(t){const a=this.headerEl.querySelector(".i-amphtml-story-page-attachment-close-button");a&&this.mutateElement((()=>{t?a.removeAttribute("tabindex"):a.setAttribute("tabindex",-1)}))}vmt(t){var a;const i=null===(a=this.element.getAttribute("theme"))||void 0===a?void 0:a.toLowerCase();i&&gt===i&&t.setAttribute("theme",i)}_mt(){return f("div",{class:"i-amphtml-story-page-attachment-domain-label"},this.zmt())}zmt(){const t=N(this.element),a=this.getAmpDoc().getUrl();return t.getSourceOrigin(a).replace(/^http(s)?:\/\/(www.)?/,"")}},class extends t.BaseElement{upgradeCallback(){const t=g(this.element,"amp-story");return t?function(t){if(l(G(t)),t.createdCallback)return Promise.resolve(t);if(!t.__AMP_UPG_PRM){const a=new class{constructor(){this.promise=new Promise(((t,a)=>{this.resolve=t,this.reject=a}))}};t.__AMP_UPG_PRM=a.promise,t.__AMP_UPG_RES=a.resolve}const a=t.__AMP_UPG_PRM;return l(a),a}(t).then((()=>t.getImpl())).then((()=>new xt(this.element))):new xt(this.element)}});t.registerElement("amp-story-page-attachment",kt,'.amp-story-draggable-drawer-root{display:block!important;position:absolute!important;top:0!important;left:0!important;height:100%!important;width:100%!important;overflow:hidden!important;z-index:4!important;transform:translate3d(0,100%,0)!important;transition:transform 0.25s cubic-bezier(0.4,0.0,1,1),visibility 0s linear 0.4s!important;visibility:hidden!important;--i-amphtml-draggable-drawer-background-color:#fff!important;--i-amphtml-draggable-drawer-text-color:#202125!important}[theme=dark].amp-story-draggable-drawer-root{--i-amphtml-draggable-drawer-background-color:#202125!important;--i-amphtml-draggable-drawer-text-color:#fff!important}[desktop] .amp-story-draggable-drawer-root{background:none!important}.amp-story-draggable-drawer-root[hidden]{display:none!important}.amp-story-draggable-drawer-root.i-amphtml-story-draggable-drawer-open{transform:translateZ(0)!important;transition:transform 0.4s cubic-bezier(0.0,0.0,0.2,1),visibility 0s linear 0s!important;visibility:visible!important}.i-amphtml-story-draggable-drawer{height:100%!important}.i-amphtml-story-draggable-drawer-container{height:100%!important;background:var(--i-amphtml-draggable-drawer-background-color)!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;transition:background 0.3s cubic-bezier(0.4,0.0,0.2,1)!important}.i-amphtml-story-draggable-drawer-container[hidden]{display:block!important;background:hsla(0,0%,100%,.92)!important}.i-amphtml-story-draggable-drawer-content{position:relative!important;opacity:1!important;transition:opacity 0.3s cubic-bezier(0.0,0.0,0.2,1)!important;background:var(--i-amphtml-draggable-drawer-background-color)!important;color:var(--i-amphtml-draggable-drawer-text-color)!important}amp-story:not([desktop]) .i-amphtml-story-draggable-drawer-content{border-radius:inherit!important}amp-story:not([desktop]) .i-amphtml-story-page-attachment-remote .i-amphtml-story-draggable-drawer-spacer{display:none!important}.i-amphtml-story-draggable-drawer-container[hidden] .i-amphtml-story-draggable-drawer-content{opacity:0!important}.i-amphtml-story-draggable-drawer-container[hidden] .i-amphtml-story-draggable-drawer-content>*{display:none!important}amp-story:not([desktop]) .i-amphtml-story-draggable-drawer-container{border-radius:16px 16px 0 0!important;height:100%!important;background:none!important;display:-ms-flexbox!important;display:flex!important;-ms-flex-direction:column!important;flex-direction:column!important}.i-amphtml-story-draggable-drawer-spacer{display:none!important}amp-story:not([desktop]) .i-amphtml-story-draggable-drawer-spacer{background:none!important;display:block!important;height:calc(var(--story-page-vh)*100)!important;min-height:calc(var(--story-page-vh)*20)!important}body:not(.amp-mode-keyboard-active) amp-story:not([desktop]) .i-amphtml-story-draggable-drawer-spacer{outline:none!important}[desktop] .amp-story-draggable-drawer-root{display:-ms-flexbox!important;display:flex!important;-ms-flex-align:center!important;align-items:center!important;-ms-flex-pack:center!important;justify-content:center!important;background:rgba(0,0,0,.55)!important;opacity:0!important;transition:opacity 0.15s cubic-bezier(0.4,0.0,1,1),transform 0s linear 0.15s,visibility 0s linear 0.4s!important}[desktop] .amp-story-draggable-drawer-root.i-amphtml-story-draggable-drawer-open{opacity:1!important;transition:opacity 0.3s cubic-bezier(0.0,0.0,0.2,1),visibility 0s linear 0s!important;transform:translateZ(0)!important}[desktop] .i-amphtml-story-draggable-drawer{height:auto!important;max-height:min(60vh,100%)!important;min-height:min(100%,700px)!important;width:800px!important;border-radius:8px!important;overflow:hidden!important;overflow-y:auto!important}.amp-story-draggable-drawer-root.i-amphtml-story-page-attachment-remote{transition-duration:.2s!important}.i-amphtml-story-page-attachment-remote.i-amphtml-story-draggable-drawer-open:after{content:""!important;position:absolute!important;width:100%!important;height:4px!important;color:#000!important;bottom:0!important;background-color:var(--i-amphtml-outlink-cta-text-color)!important;opacity:.6!important;transform-origin:left!important;animation:progress-bar-animation .6s cubic-bezier(0.4,0.0,1,1) both!important}[dir=rtl] .i-amphtml-story-page-attachment-remote.i-amphtml-story-draggable-drawer-open:after{transform-origin:right!important}@keyframes progress-bar-animation{0%{transform:scaleX(0)}to{transform:scaleX(1)}}.i-amphtml-story-page-attachment-form-submission-status{-ms-flex-align:center!important;align-items:center!important;background:var(--i-amphtml-draggable-drawer-background-color)!important;border:1px solid rgba(0,0,0,.3)!important;border-radius:12px!important;box-sizing:border-box!important;display:-ms-flexbox!important;display:flex!important;font-family:Roboto,sans-serif!important;font-size:14px!important;font-weight:700!important;height:54px!important;margin:16px 0px!important;width:100%!important;--i-amphtml-story-page-attachment-form-submission-status-icon-height:26px!important}[theme=dark] .i-amphtml-story-page-attachment-form-submission-status{border:1px solid hsla(0,0%,100%,.2)!important}[submit-success] .i-amphtml-story-page-attachment-form-submission-status{color:#0f8514!important}[theme=dark] [submit-success] .i-amphtml-story-page-attachment-form-submission-status{color:#8bdc8f!important}[submit-error] .i-amphtml-story-page-attachment-form-submission-status{color:#de3333!important}[theme=dark] [submit-error] .i-amphtml-story-page-attachment-form-submission-status{color:#ff5c5c!important}@keyframes submission-status-fade-in{0%{opacity:0}to{opacity:1}}.i-amphtml-story-page-attachment-form-submission-status div,[submitting] .i-amphtml-story-page-attachment-form-submission-status{animation:submission-status-fade-in 0.2s cubic-bezier(0.0,0.0,0.2,1)!important}.i-amphtml-story-page-attachment-form-submission-status-icon{height:var(--i-amphtml-story-page-attachment-form-submission-status-icon-height)!important;margin:0px 14px!important;width:var(--i-amphtml-story-page-attachment-form-submission-status-icon-height)!important}[submit-success] .i-amphtml-story-page-attachment-form-submission-status-icon{background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="none"><rect width="328" height="54" x="-14" y="-14" rx="12"/><circle cx="13" cy="13" r="13" fill="%238BDC8F"/><path stroke="%23000" stroke-width="2.5" d="m5.8 13.9 5 5 9.4-9.6"/></svg>\')!important}[submit-error] .i-amphtml-story-page-attachment-form-submission-status-icon{background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="none"><path fill="%23FF5252" d="M13 0a13 13 0 1 0 0 26 13 13 0 0 0 0-26m1.3 13c0 .7-.6 1.3-1.3 1.3s-1.3-.6-1.3-1.3V7.8c0-.7.6-1.3 1.3-1.3s1.3.6 1.3 1.3zm0 5.2c0 .7-.6 1.3-1.3 1.3s-1.3-.6-1.3-1.3.6-1.3 1.3-1.3 1.3.6 1.3 1.3"/></svg>\')!important}.i-amphtml-story-page-attachment-form-submission-status .i-amphtml-story-spinner{height:var(--i-amphtml-story-page-attachment-form-submission-status-icon-height)!important;margin:0 auto!important;position:relative!important;width:var(--i-amphtml-story-page-attachment-form-submission-status-icon-height)!important;bottom:0!important;left:0!important;right:0!important}.i-amphtml-story-page-attachment-form-submission-status .i-amphtml-story-spinner-layer{color:var(--i-amphtml-draggable-drawer-text-color)!important;filter:none!important}:host{visibility:inherit!important}.i-amphtml-story-page-attachment-remote{height:56px!important;bottom:0!important;top:auto!important;--i-amphtml-outlink-cta-background-color:#fff!important;--i-amphtml-outlink-cta-text-color:#000!important}[theme=dark].i-amphtml-story-page-attachment-remote{--i-amphtml-outlink-cta-background-color:#000!important;--i-amphtml-outlink-cta-text-color:#fff!important}.i-amphtml-story-page-attachment-remote>a:first-child,amp-story[desktop] .i-amphtml-story-page-attachment-remote{display:none!important}.i-amphtml-story-page-attachment-remote .i-amphtml-story-draggable-drawer-container{height:100%!important;border-radius:8px 8px 0 0!important;box-shadow:0 1px 2px 1px rgba(0,0,0,.12)!important}.i-amphtml-story-page-attachment-remote-content{display:-ms-flexbox!important;display:flex!important;padding:0 24px!important;-ms-flex-align:center!important;align-items:center!important;color:rgba(0,0,0,.87)!important;font-family:Roboto,sans-serif!important;font-size:15px!important;-ms-flex-pack:justify!important;justify-content:space-between!important;line-height:48px!important;text-decoration:none!important;height:56px!important;padding-inline-start:12px!important;padding-inline-end:18px!important;background:var(--i-amphtml-outlink-cta-background-color)!important}.i-amphtml-story-page-attachment-remote-content .i-amphtml-story-page-attachment-remote-img,.i-amphtml-story-page-attachment-remote-content .i-amphtml-story-page-open-attachment-link-icon{width:32px!important;height:32px!important;-ms-flex-negative:0!important;flex-shrink:0!important;padding:0px!important;border-radius:50%!important;background-size:cover!important;background-repeat:no-repeat!important;overflow:hidden!important}.i-amphtml-story-page-open-attachment-link-icon{fill:var(--i-amphtml-outlink-cta-text-color)!important}.i-amphtml-story-page-attachment-remote-title{max-width:calc(100% - 30px)!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:14px!important;padding:0 12px!important;color:var(--i-amphtml-outlink-cta-text-color)!important;display:-ms-flexbox!important;display:flex!important}.i-amphtml-story-page-attachment-remote-title :first-child{-ms-flex-negative:0!important;flex-shrink:0!important;font-weight:700!important}.i-amphtml-story-page-attachment-remote-title :first-child:after{content:"\\00a0 "!important}.i-amphtml-story-page-attachment-remote-title :nth-child(2){white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.i-amphtml-story-page-attachment-remote-icon{display:block!important;height:20px!important;width:20px!important;padding:0px!important;margin-inline-start:auto!important;-ms-flex-negative:0!important;flex-shrink:0!important;fill:var(--i-amphtml-outlink-cta-text-color)!important}.i-amphtml-story-page-attachment-expand{position:relative!important;width:100%!important;height:100%!important;background:#fff!important;z-index:100000!important;animation:i-amphtml-open-3p-attachment 120ms cubic-bezier(0.0,0.0,0.2,1) forwards!important}@keyframes i-amphtml-open-3p-attachment{0%{transform:scaleX(0);opacity:0.3}to{transform:scaleX(1);opacity:1}}.i-amphtml-story-page-attachment-active:after{content:""!important;display:block!important;left:0!important;top:0!important;bottom:0!important;right:0!important;position:absolute!important;background:#000!important;z-index:3!important;animation:i-amphtml-attachment-overlay-opacity 0.3s cubic-bezier(0.0,0.0,0.2,1) forwards!important}@keyframes i-amphtml-attachment-overlay-opacity{0%{opacity:0}to{opacity:0.5}}\n/*# sourceURL=/extensions/amp-story-page-attachment/0.1/amp-story-page-attachment.css*/'),t.registerElement("amp-story-page-outlink",kt)})();
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
/**
* @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file or at
* https://developers.google.com/open-source/licenses/bsd
*/}});
//# sourceMappingURL=amp-story-page-attachment-0.1.mjs.map