cloudcommerce 0.0.81 → 0.0.82

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +1 -1
  3. package/packages/api/package.json +1 -1
  4. package/packages/apps/correios/package.json +1 -1
  5. package/packages/apps/custom-shipping/package.json +1 -1
  6. package/packages/apps/discounts/package.json +1 -1
  7. package/packages/apps/frenet/package.json +1 -1
  8. package/packages/apps/tiny-erp/package.json +1 -1
  9. package/packages/cli/package.json +1 -1
  10. package/packages/config/package.json +1 -1
  11. package/packages/events/package.json +1 -1
  12. package/packages/firebase/package.json +1 -1
  13. package/packages/modules/package.json +1 -1
  14. package/packages/passport/package.json +1 -1
  15. package/packages/ssr/package.json +1 -1
  16. package/packages/storefront/astro.config.mjs +4 -0
  17. package/packages/storefront/dist/client/hoisted.f0efb207.js +272 -0
  18. package/packages/storefront/dist/client/manifest.webmanifest +1 -0
  19. package/packages/storefront/dist/client/sw.js +1 -0
  20. package/packages/storefront/dist/client/workbox-70b8fbb9.js +1 -0
  21. package/packages/storefront/dist/server/entry.mjs +10 -2
  22. package/packages/storefront/dist/server/manifest.webmanifest +1 -0
  23. package/packages/storefront/dist/server/registerSW.js +1 -0
  24. package/packages/storefront/package.json +1 -1
  25. package/packages/storefront/src/lib/components/LoginModal.vue +0 -1
  26. package/packages/storefront/src/lib/layouts/Base.astro +8 -0
  27. package/packages/storefront/src/lib/ssr-context.ts +1 -1
  28. package/packages/storefront/src/vite-env.d.ts +13 -0
  29. package/packages/types/package.json +1 -1
  30. package/packages/storefront/dist/client/hoisted.31e23ac0.js +0 -271
  31. package/packages/storefront/src/assets/firebaseui.css +0 -648
@@ -1768,7 +1768,7 @@ if (!globalThis.api_prefetch_endpoints) {
1768
1768
  }
