@opentabs-dev/opentabs-plugin-priceline 0.0.75 → 0.0.76
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/dist/adapter.iife.js +30 -20
- package/dist/adapter.iife.js.map +3 -3
- package/dist/tools.json +1 -1
- package/package.json +3 -3
package/dist/adapter.iife.js
CHANGED
|
@@ -349,18 +349,18 @@
|
|
|
349
349
|
|
|
350
350
|
// node_modules/@opentabs-dev/plugin-sdk/dist/storage.js
|
|
351
351
|
var getLocalStorage = (key) => {
|
|
352
|
-
try {
|
|
353
|
-
return localStorage.getItem(key);
|
|
354
|
-
} catch {
|
|
355
|
-
}
|
|
356
352
|
let storage;
|
|
357
353
|
try {
|
|
358
|
-
storage = localStorage;
|
|
354
|
+
storage = window.localStorage;
|
|
359
355
|
} catch {
|
|
360
356
|
return null;
|
|
361
357
|
}
|
|
362
|
-
if (storage
|
|
363
|
-
|
|
358
|
+
if (storage) {
|
|
359
|
+
try {
|
|
360
|
+
return storage.getItem(key);
|
|
361
|
+
} catch {
|
|
362
|
+
return null;
|
|
363
|
+
}
|
|
364
364
|
}
|
|
365
365
|
try {
|
|
366
366
|
const iframe = document.createElement("iframe");
|
|
@@ -15000,21 +15000,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15000
15000
|
};
|
|
15001
15001
|
var src_default = new PricelinePlugin();
|
|
15002
15002
|
|
|
15003
|
-
// dist/
|
|
15003
|
+
// dist/_adapter_entry_1766d539-4d4c-4160-be59-872694b05738.ts
|
|
15004
15004
|
if (!globalThis.__openTabs) {
|
|
15005
15005
|
globalThis.__openTabs = {};
|
|
15006
15006
|
} else {
|
|
15007
15007
|
const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
|
|
15008
15008
|
if (desc && !desc.writable) {
|
|
15009
|
-
const
|
|
15009
|
+
const ot3 = globalThis.__openTabs;
|
|
15010
15010
|
const newAdaptersObj = {};
|
|
15011
|
-
if (
|
|
15012
|
-
for (const key of Object.keys(
|
|
15013
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
15011
|
+
if (ot3.adapters) {
|
|
15012
|
+
for (const key of Object.keys(ot3.adapters)) {
|
|
15013
|
+
const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
|
|
15014
15014
|
if (d) Object.defineProperty(newAdaptersObj, key, d);
|
|
15015
15015
|
}
|
|
15016
15016
|
}
|
|
15017
|
-
globalThis.__openTabs = Object.assign({},
|
|
15017
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
|
|
15018
15018
|
}
|
|
15019
15019
|
}
|
|
15020
15020
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -15052,6 +15052,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15052
15052
|
}
|
|
15053
15053
|
};
|
|
15054
15054
|
var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
|
|
15055
|
+
var ot2 = globalThis.__openTabs;
|
|
15056
|
+
ot2._notifyReadinessChanged = () => {
|
|
15057
|
+
try {
|
|
15058
|
+
const nonce = globalThis.__openTabs?._readinessNonce;
|
|
15059
|
+
if (nonce) {
|
|
15060
|
+
window.postMessage({ type: "opentabs:readiness-changed", plugin: "priceline", nonce }, "*");
|
|
15061
|
+
}
|
|
15062
|
+
} catch {
|
|
15063
|
+
}
|
|
15064
|
+
};
|
|
15055
15065
|
var existing = adapters["priceline"];
|
|
15056
15066
|
if (existing) {
|
|
15057
15067
|
if (typeof existing.teardown === "function") {
|
|
@@ -15063,7 +15073,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15063
15073
|
}
|
|
15064
15074
|
}
|
|
15065
15075
|
if (!Reflect.deleteProperty(adapters, "priceline")) {
|
|
15066
|
-
const
|
|
15076
|
+
const ot3 = globalThis.__openTabs;
|
|
15067
15077
|
const newAdapters = {};
|
|
15068
15078
|
for (const key of Object.keys(adapters)) {
|
|
15069
15079
|
if (key !== "priceline") {
|
|
@@ -15071,7 +15081,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15071
15081
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
15072
15082
|
}
|
|
15073
15083
|
}
|
|
15074
|
-
globalThis.__openTabs = Object.assign({},
|
|
15084
|
+
globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
|
|
15075
15085
|
}
|
|
15076
15086
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
15077
15087
|
for (const tool of src_default.tools) {
|
|
@@ -15132,12 +15142,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15132
15142
|
}
|
|
15133
15143
|
}
|
|
15134
15144
|
};
|
|
15135
|
-
const
|
|
15136
|
-
if (!
|
|
15145
|
+
const ot3 = globalThis.__openTabs;
|
|
15146
|
+
if (!ot3._navigationInterceptor) {
|
|
15137
15147
|
const origPushState = history.pushState.bind(history);
|
|
15138
15148
|
const origReplaceState = history.replaceState.bind(history);
|
|
15139
15149
|
const callbacks = /* @__PURE__ */ new Map();
|
|
15140
|
-
|
|
15150
|
+
ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
15141
15151
|
history.pushState = function(...args) {
|
|
15142
15152
|
origPushState(...args);
|
|
15143
15153
|
for (const cb of callbacks.values()) {
|
|
@@ -15151,7 +15161,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15151
15161
|
}
|
|
15152
15162
|
};
|
|
15153
15163
|
}
|
|
15154
|
-
const interceptor =
|
|
15164
|
+
const interceptor = ot3._navigationInterceptor;
|
|
15155
15165
|
interceptor.callbacks.set("priceline", checkUrl);
|
|
15156
15166
|
window.addEventListener("popstate", checkUrl);
|
|
15157
15167
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -15206,5 +15216,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15206
15216
|
};
|
|
15207
15217
|
delete src_default.onDeactivate;
|
|
15208
15218
|
}
|
|
15209
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["priceline"]){var a=o.adapters["priceline"];a.__adapterHash="
|
|
15219
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["priceline"]){var a=o.adapters["priceline"];a.__adapterHash="b170b1dad559826406e50fa8e1e0900fd984dac10d46cb89ac9dde4f9d37d3a1";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"priceline",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15210
15220
|
//# sourceMappingURL=adapter.iife.js.map
|