cas-ds-web-components 1.2.96 → 1.2.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/cas-booking-box.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var G;const
|
|
9
|
+
*/var G;const z=window,ft=z.trustedTypes,Gt=ft?ft.emptyScript:"",gt=z.reactiveElementPolyfillSupport,Q={toAttribute(n,t){switch(t){case Boolean:n=n?Gt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},At=(n,t)=>t!==n&&(t==t||n==n),tt={attribute:!0,type:String,converter:Q,reflect:!1,hasChanged:At},et="finalized";let C=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const o=this._$Ep(i,e);o!==void 0&&(this._$Ev.set(o,i),t.push(o))}),t}static createProperty(t,e=tt){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);o!==void 0&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const a=this[t];this[e]=o,this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||tt}static finalize(){if(this.hasOwnProperty(et))return!1;this[et]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const o of i)this.createProperty(o,e[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const o of i)e.unshift(mt(o))}else t!==void 0&&e.push(mt(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Yt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=tt){var o;const a=this.constructor._$Ep(t,i);if(a!==void 0&&i.reflect===!0){const s=(((o=i.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?i.converter:Q).toAttribute(e,i.type);this._$El=t,s==null?this.removeAttribute(a):this.setAttribute(a,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,a=o._$Ev.get(t);if(a!==void 0&&this._$El!==a){const s=o.getPropertyOptions(a),c=typeof s.converter=="function"?{fromAttribute:s.converter}:((i=s.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?s.converter:Q;this._$El=a,this[a]=c.fromAttribute(e,s.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||At)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((o,a)=>this[a]=o),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(o=>{var a;return(a=o.hostUpdate)===null||a===void 0?void 0:a.call(o)}),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var o;return(o=i.hostUpdated)===null||o===void 0?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};C[et]=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},gt==null||gt({ReactiveElement:C}),((G=z.reactiveElementVersions)!==null&&G!==void 0?G:z.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
19
|
*/var at;const K=window,N=K.trustedTypes,Nt=N?N.createPolicy("lit-html",{createHTML:n=>n}):void 0,rt="$lit$",_=`lit$${(Math.random()+"").slice(9)}$`,Pt="?"+_,he=`<${Pt}>`,k=document,O=()=>k.createComment(""),B=n=>n===null||typeof n!="object"&&typeof n!="function",Ut=Array.isArray,ce=n=>Ut(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",lt=`[
|
|
20
20
|
\f\r]`,L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rt=/-->/g,It=/>/g,E=RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^
|
|
21
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Dt=/'/g,Ot=/"/g,Bt=/^(?:script|style|textarea|title)$/i,P=Symbol.for("lit-noChange"),v=Symbol.for("lit-nothing"),Lt=new WeakMap,S=k.createTreeWalker(k,129,null,!1);function
|
|
21
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Dt=/'/g,Ot=/"/g,Bt=/^(?:script|style|textarea|title)$/i,P=Symbol.for("lit-noChange"),v=Symbol.for("lit-nothing"),Lt=new WeakMap,S=k.createTreeWalker(k,129,null,!1);function Ft(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Nt!==void 0?Nt.createHTML(t):t}const pe=(n,t)=>{const e=n.length-1,i=[];let o,a=t===2?"<svg>":"",s=L;for(let c=0;c<e;c++){const r=n[c];let l,d,h=-1,p=0;for(;p<r.length&&(s.lastIndex=p,d=s.exec(r),d!==null);)p=s.lastIndex,s===L?d[1]==="!--"?s=Rt:d[1]!==void 0?s=It:d[2]!==void 0?(Bt.test(d[2])&&(o=RegExp("</"+d[2],"g")),s=E):d[3]!==void 0&&(s=E):s===E?d[0]===">"?(s=o??L,h=-1):d[1]===void 0?h=-2:(h=s.lastIndex-d[2].length,l=d[1],s=d[3]===void 0?E:d[3]==='"'?Ot:Dt):s===Ot||s===Dt?s=E:s===Rt||s===It?s=L:(s=E,o=void 0);const u=s===E&&n[c+1].startsWith("/>")?" ":"";a+=s===L?r+he:h>=0?(i.push(l),r.slice(0,h)+rt+r.slice(h)+_+u):r+_+(h===-2?(i.push(void 0),c):u)}return[Ft(n,a+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};class F{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let a=0,s=0;const c=t.length-1,r=this.parts,[l,d]=pe(t,e);if(this.el=F.createElement(l,i),S.currentNode=this.el.content,e===2){const h=this.el.content,p=h.firstChild;p.remove(),h.append(...p.childNodes)}for(;(o=S.nextNode())!==null&&r.length<c;){if(o.nodeType===1){if(o.hasAttributes()){const h=[];for(const p of o.getAttributeNames())if(p.endsWith(rt)||p.startsWith(_)){const u=d[s++];if(h.push(p),u!==void 0){const ut=o.getAttribute(u.toLowerCase()+rt).split(_),A=/([.?@])?(.*)/.exec(u);r.push({type:1,index:a,name:A[2],strings:ut,ctor:A[1]==="."?$e:A[1]==="?"?me:A[1]==="@"?fe:J})}else r.push({type:6,index:a})}for(const p of h)o.removeAttribute(p)}if(Bt.test(o.tagName)){const h=o.textContent.split(_),p=h.length-1;if(p>0){o.textContent=N?N.emptyScript:"";for(let u=0;u<p;u++)o.append(h[u],O()),S.nextNode(),r.push({type:2,index:++a});o.append(h[p],O())}}}else if(o.nodeType===8)if(o.data===Pt)r.push({type:2,index:a});else{let h=-1;for(;(h=o.data.indexOf(_,h+1))!==-1;)r.push({type:7,index:a}),h+=_.length-1}a++}}static createElement(t,e){const i=k.createElement("template");return i.innerHTML=t,i}}function U(n,t,e=n,i){var o,a,s,c;if(t===P)return t;let r=i!==void 0?(o=e._$Co)===null||o===void 0?void 0:o[i]:e._$Cl;const l=B(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==l&&((a=r==null?void 0:r._$AO)===null||a===void 0||a.call(r,!1),l===void 0?r=void 0:(r=new l(n),r._$AT(n,e,i)),i!==void 0?((s=(c=e)._$Co)!==null&&s!==void 0?s:c._$Co=[])[i]=r:e._$Cl=r),r!==void 0&&(t=U(n,r._$AS(n,t.values),r,i)),t}class ue{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){var e;const{el:{content:i},parts:o}=this._$AD,a=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:k).importNode(i,!0);S.currentNode=a;let s=S.nextNode(),c=0,r=0,l=o[0];for(;l!==void 0;){if(c===l.index){let d;l.type===2?d=new V(s,s.nextSibling,this,t):l.type===1?d=new l.ctor(s,l.name,l.strings,this,t):l.type===6&&(d=new ge(s,this,t)),this._$AV.push(d),l=o[++r]}c!==(l==null?void 0:l.index)&&(s=S.nextNode(),c++)}return S.currentNode=k,a}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class V{constructor(t,e,i,o){var a;this.type=2,this._$AH=v,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=(a=o==null?void 0:o.isConnected)===null||a===void 0||a}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),B(t)?t===v||t==null||t===""?(this._$AH!==v&&this._$AR(),this._$AH=v):t!==this._$AH&&t!==P&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):ce(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==v&&B(this._$AH)?this._$AA.nextSibling.data=t:this.$(k.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,a=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=F.createElement(Ft(o.h,o.h[0]),this.options)),o);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===a)this._$AH.v(i);else{const s=new ue(a,this),c=s.u(this.options);s.v(i),this.$(c),this._$AH=s}}_$AC(t){let e=Lt.get(t.strings);return e===void 0&&Lt.set(t.strings,e=new F(t)),e}T(t){Ut(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const a of t)o===e.length?e.push(i=new V(this.k(O()),this.k(O()),this,this.options)):i=e[o],i._$AI(a),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class J{constructor(t,e,i,o,a){this.type=1,this._$AH=v,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=a,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=v}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const a=this.strings;let s=!1;if(a===void 0)t=U(this,t,e,0),s=!B(t)||t!==this._$AH&&t!==P,s&&(this._$AH=t);else{const c=t;let r,l;for(t=a[0],r=0;r<a.length-1;r++)l=U(this,c[i+r],e,r),l===P&&(l=this._$AH[r]),s||(s=!B(l)||l!==this._$AH[r]),l===v?t=v:t!==v&&(t+=(l??"")+a[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===v?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class $e extends J{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===v?void 0:t}}const ve=N?N.emptyScript:"";class me extends J{constructor(){super(...arguments),this.type=4}j(t){t&&t!==v?this.element.setAttribute(this.name,ve):this.element.removeAttribute(this.name)}}class fe extends J{constructor(t,e,i,o,a){super(t,e,i,o,a),this.type=5}_$AI(t,e=this){var i;if((t=(i=U(this,t,e,0))!==null&&i!==void 0?i:v)===P)return;const o=this._$AH,a=t===v&&o!==v||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==v&&(o===v||a);a&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class ge{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){U(this,t)}}const Vt=K.litHtmlPolyfillSupport;Vt==null||Vt(F,V),((at=K.litHtmlVersions)!==null&&at!==void 0?at:K.litHtmlVersions=[]).push("2.8.0");const Ae=(n,t,e)=>{var i,o;const a=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:t;let s=a._$litPart$;if(s===void 0){const c=(o=e==null?void 0:e.renderBefore)!==null&&o!==void 0?o:null;a._$litPart$=s=new V(t.insertBefore(O(),c),c,void 0,e??{})}return s._$AI(n),s};/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/var dt,ht;let R=class extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ae(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return P}};R.finalized=!0,R._$litElement$=!0,(dt=globalThis.litElementHydrateSupport)===null||dt===void 0||dt.call(globalThis,{LitElement:R});const
|
|
25
|
+
*/var dt,ht;let R=class extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ae(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return P}};R.finalized=!0,R._$litElement$=!0,(dt=globalThis.litElementHydrateSupport)===null||dt===void 0||dt.call(globalThis,{LitElement:R});const jt=globalThis.litElementPolyfillSupport;jt==null||jt({LitElement:R}),((ht=globalThis.litElementVersions)!==null&&ht!==void 0?ht:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2020 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/const be=Symbol.for(""),_e=n=>{if((n==null?void 0:n.r)===be)return n==null?void 0:n._$litStatic$},
|
|
29
|
+
*/const be=Symbol.for(""),_e=n=>{if((n==null?void 0:n.r)===be)return n==null?void 0:n._$litStatic$},zt=new Map,ye=n=>(t,...e)=>{const i=e.length;let o,a;const s=[],c=[];let r,l=0,d=!1;for(;l<i;){for(r=t[l];l<i&&(a=e[l],(o=_e(a))!==void 0);)r+=o+t[++l],d=!0;l!==i&&c.push(a),s.push(r),l++}if(l===i&&s.push(t[i]),d){const h=s.join("$$lit$$");(t=zt.get(h))===void 0&&(s.raw=s,zt.set(h,t=s)),e=c}return n(t,...e)},ct=ye(ie),xe=Xt`
|
|
30
30
|
:host {
|
|
31
31
|
position: absolute;
|
|
32
32
|
width: 100%;
|
|
@@ -113,6 +113,10 @@
|
|
|
113
113
|
color: #FFFFFF;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
:host([theme="dark"]) .btn-outline {
|
|
117
|
+
color: #FFFFFF;
|
|
118
|
+
}
|
|
119
|
+
|
|
116
120
|
.booking-box .option-box {
|
|
117
121
|
width: auto;
|
|
118
122
|
background-color: #ffffff;
|
|
@@ -302,7 +306,7 @@
|
|
|
302
306
|
* @license
|
|
303
307
|
* Copyright 2018 Google LLC
|
|
304
308
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
305
|
-
*/const qt=ke(class extends Ee{constructor(n){var t;if(super(n),n.type!==we.ATTRIBUTE||n.name!=="class"||((t=n.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(t=>n[t]).join(" ")+" "}update(n,[t]){var e,i;if(this.it===void 0){this.it=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in t)t[a]&&!(!((e=this.nt)===null||e===void 0)&&e.has(a))&&this.it.add(a);return this.render(t)}const o=n.element.classList;this.it.forEach(a=>{a in t||(o.remove(a),this.it.delete(a))});for(const a in t){const s=!!t[a];s===this.it.has(a)||!((i=this.nt)===null||i===void 0)&&i.has(a)||(s?(o.add(a),this.it.add(a)):(o.remove(a),this.it.delete(a)))}return H}}),Se=[{name:"Consulta médica",items:[{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"Teleconsulta",link:"https://agenda.clinicaalemana.cl/paciente"},{name:"TeleUrgencia",link:"https://www.clinicaalemana.cl/telemedicina/teleurgencia"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio"},{name:"Teledermatología",link:"https://teledermatologia.clinicaalemana.cl/"}]},{name:"Exámenes y procedimientos",items:[{name:"Presencial",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio/examenes-laboratorio-domicilio"}]},{name:"Vacunas",items:[{name:"Adulto",link:"https://agenda.clinicaalemana.cl/examenes-y-procedimientos/vacunatorio/vacuna-adulto/disponibilidad"},{name:"Covid-19",link:"https://www.clinicaalemana.cl/covid-19"},{name:"Influenza",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/influenza-2024"},{name:"Viajeros",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/reserva-vacuna-fiebre-amarilla"},{name:"TeleAsesoría pediátrica",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/asesoria-en-vacunacion-pediatrica"}]}],Ce=[{name:"Consulta médica",link:"https://reserva.clinicaalemana.cl/alemana-integral"},{name:"Exámenes y procedimientos",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"}],pt=Se,Wt=Ce;class
|
|
309
|
+
*/const qt=ke(class extends Ee{constructor(n){var t;if(super(n),n.type!==we.ATTRIBUTE||n.name!=="class"||((t=n.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(t=>n[t]).join(" ")+" "}update(n,[t]){var e,i;if(this.it===void 0){this.it=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in t)t[a]&&!(!((e=this.nt)===null||e===void 0)&&e.has(a))&&this.it.add(a);return this.render(t)}const o=n.element.classList;this.it.forEach(a=>{a in t||(o.remove(a),this.it.delete(a))});for(const a in t){const s=!!t[a];s===this.it.has(a)||!((i=this.nt)===null||i===void 0)&&i.has(a)||(s?(o.add(a),this.it.add(a)):(o.remove(a),this.it.delete(a)))}return H}}),Se=[{name:"Consulta médica",items:[{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"Teleconsulta",link:"https://agenda.clinicaalemana.cl/paciente"},{name:"TeleUrgencia",link:"https://www.clinicaalemana.cl/telemedicina/teleurgencia"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio"},{name:"Teledermatología",link:"https://teledermatologia.clinicaalemana.cl/"}]},{name:"Exámenes y procedimientos",items:[{name:"Presencial",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio/examenes-laboratorio-domicilio"}]},{name:"Vacunas",items:[{name:"Adulto",link:"https://agenda.clinicaalemana.cl/examenes-y-procedimientos/vacunatorio/vacuna-adulto/disponibilidad"},{name:"Covid-19",link:"https://www.clinicaalemana.cl/covid-19"},{name:"Influenza",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/influenza-2024"},{name:"Viajeros",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/reserva-vacuna-fiebre-amarilla"},{name:"TeleAsesoría pediátrica",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/asesoria-en-vacunacion-pediatrica"}]}],Ce=[{name:"Consulta médica",link:"https://reserva.clinicaalemana.cl/alemana-integral"},{name:"Exámenes y procedimientos",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"}],pt=Se,Wt=Ce;class j extends R{constructor(){super(),this.hidden=!1,this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.dataTipoDeAtencion=[],this.dataModalidad=[],this.opcionSelecionada="Paciente",this.focused=!1,this.refresh=!1,this.link=""}changeHandler(t){const e=t.target.name;if(this[e]=t.composedPath()[0].value,this.handleErrorTipoDeAtencion(!1),this.handleErrorModalidad(!1),e==="tipoDeAtencionIntegral"&&(this.tipoDeAtencion="",this.modalidad=""),e==="tipoDeAtencion"){this.modalidad="",this.refresh=!0,this.handleFocusModalidad(!0),this.handleFocusTipoDeAtencion(!1);const i=pt.find(o=>o.name===this.tipoDeAtencion).items.map(o=>o.name);this.dataModalidad=[...i],this.requestUpdate(),setTimeout(()=>{this.refresh=!1,this.requestUpdate()},100)}e==="modalidad"&&this.handleFocusModalidad(!1),this.handleLink()}handleFocusTipoDeAtencion(t){const e=this.shadowRoot.getElementById("tipoDeAtencion");e==null||e.setAttribute("active",t)}handleFocusModalidad(t){const e=this.shadowRoot.getElementById("modalidad");e==null||e.setAttribute("active",t)}handleErrorTipoDeAtencion(t){const e=this.shadowRoot.getElementById("tipoDeAtencion");t?e==null||e.setAttribute("isSelectError",!0):e==null||e.removeAttribute("isSelectError")}handleErrorModalidad(t){const e=this.shadowRoot.getElementById("modalidad");t?e==null||e.setAttribute("isSelectError",!0):e==null||e.removeAttribute("isSelectError")}handleLink(){let t="";this.tipoDeAtencionIntegral!==""&&(t=Wt.find(i=>i.name===this.tipoDeAtencionIntegral).link),this.tipoDeAtencion!==""&&this.modalidad!==""&&(t=pt.find(i=>i.name===this.tipoDeAtencion).items.find(i=>i.name===this.modalidad).link),this.link=t;const e=this.shadowRoot.querySelector(".btn-action");this.link!==""?e.setAttribute("href",this.link):e.removeAttribute("href")}submit(){this.link!==""?this.handleMark({category:"reservar_hora"}):this.tipoDeAtencion===""?(this.handleErrorTipoDeAtencion(!0),this.handleErrorModalidad(!0)):(this.handleFocusModalidad(!1),this.handleErrorModalidad(!0))}handleMark({category:t,action:e,label:i}){const o={event:"evento-interactivo","evento-interactivo-categoria":t,"evento-interactivo-accion":e||this.tipoDeAtencion||this.tipoDeAtencionIntegral||"reservar_hora","evento-interactivo-etiqueta":i||this.modalidad,opcion_seleccionada:this.opcionSelecionada};console.log("devLayer_ ",o);try{window.dataLayer.push(o)}catch{console.log("event push failed")}}eventHandler(){this.removeAttribute("hidden");let t=this.shadowRoot.getElementById("backdrop");t.style.display="flex",this.hidden=!1,this.focused=!0,this.requestUpdate()}firstUpdated(){if(this.handleParameter(),setTimeout(()=>{this.handleTab()},1e3),this.onlyView||document.addEventListener("openBookingBox",()=>{this.eventHandler()}),window.innerWidth>1023){const t=this.shadowRoot.querySelector(".booking-box");let e=this.shadowRoot.getElementById("backdrop");t.addEventListener("focusin",()=>{this.focused=!0,e.style.display="flex",this.requestUpdate()})}}handleTab(t){this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.handleLink();const e={1:"Paciente",2:"Alemana Integral"};this.opcionSelecionada=e[t]??"Paciente";const i=this.shadowRoot.querySelectorAll("[data-view]");if(t){const o=this.shadowRoot.querySelectorAll(".top .item");this.shadowRoot.querySelector(".option-box").setAttribute("current-view",t.toString()),i.forEach(s=>{s.getAttribute("data-view")===t.toString()?s.style.display="flex":s.style.display="none"}),o.forEach(s=>{s.getAttribute("data-tab")===t.toString()?s.querySelector("cas-radio").setAttribute("checked",!0):s.querySelector("cas-radio").removeAttribute("checked")})}else Array.from(i).filter(a=>a.getAttribute("data-view")==="2").forEach(a=>{a.style.display="none"})}handleParameter(){new URLSearchParams(window.location.search).get("rsv")==="true"&&this.eventHandler()}closeHandler(){let t=this.shadowRoot.getElementById("backdrop");t.style.display="none",this.hidden=!1,this.focused=!1,this.requestUpdate()}handleOverrideTime(){this.handleMark({category:"anular_hora"})}render(){const t=qt({"booking-box":!0,hidden:this.hidden,home:this.home,focused:this.focused}),e=qt({backdrop:!0,hidden:this.hidden});return ct`
|
|
306
310
|
<div class="${e}" id="backdrop" @click="${this.closeHandler}"></div>
|
|
307
311
|
<div class="booking-box-main-cont" id="booking-box-main-cont">
|
|
308
312
|
<div class="${t}" id="booking-box" tabindex="0">
|
|
@@ -371,13 +375,13 @@
|
|
|
371
375
|
iconSize="20"
|
|
372
376
|
></cas-button>
|
|
373
377
|
</a>
|
|
374
|
-
<a href="https://www.clinicaalemana.cl/alemana-integral" data-view="2" style="display: none">
|
|
378
|
+
<a href="https://www.clinicaalemana.cl/alemana-integral" data-view="2" class="btn-outline" style="display: none">
|
|
375
379
|
<cas-button
|
|
376
380
|
rounded="true"
|
|
377
381
|
@click="${this.submit}"
|
|
378
382
|
fullWidth="true"
|
|
379
383
|
text="Más información"
|
|
380
|
-
variant="${this.theme==="dark"?"
|
|
384
|
+
variant="${this.theme==="dark"?"outline3":"outline1"}"
|
|
381
385
|
iconName="flat-info"
|
|
382
386
|
iconSize="20"
|
|
383
387
|
></cas-button>
|
|
@@ -389,4 +393,4 @@
|
|
|
389
393
|
</div>
|
|
390
394
|
</div>
|
|
391
395
|
</div>
|
|
392
|
-
</div>`}}X(
|
|
396
|
+
</div>`}}X(j,"styles",xe),X(j,"shadowRootOptions",{...R.shadowRootOptions,mode:"open"}),X(j,"properties",{theme:{type:String},hidden:{type:Boolean},title:{type:String},tipoDeAtencion:{type:String},modalidad:{type:String},dataTipoDeAtencion:{type:Array},dataModalidad:{type:Array},focused:{type:Boolean},home:{type:Boolean},onlyView:{type:Boolean}}),customElements.get("cas-booking-box")||customElements.define("cas-booking-box",j),f.CasBookingBox=j,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(b,J){typeof exports=="object"&&typeof module<"u"?J(exports):typeof define=="function"&&define.amd?define(["exports"],J):(b=typeof globalThis<"u"?globalThis:b||self,J(b["all-components"]={}))})(this,function(b){"use strict";var Pv=Object.defineProperty;var Fv=(b,J,J1)=>J in b?Pv(b,J,{enumerable:!0,configurable:!0,writable:!0,value:J1}):b[J]=J1;var g=(b,J,J1)=>(Fv(b,typeof J!="symbol"?J+"":J,J1),J1);var I3,SC;(()=>{const i=document.createElement("link");i.setAttribute("href","https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap"),i.setAttribute("rel","stylesheet"),document.head.appendChild(i)})();const Y5={name:"@eloisa-ds/all-components",version:"1.0.
|
|
1
|
+
(function(b,J){typeof exports=="object"&&typeof module<"u"?J(exports):typeof define=="function"&&define.amd?define(["exports"],J):(b=typeof globalThis<"u"?globalThis:b||self,J(b["all-components"]={}))})(this,function(b){"use strict";var Pv=Object.defineProperty;var Fv=(b,J,J1)=>J in b?Pv(b,J,{enumerable:!0,configurable:!0,writable:!0,value:J1}):b[J]=J1;var g=(b,J,J1)=>(Fv(b,typeof J!="symbol"?J+"":J,J1),J1);var I3,SC;(()=>{const i=document.createElement("link");i.setAttribute("href","https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap"),i.setAttribute("rel","stylesheet"),document.head.appendChild(i)})();const Y5={name:"@eloisa-ds/all-components",version:"1.0.99",dependencies:{},main:"./index.js",module:"./index.mjs",typings:"./index.d.ts",private:!0};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -6927,6 +6927,10 @@
|
|
|
6927
6927
|
color: #FFFFFF;
|
|
6928
6928
|
}
|
|
6929
6929
|
|
|
6930
|
+
:host([theme="dark"]) .btn-outline {
|
|
6931
|
+
color: #FFFFFF;
|
|
6932
|
+
}
|
|
6933
|
+
|
|
6930
6934
|
.booking-box .option-box {
|
|
6931
6935
|
width: auto;
|
|
6932
6936
|
background-color: #ffffff;
|
|
@@ -7108,7 +7112,7 @@
|
|
|
7108
7112
|
border-radius: 8px; /* rounded */
|
|
7109
7113
|
background-color: rgba(229, 231, 235, 0.5); /* bg-gray-100 */
|
|
7110
7114
|
}
|
|
7111
|
-
`,Fn=[{name:"Consulta médica",items:[{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"Teleconsulta",link:"https://agenda.clinicaalemana.cl/paciente"},{name:"TeleUrgencia",link:"https://www.clinicaalemana.cl/telemedicina/teleurgencia"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio"},{name:"Teledermatología",link:"https://teledermatologia.clinicaalemana.cl/"}]},{name:"Exámenes y procedimientos",items:[{name:"Presencial",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio/examenes-laboratorio-domicilio"}]},{name:"Vacunas",items:[{name:"Adulto",link:"https://agenda.clinicaalemana.cl/examenes-y-procedimientos/vacunatorio/vacuna-adulto/disponibilidad"},{name:"Covid-19",link:"https://www.clinicaalemana.cl/covid-19"},{name:"Influenza",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/influenza-2024"},{name:"Viajeros",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/reserva-vacuna-fiebre-amarilla"},{name:"TeleAsesoría pediátrica",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/asesoria-en-vacunacion-pediatrica"}]}],Nn=[{name:"Consulta médica",link:"https://reserva.clinicaalemana.cl/alemana-integral"},{name:"Exámenes y procedimientos",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"}],k6=Fn,_7=Nn;class t5 extends f{constructor(){super(),this.hidden=!1,this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.dataTipoDeAtencion=[],this.dataModalidad=[],this.opcionSelecionada="Paciente",this.focused=!1,this.refresh=!1,this.link=""}changeHandler(C){const t=C.target.name;if(this[t]=C.composedPath()[0].value,this.handleErrorTipoDeAtencion(!1),this.handleErrorModalidad(!1),t==="tipoDeAtencionIntegral"&&(this.tipoDeAtencion="",this.modalidad=""),t==="tipoDeAtencion"){this.modalidad="",this.refresh=!0,this.handleFocusModalidad(!0),this.handleFocusTipoDeAtencion(!1);const e=k6.find(o=>o.name===this.tipoDeAtencion).items.map(o=>o.name);this.dataModalidad=[...e],this.requestUpdate(),setTimeout(()=>{this.refresh=!1,this.requestUpdate()},100)}t==="modalidad"&&this.handleFocusModalidad(!1),this.handleLink()}handleFocusTipoDeAtencion(C){const t=this.shadowRoot.getElementById("tipoDeAtencion");t==null||t.setAttribute("active",C)}handleFocusModalidad(C){const t=this.shadowRoot.getElementById("modalidad");t==null||t.setAttribute("active",C)}handleErrorTipoDeAtencion(C){const t=this.shadowRoot.getElementById("tipoDeAtencion");C?t==null||t.setAttribute("isSelectError",!0):t==null||t.removeAttribute("isSelectError")}handleErrorModalidad(C){const t=this.shadowRoot.getElementById("modalidad");C?t==null||t.setAttribute("isSelectError",!0):t==null||t.removeAttribute("isSelectError")}handleLink(){let C="";this.tipoDeAtencionIntegral!==""&&(C=_7.find(e=>e.name===this.tipoDeAtencionIntegral).link),this.tipoDeAtencion!==""&&this.modalidad!==""&&(C=k6.find(e=>e.name===this.tipoDeAtencion).items.find(e=>e.name===this.modalidad).link),this.link=C;const t=this.shadowRoot.querySelector(".btn-action");this.link!==""?t.setAttribute("href",this.link):t.removeAttribute("href")}submit(){this.link!==""?this.handleMark({category:"reservar_hora"}):this.tipoDeAtencion===""?(this.handleErrorTipoDeAtencion(!0),this.handleErrorModalidad(!0)):(this.handleFocusModalidad(!1),this.handleErrorModalidad(!0))}handleMark({category:C,action:t,label:e}){
|
|
7115
|
+
`,Fn=[{name:"Consulta médica",items:[{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"Teleconsulta",link:"https://agenda.clinicaalemana.cl/paciente"},{name:"TeleUrgencia",link:"https://www.clinicaalemana.cl/telemedicina/teleurgencia"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio"},{name:"Teledermatología",link:"https://teledermatologia.clinicaalemana.cl/"}]},{name:"Exámenes y procedimientos",items:[{name:"Presencial",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio/examenes-laboratorio-domicilio"}]},{name:"Vacunas",items:[{name:"Adulto",link:"https://agenda.clinicaalemana.cl/examenes-y-procedimientos/vacunatorio/vacuna-adulto/disponibilidad"},{name:"Covid-19",link:"https://www.clinicaalemana.cl/covid-19"},{name:"Influenza",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/influenza-2024"},{name:"Viajeros",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/reserva-vacuna-fiebre-amarilla"},{name:"TeleAsesoría pediátrica",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/asesoria-en-vacunacion-pediatrica"}]}],Nn=[{name:"Consulta médica",link:"https://reserva.clinicaalemana.cl/alemana-integral"},{name:"Exámenes y procedimientos",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"}],k6=Fn,_7=Nn;class t5 extends f{constructor(){super(),this.hidden=!1,this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.dataTipoDeAtencion=[],this.dataModalidad=[],this.opcionSelecionada="Paciente",this.focused=!1,this.refresh=!1,this.link=""}changeHandler(C){const t=C.target.name;if(this[t]=C.composedPath()[0].value,this.handleErrorTipoDeAtencion(!1),this.handleErrorModalidad(!1),t==="tipoDeAtencionIntegral"&&(this.tipoDeAtencion="",this.modalidad=""),t==="tipoDeAtencion"){this.modalidad="",this.refresh=!0,this.handleFocusModalidad(!0),this.handleFocusTipoDeAtencion(!1);const e=k6.find(o=>o.name===this.tipoDeAtencion).items.map(o=>o.name);this.dataModalidad=[...e],this.requestUpdate(),setTimeout(()=>{this.refresh=!1,this.requestUpdate()},100)}t==="modalidad"&&this.handleFocusModalidad(!1),this.handleLink()}handleFocusTipoDeAtencion(C){const t=this.shadowRoot.getElementById("tipoDeAtencion");t==null||t.setAttribute("active",C)}handleFocusModalidad(C){const t=this.shadowRoot.getElementById("modalidad");t==null||t.setAttribute("active",C)}handleErrorTipoDeAtencion(C){const t=this.shadowRoot.getElementById("tipoDeAtencion");C?t==null||t.setAttribute("isSelectError",!0):t==null||t.removeAttribute("isSelectError")}handleErrorModalidad(C){const t=this.shadowRoot.getElementById("modalidad");C?t==null||t.setAttribute("isSelectError",!0):t==null||t.removeAttribute("isSelectError")}handleLink(){let C="";this.tipoDeAtencionIntegral!==""&&(C=_7.find(e=>e.name===this.tipoDeAtencionIntegral).link),this.tipoDeAtencion!==""&&this.modalidad!==""&&(C=k6.find(e=>e.name===this.tipoDeAtencion).items.find(e=>e.name===this.modalidad).link),this.link=C;const t=this.shadowRoot.querySelector(".btn-action");this.link!==""?t.setAttribute("href",this.link):t.removeAttribute("href")}submit(){this.link!==""?this.handleMark({category:"reservar_hora"}):this.tipoDeAtencion===""?(this.handleErrorTipoDeAtencion(!0),this.handleErrorModalidad(!0)):(this.handleFocusModalidad(!1),this.handleErrorModalidad(!0))}handleMark({category:C,action:t,label:e}){const o={event:"evento-interactivo","evento-interactivo-categoria":C,"evento-interactivo-accion":t||this.tipoDeAtencion||this.tipoDeAtencionIntegral||"reservar_hora","evento-interactivo-etiqueta":e||this.modalidad,opcion_seleccionada:this.opcionSelecionada};console.log("devLayer_ ",o);try{window.dataLayer.push(o)}catch{console.log("event push failed")}}eventHandler(){this.removeAttribute("hidden");let C=this.shadowRoot.getElementById("backdrop");C.style.display="flex",this.hidden=!1,this.focused=!0,this.requestUpdate()}firstUpdated(){if(this.handleParameter(),setTimeout(()=>{this.handleTab()},1e3),this.onlyView||document.addEventListener("openBookingBox",()=>{this.eventHandler()}),window.innerWidth>1023){const C=this.shadowRoot.querySelector(".booking-box");let t=this.shadowRoot.getElementById("backdrop");C.addEventListener("focusin",()=>{this.focused=!0,t.style.display="flex",this.requestUpdate()})}}handleTab(C){this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.handleLink();const t={1:"Paciente",2:"Alemana Integral"};this.opcionSelecionada=t[C]??"Paciente";const e=this.shadowRoot.querySelectorAll("[data-view]");if(C){const o=this.shadowRoot.querySelectorAll(".top .item");this.shadowRoot.querySelector(".option-box").setAttribute("current-view",C.toString()),e.forEach(l=>{l.getAttribute("data-view")===C.toString()?l.style.display="flex":l.style.display="none"}),o.forEach(l=>{l.getAttribute("data-tab")===C.toString()?l.querySelector("cas-radio").setAttribute("checked",!0):l.querySelector("cas-radio").removeAttribute("checked")})}else Array.from(e).filter(a=>a.getAttribute("data-view")==="2").forEach(a=>{a.style.display="none"})}handleParameter(){new URLSearchParams(window.location.search).get("rsv")==="true"&&this.eventHandler()}closeHandler(){let C=this.shadowRoot.getElementById("backdrop");C.style.display="none",this.hidden=!1,this.focused=!1,this.requestUpdate()}handleOverrideTime(){this.handleMark({category:"anular_hora"})}render(){const C=a2({"booking-box":!0,hidden:this.hidden,home:this.home,focused:this.focused}),t=a2({backdrop:!0,hidden:this.hidden});return M`
|
|
7112
7116
|
<div class="${t}" id="backdrop" @click="${this.closeHandler}"></div>
|
|
7113
7117
|
<div class="booking-box-main-cont" id="booking-box-main-cont">
|
|
7114
7118
|
<div class="${C}" id="booking-box" tabindex="0">
|
|
@@ -7177,13 +7181,13 @@
|
|
|
7177
7181
|
iconSize="20"
|
|
7178
7182
|
></cas-button>
|
|
7179
7183
|
</a>
|
|
7180
|
-
<a href="https://www.clinicaalemana.cl/alemana-integral" data-view="2" style="display: none">
|
|
7184
|
+
<a href="https://www.clinicaalemana.cl/alemana-integral" data-view="2" class="btn-outline" style="display: none">
|
|
7181
7185
|
<cas-button
|
|
7182
7186
|
rounded="true"
|
|
7183
7187
|
@click="${this.submit}"
|
|
7184
7188
|
fullWidth="true"
|
|
7185
7189
|
text="Más información"
|
|
7186
|
-
variant="${this.theme==="dark"?"
|
|
7190
|
+
variant="${this.theme==="dark"?"outline3":"outline1"}"
|
|
7187
7191
|
iconName="flat-info"
|
|
7188
7192
|
iconSize="20"
|
|
7189
7193
|
></cas-button>
|
package/build/cas-header.js
CHANGED
|
@@ -6927,6 +6927,10 @@
|
|
|
6927
6927
|
color: #FFFFFF;
|
|
6928
6928
|
}
|
|
6929
6929
|
|
|
6930
|
+
:host([theme="dark"]) .btn-outline {
|
|
6931
|
+
color: #FFFFFF;
|
|
6932
|
+
}
|
|
6933
|
+
|
|
6930
6934
|
.booking-box .option-box {
|
|
6931
6935
|
width: auto;
|
|
6932
6936
|
background-color: #ffffff;
|
|
@@ -7108,7 +7112,7 @@
|
|
|
7108
7112
|
border-radius: 8px; /* rounded */
|
|
7109
7113
|
background-color: rgba(229, 231, 235, 0.5); /* bg-gray-100 */
|
|
7110
7114
|
}
|
|
7111
|
-
`,Ua=[{name:"Consulta médica",items:[{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"Teleconsulta",link:"https://agenda.clinicaalemana.cl/paciente"},{name:"TeleUrgencia",link:"https://www.clinicaalemana.cl/telemedicina/teleurgencia"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio"},{name:"Teledermatología",link:"https://teledermatologia.clinicaalemana.cl/"}]},{name:"Exámenes y procedimientos",items:[{name:"Presencial",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio/examenes-laboratorio-domicilio"}]},{name:"Vacunas",items:[{name:"Adulto",link:"https://agenda.clinicaalemana.cl/examenes-y-procedimientos/vacunatorio/vacuna-adulto/disponibilidad"},{name:"Covid-19",link:"https://www.clinicaalemana.cl/covid-19"},{name:"Influenza",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/influenza-2024"},{name:"Viajeros",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/reserva-vacuna-fiebre-amarilla"},{name:"TeleAsesoría pediátrica",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/asesoria-en-vacunacion-pediatrica"}]}],qa=[{name:"Consulta médica",link:"https://reserva.clinicaalemana.cl/alemana-integral"},{name:"Exámenes y procedimientos",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"}],K5=Ua,F4=qa;class x3 extends V{constructor(){super(),this.hidden=!1,this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.dataTipoDeAtencion=[],this.dataModalidad=[],this.opcionSelecionada="Paciente",this.focused=!1,this.refresh=!1,this.link=""}changeHandler(C){const t=C.target.name;if(this[t]=C.composedPath()[0].value,this.handleErrorTipoDeAtencion(!1),this.handleErrorModalidad(!1),t==="tipoDeAtencionIntegral"&&(this.tipoDeAtencion="",this.modalidad=""),t==="tipoDeAtencion"){this.modalidad="",this.refresh=!0,this.handleFocusModalidad(!0),this.handleFocusTipoDeAtencion(!1);const e=K5.find(i=>i.name===this.tipoDeAtencion).items.map(i=>i.name);this.dataModalidad=[...e],this.requestUpdate(),setTimeout(()=>{this.refresh=!1,this.requestUpdate()},100)}t==="modalidad"&&this.handleFocusModalidad(!1),this.handleLink()}handleFocusTipoDeAtencion(C){const t=this.shadowRoot.getElementById("tipoDeAtencion");t==null||t.setAttribute("active",C)}handleFocusModalidad(C){const t=this.shadowRoot.getElementById("modalidad");t==null||t.setAttribute("active",C)}handleErrorTipoDeAtencion(C){const t=this.shadowRoot.getElementById("tipoDeAtencion");C?t==null||t.setAttribute("isSelectError",!0):t==null||t.removeAttribute("isSelectError")}handleErrorModalidad(C){const t=this.shadowRoot.getElementById("modalidad");C?t==null||t.setAttribute("isSelectError",!0):t==null||t.removeAttribute("isSelectError")}handleLink(){let C="";this.tipoDeAtencionIntegral!==""&&(C=F4.find(e=>e.name===this.tipoDeAtencionIntegral).link),this.tipoDeAtencion!==""&&this.modalidad!==""&&(C=K5.find(e=>e.name===this.tipoDeAtencion).items.find(e=>e.name===this.modalidad).link),this.link=C;const t=this.shadowRoot.querySelector(".btn-action");this.link!==""?t.setAttribute("href",this.link):t.removeAttribute("href")}submit(){this.link!==""?this.handleMark({category:"reservar_hora"}):this.tipoDeAtencion===""?(this.handleErrorTipoDeAtencion(!0),this.handleErrorModalidad(!0)):(this.handleFocusModalidad(!1),this.handleErrorModalidad(!0))}handleMark({category:C,action:t,label:e}){
|
|
7115
|
+
`,Ua=[{name:"Consulta médica",items:[{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"Teleconsulta",link:"https://agenda.clinicaalemana.cl/paciente"},{name:"TeleUrgencia",link:"https://www.clinicaalemana.cl/telemedicina/teleurgencia"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio"},{name:"Teledermatología",link:"https://teledermatologia.clinicaalemana.cl/"}]},{name:"Exámenes y procedimientos",items:[{name:"Presencial",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio/examenes-laboratorio-domicilio"}]},{name:"Vacunas",items:[{name:"Adulto",link:"https://agenda.clinicaalemana.cl/examenes-y-procedimientos/vacunatorio/vacuna-adulto/disponibilidad"},{name:"Covid-19",link:"https://www.clinicaalemana.cl/covid-19"},{name:"Influenza",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/influenza-2024"},{name:"Viajeros",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/reserva-vacuna-fiebre-amarilla"},{name:"TeleAsesoría pediátrica",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/asesoria-en-vacunacion-pediatrica"}]}],qa=[{name:"Consulta médica",link:"https://reserva.clinicaalemana.cl/alemana-integral"},{name:"Exámenes y procedimientos",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"}],K5=Ua,F4=qa;class x3 extends V{constructor(){super(),this.hidden=!1,this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.dataTipoDeAtencion=[],this.dataModalidad=[],this.opcionSelecionada="Paciente",this.focused=!1,this.refresh=!1,this.link=""}changeHandler(C){const t=C.target.name;if(this[t]=C.composedPath()[0].value,this.handleErrorTipoDeAtencion(!1),this.handleErrorModalidad(!1),t==="tipoDeAtencionIntegral"&&(this.tipoDeAtencion="",this.modalidad=""),t==="tipoDeAtencion"){this.modalidad="",this.refresh=!0,this.handleFocusModalidad(!0),this.handleFocusTipoDeAtencion(!1);const e=K5.find(i=>i.name===this.tipoDeAtencion).items.map(i=>i.name);this.dataModalidad=[...e],this.requestUpdate(),setTimeout(()=>{this.refresh=!1,this.requestUpdate()},100)}t==="modalidad"&&this.handleFocusModalidad(!1),this.handleLink()}handleFocusTipoDeAtencion(C){const t=this.shadowRoot.getElementById("tipoDeAtencion");t==null||t.setAttribute("active",C)}handleFocusModalidad(C){const t=this.shadowRoot.getElementById("modalidad");t==null||t.setAttribute("active",C)}handleErrorTipoDeAtencion(C){const t=this.shadowRoot.getElementById("tipoDeAtencion");C?t==null||t.setAttribute("isSelectError",!0):t==null||t.removeAttribute("isSelectError")}handleErrorModalidad(C){const t=this.shadowRoot.getElementById("modalidad");C?t==null||t.setAttribute("isSelectError",!0):t==null||t.removeAttribute("isSelectError")}handleLink(){let C="";this.tipoDeAtencionIntegral!==""&&(C=F4.find(e=>e.name===this.tipoDeAtencionIntegral).link),this.tipoDeAtencion!==""&&this.modalidad!==""&&(C=K5.find(e=>e.name===this.tipoDeAtencion).items.find(e=>e.name===this.modalidad).link),this.link=C;const t=this.shadowRoot.querySelector(".btn-action");this.link!==""?t.setAttribute("href",this.link):t.removeAttribute("href")}submit(){this.link!==""?this.handleMark({category:"reservar_hora"}):this.tipoDeAtencion===""?(this.handleErrorTipoDeAtencion(!0),this.handleErrorModalidad(!0)):(this.handleFocusModalidad(!1),this.handleErrorModalidad(!0))}handleMark({category:C,action:t,label:e}){const i={event:"evento-interactivo","evento-interactivo-categoria":C,"evento-interactivo-accion":t||this.tipoDeAtencion||this.tipoDeAtencionIntegral||"reservar_hora","evento-interactivo-etiqueta":e||this.modalidad,opcion_seleccionada:this.opcionSelecionada};console.log("devLayer_ ",i);try{window.dataLayer.push(i)}catch{console.log("event push failed")}}eventHandler(){this.removeAttribute("hidden");let C=this.shadowRoot.getElementById("backdrop");C.style.display="flex",this.hidden=!1,this.focused=!0,this.requestUpdate()}firstUpdated(){if(this.handleParameter(),setTimeout(()=>{this.handleTab()},1e3),this.onlyView||document.addEventListener("openBookingBox",()=>{this.eventHandler()}),window.innerWidth>1023){const C=this.shadowRoot.querySelector(".booking-box");let t=this.shadowRoot.getElementById("backdrop");C.addEventListener("focusin",()=>{this.focused=!0,t.style.display="flex",this.requestUpdate()})}}handleTab(C){this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.handleLink();const t={1:"Paciente",2:"Alemana Integral"};this.opcionSelecionada=t[C]??"Paciente";const e=this.shadowRoot.querySelectorAll("[data-view]");if(C){const i=this.shadowRoot.querySelectorAll(".top .item");this.shadowRoot.querySelector(".option-box").setAttribute("current-view",C.toString()),e.forEach(a=>{a.getAttribute("data-view")===C.toString()?a.style.display="flex":a.style.display="none"}),i.forEach(a=>{a.getAttribute("data-tab")===C.toString()?a.querySelector("cas-radio").setAttribute("checked",!0):a.querySelector("cas-radio").removeAttribute("checked")})}else Array.from(e).filter(l=>l.getAttribute("data-view")==="2").forEach(l=>{l.style.display="none"})}handleParameter(){new URLSearchParams(window.location.search).get("rsv")==="true"&&this.eventHandler()}closeHandler(){let C=this.shadowRoot.getElementById("backdrop");C.style.display="none",this.hidden=!1,this.focused=!1,this.requestUpdate()}handleOverrideTime(){this.handleMark({category:"anular_hora"})}render(){const C=k2({"booking-box":!0,hidden:this.hidden,home:this.home,focused:this.focused}),t=k2({backdrop:!0,hidden:this.hidden});return u`
|
|
7112
7116
|
<div class="${t}" id="backdrop" @click="${this.closeHandler}"></div>
|
|
7113
7117
|
<div class="booking-box-main-cont" id="booking-box-main-cont">
|
|
7114
7118
|
<div class="${C}" id="booking-box" tabindex="0">
|
|
@@ -7177,13 +7181,13 @@
|
|
|
7177
7181
|
iconSize="20"
|
|
7178
7182
|
></cas-button>
|
|
7179
7183
|
</a>
|
|
7180
|
-
<a href="https://www.clinicaalemana.cl/alemana-integral" data-view="2" style="display: none">
|
|
7184
|
+
<a href="https://www.clinicaalemana.cl/alemana-integral" data-view="2" class="btn-outline" style="display: none">
|
|
7181
7185
|
<cas-button
|
|
7182
7186
|
rounded="true"
|
|
7183
7187
|
@click="${this.submit}"
|
|
7184
7188
|
fullWidth="true"
|
|
7185
7189
|
text="Más información"
|
|
7186
|
-
variant="${this.theme==="dark"?"
|
|
7190
|
+
variant="${this.theme==="dark"?"outline3":"outline1"}"
|
|
7187
7191
|
iconName="flat-info"
|
|
7188
7192
|
iconSize="20"
|
|
7189
7193
|
></cas-button>
|