1769
1769
  const setResponseCache = (Astro, maxAge, sMaxAge) => {
1770
1770
  const headerName = Object.assign({"BASE_URL":"/","MODE":"production","DEV":false,"PROD":true}, { SSR: true }).PROD ? "Cache-Control" : "X-Cache-Control";
1771
- let cacheControl = `public, max-age=${maxAge}`;
1771
+ let cacheControl = `public, max-age=${maxAge}, must-revalidate`;
1772
1772
  if (sMaxAge) {
1773
1773
  cacheControl += `, s-maxage=${sMaxAge}, stale-while-revalidate=86400`;
1774
1774
  }
@@ -2011,6 +2011,7 @@ const $$module3$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePropert
2011
2011
 
2012
2012
  const $$metadata$9 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Base.astro", { modules: [{ module: $$module1$6, specifier: "color", assert: {} }, { module: $$module2$1, specifier: "./meta/Head.astro", assert: {} }, { module: $$module3$1, specifier: "./meta/Json.astro", assert: {} }], hydratedComponents: [], clientOnlyComponents: [], hydrationDirectives: /* @__PURE__ */ new Set([]), hoisted: [{ type: "inline", value: `
2013
2013
  import { initializeApp } from 'firebase/app';
2014
+ import { registerSW } from 'virtual:pwa-register';
2014
2015
  // @ts-ignore
2015
2016
  const firebaseConfig = window.firebaseConfig || {
2016
2017
  apiKey: "AIzaSyCrVzemDgpyp9i6ni7Yc5ZuEVfXYwl-4J0",
@@ -2022,6 +2023,13 @@ const $$metadata$9 = createMetadata("/@fs/home/leo/code/ecomplus/cloud-commerce/
2022
2023
  measurementId: "G-SC592CE0GB"
2023
2024
  };
2024
2025
  initializeApp(firebaseConfig);
2026
+ const updateSW = registerSW({
2027
+ onNeedRefresh() {},
2028
+ onOfflineReady() {
2029
+ console.log('Offline ready');
2030
+ },
2031
+ });
2032
+ updateSW();
2025
2033
  ` }] });
2026
2034
  const $$Astro$9 = createAstro("/@fs/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Base.astro", "https://storefront-demo.e-com.plus/", "file:///home/leo/code/ecomplus/cloud-commerce/packages/storefront/");
2027
2035
  const $$Base = createComponent(async ($$result, $$props, $$slots) => {
@@ -2488,7 +2496,7 @@ function deserializeManifest(serializedManifest) {
2488
2496
  };
2489
2497
  }
2490
2498
 
2491
- const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.7.0/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...65ca64e2.css","assets/_...11681504.css","assets/fallback-index.552fd862.css","assets/index.73f26ab5.css"],"scripts":[{"type":"external","value":"hoisted.31e23ac0.js"},{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...65ca64e2.css","assets/_...11681504.css","assets/fallback-index.552fd862.css","assets/fallback.a3f85892.css"],"scripts":[{"type":"external","value":"hoisted.31e23ac0.js"},{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/fallback","type":"page","pattern":"^\\/fallback\\/?$","segments":[[{"content":"fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fallback.astro","pathname":"/fallback","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...65ca64e2.css"],"scripts":[{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...65ca64e2.css","assets/_...11681504.css","assets/_...b330a555.css"],"scripts":[{"type":"external","value":"hoisted.31e23ac0.js"},{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","_meta":{"trailingSlash":"ignore"}}}],"site":"https://storefront-demo.e-com.plus/","base":"/","markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"extendDefaultPlugins":false,"isAstroFlavoredMd":false},"pageMap":null,"renderers":[],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"entry.mjs","@astrojs/vue/client.js":"client.80baece3.js","/astro/hoisted.js?q=0":"hoisted.31e23ac0.js","astro:scripts/page.js":"page.3aa82516.js","astro:scripts/before-hydration.js":""},"assets":["/assets/_...b330a555.css","/assets/fallback.a3f85892.css","/assets/fallback-index.552fd862.css","/assets/index.73f26ab5.css","/assets/_...11681504.css","/assets/_...65ca64e2.css","/client.80baece3.js","/favicon.ico","/hoisted.31e23ac0.js","/page.3aa82516.js","/page.3aa82516.js","/~partytown/partytown-atomics.js","/~partytown/partytown-media.js","/~partytown/partytown-sw.js","/~partytown/partytown.js"]}), {
2499
+ const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.7.0/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...65ca64e2.css","assets/_...11681504.css","assets/fallback-index.552fd862.css","assets/index.73f26ab5.css"],"scripts":[{"type":"external","value":"hoisted.f0efb207.js"},{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...65ca64e2.css","assets/_...11681504.css","assets/fallback-index.552fd862.css","assets/fallback.a3f85892.css"],"scripts":[{"type":"external","value":"hoisted.f0efb207.js"},{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/fallback","type":"page","pattern":"^\\/fallback\\/?$","segments":[[{"content":"fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fallback.astro","pathname":"/fallback","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...65ca64e2.css"],"scripts":[{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","_meta":{"trailingSlash":"ignore"}}},{"file":"","links":["assets/_...65ca64e2.css","assets/_...11681504.css","assets/_...b330a555.css"],"scripts":[{"type":"external","value":"hoisted.f0efb207.js"},{"type":"external","value":"page.3aa82516.js"},{"stage":"head-inline","children":"!(function(w,p,f,c){c=w[p]=Object.assign(w[p]||{},{\"lib\":\"/~partytown/\",\"debug\":false});c[f]=(c[f]||[])})(window,'partytown','forward');/* Partytown 0.4.5 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener(\"pt0\",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.4.5\":\"sandbox-sw.html?\"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement(\"script\")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(\".\").map((function(e,n,i){p=p[i[n]]=n+1<i.length?\"push\"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),\"complete\"==e.readyState?u():(t.addEventListener(\"DOMContentLoaded\",u),t.addEventListener(\"load\",u))}(window,document,navigator,top,window.crossOriginIsolated);"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","_meta":{"trailingSlash":"ignore"}}}],"site":"https://storefront-demo.e-com.plus/","base":"/","markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"extendDefaultPlugins":false,"isAstroFlavoredMd":false},"pageMap":null,"renderers":[],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"entry.mjs","@astrojs/vue/client.js":"client.80baece3.js","/astro/hoisted.js?q=0":"hoisted.f0efb207.js","astro:scripts/page.js":"page.3aa82516.js","astro:scripts/before-hydration.js":""},"assets":["/assets/_...b330a555.css","/assets/fallback.a3f85892.css","/assets/fallback-index.552fd862.css","/assets/index.73f26ab5.css","/assets/_...11681504.css","/assets/_...65ca64e2.css","/manifest.webmanifest","/registerSW.js","/client.80baece3.js","/favicon.ico","/hoisted.f0efb207.js","/page.3aa82516.js","/sw.js","/workbox-70b8fbb9.js","/page.3aa82516.js","/~partytown/partytown-atomics.js","/~partytown/partytown-media.js","/~partytown/partytown-sw.js","/~partytown/partytown.js"]}), {
2492
2500
  pageMap: pageMap,
2493
2501
  renderers: renderers
2494
2502
  });
@@ -0,0 +1 @@
1
+ {"name":"@cloudcommerce/storefront","short_name":"@cloudcommerce/storefront","start_url":"/","display":"standalone","background_color":"#ffffff","lang":"en","scope":"/"}
@@ -0,0 +1 @@
1
+ if('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('/sw.js', { scope: '/' })})}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/storefront",
3
3
  "type": "module",
4
- "version": "0.0.81",
4
+ "version": "0.0.82",
5
5
  "description": "E-Com Plus Cloud Commerce storefront with Astro",
6
6
  "main": "src/index.js",
7
7
  "repository": {
@@ -18,7 +18,6 @@ import config from '@cloudcommerce/config';
18
18
 
19
19
  const setupFirebaseUi = async () => {
20
20
  const { lang } = config.get();
21
- import('../../assets/firebaseui.css');
22
21
 
23
22
  await Promise.all([
24
23
  import('firebase/compat/auth'),
@@ -68,6 +68,7 @@ Object.keys(brandColors).forEach((colorName) => {
68
68
  <slot />
69
69
  <script>
70
70
  import { initializeApp } from 'firebase/app';
71
+ import { registerSW } from 'virtual:pwa-register';
71
72
  // @ts-ignore
72
73
  const firebaseConfig = window.firebaseConfig || {
73
74
  apiKey: "AIzaSyCrVzemDgpyp9i6ni7Yc5ZuEVfXYwl-4J0",
@@ -79,6 +80,13 @@ Object.keys(brandColors).forEach((colorName) => {
79
80
  measurementId: "G-SC592CE0GB"
80
81
  };
81
82
  initializeApp(firebaseConfig);
83
+ const updateSW = registerSW({
84
+ onNeedRefresh() {},
85
+ onOfflineReady() {
86
+ console.log('Offline ready');
87
+ },
88
+ });
89
+ updateSW();
82
90
  </script>
83
91
  <slot name="before-body-end">
84
92
  {cmsCustomCode.html_body && <Fragment set:html={cmsCustomCode.html_body} />}
@@ -32,7 +32,7 @@ type ApiPrefetchEndpoints = Array<ApiEndpoint>;
32
32
 
33
33
  const setResponseCache = (Astro: AstroGlobal, maxAge: number, sMaxAge?: number) => {
34
34
  const headerName = import.meta.env.PROD ? 'Cache-Control' : 'X-Cache-Control';
35
- let cacheControl = `public, max-age=${maxAge}`;
35
+ let cacheControl = `public, max-age=${maxAge}, must-revalidate`;
36
36
  if (sMaxAge) {
37
37
  cacheControl += `, s-maxage=${sMaxAge}, stale-while-revalidate=86400`;
38
38
  }
@@ -0,0 +1,13 @@
1
+ /* eslint-disable no-unused-vars */
2
+
3
+ declare module 'virtual:pwa-register' {
4
+ export type RegisterSWOptions = {
5
+ immediate?: boolean;
6
+ onNeedRefresh?: () => void;
7
+ onOfflineReady?: () => void;
8
+ onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void;
9
+ onRegisterError?: (error: any) => void;
10
+ };
11
+
12
+ export function registerSW(options?: RegisterSWOptions): (reloadPage?: boolean) => Promise<void>;
13
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/types",
3
3
  "type": "module",
4
- "version": "0.0.81",
4
+ "version": "0.0.82",
5
5
  "description": "E-Com Plus Cloud Commerce reusable type definitions",
6
6
  "main": "index.ts",
7
7
  "repository": {
@@ -1,271 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- *//**
17
- * @license
18
- * Copyright 2017 Google LLC
19
- *
20
- * Licensed under the Apache License, Version 2.0 (the "License");
21
- * you may not use this file except in compliance with the License.
22
- * You may obtain a copy of the License at
23
- *
24
- * http://www.apache.org/licenses/LICENSE-2.0
25
- *
26
- * Unless required by applicable law or agreed to in writing, software
27
- * distributed under the License is distributed on an "AS IS" BASIS,
28
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
- * See the License for the specific language governing permissions and
30
- * limitations under the License.
31
- */const z=function(t){const e=[];let n=0;for(let s=0;s<t.length;s++){let r=t.charCodeAt(s);r<128?e[n++]=r:r<2048?(e[n++]=r>>6|192,e[n++]=r&63|128):(r&64512)===55296&&s+1<t.length&&(t.charCodeAt(s+1)&64512)===56320?(r=65536+((r&1023)<<10)+(t.charCodeAt(++s)&1023),e[n++]=r>>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=r&63|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=r&63|128)}return e},Z=function(t){const e=[];let n=0,s=0;for(;n<t.length;){const r=t[n++];if(r<128)e[s++]=String.fromCharCode(r);else if(r>191&&r<224){const a=t[n++];e[s++]=String.fromCharCode((r&31)<<6|a&63)}else if(r>239&&r<365){const a=t[n++],i=t[n++],o=t[n++],h=((r&7)<<18|(a&63)<<12|(i&63)<<6|o&63)-65536;e[s++]=String.fromCharCode(55296+(h>>10)),e[s++]=String.fromCharCode(56320+(h&1023))}else{const a=t[n++],i=t[n++];e[s++]=String.fromCharCode((r&15)<<12|(a&63)<<6|i&63)}}return e.join("")},Q={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,s=[];for(let r=0;r<t.length;r+=3){const a=t[r],i=r+1<t.length,o=i?t[r+1]:0,h=r+2<t.length,l=h?t[r+2]:0,R=a>>2,m=(a&3)<<4|o>>4;let E=(o&15)<<2|l>>6,y=l&63;h||(y=64,i||(E=64)),s.push(n[R],n[m],n[E],n[y])}return s.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(z(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):Z(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,s=[];for(let r=0;r<t.length;){const a=n[t.charAt(r++)],o=r<t.length?n[t.charAt(r)]:0;++r;const l=r<t.length?n[t.charAt(r)]:64;++r;const m=r<t.length?n[t.charAt(r)]:64;if(++r,a==null||o==null||l==null||m==null)throw Error();const E=a<<2|o>>4;if(s.push(E),l!==64){const y=o<<4&240|l>>2;if(s.push(y),m!==64){const J=l<<6&192|m;s.push(J)}}}return s},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},q=function(t){const e=z(t);return Q.encodeByteArray(e,!0)},U=function(t){return q(t).replace(/\./g,"")};/**
32
- * @license
33
- * Copyright 2017 Google LLC
34
- *
35
- * Licensed under the Apache License, Version 2.0 (the "License");
36
- * you may not use this file except in compliance with the License.
37
- * You may obtain a copy of the License at
38
- *
39
- * http://www.apache.org/licenses/LICENSE-2.0
40
- *
41
- * Unless required by applicable law or agreed to in writing, software
42
- * distributed under the License is distributed on an "AS IS" BASIS,
43
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44
- * See the License for the specific language governing permissions and
45
- * limitations under the License.
46
- */class ee{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,s)=>{n?this.reject(n):this.resolve(s),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,s))}}}function te(){return typeof indexedDB=="object"}function ne(){return new Promise((t,e)=>{try{let n=!0;const s="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(s);r.onsuccess=()=>{r.result.close(),n||self.indexedDB.deleteDatabase(s),t(!0)},r.onupgradeneeded=()=>{n=!1},r.onerror=()=>{var a;e(((a=r.error)===null||a===void 0?void 0:a.message)||"")}}catch(n){e(n)}})}/**
47
- * @license
48
- * Copyright 2017 Google LLC
49
- *
50
- * Licensed under the Apache License, Version 2.0 (the "License");
51
- * you may not use this file except in compliance with the License.
52
- * You may obtain a copy of the License at
53
- *
54
- * http://www.apache.org/licenses/LICENSE-2.0
55
- *
56
- * Unless required by applicable law or agreed to in writing, software
57
- * distributed under the License is distributed on an "AS IS" BASIS,
58
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59
- * See the License for the specific language governing permissions and
60
- * limitations under the License.
61
- */const re="FirebaseError";class b extends Error{constructor(e,n,s){super(n),this.code=e,this.customData=s,this.name=re,Object.setPrototypeOf(this,b.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,W.prototype.create)}}class W{constructor(e,n,s){this.service=e,this.serviceName=n,this.errors=s}create(e,...n){const s=n[0]||{},r=`${this.service}/${e}`,a=this.errors[e],i=a?se(a,s):"Error",o=`${this.serviceName}: ${i} (${r}).`;return new b(r,o,s)}}function se(t,e){return t.replace(ae,(n,s)=>{const r=e[s];return r!=null?String(r):`<${s}?>`})}const ae=/\{\$([^}]+)}/g;function v(t,e){if(t===e)return!0;const n=Object.keys(t),s=Object.keys(e);for(const r of n){if(!s.includes(r))return!1;const a=t[r],i=e[r];if(H(a)&&H(i)){if(!v(a,i))return!1}else if(a!==i)return!1}for(const r of s)if(!n.includes(r))return!1;return!0}function H(t){return t!==null&&typeof t=="object"}class I{constructor(e,n,s){this.name=e,this.instanceFactory=n,this.type=s,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/**
62
- * @license
63
- * Copyright 2019 Google LLC
64
- *
65
- * Licensed under the Apache License, Version 2.0 (the "License");
66
- * you may not use this file except in compliance with the License.
67
- * You may obtain a copy of the License at
68
- *
69
- * http://www.apache.org/licenses/LICENSE-2.0
70
- *
71
- * Unless required by applicable law or agreed to in writing, software
72
- * distributed under the License is distributed on an "AS IS" BASIS,
73
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
74
- * See the License for the specific language governing permissions and
75
- * limitations under the License.
76
- */const f="[DEFAULT]";/**
77
- * @license
78
- * Copyright 2019 Google LLC
79
- *
80
- * Licensed under the Apache License, Version 2.0 (the "License");
81
- * you may not use this file except in compliance with the License.
82
- * You may obtain a copy of the License at
83
- *
84
- * http://www.apache.org/licenses/LICENSE-2.0
85
- *
86
- * Unless required by applicable law or agreed to in writing, software
87
- * distributed under the License is distributed on an "AS IS" BASIS,
88
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89
- * See the License for the specific language governing permissions and
90
- * limitations under the License.
91
- */class ie{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const s=new ee;if(this.instancesDeferred.set(n,s),this.isInitialized(n)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:n});r&&s.resolve(r)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const s=this.normalizeInstanceIdentifier(e?.identifier),r=(n=e?.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(s)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:s})}catch(a){if(r)return null;throw a}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(ce(e))try{this.getOrInitializeService({instanceIdentifier:f})}catch{}for(const[n,s]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(n);try{const a=this.getOrInitializeService({instanceIdentifier:r});s.resolve(a)}catch{}}}}clearInstance(e=f){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=f){return this.instances.has(e)}getOptions(e=f){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,s=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(s))throw Error(`${this.name}(${s}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:s,options:n});for(const[a,i]of this.instancesDeferred.entries()){const o=this.normalizeInstanceIdentifier(a);s===o&&i.resolve(r)}return r}onInit(e,n){var s;const r=this.normalizeInstanceIdentifier(n),a=(s=this.onInitCallbacks.get(r))!==null&&s!==void 0?s:new Set;a.add(e),this.onInitCallbacks.set(r,a);const i=this.instances.get(r);return i&&e(i,r),()=>{a.delete(e)}}invokeOnInitCallbacks(e,n){const s=this.onInitCallbacks.get(n);if(!!s)for(const r of s)try{r(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let s=this.instances.get(e);if(!s&&this.component&&(s=this.component.instanceFactory(this.container,{instanceIdentifier:oe(e),options:n}),this.instances.set(e,s),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(s,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,s)}catch{}return s||null}normalizeInstanceIdentifier(e=f){return this.component?this.component.multipleInstances?e:f:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function oe(t){return t===f?void 0:t}function ce(t){return t.instantiationMode==="EAGER"}/**
92
- * @license
93
- * Copyright 2019 Google LLC
94
- *
95
- * Licensed under the Apache License, Version 2.0 (the "License");
96
- * you may not use this file except in compliance with the License.
97
- * You may obtain a copy of the License at
98
- *
99
- * http://www.apache.org/licenses/LICENSE-2.0
100
- *
101
- * Unless required by applicable law or agreed to in writing, software
102
- * distributed under the License is distributed on an "AS IS" BASIS,
103
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
104
- * See the License for the specific language governing permissions and
105
- * limitations under the License.
106
- */class he{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new ie(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/**
107
- * @license
108
- * Copyright 2017 Google LLC
109
- *
110
- * Licensed under the Apache License, Version 2.0 (the "License");
111
- * you may not use this file except in compliance with the License.
112
- * You may obtain a copy of the License at
113
- *
114
- * http://www.apache.org/licenses/LICENSE-2.0
115
- *
116
- * Unless required by applicable law or agreed to in writing, software
117
- * distributed under the License is distributed on an "AS IS" BASIS,
118
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119
- * See the License for the specific language governing permissions and
120
- * limitations under the License.
121
- */var c;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(c||(c={}));const le={debug:c.DEBUG,verbose:c.VERBOSE,info:c.INFO,warn:c.WARN,error:c.ERROR,silent:c.SILENT},de=c.INFO,fe={[c.DEBUG]:"log",[c.VERBOSE]:"log",[c.INFO]:"info",[c.WARN]:"warn",[c.ERROR]:"error"},ue=(t,e,...n)=>{if(e<t.logLevel)return;const s=new Date().toISOString(),r=fe[e];if(r)console[r](`[${s}] ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class pe{constructor(e){this.name=e,this._logLevel=de,this._logHandler=ue,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in c))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?le[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,c.DEBUG,...e),this._logHandler(this,c.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,c.VERBOSE,...e),this._logHandler(this,c.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,c.INFO,...e),this._logHandler(this,c.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,c.WARN,...e),this._logHandler(this,c.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,c.ERROR,...e),this._logHandler(this,c.ERROR,...e)}}const me=(t,e)=>e.some(n=>t instanceof n);let x,L;function ge(){return x||(x=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function be(){return L||(L=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const G=new WeakMap,B=new WeakMap,K=new WeakMap,D=new WeakMap,N=new WeakMap;function Ee(t){const e=new Promise((n,s)=>{const r=()=>{t.removeEventListener("success",a),t.removeEventListener("error",i)},a=()=>{n(d(t.result)),r()},i=()=>{s(t.error),r()};t.addEventListener("success",a),t.addEventListener("error",i)});return e.then(n=>{n instanceof IDBCursor&&G.set(n,t)}).catch(()=>{}),N.set(e,t),e}function ye(t){if(B.has(t))return;const e=new Promise((n,s)=>{const r=()=>{t.removeEventListener("complete",a),t.removeEventListener("error",i),t.removeEventListener("abort",i)},a=()=>{n(),r()},i=()=>{s(t.error||new DOMException("AbortError","AbortError")),r()};t.addEventListener("complete",a),t.addEventListener("error",i),t.addEventListener("abort",i)});B.set(t,e)}let A={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return B.get(t);if(e==="objectStoreNames")return t.objectStoreNames||K.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return d(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function _e(t){A=t(A)}function Ie(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const s=t.call(C(this),e,...n);return K.set(s,e.sort?e.sort():[e]),d(s)}:be().includes(t)?function(...e){return t.apply(C(this),e),d(G.get(this))}:function(...e){return d(t.apply(C(this),e))}}function De(t){return typeof t=="function"?Ie(t):(t instanceof IDBTransaction&&ye(t),me(t,ge())?new Proxy(t,A):t)}function d(t){if(t instanceof IDBRequest)return Ee(t);if(D.has(t))return D.get(t);const e=De(t);return e!==t&&(D.set(t,e),N.set(e,t)),e}const C=t=>N.get(t);function Ce(t,e,{blocked:n,upgrade:s,blocking:r,terminated:a}={}){const i=indexedDB.open(t,e),o=d(i);return s&&i.addEventListener("upgradeneeded",h=>{s(d(i.result),h.oldVersion,h.newVersion,d(i.transaction))}),n&&i.addEventListener("blocked",()=>n()),o.then(h=>{a&&h.addEventListener("close",()=>a()),r&&h.addEventListener("versionchange",()=>r())}).catch(()=>{}),o}const we=["get","getKey","getAll","getAllKeys","count"],Se=["put","add","delete","clear"],w=new Map;function P(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(w.get(e))return w.get(e);const n=e.replace(/FromIndex$/,""),s=e!==n,r=Se.includes(n);if(!(n in(s?IDBIndex:IDBObjectStore).prototype)||!(r||we.includes(n)))return;const a=async function(i,...o){const h=this.transaction(i,r?"readwrite":"readonly");let l=h.store;return s&&(l=l.index(o.shift())),(await Promise.all([l[n](...o),r&&h.done]))[0]};return w.set(e,a),a}_e(t=>({...t,get:(e,n,s)=>P(e,n)||t.get(e,n,s),has:(e,n)=>!!P(e,n)||t.has(e,n)}));/**
122
- * @license
123
- * Copyright 2019 Google LLC
124
- *
125
- * Licensed under the Apache License, Version 2.0 (the "License");
126
- * you may not use this file except in compliance with the License.
127
- * You may obtain a copy of the License at
128
- *
129
- * http://www.apache.org/licenses/LICENSE-2.0
130
- *
131
- * Unless required by applicable law or agreed to in writing, software
132
- * distributed under the License is distributed on an "AS IS" BASIS,
133
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
134
- * See the License for the specific language governing permissions and
135
- * limitations under the License.
136
- */class ve{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(Be(n)){const s=n.getImmediate();return`${s.library}/${s.version}`}else return null}).filter(n=>n).join(" ")}}function Be(t){const e=t.getComponent();return e?.type==="VERSION"}const O="@firebase/app",j="0.7.33";/**
137
- * @license
138
- * Copyright 2019 Google LLC
139
- *
140
- * Licensed under the Apache License, Version 2.0 (the "License");
141
- * you may not use this file except in compliance with the License.
142
- * You may obtain a copy of the License at
143
- *
144
- * http://www.apache.org/licenses/LICENSE-2.0
145
- *
146
- * Unless required by applicable law or agreed to in writing, software
147
- * distributed under the License is distributed on an "AS IS" BASIS,
148
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
149
- * See the License for the specific language governing permissions and
150
- * limitations under the License.
151
- */const u=new pe("@firebase/app"),Ae="@firebase/app-compat",Oe="@firebase/analytics-compat",Te="@firebase/analytics",Me="@firebase/app-check-compat",$e="@firebase/app-check",Ne="@firebase/auth",Re="@firebase/auth-compat",He="@firebase/database",xe="@firebase/database-compat",Le="@firebase/functions",Pe="@firebase/functions-compat",je="@firebase/installations",Fe="@firebase/installations-compat",ke="@firebase/messaging",Ve="@firebase/messaging-compat",ze="@firebase/performance",Ue="@firebase/performance-compat",We="@firebase/remote-config",Ge="@firebase/remote-config-compat",Ke="@firebase/storage",Ye="@firebase/storage-compat",Xe="@firebase/firestore",Je="@firebase/firestore-compat",Ze="firebase";/**
152
- * @license
153
- * Copyright 2019 Google LLC
154
- *
155
- * Licensed under the Apache License, Version 2.0 (the "License");
156
- * you may not use this file except in compliance with the License.
157
- * You may obtain a copy of the License at
158
- *
159
- * http://www.apache.org/licenses/LICENSE-2.0
160
- *
161
- * Unless required by applicable law or agreed to in writing, software
162
- * distributed under the License is distributed on an "AS IS" BASIS,
163
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
164
- * See the License for the specific language governing permissions and
165
- * limitations under the License.
166
- */const Qe="[DEFAULT]",qe={[O]:"fire-core",[Ae]:"fire-core-compat",[Te]:"fire-analytics",[Oe]:"fire-analytics-compat",[$e]:"fire-app-check",[Me]:"fire-app-check-compat",[Ne]:"fire-auth",[Re]:"fire-auth-compat",[He]:"fire-rtdb",[xe]:"fire-rtdb-compat",[Le]:"fire-fn",[Pe]:"fire-fn-compat",[je]:"fire-iid",[Fe]:"fire-iid-compat",[ke]:"fire-fcm",[Ve]:"fire-fcm-compat",[ze]:"fire-perf",[Ue]:"fire-perf-compat",[We]:"fire-rc",[Ge]:"fire-rc-compat",[Ke]:"fire-gcs",[Ye]:"fire-gcs-compat",[Xe]:"fire-fst",[Je]:"fire-fst-compat","fire-js":"fire-js",[Ze]:"fire-js-all"};/**
167
- * @license
168
- * Copyright 2019 Google LLC
169
- *
170
- * Licensed under the Apache License, Version 2.0 (the "License");
171
- * you may not use this file except in compliance with the License.
172
- * You may obtain a copy of the License at
173
- *
174
- * http://www.apache.org/licenses/LICENSE-2.0
175
- *
176
- * Unless required by applicable law or agreed to in writing, software
177
- * distributed under the License is distributed on an "AS IS" BASIS,
178
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
179
- * See the License for the specific language governing permissions and
180
- * limitations under the License.
181
- */const T=new Map,M=new Map;function et(t,e){try{t.container.addComponent(e)}catch(n){u.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function $(t){const e=t.name;if(M.has(e))return u.debug(`There were multiple attempts to register component ${e}.`),!1;M.set(e,t);for(const n of T.values())et(n,t);return!0}/**
182
- * @license
183
- * Copyright 2019 Google LLC
184
- *
185
- * Licensed under the Apache License, Version 2.0 (the "License");
186
- * you may not use this file except in compliance with the License.
187
- * You may obtain a copy of the License at
188
- *
189
- * http://www.apache.org/licenses/LICENSE-2.0
190
- *
191
- * Unless required by applicable law or agreed to in writing, software
192
- * distributed under the License is distributed on an "AS IS" BASIS,
193
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
194
- * See the License for the specific language governing permissions and
195
- * limitations under the License.
196
- */const tt={["no-app"]:"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",["bad-app-name"]:"Illegal App name: '{$appName}",["duplicate-app"]:"Firebase App named '{$appName}' already exists with different options or config",["app-deleted"]:"Firebase App named '{$appName}' already deleted",["invalid-app-argument"]:"firebase.{$appName}() takes either no argument or a Firebase App instance.",["invalid-log-argument"]:"First argument to `onLog` must be null or a function.",["idb-open"]:"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",["idb-get"]:"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",["idb-set"]:"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",["idb-delete"]:"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},p=new W("app","Firebase",tt);/**
197
- * @license
198
- * Copyright 2019 Google LLC
199
- *
200
- * Licensed under the Apache License, Version 2.0 (the "License");
201
- * you may not use this file except in compliance with the License.
202
- * You may obtain a copy of the License at
203
- *
204
- * http://www.apache.org/licenses/LICENSE-2.0
205
- *
206
- * Unless required by applicable law or agreed to in writing, software
207
- * distributed under the License is distributed on an "AS IS" BASIS,
208
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
209
- * See the License for the specific language governing permissions and
210
- * limitations under the License.
211
- */class nt{constructor(e,n,s){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=s,this.container.addComponent(new I("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw p.create("app-deleted",{appName:this._name})}}function rt(t,e={}){typeof e!="object"&&(e={name:e});const n=Object.assign({name:Qe,automaticDataCollectionEnabled:!1},e),s=n.name;if(typeof s!="string"||!s)throw p.create("bad-app-name",{appName:String(s)});const r=T.get(s);if(r){if(v(t,r.options)&&v(n,r.config))return r;throw p.create("duplicate-app",{appName:s})}const a=new he(s);for(const o of M.values())a.addComponent(o);const i=new nt(t,n,a);return T.set(s,i),i}function _(t,e,n){var s;let r=(s=qe[t])!==null&&s!==void 0?s:t;n&&(r+=`-${n}`);const a=r.match(/\s|\//),i=e.match(/\s|\//);if(a||i){const o=[`Unable to register library "${r}" with version "${e}":`];a&&o.push(`library name "${r}" contains illegal characters (whitespace or "/")`),a&&i&&o.push("and"),i&&o.push(`version name "${e}" contains illegal characters (whitespace or "/")`),u.warn(o.join(" "));return}$(new I(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}/**
212
- * @license
213
- * Copyright 2021 Google LLC
214
- *
215
- * Licensed under the Apache License, Version 2.0 (the "License");
216
- * you may not use this file except in compliance with the License.
217
- * You may obtain a copy of the License at
218
- *
219
- * http://www.apache.org/licenses/LICENSE-2.0
220
- *
221
- * Unless required by applicable law or agreed to in writing, software
222
- * distributed under the License is distributed on an "AS IS" BASIS,
223
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
224
- * See the License for the specific language governing permissions and
225
- * limitations under the License.
226
- */const st="firebase-heartbeat-database",at=1,g="firebase-heartbeat-store";let S=null;function Y(){return S||(S=Ce(st,at,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(g)}}}).catch(t=>{throw p.create("idb-open",{originalErrorMessage:t.message})})),S}async function it(t){var e;try{return(await Y()).transaction(g).objectStore(g).get(X(t))}catch(n){if(n instanceof b)u.warn(n.message);else{const s=p.create("idb-get",{originalErrorMessage:(e=n)===null||e===void 0?void 0:e.message});u.warn(s.message)}}}async function F(t,e){var n;try{const r=(await Y()).transaction(g,"readwrite");return await r.objectStore(g).put(e,X(t)),r.done}catch(s){if(s instanceof b)u.warn(s.message);else{const r=p.create("idb-set",{originalErrorMessage:(n=s)===null||n===void 0?void 0:n.message});u.warn(r.message)}}}function X(t){return`${t.name}!${t.options.appId}`}/**
227
- * @license
228
- * Copyright 2021 Google LLC
229
- *
230
- * Licensed under the Apache License, Version 2.0 (the "License");
231
- * you may not use this file except in compliance with the License.
232
- * You may obtain a copy of the License at
233
- *
234
- * http://www.apache.org/licenses/LICENSE-2.0
235
- *
236
- * Unless required by applicable law or agreed to in writing, software
237
- * distributed under the License is distributed on an "AS IS" BASIS,
238
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
239
- * See the License for the specific language governing permissions and
240
- * limitations under the License.
241
- */const ot=1024,ct=30*24*60*60*1e3;class ht{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new dt(n),this._heartbeatsCachePromise=this._storage.read().then(s=>(this._heartbeatsCache=s,s))}async triggerHeartbeat(){const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=k();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(r=>r.date===s)))return this._heartbeatsCache.heartbeats.push({date:s,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(r=>{const a=new Date(r.date).valueOf();return Date.now()-a<=ct}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const e=k(),{heartbeatsToSend:n,unsentEntries:s}=lt(this._heartbeatsCache.heartbeats),r=U(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,s.length>0?(this._heartbeatsCache.heartbeats=s,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),r}}function k(){return new Date().toISOString().substring(0,10)}function lt(t,e=ot){const n=[];let s=t.slice();for(const r of t){const a=n.find(i=>i.agent===r.agent);if(a){if(a.dates.push(r.date),V(n)>e){a.dates.pop();break}}else if(n.push({agent:r.agent,dates:[r.date]}),V(n)>e){n.pop();break}s=s.slice(1)}return{heartbeatsToSend:n,unsentEntries:s}}class dt{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return te()?ne().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await it(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const r=await this.read();return F(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const r=await this.read();return F(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return}}function V(t){return U(JSON.stringify({version:2,heartbeats:t})).length}/**
242
- * @license
243
- * Copyright 2019 Google LLC
244
- *
245
- * Licensed under the Apache License, Version 2.0 (the "License");
246
- * you may not use this file except in compliance with the License.
247
- * You may obtain a copy of the License at
248
- *
249
- * http://www.apache.org/licenses/LICENSE-2.0
250
- *
251
- * Unless required by applicable law or agreed to in writing, software
252
- * distributed under the License is distributed on an "AS IS" BASIS,
253
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
254
- * See the License for the specific language governing permissions and
255
- * limitations under the License.
256
- */function ft(t){$(new I("platform-logger",e=>new ve(e),"PRIVATE")),$(new I("heartbeat",e=>new ht(e),"PRIVATE")),_(O,j,t),_(O,j,"esm2017"),_("fire-js","")}ft("");var ut="firebase",pt="9.10.0";/**
257
- * @license
258
- * Copyright 2020 Google LLC
259
- *
260
- * Licensed under the Apache License, Version 2.0 (the "License");
261
- * you may not use this file except in compliance with the License.
262
- * You may obtain a copy of the License at
263
- *
264
- * http://www.apache.org/licenses/LICENSE-2.0
265
- *
266
- * Unless required by applicable law or agreed to in writing, software
267
- * distributed under the License is distributed on an "AS IS" BASIS,
268
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
269
- * See the License for the specific language governing permissions and
270
- * limitations under the License.
271
- */_(ut,pt,"app");const mt=window.firebaseConfig||{apiKey:"AIzaSyCrVzemDgpyp9i6ni7Yc5ZuEVfXYwl-4J0",authDomain:"ecom2-002.firebaseapp.com",projectId:"ecom2-002",storageBucket:"ecom2-002.appspot.com",messagingSenderId:"402807248219",appId:"1:402807248219:web:cf7d57759751e74776367e",measurementId:"G-SC592CE0GB"};rt(mt);