/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/flightkit@2.1.0/dist/flightkit.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
const t=globalThis,o=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),r=new WeakMap;let a=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&r.set(e,t))}return t}toString(){return this.cssText}};const l=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new a(i,t,s)},c=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,s))(e)})(t):t,{is:h,defineProperty:d,getOwnPropertyDescriptor:p,getOwnPropertyNames:u,getOwnPropertySymbols:g,getPrototypeOf:f}=Object,v=globalThis,m=v.trustedTypes,b=m?m.emptyScript:"",$=v.reactiveElementPolyfillSupport,_=(t,e)=>t,S={toAttribute(t,e){switch(e){case Boolean:t=t?b:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},E=(t,e)=>!h(t,e),w={attribute:!0,type:String,converter:S,reflect:!1,useDefault:!1,hasChanged:E};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;let A=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=w){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&d(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:s}=p(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const r=o?.call(this);s?.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;const t=f(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){const t=this.properties,e=[...u(t),...g(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(c(t))}else void 0!==t&&e.push(c(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,i)=>{if(o)e.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const o of i){const i=document.createElement("style"),s=t.litNonce;void 0!==s&&i.setAttribute("nonce",s),i.textContent=o.cssText,e.appendChild(i)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(void 0!==o&&!0===i.reflect){const s=(void 0!==i.converter?.toAttribute?i.converter:S).toAttribute(e,i.type);this._$Em=t,null==s?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,e){const i=this.constructor,o=i._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=i.getPropertyOptions(o),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:S;this._$Em=o,this[o]=s.fromAttribute(e,t.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const o=this.constructor,s=this[t];if(i??=o.getPropertyOptions(t),!((i.hasChanged??E)(s,e)||i.useDefault&&i.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:o,wrapped:s},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),!0!==s||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===o&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,o=this[e];!0!==t||this._$AL.has(e)||void 0===o||this.C(e,void 0,i,o)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[_("elementProperties")]=new Map,A[_("finalized")]=new Map,$?.({ReactiveElement:A}),(v.reactiveElementVersions??=[]).push("2.1.0");const C=globalThis,x=C.trustedTypes,O=x?x.createPolicy("lit-html",{createHTML:t=>t}):void 0,D="$lit$",U=`lit$${Math.random().toFixed(9).slice(2)}$`,F="?"+U,P=`<${F}>`,T=document,j=()=>T.createComment(""),B=t=>null===t||"object"!=typeof t&&"function"!=typeof t,V=Array.isArray,W="[ \t\n\f\r]",Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,q=/-->/g,G=/>/g,J=RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,K=/"/g,X=/^(?:script|style|textarea|title)$/i,Q=(t,...e)=>({_$litType$:1,strings:t,values:e}),tt=Symbol.for("lit-noChange"),et=Symbol.for("lit-nothing"),it=new WeakMap,ot=T.createTreeWalker(T,129);function st(t,e){if(!V(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==O?O.createHTML(e):e}const rt=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":3===e?"<math>":"",n=Z;for(let e=0;e<i;e++){const i=t[e];let a,l,c=-1,h=0;for(;h<i.length&&(n.lastIndex=h,l=n.exec(i),null!==l);)h=n.lastIndex,n===Z?"!--"===l[1]?n=q:void 0!==l[1]?n=G:void 0!==l[2]?(X.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=J):void 0!==l[3]&&(n=J):n===J?">"===l[0]?(n=s??Z,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?J:'"'===l[3]?K:Y):n===K||n===Y?n=J:n===q||n===G?n=Z:(n=J,s=void 0);const d=n===J&&t[e+1].startsWith("/>")?" ":"";r+=n===Z?i+P:c>=0?(o.push(a),i.slice(0,c)+D+i.slice(c)+U+d):i+U+(-2===c?e:d)}return[st(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),o]};class N{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const n=t.length-1,a=this.parts,[l,c]=rt(t,e);if(this.el=N.createElement(l,i),ot.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=ot.nextNode())&&a.length<n;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(D)){const e=c[r++],i=o.getAttribute(t).split(U),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:n[2],strings:i,ctor:"."===n[1]?H:"?"===n[1]?I:"@"===n[1]?L:k}),o.removeAttribute(t)}else t.startsWith(U)&&(a.push({type:6,index:s}),o.removeAttribute(t));if(X.test(o.tagName)){const t=o.textContent.split(U),e=t.length-1;if(e>0){o.textContent=x?x.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],j()),ot.nextNode(),a.push({type:2,index:++s});o.append(t[e],j())}}}else if(8===o.nodeType)if(o.data===F)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(U,t+1));)a.push({type:7,index:s}),t+=U.length-1}s++}}static createElement(t,e){const i=T.createElement("template");return i.innerHTML=t,i}}function nt(t,e,i=t,o){if(e===tt)return e;let s=void 0!==o?i._$Co?.[o]:i._$Cl;const r=B(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),void 0===r?s=void 0:(s=new r(t),s._$AT(t,i,o)),void 0!==o?(i._$Co??=[])[o]=s:i._$Cl=s),void 0!==s&&(e=nt(t,s._$AS(t,e.values),s,o)),e}class M{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,o=(t?.creationScope??T).importNode(e,!0);ot.currentNode=o;let s=ot.nextNode(),r=0,n=0,a=i[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new R(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new z(s,this,t)),this._$AV.push(e),a=i[++n]}r!==a?.index&&(s=ot.nextNode(),r++)}return ot.currentNode=T,o}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,o){this.type=2,this._$AH=et,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=nt(this,t,e),B(t)?t===et||null==t||""===t?(this._$AH!==et&&this._$AR(),this._$AH=et):t!==this._$AH&&t!==tt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>V(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==et&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,o="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=N.createElement(st(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new M(o,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=it.get(t.strings);return void 0===e&&it.set(t.strings,e=new N(t)),e}k(t){V(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new R(this.O(j()),this.O(j()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,s){this.type=1,this._$AH=et,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=et}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=nt(this,t,e,0),r=!B(t)||t!==this._$AH&&t!==tt,r&&(this._$AH=t);else{const o=t;let n,a;for(t=s[0],n=0;n<s.length-1;n++)a=nt(this,o[i+n],e,n),a===tt&&(a=this._$AH[n]),r||=!B(a)||a!==this._$AH[n],a===et?t=et:t!==et&&(t+=(a??"")+s[n+1]),this._$AH[n]=a}r&&!o&&this.j(t)}j(t){t===et?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class H extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===et?void 0:t}}class I extends k{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==et)}}class L extends k{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){if((t=nt(this,t,e,0)??et)===tt)return;const i=this._$AH,o=t===et&&i!==et||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,s=t!==et&&(i===et||o);o&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class z{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){nt(this,t)}}const at=C.litHtmlPolyfillSupport;at?.(N,R),(C.litHtmlVersions??=[]).push("3.3.0");const lt=globalThis;let ct=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const o=i?.renderBefore??e;let s=o._$litPart$;if(void 0===s){const t=i?.renderBefore??null;o._$litPart$=s=new R(e.insertBefore(j(),t),t,void 0,i??{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return tt}};ct._$litElement$=!0,ct.finalized=!0,lt.litElementHydrateSupport?.({LitElement:ct});const ht=lt.litElementPolyfillSupport;ht?.({LitElement:ct}),(lt.litElementVersions??=[]).push("4.2.0");const dt=1;class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const pt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends i{constructor(t){if(super(t),1!==t.type||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const o=!!e[t];o===this.st.has(t)||this.nt?.has(t)||(o?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return tt}});var ut="https://static-files-concierge.staging.flybits.com/latest/zone.html",gt=2e3,yt="2.1.0",ft=function(){var t=this;this.promise=new Promise((function(e,i){t.resolve=e,t.reject=i})),this.then=this.promise.then.bind(this.promise),this.catch=this.promise.catch.bind(this.promise)};const vt=function(t,e){var i={};return Object.keys(t).forEach((function(o){const s=t[o];s?e[o].type===Boolean?i[o]="true"===s?.toLowerCase():e[o].type===Number?i[o]=+s:i[o]=s:e[o].hasOwnProperty("default")&&(i[o]=protocolObj[o].default)})),i};class ActionLink{static protocol={DETAILS:"details",INAPPBROWSER:"web",BROWSER:"browser",HTTPS:"https",PHONE:"phone",APP:"app",CONCIERGE:"concierge",UNIVERSAL:"universalLink",MAIL:"mail",CUSTOM:"custom"};static PROTOCOLDEFS={details:{contentId:{type:String},overlay:{type:Boolean,default:!1},title:{type:String}},web:{url:{type:String}},browser:{url:{type:String}},https:{},phone:{phoneNumber:{type:String}},app:{name:{type:String}},concierge:{container:{type:String},zoneReferenceId:{type:String},filter:{type:String},style:{type:String},overlay:{type:Boolean,default:!1}},universalLink:{ios:{type:String},android:{type:String}},mail:{sendTo:{type:String},subject:{type:String},body:{type:String},cc:{type:String},bcc:{type:String}},custom:{}};constructor(t){this.rawStr="",this.protocol="",this.value="",this.protoValue="",this.params={},this.data={},this.fromLink(t)}_parseParams(t,e){var i={},o=[];return Object.keys(e).forEach((e=>{o.push({key:e,idx:t.indexOf(e+"=")})})),o.sort(((t,e)=>t.idx-e.idx)),o.forEach(((e,s)=>{e.idx<0||(o[s+1]?i[e.key]=t.slice(e.idx+e.key.length+1,o[s+1].idx-1):i[e.key]=t.slice(e.idx+e.key.length+1))})),i}fromLink(t){this.rawStr=t;var e=t.split("://")[0]||"";e=e.toLowerCase();var i=t.indexOf("://")>-1?t.substring(t.indexOf("://")+3):t,o=ActionLink.PROTOCOLDEFS.custom;if(ActionLink.PROTOCOLDEFS[e])o=ActionLink.PROTOCOLDEFS[e];else try{const e=new URL(t);this.protoValue=t.match(/:\/\/(.*?)\?/)[1],this.params=Object.fromEntries(e.searchParams.entries())}catch(t){console.warn("custom action is of unknown protocol scheme")}if(this.protocol=e,this.value=i,o&&Object.keys(o).length){var s=this._parseParams(i,o);s=vt(s,o),this.params=s}}toJSON(){return{rawStr:this.rawStr,protocol:this.protocol,protoValue:this.protoValue,value:this.value,params:this.params,data:this.data}}static parse(t){return new ActionLink(t)}}var mt={cachedContent:{},getCachedContentDetails:function(t){return this.cachedContent[t]},getContentDetails:function(t){const e=new ft;var i=this;return Flybits.api.Content.get(t).then((function(t){i.cachedContent[t.result.id]=t.result,e.resolve(t.result)})).catch((function(t){e.reject(t)})),e.promise},getZoneContent:function(t){const e=new ft;var i=this.cachedContent;return Flybits.api.Zones.getByReferenceId(t).then((function(o){o?.zone?.modules?(o.zone.modules.forEach((function(t){t.content.forEach((function(t){i[t.id]=t}))})),e.resolve(o.zone)):e.reject((new Flybits.Validation).addError("Zone not found","No valid Zone was found with specified reference ID",{code:Flybits.Validation.type.NOTFOUND,context:t}))})).catch((function(t){e.reject(t)})),e.promise}},bt=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},$t={guid:function(t){var e="";if(t&&t>0){for(var i=0;i<t;i++)e+=""!==e?"-"+bt():bt();return e}return bt()+bt()+"-"+bt()+"-"+bt()+"-"+bt()+"-"+bt()+bt()+bt()},getByStr:function(t,e){for(var i=(e=(e=e.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),o=0,s=i.length;o<s;++o){var r=i[o];if(!(r in t))return;t=t[r]}return t},setByStr:function(t,e,i){for(var o=(e=(e=e.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),s=0,r=o.length;s<r;s++){var n=o[s];if(n in t&&s+1<r)t=t[n];else{if(n in t||!(s+1<r))return t[n]=i,i;t[n]={},t=t[n]}}},removeObject:function(t,e,i){var o=t.indexOf(e);if(i){var s=t.filter(i);s.length>0&&(o=t.indexOf(s[0]))}return o>=0?t.splice(o,1):t},debounce:function(t,e,i){var o;return function(){var s=this,r=arguments,n=i&&!o;clearTimeout(o),o=setTimeout((function(){o=null,i||t.apply(s,r)}),e),n&&t.apply(s,r)}}};$t.extend=function(){function t(t){return t&&"object"==typeof t&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function e(e,i){var s;return i&&!0===i.clone&&t(e)?o((s=e,Array.isArray(s)?[]:{}),e,i):e}function i(i,s,r){var n=i.slice();return s.forEach((function(s,a){void 0===n[a]?n[a]=e(s,r):t(s)?n[a]=o(i[a],s,r):-1===i.indexOf(s)&&n.push(e(s,r))})),n}function o(s,r,n){var a=Array.isArray(r),l=(n||{arrayMerge:i}).arrayMerge||i;return a?Array.isArray(s)?l(s,r,n):e(r,n):function(i,s,r){var n={};return t(i)&&Object.keys(i).forEach((function(t){n[t]=e(i[t],r)})),Object.keys(s).forEach((function(a){t(s[a])&&i[a]?n[a]=o(i[a],s[a],r):n[a]=e(s[a],r)})),n}(s,r,n)}return o.all=function(t,e){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce((function(t,i){return o(t,i,e)}))},o}();class Zone{static generateOverlayPayload(t,e){var i=new Flybits.Zone;i.id=$t.guid(2),i.name="Overlay",i.referenceID="overlay";var o=new Flybits.Module;o.id=$t.guid(2),o.layout="overlay",o.content=[t],i.modules=[o];var s=i.toConciergeContainer(e);return s.containers[0].content[0].uiTemplate=t.detailsUI?.layoutHTML||"\x3c!-- --\x3e",s.containers[0].content[0].style=t.detailsUI?.styleCSSURL||"",s.containers[0].content[0].styleStr=t.detailsUI?.styleCSS||"",s}static generateDetailsPayload(t,e){var i=new Flybits.Zone;i.id=$t.guid(2),i.name="Content Details",i.referenceID="details";var o=new Flybits.Module;o.id=$t.guid(2),o.layout="vertical",o.content=[t],i.modules=[o];var s=i.toConciergeContainer(e);return s.containers[0].content[0].uiTemplate=t.detailsUI?.layoutHTML||"\x3c!-- --\x3e",s.containers[0].content[0].style=t.detailsUI?.styleCSSURL||"",s.containers[0].content[0].styleStr=t.detailsUI?.styleCSS||"",s}}var _t={_deferredCtxInit:!1,autoInitCtxManager:function(){this._deferredCtxInit||(this._deferredCtxInit=!0,Flybits.Session.ready.then((function(){"object"!=typeof window.Flybits||Flybits.context.Manager.isReporting||(Flybits.context.Manager.reportDelay=gt,Flybits.context.Manager.initialize())})))},handleContextPayload:function(t,e){e=e||console,Array.isArray(t)?Flybits.context.Manager.ready.then((function(){t.forEach((function(i){if(i.pluginId&&i.values){var o={};Object.keys(i.values).forEach((function(t){var e=t.replaceAll("query.","");o[e]=i.values[t]})),Flybits.context.Manager.reportCtx(i.pluginId,o)}else e.error("[ctxapi] malformed ctx payload object",t)}))})):e.error("[ctxapi] malformed ctx payload",t)},handleAnalyticsPayload:function(t,e){e=e||console,t?.contentInfo?.id?"viewed"!==t.type&&"engaged"!==t.type||t.component?"engaged"!==t.type&&"content_component_event"!==t.type||!t.component?e.error("[ctxapi] unsupported analytics event",t):Flybits.context.Manager.ready.then((function(){Flybits.analytics.Manager.reportContentID(t.contentInfo.id,Flybits.analytics.Manager.actions.COMPONENTENGAGED,{name:t.component.name,compID:t.component.id,type:t.component.compId})})):Flybits.context.Manager.ready.then((function(){Flybits.analytics.Manager.reportContentID(t.contentInfo.id,t.type)})):e.error("[ctxapi] missing content id in analytics event")}};class Logger{static modes={VERBOSE:"verbose",ERRORS:"errors",SILENT:"silent"};constructor(t){t=t||{},this.mode=t.mode||"errors"}get prefix(){const t=new Date;return`[fk-${t.getHours()}:${t.getMinutes()}:${t.getSeconds()}:${t.getMilliseconds()}.${(window?.performance.now().toFixed(2)+"").split(".")[1]}]`}log(...t){this.mode!==Logger.modes.SILENT&&this.mode===Logger.modes.VERBOSE&&(t.unshift(this.prefix),console.log.apply(null,t))}error(...t){this.mode!==Logger.modes.SILENT&&(t.unshift(this.prefix),console.error.apply(null,t))}warn(...t){this.mode!==Logger.modes.SILENT&&this.mode===Logger.modes.VERBOSE&&(t.unshift(this.prefix),console.warn.apply(null,t))}}var St=function(t){return!!t?.modules?.filter((t=>t?.content?.length))?.length};class FlybitsSlot extends ct{static get VERSION(){return yt}static get modes(){return{FIXEDHEIGHT:"fixedheight",DYNAMICHEIGHT:"dynamicheight"}}static properties={host:{type:String},projectID:{type:String,attribute:"project-id"},renderURL:{type:String,attribute:"render-url"},refID:{type:String,attribute:"ref-id"},pollingEnabled:{type:Boolean,attribute:"polling-enabled"},pollingInterval:{type:Number,attribute:"polling-interval"},renderMode:{type:String,attribute:"render-mode"},overlayOutlet:{type:String|HTMLElement,attribute:"overlay-outlet"},overrideOverlay:{type:Boolean,attribute:"override-overlay"},overrideURLs:{type:Boolean,attribute:"override-urls"},overrideActions:{type:Boolean,attribute:"override-actions"},overlayDismissUI:{type:Boolean,attribute:"overlay-dismiss-ui"},isLoadingOpen:{type:Boolean,attribute:"show-loading"},isErrorOpen:{type:Boolean,attribute:"show-error"},hasLoadingSlot:{type:Boolean},hasErrorSlot:{type:Boolean},logLevel:{type:String,attribute:"log-level"},localization:{type:String},textDirection:{type:String,attribute:"text-direction"}};static styles=l`
    :host {
      position: relative;
      display: block;
    }
    .flb-frame {
      width: 100%;
      height: 100%;
      border: 0;
      z-index: 1;
    }
    .slot-default, ::slotted(*){
      position: absolute;
      top: 0;
      right: 0;
      left: 0;
      bottom: 0;
      visibility: hidden;
      opacity: 0;
      transition: opacity 0.2s linear 0.2s, visibility 0s linear 0.2s;
      z-index: 2;
    }
    .slot-default.open, .open::slotted(*){
      visibility: visible;
      opacity: 1;
      transition: opacity 0.2s linear 0.2s, visibility 0s linear 0s;
    }
    .overlay-loading{
      display: none;
    }
  `;get $renderFrame(){return this.renderRoot?.querySelector(".flb-frame")??null}get $noContentUI(){const t=this.shadowRoot.querySelector('slot[name="no-content"]'),e=t?.assignedElements({flatten:!0});return e?.[0]}get $overlayLoadingUI(){const t=this.shadowRoot.querySelector('slot[name="overlay-loading"]'),e=t?.assignedElements({flatten:!0});return e?.length&&(this._$overlayLoadingOverride=e[0]),this._$overlayLoadingOverride}get $overlayErrorUI(){const t=this.shadowRoot.querySelector('slot[name="overlay-error"]'),e=t?.assignedElements({flatten:!0});return e?.length&&(this._$overlayErrorOverride=e[0]),this._$overlayErrorOverride}get browserLocale(){var t=navigator?.language||"en";return(t=t.toLowerCase()).indexOf("-")>-1&&(t=t.split("-")[0]),t}get resolvedLocale(){var t={locale:"",textDirection:"ltr"};switch("auto"===this.localization?t.locale=this.browserLocale:2===this.localization?.length&&(t.locale=this.localization),t.locale){case"ar":case"dv":case"ff":case"he":case"ku":case"fa":case"ur":t.textDirection="rtl"}return this.textDirection&&["ltr","rtl","auto"].indexOf(this.textDirection)>-1&&(t.textDirection=this.textDirection),t}get initParams(){return{host:this.host,refID:this.refID,projectID:this.projectID}}constructor(){super(),this.zone=null,this.pollingEnabled=!1,this.pollingInterval=2500,this.renderMode=FlybitsSlot.modes.DYNAMICHEIGHT,this.host="",this.renderURL=ut,this.refID="",this.projectID="",this._hasDeferredLoad=!1,this.overlayDismissUI=!1,this.overlayOutlet=document.body,this.overrideOverlay=!1,this.overrideURLs=!1,this.overrideActions=!1,this._loaderStack=[],this.isLoadingOpen=!1,this.isErrorOpen=!1,this.showNoContentUI=!1,this.hasLoadingSlot=!1,this.hasErrorSlot=!1,this.hasNoContentSlot=!1,this._$overlayLoadingOverride=null,this._$overlayErrorOverride=null,this._$evtSrcCtx=this,this.logger=new Logger({mode:this.logLevel||"errors"}),this.localization="disabled",this.textDirection=null}connectedCallback(){super.connectedCallback(),this.frameLoadDef=new ft,this.frameLoadPromise=this.frameLoadDef.promise,this.detectFlybits(),this._reboundHandleFrameEvent=this.handleFrameEvent.bind(this),window.addEventListener("message",this._reboundHandleFrameEvent),window.addEventListener("resize",this._handleWindowResize),this.frameLoadPromise.then((()=>{this._handleWindowResize()}))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("message",this._reboundHandleFrameEvent),window.removeEventListener("resize",this._handleWindowResize)}init(t){if(t=t??{},this.pollingEnabled=t.pollingEnabled??this.pollingEnabled,this.pollingInterval=t.pollingInterval||this.pollingInterval,this.host=t.host||this.host,this.renderURL=t.renderURL||this.renderURL,this.refID=t.refID||this.refID,this.projectID=t.projectID,this.overlayOutlet=t.overlayOutlet||this.overlayOutlet,this.overrideOverlay=!!t.overrideOverlay,this.overrideURLs=!!t.overrideURLs,this.overrideActions=!!t.overrideActions,this.logger.mode=this.logLevel=t.logLevel||Logger.modes.ERRORS,"disabled"!==t.localization){const e=t.localization?.toLowerCase();"auto"!==e&&2!==e?.length||(this.localization=e)}if(t.textDirection)switch(t.textDirection){case"ltr":case"rtl":case"auto":this.textDirection=t.textDirection;break;default:this.logger.warn("invalid text direction specified:",t.textDirection)}}initElementMeta(){if(this.renderMode===FlybitsSlot.modes.DYNAMICHEIGHT)if(this.refID)if(Flybits.Session._projectID){var t=this;this.logger.log("fetching zone metadata",Flybits.Session._projectID),Flybits.api.Zones.getZoneMetadata(Flybits.Session._projectID,this.refID).then((function(e){t.logger.log("set from metadata height",e.height),t._setHeight(e.height)})).catch((function(e){t.logger.error(e)}))}else this.logger.warn("missing Flybits project ID");else this.logger.warn("missing Zone reference ID")}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"ref-id"===t?(!e&&i&&!this._hasDeferredLoad||e&&i&&e!==i)&&this.detectFlybits():"log-level"===t&&(this.logger.mode=i)}loadZoneData(){const t=new ft,e=this;return this.refID&&"overlay"!==this.refID?(this.showNoContentUI=!1,this.isErrorOpen=!1,this.setLoading(!0),this.logger.log("fetching zone content",this.refID),mt.getZoneContent(this.refID).then((function(i){e.zone=i,e.logger.log("set height from loadzone"),e._setHeight(i.height),e._dispatchLoad(i),!St(i)&&e.$noContentUI&&(e.showNoContentUI=!0),e.injectData(i.toConciergeContainer(e.resolvedLocale)),t.resolve()})).catch((function(i){e.logger.error(i),e.isErrorOpen=!0,e._dispatchError(i),t.reject(i)})).then((function(){e._hasDeferredLoad=!1,e.setLoading(!1)})),t.promise):(e._hasDeferredLoad=!1,e.logger.warn("no refID detected"),Promise.reject())}injectData(t){t={flb:!0,type:"flb.inject",appid:{name:"flightkit",version:FlybitsSlot.VERSION,coreVersion:Flybits?.VERSION,logLevel:this.logLevel},...t},this._framePostMessage(t)}_framePostMessage(t){this.frameLoadPromise?this.frameLoadPromise.then((()=>{var e=this.$renderFrame?.contentWindow;e?(this.logger.log("injecting payload",t),e.postMessage(t,this.renderURL)):this.logger.error("no frame window detected")})):this.$renderFrame?.contentWindow&&this.$renderFrame.contentWindow.postMessage(t,$el.renderURL)}handleAction(t){const i=new ft,o=this;if(t.protocol===ActionLink.protocol.DETAILS){if(!t.params.contentId&&t.data.content&&t.meta.contentID)return o.logger.error("details action missing content id",e),Promise.reject();if(t.data.content)this.injectData(Zone.generateDetailsPayload(t.data.content,o.resolvedLocale)),i.resolve();else{const e=t.params.contentId||t.meta.contentID;this._resolveContent(e).then((function(t){o.injectData(Zone.generateDetailsPayload(t,o.resolvedLocale)),i.resolve()})).catch((function(t){o.logger.error("cannot resolve content",t),i.reject()}))}}else if(t.protocol===ActionLink.protocol.CONCIERGE)return t.params.zoneReferenceId?(this.refID=t.params.zoneReferenceId,this.loadZoneData()):(o.logger.error("concierge action missing zone reference id",e),Promise.reject());return i.promise}setLoading(t){return t?(this.logger.log("open loading ui"),this.isLoadingOpen=!0,this._loaderStack.push(!0)):!t&&this._loaderStack.length>1?this._loaderStack.pop():t||(this.logger.log("closing loading ui"),this._loaderStack.pop(),this.isLoadingOpen=!1),this}_setHeight(t){null==t||isNaN(t)?this.logger.warn("not a valid height",t):this.renderMode===FlybitsSlot.modes.DYNAMICHEIGHT&&(this.logger.log("setting height",t),this.style.height=t+"px")}_resolveContent(t){const e=new ft,i=t?mt.getCachedContentDetails(t):null;if(i)return Promise.resolve(i);const o=this;return o.setLoading(!0),mt.getContentDetails(t).then((function(t){e.resolve(t)})).catch((function(t){e.reject(t)})).then((function(){o.setLoading(!1)})),e.promise}_dispatchActionLinks(t,e){const i=this,o=new ActionLink(t);if(!this.overrideActions){if(o.protocol===ActionLink.protocol.DETAILS&&!this.overrideOverlay){const t=o.params.contentId||e.contentID;return void this._resolveContent(t).then((function(t){o.data.content=t,Flightkit.outlet.openOverlay(o,i.overlayOutlet,i)})).catch((function(t){i.logger.error("failed to load content",t)}))}if(o.protocol===ActionLink.protocol.CONCIERGE&&!this.overrideOverlay)return void Flightkit.outlet.openOverlay(o,i.overlayOutlet,i);if(o.protocol===ActionLink.protocol.HTTPS&&!this.overrideURLs)return o.rawStr?void window.open(o.rawStr,"_blank"):void i.logger.error("invalid url",o.rawStr);if(o.protocol===ActionLink.protocol.BROWSER&&!this.overrideURLs)return o.params.url?void window.open(o.params.url,"_blank"):void i.logger.error("invalid url",o.params.url);if(o.protocol===ActionLink.protocol.INAPPBROWSER&&!this.overrideURLs)return o.params.url?void(window.location.href=o.params.url):void i.logger.error("invalid url",o.params.url)}const s=o.toJSON();e&&(s.meta=e);const r=new CustomEvent("action",{detail:s,bubbles:!0,composed:!0});this._$evtSrcCtx.dispatchEvent(r)}_dispatchLoad(t){var e=[];t?.modules?.forEach((t=>{t?.content?.forEach((t=>{e.push(t.id)}))})),this._$evtSrcCtx.dispatchEvent(new CustomEvent("zoneLoad",{detail:{zone:t,contentIDs:e},bubbles:!0,composed:!0}))}_dispatchError(t){t&&t instanceof Flybits.Validation?(delete t.stacktrace,this._$evtSrcCtx.dispatchEvent(new CustomEvent("error",{detail:{errors:t.errors},bubbles:!0,composed:!0}))):this.logger.error("invalid error type",t)}detectFlybits(){var t=this;window.Flybits?(_t.autoInitCtxManager(),this.host&&(Flybits.cfg.HOST=this.host),this.projectID&&(Flybits.Session._projectID=this.projectID),Flybits.Session._projectID?(this.initElementMeta(),Flybits.Session.userToken?this.loadZoneData().catch((function(){})):this._hasDeferredLoad||(this._hasDeferredLoad=!0,Flybits.Session.ready.then((function(){t.loadZoneData().catch((function(){}))})))):this._hasDeferredLoad||(this._hasDeferredLoad=!0,Flybits.Session.ready.then((function(){t.loadZoneData().catch((function(){}))})))):this.logger.error("Flybits.js Core SDK not detected.")}handleFrameEvent(t){try{var e=this.$renderFrame.contentWindow;if(t.source!==e||t.origin!==new URL(this.renderURL).origin)return;if(t.data&&t.data.flb){var i=t?.data?.value?JSON.parse(t.data.value):{};if(this.logger.log("frameEvt["+this.refID+"]["+t.data.type+"]",i),"context"===t.data.type)_t.handleContextPayload(i,this.logger);else if("action"===t.data.type)this._dispatchActionLinks(i.actionlink,{contentID:i?.contentInfo?.id});else if("analytics"===t.data.type)_t.handleAnalyticsPayload(i,this.logger);else if("error"===t.data.type);else if("dismiss"===t.data.type)"function"==typeof this._dispatchDismiss&&this._dispatchDismiss();else if("flb.heightupdate"===t.data.type){const e=+t.data.value;this.logger.log("set height from frame event",e),this._setHeight(e)}else this.logger.warn("Message not supported",t.data)}}catch(t){this.logger.error("Cannot parse message",t)}}_handleWindowResize=$t.debounce(function(t){this.injectData({flb:!0,type:"flb.inject.parent.resize",outer:{width:window.outerWidth,height:window.outerHeight},inner:{width:window.innerWidth,height:window.innerHeight},document:{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}})}.bind(this),150);_handleFrameLoad(t){this.frameLoadDef.resolve()}_handleLoadingSlotChange(t){const e=t.target.assignedNodes({flatten:!0});this.logger.log("loading slot change",e),e.length&&(this.hasLoadingSlot=!0)}_handleErrorSlotChange(t){const e=t.target.assignedNodes({flatten:!0});this.logger.log("error slot change",e),e.length&&(this.hasErrorSlot=!0)}_handleNoContentSlotChange(t){const e=t.target.assignedNodes({flatten:!0});this.logger.log("no content slot change",e),e.length&&(this.hasNoContentSlot=!0)}_handleSlotEvent(t){t.preventDefault(),t.stopPropagation(),"reload"===t?.type&&(this.loadZoneData(),this.isErrorOpen=!1)}render(){return Q`
      <iframe src="${this.renderURL}" @load=${this._handleFrameLoad} frameborder="0" class="flb-frame" sandbox="allow-scripts allow-same-origin allow-downloads"></iframe>
      ${this.hasLoadingSlot?"":Q`
        <div class=${pt({open:this.isLoadingOpen,"slot-default":!0,loading:!0})}>
          <flybits-loading></flybits-loading>
        </div>
      `}
      ${this.hasErrorSlot?"":Q`
        <div class=${pt({open:this.isErrorOpen,"slot-default":!0,error:!0})}>
          <flybits-error @reload=${this._handleSlotEvent}></flybits-error>
        </div>
      `}
      <slot class=${pt({open:this.isLoadingOpen})} name="loading" @slotchange=${this._handleLoadingSlotChange}></slot>
      <slot class=${pt({open:this.isErrorOpen})} name="error" @reload=${this._handleSlotEvent} @slotchange=${this._handleErrorSlotChange}></slot>
      <slot class='overlay-loading' name="overlay-loading"></slot>
      <slot class='overlay-error' name="overlay-error"></slot>
      <slot class=${pt({open:this.showNoContentUI})} name="no-content" @slotchange=${this._handleNoContentSlotChange}></slot>
    `}}customElements.define("flybits-slot",FlybitsSlot);class FlybitsOverlay extends FlybitsSlot{static properties={dismissUI:{type:Boolean,attribute:"dismiss-ui"}};static styles=l`
    :host {
      position: fixed;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 1000000;
    }
    .flb-frame {
      width: 100%;
      height: 100%;
      border: 0;
      z-index: 1;
    }
    .dismiss.btn{
      position: fixed;
      top: 25px;
      right: 25px;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      line-height: 40px;
      text-align: center;
      font-size: 25px;
      cursor: pointer;
      background-color: white;
    }
    .dismiss.btn:hover{
      background-color: whitesmoke;
      transition: background-color 0.1s linear; 
    }
    .slot-default flybits-loading{
      background-color: rgba(0,0,0,0.05);
    }
    .slot-default,::slotted(:first-child){
      position: absolute;
      top: 0;
      right: 0;
      left: 0;
      bottom: 0;
      visibility: hidden;
      opacity: 0;
      transition: opacity 0.2s linear 0.2s, visibility 0s linear 0.2s;
      z-index: 2;
    }
    .slot-default.open,.open::slotted(:first-child) {
      visibility: visible;
      opacity: 1;
      transition: opacity 0.2s linear 0.2s, visibility 0s linear 0s;
    }
  `;constructor(){super(),this.renderMode=FlybitsSlot.modes.FULLHEIGHT,this.refID="overlay",this.uid=$t.guid(2),this.dismissUI=!1}connectedCallback(){super.connectedCallback(),this.setLoading(!0);const t=this;this.frameLoadPromise.then((function(){t.setLoading(!1)})),window.Flybits?.evt&&Flybits.evt.on(Flybits.evt.type.SESSIONEND+".overlay-"+this.uid,(function(){t._dispatchDismiss()}))}disconnectedCallback(){super.disconnectedCallback(),window.Flybits?.evt&&Flybits.evt.off(Flybits.evt.type.SESSIONEND+".overlay-"+this.uid)}_dispatchDismiss(){this.remove()}_adoptSlotContext(t){t&&t instanceof FlybitsSlot?(t?.renderURL&&(this.renderURL=t.renderURL),t?.overlayOutlet&&(this.overlayOutlet=t.overlayOutlet),t?.overlayDismissUI&&(this.overlayDismissUI=t.overlayDismissUI),t?.logger?.mode&&(this.logger.mode=t.logger.mode),t?.logLevel&&(this.logLevel=t.logLevel),Object.prototype.hasOwnProperty.call(t,"dismissUI")&&(this.dismissUI=!!t.dismissUI),t?.$overlayLoadingUI&&(t.$overlayLoadingUI.setAttribute("slot","loading"),this.append(t.$overlayLoadingUI)),t?.$overlayErrorUI&&(t.$overlayErrorUI.setAttribute("slot","error"),this.append(t.$overlayErrorUI)),t?.localization&&(this.localization=t.localization),t?.textDirection&&(this.textDirection=t.textDirection),t?._$evtSrcCtx&&(this._$evtSrcCtx=t?._$evtSrcCtx),t?.overrideURLs&&(this.overrideURLs=t?.overrideURLs)):this.logger.error("invalid argument: can only adopt the context of FlybitsSlot instances")}injectContent(t){this.injectData(Zone.generateOverlayPayload(t,this.resolvedLocale))}detectFlybits(){_t.autoInitCtxManager(),window.Flybits?(this.host&&(Flybits.cfg.HOST=this.host),this.projectID&&(Flybits.Session._projectID=this.projectID)):this.logger.error("Flybits.js Core SDK not detected.")}render(){let t=Q``;return this.dismissUI&&(t=Q`
        <div class="dismiss btn" @click=${this._dispatchDismiss}>×</div>
      `),Q`
      ${t}
      <iframe src="${this.renderURL}" @load=${this._handleFrameLoad} frameborder="0" class="flb-frame" sandbox="allow-scripts allow-same-origin allow-downloads"></iframe>
      ${this.hasLoadingSlot?"":Q`
        <div class=${pt({open:this.isLoadingOpen,"slot-default":!0,loading:!0})}>
          <flybits-loading></flybits-loading>
        </div>
      `}
      ${this.hasErrorSlot?"":Q`
        <div class=${pt({open:this.isErrorOpen,"slot-default":!0,error:!0})}>
          <flybits-error @reload=${this._handleSlotEvent}></flybits-error>
        </div>
      `}
      <slot class=${pt({open:this.isLoadingOpen})} name="loading" @slotchange=${this._handleLoadingSlotChange}></slot>
      <slot class=${pt({open:this.isErrorOpen})} name="error" @reload=${this._handleSlotEvent} @slotchange=${this._handleErrorSlotChange}></slot>
    `}}customElements.define("flybits-overlay",FlybitsOverlay);class FlybitsLoading extends ct{static properties={};static styles=l`
    :host {
      position: relative;
      display: flex;
      width: 100%;
      height: 100%;
      justify-content: center;
      align-items: center;
      align-content: center;
      background-color: rgba(255,255,255,0.3);
    }
    :host svg{
      opacity: 0.7;
    }
  `;constructor(){super()}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}render(){return Q`
      <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: transparent; display: block; shape-rendering: auto;" width="100px" height="100px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
        <circle cx="84" cy="50" r="10" fill="#292664">
            <animate attributeName="r" repeatCount="indefinite" dur="0.4807692307692307s" calcMode="spline" keyTimes="0;1" values="10;0" keySplines="0 0.5 0.5 1" begin="0s"></animate>
            <animate attributeName="fill" repeatCount="indefinite" dur="1.923076923076923s" calcMode="discrete" keyTimes="0;0.25;0.5;0.75;1" values="#292664;#b5ccf1;#94a9ce;#667395;#292664" begin="0s"></animate>
        </circle><circle cx="16" cy="50" r="10" fill="#292664">
          <animate attributeName="r" repeatCount="indefinite" dur="1.923076923076923s" calcMode="spline" keyTimes="0;0.25;0.5;0.75;1" values="0;0;10;10;10" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" begin="0s"></animate>
          <animate attributeName="cx" repeatCount="indefinite" dur="1.923076923076923s" calcMode="spline" keyTimes="0;0.25;0.5;0.75;1" values="16;16;16;50;84" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" begin="0s"></animate>
        </circle><circle cx="50" cy="50" r="10" fill="#667395">
          <animate attributeName="r" repeatCount="indefinite" dur="1.923076923076923s" calcMode="spline" keyTimes="0;0.25;0.5;0.75;1" values="0;0;10;10;10" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.4807692307692307s"></animate>
          <animate attributeName="cx" repeatCount="indefinite" dur="1.923076923076923s" calcMode="spline" keyTimes="0;0.25;0.5;0.75;1" values="16;16;16;50;84" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.4807692307692307s"></animate>
        </circle><circle cx="84" cy="50" r="10" fill="#94a9ce">
          <animate attributeName="r" repeatCount="indefinite" dur="1.923076923076923s" calcMode="spline" keyTimes="0;0.25;0.5;0.75;1" values="0;0;10;10;10" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.9615384615384615s"></animate>
          <animate attributeName="cx" repeatCount="indefinite" dur="1.923076923076923s" calcMode="spline" keyTimes="0;0.25;0.5;0.75;1" values="16;16;16;50;84" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.9615384615384615s"></animate>
        </circle><circle cx="16" cy="50" r="10" fill="#b5ccf1">
          <animate attributeName="r" repeatCount="indefinite" dur="1.923076923076923s" calcMode="spline" keyTimes="0;0.25;0.5;0.75;1" values="0;0;10;10;10" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" begin="-1.4423076923076923s"></animate>
          <animate attributeName="cx" repeatCount="indefinite" dur="1.923076923076923s" calcMode="spline" keyTimes="0;0.25;0.5;0.75;1" values="16;16;16;50;84" keySplines="0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1;0 0.5 0.5 1" begin="-1.4423076923076923s"></animate>
        </circle>
      </svg>
    `}}customElements.define("flybits-loading",FlybitsLoading);class FlybitsError extends ct{static properties={};static styles=l`
    :host {
      position: relative;
      display: flex;
      width: 100%;
      height: 100%;
      justify-content: center;
      align-items: center;
      align-content: center;
      background-color: rgba(255,255,255,0.8);
    }
    .inner-wrap{
      text-align: center;
    }
    .msg{
      display: block;
      font-weight: bold;
      font-size: 16px;
      margin-bottom: 10px;
    }
    .reload-trigger{
      display: inline-block;
      font-size: 14px;
      border-radius: 20px;
      min-width: 100px;
      background-color: #3258E9;
      color: white;
      text-align: center;
      line-height: 30px;
      cursor: pointer;
      user-select: none;
    }
    .reload-trigger:hover{
      background-color: #0c94f2;
    }
  `;constructor(){super()}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}emitReload(){this.dispatchEvent(new CustomEvent("reload",{bubbles:!0}))}render(){return Q`
      <div class="inner-wrap">
        <div class="msg">Sorry, something went wrong.</div>
        <div class="reload-trigger" @click="${this.emitReload}">Try again</div>
      </div>
    `}}customElements.define("flybits-error",FlybitsError);const Et={$overlay:null,openOverlay:function(t,e,i){if(this.$overlay||(this.$overlay=new FlybitsOverlay),t.protocol===ActionLink.protocol.DETAILS&&!t.data.content)return void this.$overlay.logger.error("no content details to display");if(t.protocol===ActionLink.protocol.CONCIERGE&&!t?.params?.zoneReferenceId)return void this.$overlay.logger.error("no zone reference ID");const o=this.$overlay.querySelector('[slot="loading"]');o&&o.remove();const s=this.$overlay.querySelector('[slot="error"]');s&&s.remove(),this.$overlay._adoptSlotContext(i);var r=e;"string"==typeof e&&(r=document.querySelector(e)),r?(r.append(this.$overlay),t.protocol===ActionLink.protocol.DETAILS?this.$overlay.injectContent(t.data.content):t.protocol===ActionLink.protocol.CONCIERGE?this.$overlay.handleAction(t):this.$overlay.logger.error("ActionLink type not yet supported in overlay",t.rawStr)):this.$overlay.logger.error("invalid outlet",e)}},wt=yt,At={FlybitsSlot:FlybitsSlot,outlet:Et,FlybitsOverlay:FlybitsOverlay,ActionLink:ActionLink,FlybitsLoading:FlybitsLoading,FlybitsError:FlybitsError,VERSION:wt};"object"==typeof window&&"object"!=typeof window.Flightkit&&(window.Flightkit=At);export{ActionLink,FlybitsError,FlybitsLoading,FlybitsOverlay,FlybitsSlot,Et as OutletManager,wt as VERSION};
//# sourceMappingURL=/sm/cdbfd78d19d0aa9c9d5c864f9cd051c585e4f14938c58994ffdc15964669da58.map