bookito-widget 0.7.0 → 0.7.1
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/CHANGELOG.md +10 -0
- package/dist/bookito-widget.umd.js +1 -1
- package/dist/bookito-widget.window.js +1 -1
- package/index.html +35 -21
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.7.1](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.7.0...bookito-widget-0.7.1) (2023-08-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **bookito-api:** make sure alpinebits data is synced for one week in advance ([bbcea68](https://github.com/Carlito-GmbH/carlito-platform/commit/bbcea684b4397f8056d5b2a83583ccb4bbe45b91))
|
|
11
|
+
* **carlito-app:** enhanced bookito widget example code ([5530011](https://github.com/Carlito-GmbH/carlito-platform/commit/553001165d779c55dd38909a58127f5c1f119854))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
5
15
|
# [0.7.0](https://github.com/Carlito-GmbH/carlito-platform/compare/bookito-widget-0.6.1...bookito-widget-0.7.0) (2023-08-25)
|
|
6
16
|
|
|
7
17
|
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
`));let $,W,Z,Y,X,ee,ie,ae,le,ce,de;!function(o){o.modal="modal",o.new_page="new_page"}($||($={})),function(o){o.sans="sans",o.serif="serif"}(W||(W={})),function(o){o.bookito="bookito",o.dailybird="dailybird"}(Z||(Z={})),function(o){o.facebook="facebook",o.instagram="instagram",o.web="web"}(Y||(Y={})),function(o){o.draft="draft",o.published="published"}(X||(X={})),function(o){o.apartment="apartment",o.hotel="hotel"}(ee||(ee={})),function(o){o.active="active",o.deleted="deleted",o.past_due="past_due",o.paused="paused",o.trialing="trialing"}(ie||(ie={})),function(o){o.apartment="apartment",o.hotel="hotel"}(ae||(ae={})),function(o){o.bottom="bottom",o.bottom_end="bottom_end",o.bottom_start="bottom_start",o.left="left",o.left_end="left_end",o.left_start="left_start",o.right="right",o.right_end="right_end",o.right_start="right_start",o.top="top",o.top_end="top_end",o.top_start="top_start"}(le||(le={})),function(o){o.big="big",o.default="default",o.small="small"}(ce||(ce={})),function(o){o.bookitoViewOnly="bookitoViewOnly",o.default="default"}(de||(de={}));__webpack_require__(5654),__webpack_require__(8268);__webpack_require__(3382),__webpack_require__(2295),__webpack_require__(7503);var pe=__webpack_require__(4512);__webpack_require__(7425),__webpack_require__(4994);let fe;function getKeyByValue(o){return Object.keys(fe).find((m=>fe[m]===o))}!function(o){o.INVALID_TOKEN="1004",o.UNKNOWN="0",o.AUTH_FAILED="6",o.CHARGING_PROCESS_ALREADY_RUNNING="3003",o.CHARGING_POINT_NOT_FOUND="3004",o.CHARGING_POINT_IN_MAINTENENCE="3005",o.CHARGING_SIZE_NOT_FOUND="3006",o.CHARGING_POINT_NOT_READY="3007",o.CHARGING_POINT_PAYMENT_ERROR="3008"}(fe||(fe={}));class OrderandoError extends Error{constructor(o){const m=getKeyByValue(o);m?(super(`Orderando error: ${m}`),this.errorCode=void 0,this.errorCode=fe[m]):(super("Unkown Orderando error"),this.errorCode=void 0,this.errorCode=fe.UNKNOWN),console.error("Orderando error:",o)}toString(){var o;return null!=(o=getKeyByValue(this.errorCode))?o:""}}const ye="https://api.ando.cloud/v1";let be,we="";async function request(o,m,v,{data:R,skipAuth:M=!1}={}){if(!we)throw new Error("Customer code not defined!");let j,$={"content-type":"application/json"};be&&!M&&($=Object.assign({},$,{Authorization:`Bearer ${be}`}));let W="";"POST"===v&&(j=JSON.stringify(R)),"GET"===v&&R&&(W=`?${Object.keys(R).map((o=>`${o}=${encodeURIComponent(R[o])}`)).join("&")}`);const Z=`${ye}/${o}/${we}${m}${W}`,Y=await fetch(Z,{method:v,body:j,headers:$}),X=await Y.json();if(!X.success||!Y.status.toString().startsWith("2")){var ee,ie,ae;const o=null!=(ee=null==(ie=X.errors)||null==(ae=ie.find((o=>o.code)))?void 0:ae.code)?ee:"0";throw new OrderandoError(o)}return X}function createPost(o){return function(m,v){return request(o,m,"POST",v)}}function createGet(o){return function(m,v){return request(o,m,"GET",v)}}createGet("order"),createPost("order");createGet("power"),createPost("power");__webpack_require__(8594),__webpack_require__(8143);function formatPrice(o,m="de-DE"){return new Intl.NumberFormat(m,{style:"currency",currency:"EUR"}).format(o)}var _e=__webpack_require__(8272),xe=__webpack_require__(1054),Se=__webpack_require__(1191),Ie=__webpack_require__(5754),Te=__webpack_require__(8850);var Pe=__webpack_require__(9494),Re=__webpack_require__.n(Pe),ze=__webpack_require__(3964);function getImageFormatUrl(o,m="large"){var v,R;if(!o)return;const M=null==(v=o.formats)||null==(R=v[m])?void 0:R.url;return M||(null==o?void 0:o.url)}const qe={NX_CLI_SET:"true",NX_LOAD_DOT_ENV_FILES:"true",NX_WORKSPACE_ROOT:"/home/runner/work/carlito-platform/carlito-platform",NX_TERMINAL_OUTPUT_PATH:"/home/runner/work/carlito-platform/carlito-platform/node_modules/.cache/nx/terminalOutputs/14703699330390724779",NX_TASK_TARGET_PROJECT:"bookito-widget",NX_TASK_TARGET_TARGET:"bundle",NX_TASK_HASH:"14703699330390724779"}.NX_PUBLIC_API_URI,Ve=`${window.location.protocol}//app.${function getHostWithoutSubdomain(o=window.location.host){return o.split(".").slice(1).join(".")}()}`,He={apiUri:qe,oauthUrls:{google:{init:`${qe}/connect/google?callback=${Ve}/auth/callback/google`,callback:`${qe}/auth/google/callback`},applogin:{init:`https://applogin.com/login?redirect_uri=${Ve}/auth/callback/applogin&client_id=9&scope=openid&response_type=code`,callback:`${qe}/auth/applogin/callback`}}};__webpack_require__(2963);const We={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Qe;const Ye=new Uint8Array(16);function rng(){if(!Qe&&(Qe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qe(Ye)}const Xe=[];for(let o=0;o<256;++o)Xe.push((o+256).toString(16).slice(1));function unsafeStringify(o,m=0){return(Xe[o[m+0]]+Xe[o[m+1]]+Xe[o[m+2]]+Xe[o[m+3]]+"-"+Xe[o[m+4]]+Xe[o[m+5]]+"-"+Xe[o[m+6]]+Xe[o[m+7]]+"-"+Xe[o[m+8]]+Xe[o[m+9]]+"-"+Xe[o[m+10]]+Xe[o[m+11]]+Xe[o[m+12]]+Xe[o[m+13]]+Xe[o[m+14]]+Xe[o[m+15]]).toLowerCase()}const et=function v4_v4(o,m,v){if(We.randomUUID&&!m&&!o)return We.randomUUID();const R=(o=o||{}).random||(o.rng||rng)();if(R[6]=15&R[6]|64,R[8]=63&R[8]|128,m){v=v||0;for(let o=0;o<16;++o)m[v+o]=R[o];return m}return unsafeStringify(R)},tt="https://5bc8eantf0.execute-api.eu-central-1.amazonaws.com/production";let nt=tt;nt=tt;et();const rt=new Map;const ot=function getStartUrlData(){const o=new URLSearchParams(window.location.search).get("startUrlData");return o?JSON.parse(decodeURIComponent(o)):null}();async function useGetWebManifestUrl_getPwaShareData(){return null!=ot&&ot.device_id?async function retrievePwaShareData(o){if(rt.has(o))return rt.get(o);const m=`${nt}/share/?id=${o}`,v=await fetch(m,{method:"GET",headers:{"Content-Type":"application/json"}});if(!v.status.toString().startsWith("2"))return null;const R=await v.json();return rt.set(o,R),R}(ot.device_id):null}const it="auth",at="token",st="/fake-cache-auth-endpoint";let lt;const ct=new Set;function updateJwt(o){lt=o,ct.forEach((o=>o()))}async function persistance_readJwt(){if(lt)return lt;try{const o=await caches.open(it),m=await o.match(st);if(!m){const o=await useGetWebManifestUrl_getPwaShareData();if(o){return persistance_persistJwt(o.jwt,{store:!0}),lt}return null}const v=(await m.json())[at];return updateJwt(v),v}catch(o){console.error("readJwt error:",o)}return lt}async function persistance_persistJwt(o,{store:m}={}){if(updateJwt(o),m)try{const m=await caches.open(it),v=JSON.stringify({[at]:o}),R=new Response(v);await m.put(st,R)}catch(o){console.error("persistJwt error:",o)}}const ut=["keypress","keydown","click","contextmenu","dblclick","mousemove","scroll","touchmove","touchstart"];let dt;!function(o){o[o.Standard=1]="Standard",o[o.Advanced=2]="Advanced"}(dt||(dt={}));class Idle{constructor(o){this.userReportedActive=!1,this.userIsActive=!1,this.userMouseIsInFrame=!1,this.attachedFrames=[],this.activityReportMode=dt.Advanced,this.activityReportInSec=5,this.detectFramesInSec=-1,this.onActivity=()=>{},this.onEnterFrame=()=>{},this.onReportUserIsActive=()=>{},this.onReportUserIsIdle=()=>{},this.intervals=[],this.attachListenerToNewFrames=()=>{const o=Array.prototype.slice.call(window.document.getElementsByTagName("frame")),m=Array.prototype.slice.call(window.document.getElementsByTagName("iframe")),v=o.concat(m);for(const o of v)this.attachedFrames.indexOf(o)<0&&(o.addEventListener("mouseenter",this.onMouseEntersFrame.bind(this),this,!1),this.attachedFrames.push(o),this.userMouseIsInFrame=!0)},this.onUserActivity=()=>{this.onActivity(),this.userIsActive=!0,this.activityReportMode!==dt.Advanced||this.userReportedActive||this.reportActivity(),this.userMouseIsInFrame=!1},this.overrideDefaultsWithOptions(o),ut.forEach((o=>{window.addEventListener(o,this.onUserActivity,!1)})),this.intervals.push(window.setInterval(this.onTimerTick.bind(this),1e3*this.activityReportInSec)),this.detectFramesInSec>0&&this.intervals.push(window.setInterval(this.attachListenerToNewFrames,1e3*this.detectFramesInSec)),this.reportActivity()}onMouseEntersFrame(){this.onEnterFrame(),this.userMouseIsInFrame=!0}onTimerTick(){this.userReportedActive=!1,this.activityReportMode===dt.Standard&&this.userIsActive||this.userMouseIsInFrame&&this.isPageVisible()?this.reportActivity():this.onReportUserIsIdle()}reportActivity(){this.onReportUserIsActive(),this.userReportedActive=!0,this.userIsActive=!1}overrideDefaultsWithOptions(o){this.activityReportInSec=o.activityReportInSec||this.activityReportInSec,this.activityReportMode=o.activityReportMode||this.activityReportMode,this.detectFramesInSec=o.detectFramesInSec||this.detectFramesInSec,this.onActivity=o.onActivity||this.onActivity,this.onEnterFrame=o.onEnterFrame||this.onEnterFrame,this.onReportUserIsActive=o.onReportUserIsActive||this.onReportUserIsActive,this.onReportUserIsIdle=o.onReportUserIsIdle||this.onReportUserIsIdle}isPageVisible(){return"hidden"!==document.visibilityState}dispose(){this.intervals.forEach(window.clearInterval),ut.forEach((o=>{window.removeEventListener(o,this.onUserActivity,!1)}))}}const pt=1;let ht=null;const ft=(0,ze.U)(),{link:mt}=ft,gt=(objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(ft,["link"]).useApolloNetworkStatus,Re()({uri:`${function config_getConciergeConfig(){return He}().apiUri}/graphql`})),At=["LoginMutation","RegisterMutation","ForgotPassword","LoginAsGuest","GetHotelBySubdomain","GetAppAuthImages","GetHotelCapabilitesBySubdomain","SearchHotelByName"],yt=function setContext(o){return new Ie.i((function(m,v){var R=(0,Se._T)(m,[]);return new Te.y((function(M){var j,$=!1;return Promise.resolve(R).then((function(v){return o(v,m.getContext())})).then(m.setContext).then((function(){$||(j=v(m).subscribe({next:M.next.bind(M),error:M.error.bind(M),complete:M.complete.bind(M)}))})).catch(M.error.bind(M)),function(){$=!0,j&&j.unsubscribe()}}))}))}((async(o,{headers:m})=>{var v;const R=!At.includes(null!=(v=o.operationName)?v:""),M=await persistance_readJwt();return{headers:Object.assign({},m,R?{authorization:M?`Bearer ${M}`:""}:{})}})),getCacheElemId=o=>{var m;return(null==(m=o.__ref)?void 0:m.split(":")[1])||""},vt=new _e.f({link:mt.concat(yt.concat(gt)),cache:new xe.h({typePolicies:{Hotel:{fields:{surroundingInformationCategories:{keyArgs:[],merge:(o,m)=>[...null!=o?o:[],...m.filter((m=>{const v=getCacheElemId(m);return!(null!=o&&o.some((o=>getCacheElemId(o)===v)))}))]}}}}})});!function autoRefetchWhenInactive({client:o}){function onTryRefresh(){if(null===ht)return;const m=Date.now()-ht;return m>=3600*pt*1e3?(console.log(`[AUTO REFETCH] Refetching all queries, content is ${m/1e3} seconds old.`),ht=Date.now(),void o.resetStore()):void 0}ht=Date.now(),document.addEventListener("visibilitychange",(()=>{document.hidden||onTryRefresh()})),function refreshAfterTimeWhenIdle(){setTimeout((()=>{const o=new Idle({activityReportInSec:120,onReportUserIsIdle:()=>{o.dispose(),onTryRefresh(),refreshAfterTimeWhenIdle()}})}),3600*pt*1e3)}()}({client:vt});const bt=(0,o.createContext)({activeLanguage:"en",switchLanguage:()=>{},resetLanguage:()=>{},initialLanguage:"en"});let wt;(0,m.Ps)(wt||(wt=(o=>o)`
|
|
69
|
+
`));let $,W,Z,Y,X,ee,ie,ae,le,ce,de;!function(o){o.modal="modal",o.new_page="new_page"}($||($={})),function(o){o.sans="sans",o.serif="serif"}(W||(W={})),function(o){o.bookito="bookito",o.dailybird="dailybird"}(Z||(Z={})),function(o){o.facebook="facebook",o.instagram="instagram",o.web="web"}(Y||(Y={})),function(o){o.draft="draft",o.published="published"}(X||(X={})),function(o){o.apartment="apartment",o.hotel="hotel"}(ee||(ee={})),function(o){o.active="active",o.deleted="deleted",o.past_due="past_due",o.paused="paused",o.trialing="trialing"}(ie||(ie={})),function(o){o.apartment="apartment",o.hotel="hotel"}(ae||(ae={})),function(o){o.bottom="bottom",o.bottom_end="bottom_end",o.bottom_start="bottom_start",o.left="left",o.left_end="left_end",o.left_start="left_start",o.right="right",o.right_end="right_end",o.right_start="right_start",o.top="top",o.top_end="top_end",o.top_start="top_start"}(le||(le={})),function(o){o.big="big",o.default="default",o.small="small"}(ce||(ce={})),function(o){o.bookitoViewOnly="bookitoViewOnly",o.default="default"}(de||(de={}));__webpack_require__(5654),__webpack_require__(8268);__webpack_require__(3382),__webpack_require__(2295),__webpack_require__(7503);var pe=__webpack_require__(4512);__webpack_require__(7425),__webpack_require__(4994);let fe;function getKeyByValue(o){return Object.keys(fe).find((m=>fe[m]===o))}!function(o){o.INVALID_TOKEN="1004",o.UNKNOWN="0",o.AUTH_FAILED="6",o.CHARGING_PROCESS_ALREADY_RUNNING="3003",o.CHARGING_POINT_NOT_FOUND="3004",o.CHARGING_POINT_IN_MAINTENENCE="3005",o.CHARGING_SIZE_NOT_FOUND="3006",o.CHARGING_POINT_NOT_READY="3007",o.CHARGING_POINT_PAYMENT_ERROR="3008"}(fe||(fe={}));class OrderandoError extends Error{constructor(o){const m=getKeyByValue(o);m?(super(`Orderando error: ${m}`),this.errorCode=void 0,this.errorCode=fe[m]):(super("Unkown Orderando error"),this.errorCode=void 0,this.errorCode=fe.UNKNOWN),console.error("Orderando error:",o)}toString(){var o;return null!=(o=getKeyByValue(this.errorCode))?o:""}}const ye="https://api.ando.cloud/v1";let be,we="";async function request(o,m,v,{data:R,skipAuth:M=!1}={}){if(!we)throw new Error("Customer code not defined!");let j,$={"content-type":"application/json"};be&&!M&&($=Object.assign({},$,{Authorization:`Bearer ${be}`}));let W="";"POST"===v&&(j=JSON.stringify(R)),"GET"===v&&R&&(W=`?${Object.keys(R).map((o=>`${o}=${encodeURIComponent(R[o])}`)).join("&")}`);const Z=`${ye}/${o}/${we}${m}${W}`,Y=await fetch(Z,{method:v,body:j,headers:$}),X=await Y.json();if(!X.success||!Y.status.toString().startsWith("2")){var ee,ie,ae;const o=null!=(ee=null==(ie=X.errors)||null==(ae=ie.find((o=>o.code)))?void 0:ae.code)?ee:"0";throw new OrderandoError(o)}return X}function createPost(o){return function(m,v){return request(o,m,"POST",v)}}function createGet(o){return function(m,v){return request(o,m,"GET",v)}}createGet("order"),createPost("order");createGet("power"),createPost("power");__webpack_require__(8594),__webpack_require__(8143);function formatPrice(o,m="de-DE"){return new Intl.NumberFormat(m,{style:"currency",currency:"EUR"}).format(o)}var _e=__webpack_require__(8272),xe=__webpack_require__(1054),Se=__webpack_require__(1191),Ie=__webpack_require__(5754),Te=__webpack_require__(8850);var Pe=__webpack_require__(9494),Re=__webpack_require__.n(Pe),ze=__webpack_require__(3964);function getImageFormatUrl(o,m="large"){var v,R;if(!o)return;const M=null==(v=o.formats)||null==(R=v[m])?void 0:R.url;return M||(null==o?void 0:o.url)}const qe={NX_CLI_SET:"true",NX_LOAD_DOT_ENV_FILES:"true",NX_WORKSPACE_ROOT:"/home/runner/work/carlito-platform/carlito-platform",NX_TERMINAL_OUTPUT_PATH:"/home/runner/work/carlito-platform/carlito-platform/node_modules/.cache/nx/terminalOutputs/13716474385355639895",NX_TASK_TARGET_PROJECT:"bookito-widget",NX_TASK_TARGET_TARGET:"bundle",NX_TASK_HASH:"13716474385355639895"}.NX_PUBLIC_API_URI,Ve=`${window.location.protocol}//app.${function getHostWithoutSubdomain(o=window.location.host){return o.split(".").slice(1).join(".")}()}`,He={apiUri:qe,oauthUrls:{google:{init:`${qe}/connect/google?callback=${Ve}/auth/callback/google`,callback:`${qe}/auth/google/callback`},applogin:{init:`https://applogin.com/login?redirect_uri=${Ve}/auth/callback/applogin&client_id=9&scope=openid&response_type=code`,callback:`${qe}/auth/applogin/callback`}}};__webpack_require__(2963);const We={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Qe;const Ye=new Uint8Array(16);function rng(){if(!Qe&&(Qe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qe(Ye)}const Xe=[];for(let o=0;o<256;++o)Xe.push((o+256).toString(16).slice(1));function unsafeStringify(o,m=0){return(Xe[o[m+0]]+Xe[o[m+1]]+Xe[o[m+2]]+Xe[o[m+3]]+"-"+Xe[o[m+4]]+Xe[o[m+5]]+"-"+Xe[o[m+6]]+Xe[o[m+7]]+"-"+Xe[o[m+8]]+Xe[o[m+9]]+"-"+Xe[o[m+10]]+Xe[o[m+11]]+Xe[o[m+12]]+Xe[o[m+13]]+Xe[o[m+14]]+Xe[o[m+15]]).toLowerCase()}const et=function v4_v4(o,m,v){if(We.randomUUID&&!m&&!o)return We.randomUUID();const R=(o=o||{}).random||(o.rng||rng)();if(R[6]=15&R[6]|64,R[8]=63&R[8]|128,m){v=v||0;for(let o=0;o<16;++o)m[v+o]=R[o];return m}return unsafeStringify(R)},tt="https://5bc8eantf0.execute-api.eu-central-1.amazonaws.com/production";let nt=tt;nt=tt;et();const rt=new Map;const ot=function getStartUrlData(){const o=new URLSearchParams(window.location.search).get("startUrlData");return o?JSON.parse(decodeURIComponent(o)):null}();async function useGetWebManifestUrl_getPwaShareData(){return null!=ot&&ot.device_id?async function retrievePwaShareData(o){if(rt.has(o))return rt.get(o);const m=`${nt}/share/?id=${o}`,v=await fetch(m,{method:"GET",headers:{"Content-Type":"application/json"}});if(!v.status.toString().startsWith("2"))return null;const R=await v.json();return rt.set(o,R),R}(ot.device_id):null}const it="auth",at="token",st="/fake-cache-auth-endpoint";let lt;const ct=new Set;function updateJwt(o){lt=o,ct.forEach((o=>o()))}async function persistance_readJwt(){if(lt)return lt;try{const o=await caches.open(it),m=await o.match(st);if(!m){const o=await useGetWebManifestUrl_getPwaShareData();if(o){return persistance_persistJwt(o.jwt,{store:!0}),lt}return null}const v=(await m.json())[at];return updateJwt(v),v}catch(o){console.error("readJwt error:",o)}return lt}async function persistance_persistJwt(o,{store:m}={}){if(updateJwt(o),m)try{const m=await caches.open(it),v=JSON.stringify({[at]:o}),R=new Response(v);await m.put(st,R)}catch(o){console.error("persistJwt error:",o)}}const ut=["keypress","keydown","click","contextmenu","dblclick","mousemove","scroll","touchmove","touchstart"];let dt;!function(o){o[o.Standard=1]="Standard",o[o.Advanced=2]="Advanced"}(dt||(dt={}));class Idle{constructor(o){this.userReportedActive=!1,this.userIsActive=!1,this.userMouseIsInFrame=!1,this.attachedFrames=[],this.activityReportMode=dt.Advanced,this.activityReportInSec=5,this.detectFramesInSec=-1,this.onActivity=()=>{},this.onEnterFrame=()=>{},this.onReportUserIsActive=()=>{},this.onReportUserIsIdle=()=>{},this.intervals=[],this.attachListenerToNewFrames=()=>{const o=Array.prototype.slice.call(window.document.getElementsByTagName("frame")),m=Array.prototype.slice.call(window.document.getElementsByTagName("iframe")),v=o.concat(m);for(const o of v)this.attachedFrames.indexOf(o)<0&&(o.addEventListener("mouseenter",this.onMouseEntersFrame.bind(this),this,!1),this.attachedFrames.push(o),this.userMouseIsInFrame=!0)},this.onUserActivity=()=>{this.onActivity(),this.userIsActive=!0,this.activityReportMode!==dt.Advanced||this.userReportedActive||this.reportActivity(),this.userMouseIsInFrame=!1},this.overrideDefaultsWithOptions(o),ut.forEach((o=>{window.addEventListener(o,this.onUserActivity,!1)})),this.intervals.push(window.setInterval(this.onTimerTick.bind(this),1e3*this.activityReportInSec)),this.detectFramesInSec>0&&this.intervals.push(window.setInterval(this.attachListenerToNewFrames,1e3*this.detectFramesInSec)),this.reportActivity()}onMouseEntersFrame(){this.onEnterFrame(),this.userMouseIsInFrame=!0}onTimerTick(){this.userReportedActive=!1,this.activityReportMode===dt.Standard&&this.userIsActive||this.userMouseIsInFrame&&this.isPageVisible()?this.reportActivity():this.onReportUserIsIdle()}reportActivity(){this.onReportUserIsActive(),this.userReportedActive=!0,this.userIsActive=!1}overrideDefaultsWithOptions(o){this.activityReportInSec=o.activityReportInSec||this.activityReportInSec,this.activityReportMode=o.activityReportMode||this.activityReportMode,this.detectFramesInSec=o.detectFramesInSec||this.detectFramesInSec,this.onActivity=o.onActivity||this.onActivity,this.onEnterFrame=o.onEnterFrame||this.onEnterFrame,this.onReportUserIsActive=o.onReportUserIsActive||this.onReportUserIsActive,this.onReportUserIsIdle=o.onReportUserIsIdle||this.onReportUserIsIdle}isPageVisible(){return"hidden"!==document.visibilityState}dispose(){this.intervals.forEach(window.clearInterval),ut.forEach((o=>{window.removeEventListener(o,this.onUserActivity,!1)}))}}const pt=1;let ht=null;const ft=(0,ze.U)(),{link:mt}=ft,gt=(objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(ft,["link"]).useApolloNetworkStatus,Re()({uri:`${function config_getConciergeConfig(){return He}().apiUri}/graphql`})),At=["LoginMutation","RegisterMutation","ForgotPassword","LoginAsGuest","GetHotelBySubdomain","GetAppAuthImages","GetHotelCapabilitesBySubdomain","SearchHotelByName"],yt=function setContext(o){return new Ie.i((function(m,v){var R=(0,Se._T)(m,[]);return new Te.y((function(M){var j,$=!1;return Promise.resolve(R).then((function(v){return o(v,m.getContext())})).then(m.setContext).then((function(){$||(j=v(m).subscribe({next:M.next.bind(M),error:M.error.bind(M),complete:M.complete.bind(M)}))})).catch(M.error.bind(M)),function(){$=!0,j&&j.unsubscribe()}}))}))}((async(o,{headers:m})=>{var v;const R=!At.includes(null!=(v=o.operationName)?v:""),M=await persistance_readJwt();return{headers:Object.assign({},m,R?{authorization:M?`Bearer ${M}`:""}:{})}})),getCacheElemId=o=>{var m;return(null==(m=o.__ref)?void 0:m.split(":")[1])||""},vt=new _e.f({link:mt.concat(yt.concat(gt)),cache:new xe.h({typePolicies:{Hotel:{fields:{surroundingInformationCategories:{keyArgs:[],merge:(o,m)=>[...null!=o?o:[],...m.filter((m=>{const v=getCacheElemId(m);return!(null!=o&&o.some((o=>getCacheElemId(o)===v)))}))]}}}}})});!function autoRefetchWhenInactive({client:o}){function onTryRefresh(){if(null===ht)return;const m=Date.now()-ht;return m>=3600*pt*1e3?(console.log(`[AUTO REFETCH] Refetching all queries, content is ${m/1e3} seconds old.`),ht=Date.now(),void o.resetStore()):void 0}ht=Date.now(),document.addEventListener("visibilitychange",(()=>{document.hidden||onTryRefresh()})),function refreshAfterTimeWhenIdle(){setTimeout((()=>{const o=new Idle({activityReportInSec:120,onReportUserIsIdle:()=>{o.dispose(),onTryRefresh(),refreshAfterTimeWhenIdle()}})}),3600*pt*1e3)}()}({client:vt});const bt=(0,o.createContext)({activeLanguage:"en",switchLanguage:()=>{},resetLanguage:()=>{},initialLanguage:"en"});let wt;(0,m.Ps)(wt||(wt=(o=>o)`
|
|
70
70
|
# Write your query or mutation here
|
|
71
71
|
fragment CommonAppActionButtonFields on AppActionButton {
|
|
72
72
|
id
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
`));let $,W,Z,Y,X,ee,ie,ae,le,ce,de;!function(o){o.modal="modal",o.new_page="new_page"}($||($={})),function(o){o.sans="sans",o.serif="serif"}(W||(W={})),function(o){o.bookito="bookito",o.dailybird="dailybird"}(Z||(Z={})),function(o){o.facebook="facebook",o.instagram="instagram",o.web="web"}(Y||(Y={})),function(o){o.draft="draft",o.published="published"}(X||(X={})),function(o){o.apartment="apartment",o.hotel="hotel"}(ee||(ee={})),function(o){o.active="active",o.deleted="deleted",o.past_due="past_due",o.paused="paused",o.trialing="trialing"}(ie||(ie={})),function(o){o.apartment="apartment",o.hotel="hotel"}(ae||(ae={})),function(o){o.bottom="bottom",o.bottom_end="bottom_end",o.bottom_start="bottom_start",o.left="left",o.left_end="left_end",o.left_start="left_start",o.right="right",o.right_end="right_end",o.right_start="right_start",o.top="top",o.top_end="top_end",o.top_start="top_start"}(le||(le={})),function(o){o.big="big",o.default="default",o.small="small"}(ce||(ce={})),function(o){o.bookitoViewOnly="bookitoViewOnly",o.default="default"}(de||(de={}));__webpack_require__(5654),__webpack_require__(8268);__webpack_require__(3382),__webpack_require__(2295),__webpack_require__(7503);var pe=__webpack_require__(4512);__webpack_require__(7425),__webpack_require__(4994);let fe;function getKeyByValue(o){return Object.keys(fe).find((m=>fe[m]===o))}!function(o){o.INVALID_TOKEN="1004",o.UNKNOWN="0",o.AUTH_FAILED="6",o.CHARGING_PROCESS_ALREADY_RUNNING="3003",o.CHARGING_POINT_NOT_FOUND="3004",o.CHARGING_POINT_IN_MAINTENENCE="3005",o.CHARGING_SIZE_NOT_FOUND="3006",o.CHARGING_POINT_NOT_READY="3007",o.CHARGING_POINT_PAYMENT_ERROR="3008"}(fe||(fe={}));class OrderandoError extends Error{constructor(o){const m=getKeyByValue(o);m?(super(`Orderando error: ${m}`),this.errorCode=void 0,this.errorCode=fe[m]):(super("Unkown Orderando error"),this.errorCode=void 0,this.errorCode=fe.UNKNOWN),console.error("Orderando error:",o)}toString(){var o;return null!=(o=getKeyByValue(this.errorCode))?o:""}}const ye="https://api.ando.cloud/v1";let be,we="";async function request(o,m,v,{data:R,skipAuth:M=!1}={}){if(!we)throw new Error("Customer code not defined!");let j,$={"content-type":"application/json"};be&&!M&&($=Object.assign({},$,{Authorization:`Bearer ${be}`}));let W="";"POST"===v&&(j=JSON.stringify(R)),"GET"===v&&R&&(W=`?${Object.keys(R).map((o=>`${o}=${encodeURIComponent(R[o])}`)).join("&")}`);const Z=`${ye}/${o}/${we}${m}${W}`,Y=await fetch(Z,{method:v,body:j,headers:$}),X=await Y.json();if(!X.success||!Y.status.toString().startsWith("2")){var ee,ie,ae;const o=null!=(ee=null==(ie=X.errors)||null==(ae=ie.find((o=>o.code)))?void 0:ae.code)?ee:"0";throw new OrderandoError(o)}return X}function createPost(o){return function(m,v){return request(o,m,"POST",v)}}function createGet(o){return function(m,v){return request(o,m,"GET",v)}}createGet("order"),createPost("order");createGet("power"),createPost("power");__webpack_require__(8594),__webpack_require__(8143);function formatPrice(o,m="de-DE"){return new Intl.NumberFormat(m,{style:"currency",currency:"EUR"}).format(o)}var _e=__webpack_require__(8272),xe=__webpack_require__(1054),Se=__webpack_require__(1191),Ie=__webpack_require__(5754),Te=__webpack_require__(8850);var Pe=__webpack_require__(9494),Re=__webpack_require__.n(Pe),ze=__webpack_require__(3964);function getImageFormatUrl(o,m="large"){var v,R;if(!o)return;const M=null==(v=o.formats)||null==(R=v[m])?void 0:R.url;return M||(null==o?void 0:o.url)}const qe={NX_CLI_SET:"true",NX_LOAD_DOT_ENV_FILES:"true",NX_WORKSPACE_ROOT:"/home/runner/work/carlito-platform/carlito-platform",NX_TERMINAL_OUTPUT_PATH:"/home/runner/work/carlito-platform/carlito-platform/node_modules/.cache/nx/terminalOutputs/14703699330390724779",NX_TASK_TARGET_PROJECT:"bookito-widget",NX_TASK_TARGET_TARGET:"bundle",NX_TASK_HASH:"14703699330390724779"}.NX_PUBLIC_API_URI,Ve=`${window.location.protocol}//app.${function getHostWithoutSubdomain(o=window.location.host){return o.split(".").slice(1).join(".")}()}`,He={apiUri:qe,oauthUrls:{google:{init:`${qe}/connect/google?callback=${Ve}/auth/callback/google`,callback:`${qe}/auth/google/callback`},applogin:{init:`https://applogin.com/login?redirect_uri=${Ve}/auth/callback/applogin&client_id=9&scope=openid&response_type=code`,callback:`${qe}/auth/applogin/callback`}}};__webpack_require__(2963);const We={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Qe;const Ye=new Uint8Array(16);function rng(){if(!Qe&&(Qe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qe(Ye)}const Xe=[];for(let o=0;o<256;++o)Xe.push((o+256).toString(16).slice(1));function unsafeStringify(o,m=0){return(Xe[o[m+0]]+Xe[o[m+1]]+Xe[o[m+2]]+Xe[o[m+3]]+"-"+Xe[o[m+4]]+Xe[o[m+5]]+"-"+Xe[o[m+6]]+Xe[o[m+7]]+"-"+Xe[o[m+8]]+Xe[o[m+9]]+"-"+Xe[o[m+10]]+Xe[o[m+11]]+Xe[o[m+12]]+Xe[o[m+13]]+Xe[o[m+14]]+Xe[o[m+15]]).toLowerCase()}const et=function v4_v4(o,m,v){if(We.randomUUID&&!m&&!o)return We.randomUUID();const R=(o=o||{}).random||(o.rng||rng)();if(R[6]=15&R[6]|64,R[8]=63&R[8]|128,m){v=v||0;for(let o=0;o<16;++o)m[v+o]=R[o];return m}return unsafeStringify(R)},tt="https://5bc8eantf0.execute-api.eu-central-1.amazonaws.com/production";let nt=tt;nt=tt;et();const rt=new Map;const ot=function getStartUrlData(){const o=new URLSearchParams(window.location.search).get("startUrlData");return o?JSON.parse(decodeURIComponent(o)):null}();async function useGetWebManifestUrl_getPwaShareData(){return null!=ot&&ot.device_id?async function retrievePwaShareData(o){if(rt.has(o))return rt.get(o);const m=`${nt}/share/?id=${o}`,v=await fetch(m,{method:"GET",headers:{"Content-Type":"application/json"}});if(!v.status.toString().startsWith("2"))return null;const R=await v.json();return rt.set(o,R),R}(ot.device_id):null}const it="auth",at="token",st="/fake-cache-auth-endpoint";let lt;const ct=new Set;function updateJwt(o){lt=o,ct.forEach((o=>o()))}async function persistance_readJwt(){if(lt)return lt;try{const o=await caches.open(it),m=await o.match(st);if(!m){const o=await useGetWebManifestUrl_getPwaShareData();if(o){return persistance_persistJwt(o.jwt,{store:!0}),lt}return null}const v=(await m.json())[at];return updateJwt(v),v}catch(o){console.error("readJwt error:",o)}return lt}async function persistance_persistJwt(o,{store:m}={}){if(updateJwt(o),m)try{const m=await caches.open(it),v=JSON.stringify({[at]:o}),R=new Response(v);await m.put(st,R)}catch(o){console.error("persistJwt error:",o)}}const ut=["keypress","keydown","click","contextmenu","dblclick","mousemove","scroll","touchmove","touchstart"];let dt;!function(o){o[o.Standard=1]="Standard",o[o.Advanced=2]="Advanced"}(dt||(dt={}));class Idle{constructor(o){this.userReportedActive=!1,this.userIsActive=!1,this.userMouseIsInFrame=!1,this.attachedFrames=[],this.activityReportMode=dt.Advanced,this.activityReportInSec=5,this.detectFramesInSec=-1,this.onActivity=()=>{},this.onEnterFrame=()=>{},this.onReportUserIsActive=()=>{},this.onReportUserIsIdle=()=>{},this.intervals=[],this.attachListenerToNewFrames=()=>{const o=Array.prototype.slice.call(window.document.getElementsByTagName("frame")),m=Array.prototype.slice.call(window.document.getElementsByTagName("iframe")),v=o.concat(m);for(const o of v)this.attachedFrames.indexOf(o)<0&&(o.addEventListener("mouseenter",this.onMouseEntersFrame.bind(this),this,!1),this.attachedFrames.push(o),this.userMouseIsInFrame=!0)},this.onUserActivity=()=>{this.onActivity(),this.userIsActive=!0,this.activityReportMode!==dt.Advanced||this.userReportedActive||this.reportActivity(),this.userMouseIsInFrame=!1},this.overrideDefaultsWithOptions(o),ut.forEach((o=>{window.addEventListener(o,this.onUserActivity,!1)})),this.intervals.push(window.setInterval(this.onTimerTick.bind(this),1e3*this.activityReportInSec)),this.detectFramesInSec>0&&this.intervals.push(window.setInterval(this.attachListenerToNewFrames,1e3*this.detectFramesInSec)),this.reportActivity()}onMouseEntersFrame(){this.onEnterFrame(),this.userMouseIsInFrame=!0}onTimerTick(){this.userReportedActive=!1,this.activityReportMode===dt.Standard&&this.userIsActive||this.userMouseIsInFrame&&this.isPageVisible()?this.reportActivity():this.onReportUserIsIdle()}reportActivity(){this.onReportUserIsActive(),this.userReportedActive=!0,this.userIsActive=!1}overrideDefaultsWithOptions(o){this.activityReportInSec=o.activityReportInSec||this.activityReportInSec,this.activityReportMode=o.activityReportMode||this.activityReportMode,this.detectFramesInSec=o.detectFramesInSec||this.detectFramesInSec,this.onActivity=o.onActivity||this.onActivity,this.onEnterFrame=o.onEnterFrame||this.onEnterFrame,this.onReportUserIsActive=o.onReportUserIsActive||this.onReportUserIsActive,this.onReportUserIsIdle=o.onReportUserIsIdle||this.onReportUserIsIdle}isPageVisible(){return"hidden"!==document.visibilityState}dispose(){this.intervals.forEach(window.clearInterval),ut.forEach((o=>{window.removeEventListener(o,this.onUserActivity,!1)}))}}const pt=1;let ht=null;const ft=(0,ze.U)(),{link:mt}=ft,gt=(objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(ft,["link"]).useApolloNetworkStatus,Re()({uri:`${function config_getConciergeConfig(){return He}().apiUri}/graphql`})),At=["LoginMutation","RegisterMutation","ForgotPassword","LoginAsGuest","GetHotelBySubdomain","GetAppAuthImages","GetHotelCapabilitesBySubdomain","SearchHotelByName"],yt=function setContext(o){return new Ie.i((function(m,v){var R=(0,Se._T)(m,[]);return new Te.y((function(M){var j,$=!1;return Promise.resolve(R).then((function(v){return o(v,m.getContext())})).then(m.setContext).then((function(){$||(j=v(m).subscribe({next:M.next.bind(M),error:M.error.bind(M),complete:M.complete.bind(M)}))})).catch(M.error.bind(M)),function(){$=!0,j&&j.unsubscribe()}}))}))}((async(o,{headers:m})=>{var v;const R=!At.includes(null!=(v=o.operationName)?v:""),M=await persistance_readJwt();return{headers:Object.assign({},m,R?{authorization:M?`Bearer ${M}`:""}:{})}})),getCacheElemId=o=>{var m;return(null==(m=o.__ref)?void 0:m.split(":")[1])||""},vt=new _e.f({link:mt.concat(yt.concat(gt)),cache:new xe.h({typePolicies:{Hotel:{fields:{surroundingInformationCategories:{keyArgs:[],merge:(o,m)=>[...null!=o?o:[],...m.filter((m=>{const v=getCacheElemId(m);return!(null!=o&&o.some((o=>getCacheElemId(o)===v)))}))]}}}}})});!function autoRefetchWhenInactive({client:o}){function onTryRefresh(){if(null===ht)return;const m=Date.now()-ht;return m>=3600*pt*1e3?(console.log(`[AUTO REFETCH] Refetching all queries, content is ${m/1e3} seconds old.`),ht=Date.now(),void o.resetStore()):void 0}ht=Date.now(),document.addEventListener("visibilitychange",(()=>{document.hidden||onTryRefresh()})),function refreshAfterTimeWhenIdle(){setTimeout((()=>{const o=new Idle({activityReportInSec:120,onReportUserIsIdle:()=>{o.dispose(),onTryRefresh(),refreshAfterTimeWhenIdle()}})}),3600*pt*1e3)}()}({client:vt});const bt=(0,o.createContext)({activeLanguage:"en",switchLanguage:()=>{},resetLanguage:()=>{},initialLanguage:"en"});let wt;(0,m.Ps)(wt||(wt=(o=>o)`
|
|
69
|
+
`));let $,W,Z,Y,X,ee,ie,ae,le,ce,de;!function(o){o.modal="modal",o.new_page="new_page"}($||($={})),function(o){o.sans="sans",o.serif="serif"}(W||(W={})),function(o){o.bookito="bookito",o.dailybird="dailybird"}(Z||(Z={})),function(o){o.facebook="facebook",o.instagram="instagram",o.web="web"}(Y||(Y={})),function(o){o.draft="draft",o.published="published"}(X||(X={})),function(o){o.apartment="apartment",o.hotel="hotel"}(ee||(ee={})),function(o){o.active="active",o.deleted="deleted",o.past_due="past_due",o.paused="paused",o.trialing="trialing"}(ie||(ie={})),function(o){o.apartment="apartment",o.hotel="hotel"}(ae||(ae={})),function(o){o.bottom="bottom",o.bottom_end="bottom_end",o.bottom_start="bottom_start",o.left="left",o.left_end="left_end",o.left_start="left_start",o.right="right",o.right_end="right_end",o.right_start="right_start",o.top="top",o.top_end="top_end",o.top_start="top_start"}(le||(le={})),function(o){o.big="big",o.default="default",o.small="small"}(ce||(ce={})),function(o){o.bookitoViewOnly="bookitoViewOnly",o.default="default"}(de||(de={}));__webpack_require__(5654),__webpack_require__(8268);__webpack_require__(3382),__webpack_require__(2295),__webpack_require__(7503);var pe=__webpack_require__(4512);__webpack_require__(7425),__webpack_require__(4994);let fe;function getKeyByValue(o){return Object.keys(fe).find((m=>fe[m]===o))}!function(o){o.INVALID_TOKEN="1004",o.UNKNOWN="0",o.AUTH_FAILED="6",o.CHARGING_PROCESS_ALREADY_RUNNING="3003",o.CHARGING_POINT_NOT_FOUND="3004",o.CHARGING_POINT_IN_MAINTENENCE="3005",o.CHARGING_SIZE_NOT_FOUND="3006",o.CHARGING_POINT_NOT_READY="3007",o.CHARGING_POINT_PAYMENT_ERROR="3008"}(fe||(fe={}));class OrderandoError extends Error{constructor(o){const m=getKeyByValue(o);m?(super(`Orderando error: ${m}`),this.errorCode=void 0,this.errorCode=fe[m]):(super("Unkown Orderando error"),this.errorCode=void 0,this.errorCode=fe.UNKNOWN),console.error("Orderando error:",o)}toString(){var o;return null!=(o=getKeyByValue(this.errorCode))?o:""}}const ye="https://api.ando.cloud/v1";let be,we="";async function request(o,m,v,{data:R,skipAuth:M=!1}={}){if(!we)throw new Error("Customer code not defined!");let j,$={"content-type":"application/json"};be&&!M&&($=Object.assign({},$,{Authorization:`Bearer ${be}`}));let W="";"POST"===v&&(j=JSON.stringify(R)),"GET"===v&&R&&(W=`?${Object.keys(R).map((o=>`${o}=${encodeURIComponent(R[o])}`)).join("&")}`);const Z=`${ye}/${o}/${we}${m}${W}`,Y=await fetch(Z,{method:v,body:j,headers:$}),X=await Y.json();if(!X.success||!Y.status.toString().startsWith("2")){var ee,ie,ae;const o=null!=(ee=null==(ie=X.errors)||null==(ae=ie.find((o=>o.code)))?void 0:ae.code)?ee:"0";throw new OrderandoError(o)}return X}function createPost(o){return function(m,v){return request(o,m,"POST",v)}}function createGet(o){return function(m,v){return request(o,m,"GET",v)}}createGet("order"),createPost("order");createGet("power"),createPost("power");__webpack_require__(8594),__webpack_require__(8143);function formatPrice(o,m="de-DE"){return new Intl.NumberFormat(m,{style:"currency",currency:"EUR"}).format(o)}var _e=__webpack_require__(8272),xe=__webpack_require__(1054),Se=__webpack_require__(1191),Ie=__webpack_require__(5754),Te=__webpack_require__(8850);var Pe=__webpack_require__(9494),Re=__webpack_require__.n(Pe),ze=__webpack_require__(3964);function getImageFormatUrl(o,m="large"){var v,R;if(!o)return;const M=null==(v=o.formats)||null==(R=v[m])?void 0:R.url;return M||(null==o?void 0:o.url)}const qe={NX_CLI_SET:"true",NX_LOAD_DOT_ENV_FILES:"true",NX_WORKSPACE_ROOT:"/home/runner/work/carlito-platform/carlito-platform",NX_TERMINAL_OUTPUT_PATH:"/home/runner/work/carlito-platform/carlito-platform/node_modules/.cache/nx/terminalOutputs/13716474385355639895",NX_TASK_TARGET_PROJECT:"bookito-widget",NX_TASK_TARGET_TARGET:"bundle",NX_TASK_HASH:"13716474385355639895"}.NX_PUBLIC_API_URI,Ve=`${window.location.protocol}//app.${function getHostWithoutSubdomain(o=window.location.host){return o.split(".").slice(1).join(".")}()}`,He={apiUri:qe,oauthUrls:{google:{init:`${qe}/connect/google?callback=${Ve}/auth/callback/google`,callback:`${qe}/auth/google/callback`},applogin:{init:`https://applogin.com/login?redirect_uri=${Ve}/auth/callback/applogin&client_id=9&scope=openid&response_type=code`,callback:`${qe}/auth/applogin/callback`}}};__webpack_require__(2963);const We={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Qe;const Ye=new Uint8Array(16);function rng(){if(!Qe&&(Qe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qe(Ye)}const Xe=[];for(let o=0;o<256;++o)Xe.push((o+256).toString(16).slice(1));function unsafeStringify(o,m=0){return(Xe[o[m+0]]+Xe[o[m+1]]+Xe[o[m+2]]+Xe[o[m+3]]+"-"+Xe[o[m+4]]+Xe[o[m+5]]+"-"+Xe[o[m+6]]+Xe[o[m+7]]+"-"+Xe[o[m+8]]+Xe[o[m+9]]+"-"+Xe[o[m+10]]+Xe[o[m+11]]+Xe[o[m+12]]+Xe[o[m+13]]+Xe[o[m+14]]+Xe[o[m+15]]).toLowerCase()}const et=function v4_v4(o,m,v){if(We.randomUUID&&!m&&!o)return We.randomUUID();const R=(o=o||{}).random||(o.rng||rng)();if(R[6]=15&R[6]|64,R[8]=63&R[8]|128,m){v=v||0;for(let o=0;o<16;++o)m[v+o]=R[o];return m}return unsafeStringify(R)},tt="https://5bc8eantf0.execute-api.eu-central-1.amazonaws.com/production";let nt=tt;nt=tt;et();const rt=new Map;const ot=function getStartUrlData(){const o=new URLSearchParams(window.location.search).get("startUrlData");return o?JSON.parse(decodeURIComponent(o)):null}();async function useGetWebManifestUrl_getPwaShareData(){return null!=ot&&ot.device_id?async function retrievePwaShareData(o){if(rt.has(o))return rt.get(o);const m=`${nt}/share/?id=${o}`,v=await fetch(m,{method:"GET",headers:{"Content-Type":"application/json"}});if(!v.status.toString().startsWith("2"))return null;const R=await v.json();return rt.set(o,R),R}(ot.device_id):null}const it="auth",at="token",st="/fake-cache-auth-endpoint";let lt;const ct=new Set;function updateJwt(o){lt=o,ct.forEach((o=>o()))}async function persistance_readJwt(){if(lt)return lt;try{const o=await caches.open(it),m=await o.match(st);if(!m){const o=await useGetWebManifestUrl_getPwaShareData();if(o){return persistance_persistJwt(o.jwt,{store:!0}),lt}return null}const v=(await m.json())[at];return updateJwt(v),v}catch(o){console.error("readJwt error:",o)}return lt}async function persistance_persistJwt(o,{store:m}={}){if(updateJwt(o),m)try{const m=await caches.open(it),v=JSON.stringify({[at]:o}),R=new Response(v);await m.put(st,R)}catch(o){console.error("persistJwt error:",o)}}const ut=["keypress","keydown","click","contextmenu","dblclick","mousemove","scroll","touchmove","touchstart"];let dt;!function(o){o[o.Standard=1]="Standard",o[o.Advanced=2]="Advanced"}(dt||(dt={}));class Idle{constructor(o){this.userReportedActive=!1,this.userIsActive=!1,this.userMouseIsInFrame=!1,this.attachedFrames=[],this.activityReportMode=dt.Advanced,this.activityReportInSec=5,this.detectFramesInSec=-1,this.onActivity=()=>{},this.onEnterFrame=()=>{},this.onReportUserIsActive=()=>{},this.onReportUserIsIdle=()=>{},this.intervals=[],this.attachListenerToNewFrames=()=>{const o=Array.prototype.slice.call(window.document.getElementsByTagName("frame")),m=Array.prototype.slice.call(window.document.getElementsByTagName("iframe")),v=o.concat(m);for(const o of v)this.attachedFrames.indexOf(o)<0&&(o.addEventListener("mouseenter",this.onMouseEntersFrame.bind(this),this,!1),this.attachedFrames.push(o),this.userMouseIsInFrame=!0)},this.onUserActivity=()=>{this.onActivity(),this.userIsActive=!0,this.activityReportMode!==dt.Advanced||this.userReportedActive||this.reportActivity(),this.userMouseIsInFrame=!1},this.overrideDefaultsWithOptions(o),ut.forEach((o=>{window.addEventListener(o,this.onUserActivity,!1)})),this.intervals.push(window.setInterval(this.onTimerTick.bind(this),1e3*this.activityReportInSec)),this.detectFramesInSec>0&&this.intervals.push(window.setInterval(this.attachListenerToNewFrames,1e3*this.detectFramesInSec)),this.reportActivity()}onMouseEntersFrame(){this.onEnterFrame(),this.userMouseIsInFrame=!0}onTimerTick(){this.userReportedActive=!1,this.activityReportMode===dt.Standard&&this.userIsActive||this.userMouseIsInFrame&&this.isPageVisible()?this.reportActivity():this.onReportUserIsIdle()}reportActivity(){this.onReportUserIsActive(),this.userReportedActive=!0,this.userIsActive=!1}overrideDefaultsWithOptions(o){this.activityReportInSec=o.activityReportInSec||this.activityReportInSec,this.activityReportMode=o.activityReportMode||this.activityReportMode,this.detectFramesInSec=o.detectFramesInSec||this.detectFramesInSec,this.onActivity=o.onActivity||this.onActivity,this.onEnterFrame=o.onEnterFrame||this.onEnterFrame,this.onReportUserIsActive=o.onReportUserIsActive||this.onReportUserIsActive,this.onReportUserIsIdle=o.onReportUserIsIdle||this.onReportUserIsIdle}isPageVisible(){return"hidden"!==document.visibilityState}dispose(){this.intervals.forEach(window.clearInterval),ut.forEach((o=>{window.removeEventListener(o,this.onUserActivity,!1)}))}}const pt=1;let ht=null;const ft=(0,ze.U)(),{link:mt}=ft,gt=(objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(ft,["link"]).useApolloNetworkStatus,Re()({uri:`${function config_getConciergeConfig(){return He}().apiUri}/graphql`})),At=["LoginMutation","RegisterMutation","ForgotPassword","LoginAsGuest","GetHotelBySubdomain","GetAppAuthImages","GetHotelCapabilitesBySubdomain","SearchHotelByName"],yt=function setContext(o){return new Ie.i((function(m,v){var R=(0,Se._T)(m,[]);return new Te.y((function(M){var j,$=!1;return Promise.resolve(R).then((function(v){return o(v,m.getContext())})).then(m.setContext).then((function(){$||(j=v(m).subscribe({next:M.next.bind(M),error:M.error.bind(M),complete:M.complete.bind(M)}))})).catch(M.error.bind(M)),function(){$=!0,j&&j.unsubscribe()}}))}))}((async(o,{headers:m})=>{var v;const R=!At.includes(null!=(v=o.operationName)?v:""),M=await persistance_readJwt();return{headers:Object.assign({},m,R?{authorization:M?`Bearer ${M}`:""}:{})}})),getCacheElemId=o=>{var m;return(null==(m=o.__ref)?void 0:m.split(":")[1])||""},vt=new _e.f({link:mt.concat(yt.concat(gt)),cache:new xe.h({typePolicies:{Hotel:{fields:{surroundingInformationCategories:{keyArgs:[],merge:(o,m)=>[...null!=o?o:[],...m.filter((m=>{const v=getCacheElemId(m);return!(null!=o&&o.some((o=>getCacheElemId(o)===v)))}))]}}}}})});!function autoRefetchWhenInactive({client:o}){function onTryRefresh(){if(null===ht)return;const m=Date.now()-ht;return m>=3600*pt*1e3?(console.log(`[AUTO REFETCH] Refetching all queries, content is ${m/1e3} seconds old.`),ht=Date.now(),void o.resetStore()):void 0}ht=Date.now(),document.addEventListener("visibilitychange",(()=>{document.hidden||onTryRefresh()})),function refreshAfterTimeWhenIdle(){setTimeout((()=>{const o=new Idle({activityReportInSec:120,onReportUserIsIdle:()=>{o.dispose(),onTryRefresh(),refreshAfterTimeWhenIdle()}})}),3600*pt*1e3)}()}({client:vt});const bt=(0,o.createContext)({activeLanguage:"en",switchLanguage:()=>{},resetLanguage:()=>{},initialLanguage:"en"});let wt;(0,m.Ps)(wt||(wt=(o=>o)`
|
|
70
70
|
# Write your query or mutation here
|
|
71
71
|
fragment CommonAppActionButtonFields on AppActionButton {
|
|
72
72
|
id
|
package/index.html
CHANGED
|
@@ -2,13 +2,19 @@
|
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<title>Sample HTML Page</title>
|
|
5
|
-
<script src="./dist/bookito-widget.window.js"></script>
|
|
5
|
+
<!-- <script src="./dist/bookito-widget.window.js"></script> -->
|
|
6
|
+
<script src="https://unpkg.com/bookito-widget"></script>
|
|
6
7
|
</head>
|
|
7
8
|
<body>
|
|
9
|
+
<!-- Usage as Web Component -->
|
|
8
10
|
<div id="widget">
|
|
9
11
|
<!-- Bookito widget will be inserted here -->
|
|
10
12
|
</div>
|
|
11
13
|
|
|
14
|
+
<<<<<<< HEAD
|
|
15
|
+
<!-- Usage as Web Component -->
|
|
16
|
+
<bookito-widget auth-id="138" title="Experiences Today"></bookito-widget>
|
|
17
|
+
=======
|
|
12
18
|
<div id="widget-2">
|
|
13
19
|
<!-- Bookito widget will be inserted here -->
|
|
14
20
|
</div>
|
|
@@ -19,28 +25,36 @@
|
|
|
19
25
|
category-id="63cff0610eaa9adcb00ce39c"
|
|
20
26
|
language="de"
|
|
21
27
|
></bookito-widget>
|
|
28
|
+
>>>>>>> 5912e660a964defc9910c750455ee9395731bdf6
|
|
22
29
|
|
|
23
30
|
<script>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
window.addEventListener('DOMContentLoaded', (event) => {
|
|
32
|
+
// Make sure the script has loaded before calling the function
|
|
33
|
+
if (window.bookitoWidget && typeof window.bookitoWidget.initialize === 'function') {
|
|
34
|
+
window.bookitoWidget.initialize({
|
|
35
|
+
container: '#widget',
|
|
36
|
+
<<<<<<< HEAD
|
|
37
|
+
authId: '338',
|
|
38
|
+
=======
|
|
39
|
+
authId: '230',
|
|
40
|
+
>>>>>>> 5912e660a964defc9910c750455ee9395731bdf6
|
|
41
|
+
title: 'Experiences Today',
|
|
42
|
+
language: 'de',
|
|
43
|
+
});
|
|
44
|
+
<<<<<<< HEAD
|
|
45
|
+
=======
|
|
46
|
+
window.bookitoWidget.initialize({
|
|
47
|
+
container: '#widget-2',
|
|
48
|
+
authId: '138',
|
|
49
|
+
categoryId: '63cff0610eaa9adcb00ce39c',
|
|
50
|
+
title: 'Weekly Program',
|
|
51
|
+
language: 'de',
|
|
52
|
+
});
|
|
53
|
+
>>>>>>> 5912e660a964defc9910c750455ee9395731bdf6
|
|
54
|
+
} else {
|
|
55
|
+
console.error('bookitoWidget is not loaded or initialize is not a function');
|
|
56
|
+
}
|
|
57
|
+
});
|
|
44
58
|
</script>
|
|
45
59
|
</body>
|
|
46
60
|
</html>
|