@whop/checkout 0.0.22 → 0.0.24

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/README.md CHANGED
@@ -10,7 +10,7 @@ To embed checkout, you need to add the following script tag into the `<head>` of
10
10
  <script
11
11
  async
12
12
  defer
13
- src="https://cdn.jsdelivr.net/npm/@whop/checkout@0.0.21-canary.8/dist/loader.js"
13
+ src="https://cdn.jsdelivr.net/npm/@whop/checkout/dist/loader.js"
14
14
  ></script>
15
15
  ```
16
16
 
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";function e(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function t(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function n(e){return t(e.data)=="object"&&e.data!==null&&"event"in e.data&&e.data.event==="resize"}function o(e){window.addEventListener("message",function(t){t.source===e.contentWindow&&n(t)&&t.data.event==="resize"&&(e.style.height="".concat(t.data.height,"px"))})}function a(e){if(e.dataset.whopCheckoutMounted)return;var t=e.dataset.whopCheckoutPlanId;if(!t)return;var n;var a=(n=e.dataset.whopCheckoutOrigin)!==null&&n!==void 0?n:"https://whop.com/",r=new URL("/embedded/checkout/".concat(t,"/"),a),i=e.dataset.whopCheckoutTheme;i&&r.searchParams.set("theme",i);var l=e.dataset.whopCheckoutSession;l&&r.searchParams.set("session",l);var d=new URL(window.location.href).origin;r.searchParams.set("h",d);var u=document.createElement("iframe");u.src=r.toString(),u.style.width="100%",u.style.height="480px",u.style.border="none",u.style.overflow="hidden",u.sandbox.add("allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"),u.allow="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;",e.dataset.whopCheckoutMounted="true",e.appendChild(u),o(u)}if((typeof window==="undefined"?"undefined":t(window))<"u"&&window.wco&&!window.wco.listening){new MutationObserver(function(t){var n=true,o=false,r=undefined,i=true,l=false,d=undefined;try{for(var u=t[Symbol.iterator](),s;!(i=(s=u.next()).done);i=true){var c=s.value;try{for(var w=c.addedNodes[Symbol.iterator](),f;!(n=(f=w.next()).done);n=true){var h=f.value;e(h,HTMLElement)&&h.dataset.whopCheckoutPlanId&&a(h)}}catch(e){o=true;r=e}finally{try{if(!n&&w.return!=null){w.return()}}finally{if(o){throw r}}}}}catch(e){l=true;d=e}finally{try{if(!i&&u.return!=null){u.return()}}finally{if(l){throw d}}}}).observe(document.body,{childList:!0,subtree:!0});var r=true,i=false,l=undefined;try{for(var d=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),u;!(r=(u=d.next()).done);r=true){var s=u.value;e(s,HTMLElement)&&a(s)}}catch(e){i=true;l=e}finally{try{if(!r&&d.return!=null){d.return()}}finally{if(i){throw l}}}window.wco.listening=!0}
1
+ "use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e){if(Array.isArray(e))return e}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function r(e,t){var n=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n==null)return;var r=[];var o=true;var a=false;var i,l;try{for(n=n.call(e);!(o=(i=n.next()).done);o=true){r.push(i.value);if(t&&r.length===t)break}}catch(e){a=true;l=e}finally{try{if(!o&&n["return"]!=null)n["return"]()}finally{if(a)throw l}}return r}function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,n){return t(e)||r(e,n)||l(e,n)||o()}function i(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function l(t,n){if(!t)return;if(typeof t==="string")return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}function u(e){return i(e.data)=="object"&&e.data!==null&&"event"in e.data&&(e.data.event==="resize"||e.data.event==="center")}function d(e){var t;function n(t){t.source===e.contentWindow&&u(t)&&(t.data.event==="resize"&&(e.style.height="".concat(t.data.height,"px")),t.data.event==="center"&&e.scrollIntoView({block:"center",inline:"center"}))}window.addEventListener("message",n),(t=window.wco)===null||t===void 0?void 0:t.frames.set(e,function(){window.removeEventListener("message",n)})}function c(e){if(e.dataset.whopCheckoutMounted)return;var t=e.dataset.whopCheckoutPlanId;if(!t)return;var n;var r=(n=e.dataset.whopCheckoutOrigin)!==null&&n!==void 0?n:"https://whop.com/",o=new URL("/embedded/checkout/".concat(t,"/"),r),a=e.dataset.whopCheckoutTheme;a&&o.searchParams.set("theme",a);var i=e.dataset.whopCheckoutSession;i&&o.searchParams.set("session",i);var l=new URL(window.location.href).origin;o.searchParams.set("h",l);var u=document.createElement("iframe");u.src=o.toString(),u.style.width="100%",u.style.height="480px",u.style.border="none",u.style.overflow="hidden",u.sandbox.add("allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"),u.allow="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;",e.dataset.whopCheckoutMounted="true",e.appendChild(u),d(u)}if((typeof window==="undefined"?"undefined":i(window))<"u"&&window.wco&&!window.wco.listening){var s=new MutationObserver(function(e){var t=true,r=false,o=undefined;try{for(var i=e[Symbol.iterator](),l;!(t=(l=i.next()).done);t=true){var u=l.value;var d,s;var f=true,w=false,v=undefined;try{for(var y=u.addedNodes[Symbol.iterator](),h;!(f=(h=y.next()).done);f=true){var m=h.value;n(m,HTMLElement)&&m.dataset.whopCheckoutPlanId&&c(m)}}catch(e){w=true;v=e}finally{try{if(!f&&y.return!=null){y.return()}}finally{if(w){throw v}}}var p=Array.from(u.removedNodes);var b;var g=true,S=false,k=undefined;try{for(var x=((b=(d=window.wco)===null||d===void 0?void 0:d.frames)!==null&&b!==void 0?b:[])[Symbol.iterator](),C;!(g=(C=x.next()).done);g=true){var A=a(C.value,2),I=A[0],L=A[1];p.includes(I)&&(L(),(s=window.wco)===null||s===void 0?void 0:s.frames.delete(I))}}catch(e){S=true;k=e}finally{try{if(!g&&x.return!=null){x.return()}}finally{if(S){throw k}}}}}catch(e){r=true;o=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw o}}}});var f=true,w=false,v=undefined;try{for(var y=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),h;!(f=(h=y.next()).done);f=true){var m=h.value;n(m,HTMLElement)&&c(m)}}catch(e){w=true;v=e}finally{try{if(!f&&y.return!=null){y.return()}}finally{if(w){throw v}}}s.observe(document.body,{childList:!0,subtree:!0}),window.wco.listening=!0}
package/dist/index.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width">
6
- <script src="http://localhost:3000/loader.js"></script>
6
+ <script src="https://cdn.jsdelivr.net/npm/@whop/checkout/dist/loader.js"></script>
7
7
  <title>Whop embedded checkout</title>
8
8
  <style>
9
9
  div {
@@ -15,7 +15,6 @@
15
15
  </style>
16
16
  </head>
17
17
  <body style="display: flex; height: fit-content; width: 100%">
18
- <div style="flex: 1; height: fit-content; overflow: hidden; max-width: 50%;" data-whop-checkout-theme="light" data-whop-checkout-origin="http://localhost:8004" data-whop-checkout-plan-id="plan_ziYsgX0C9r4rG"></div>
19
- <div style="flex: 1; height: fit-content; overflow: hidden; max-width: 50%;" data-whop-checkout-theme="light" data-whop-checkout-origin="http://localhost:8004" data-whop-checkout-plan-id="plan_ziYsgX0C9r4rG"></div>
18
+ <div style="flex: 1; height: fit-content; overflow: hidden; max-width: 50%;" data-whop-checkout-theme="light" data-whop-checkout-plan-id="plan_QnbKDNAbfcXr8"></div>
20
19
  </body>
21
20
  </html>
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";function e(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function t(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}(function(){var n=function e(e){return t(e.data)=="object"&&e.data!==null&&"event"in e.data&&e.data.event==="resize"};var o=function e(e){window.addEventListener("message",function(t){t.source===e.contentWindow&&n(t)&&t.data.event==="resize"&&(e.style.height="".concat(t.data.height,"px"))})};var a=function e(e){if(e.dataset.whopCheckoutMounted)return;var t=e.dataset.whopCheckoutPlanId;if(!t)return;var n;var a=(n=e.dataset.whopCheckoutOrigin)!==null&&n!==void 0?n:"https://whop.com/",r=new URL("/embedded/checkout/".concat(t,"/"),a),i=e.dataset.whopCheckoutTheme;i&&r.searchParams.set("theme",i);var l=e.dataset.whopCheckoutSession;l&&r.searchParams.set("session",l);var d=new URL(window.location.href).origin;r.searchParams.set("h",d);var u=document.createElement("iframe");u.src=r.toString(),u.style.width="100%",u.style.height="480px",u.style.border="none",u.style.overflow="hidden",u.sandbox.add("allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"),u.allow="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;",e.dataset.whopCheckoutMounted="true",e.appendChild(u),o(u)};if((typeof window==="undefined"?"undefined":t(window))<"u"&&window.wco&&!window.wco.listening){new MutationObserver(function(t){var n=true,o=false,r=undefined,i=true,l=false,d=undefined;try{for(var u=t[Symbol.iterator](),s;!(i=(s=u.next()).done);i=true){var c=s.value;try{for(var w=c.addedNodes[Symbol.iterator](),f;!(n=(f=w.next()).done);n=true){var h=f.value;e(h,HTMLElement)&&h.dataset.whopCheckoutPlanId&&a(h)}}catch(e){o=true;r=e}finally{try{if(!n&&w.return!=null){w.return()}}finally{if(o){throw r}}}}}catch(e){l=true;d=e}finally{try{if(!i&&u.return!=null){u.return()}}finally{if(l){throw d}}}}).observe(document.body,{childList:!0,subtree:!0});var r=true,i=false,l=undefined;try{for(var d=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),u;!(r=(u=d.next()).done);r=true){var s=u.value;e(s,HTMLElement)&&a(s)}}catch(e){i=true;l=e}finally{try{if(!r&&d.return!=null){d.return()}}finally{if(i){throw l}}}window.wco.listening=!0}})();
1
+ "use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e){if(Array.isArray(e))return e}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function r(e,t){var n=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n==null)return;var r=[];var o=true;var a=false;var i,l;try{for(n=n.call(e);!(o=(i=n.next()).done);o=true){r.push(i.value);if(t&&r.length===t)break}}catch(e){a=true;l=e}finally{try{if(!o&&n["return"]!=null)n["return"]()}finally{if(a)throw l}}return r}function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,n){return t(e)||r(e,n)||l(e,n)||o()}function i(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function l(t,n){if(!t)return;if(typeof t==="string")return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}(function(){var e=function e(e){return i(e.data)=="object"&&e.data!==null&&"event"in e.data&&(e.data.event==="resize"||e.data.event==="center")};var t=function t(t){var n;function r(n){n.source===t.contentWindow&&e(n)&&(n.data.event==="resize"&&(t.style.height="".concat(n.data.height,"px")),n.data.event==="center"&&t.scrollIntoView({block:"center",inline:"center"}))}window.addEventListener("message",r),(n=window.wco)===null||n===void 0?void 0:n.frames.set(t,function(){window.removeEventListener("message",r)})};var r=function e(e){if(e.dataset.whopCheckoutMounted)return;var n=e.dataset.whopCheckoutPlanId;if(!n)return;var r;var o=(r=e.dataset.whopCheckoutOrigin)!==null&&r!==void 0?r:"https://whop.com/",a=new URL("/embedded/checkout/".concat(n,"/"),o),i=e.dataset.whopCheckoutTheme;i&&a.searchParams.set("theme",i);var l=e.dataset.whopCheckoutSession;l&&a.searchParams.set("session",l);var u=new URL(window.location.href).origin;a.searchParams.set("h",u);var d=document.createElement("iframe");d.src=a.toString(),d.style.width="100%",d.style.height="480px",d.style.border="none",d.style.overflow="hidden",d.sandbox.add("allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"),d.allow="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;",e.dataset.whopCheckoutMounted="true",e.appendChild(d),t(d)};if((typeof window==="undefined"?"undefined":i(window))<"u"&&window.wco&&!window.wco.listening){var o=new MutationObserver(function(e){var t=true,o=false,i=undefined;try{for(var l=e[Symbol.iterator](),u;!(t=(u=l.next()).done);t=true){var d=u.value;var c,s;var f=true,w=false,v=undefined;try{for(var y=d.addedNodes[Symbol.iterator](),h;!(f=(h=y.next()).done);f=true){var m=h.value;n(m,HTMLElement)&&m.dataset.whopCheckoutPlanId&&r(m)}}catch(e){w=true;v=e}finally{try{if(!f&&y.return!=null){y.return()}}finally{if(w){throw v}}}var p=Array.from(d.removedNodes);var b;var g=true,S=false,k=undefined;try{for(var x=((b=(c=window.wco)===null||c===void 0?void 0:c.frames)!==null&&b!==void 0?b:[])[Symbol.iterator](),C;!(g=(C=x.next()).done);g=true){var A=a(C.value,2),I=A[0],L=A[1];p.includes(I)&&(L(),(s=window.wco)===null||s===void 0?void 0:s.frames.delete(I))}}catch(e){S=true;k=e}finally{try{if(!g&&x.return!=null){x.return()}}finally{if(S){throw k}}}}}catch(e){o=true;i=e}finally{try{if(!t&&l.return!=null){l.return()}}finally{if(o){throw i}}}});var l=true,u=false,d=undefined;try{for(var c=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),s;!(l=(s=c.next()).done);l=true){var f=s.value;n(f,HTMLElement)&&r(f)}}catch(e){u=true;d=e}finally{try{if(!l&&c.return!=null){c.return()}}finally{if(u){throw d}}}o.observe(document.body,{childList:!0,subtree:!0}),window.wco.listening=!0}})();
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- function e(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function t(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function n(e){return t(e.data)=="object"&&e.data!==null&&"event"in e.data&&e.data.event==="resize"}function o(e){window.addEventListener("message",function(t){t.source===e.contentWindow&&n(t)&&t.data.event==="resize"&&(e.style.height="".concat(t.data.height,"px"))})}function a(e){if(e.dataset.whopCheckoutMounted)return;var t=e.dataset.whopCheckoutPlanId;if(!t)return;var n;var a=(n=e.dataset.whopCheckoutOrigin)!==null&&n!==void 0?n:"https://whop.com/",r=new URL("/embedded/checkout/".concat(t,"/"),a),l=e.dataset.whopCheckoutTheme;l&&r.searchParams.set("theme",l);var i=e.dataset.whopCheckoutSession;i&&r.searchParams.set("session",i);var d=new URL(window.location.href).origin;r.searchParams.set("h",d);var u=document.createElement("iframe");u.src=r.toString(),u.style.width="100%",u.style.height="480px",u.style.border="none",u.style.overflow="hidden",u.sandbox.add("allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"),u.allow="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;",e.dataset.whopCheckoutMounted="true",e.appendChild(u),o(u)}if((typeof window==="undefined"?"undefined":t(window))<"u"&&window.wco&&!window.wco.listening){new MutationObserver(function(t){var n=true,o=false,r=undefined,l=true,i=false,d=undefined;try{for(var u=t[Symbol.iterator](),s;!(l=(s=u.next()).done);l=true){var c=s.value;try{for(var w=c.addedNodes[Symbol.iterator](),f;!(n=(f=w.next()).done);n=true){var h=f.value;e(h,HTMLElement)&&h.dataset.whopCheckoutPlanId&&a(h)}}catch(e){o=true;r=e}finally{try{if(!n&&w.return!=null){w.return()}}finally{if(o){throw r}}}}}catch(e){i=true;d=e}finally{try{if(!l&&u.return!=null){u.return()}}finally{if(i){throw d}}}}).observe(document.body,{childList:!0,subtree:!0});var r=true,l=false,i=undefined;try{for(var d=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),u;!(r=(u=d.next()).done);r=true){var s=u.value;e(s,HTMLElement)&&a(s)}}catch(e){l=true;i=e}finally{try{if(!r&&d.return!=null){d.return()}}finally{if(l){throw i}}}window.wco.listening=!0}
1
+ function e(e,t){if(t==null||t>e.length)t=e.length;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e){if(Array.isArray(e))return e}function n(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function r(e,t){var n=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n==null)return;var r=[];var o=true;var a=false;var i,l;try{for(n=n.call(e);!(o=(i=n.next()).done);o=true){r.push(i.value);if(t&&r.length===t)break}}catch(e){a=true;l=e}finally{try{if(!o&&n["return"]!=null)n["return"]()}finally{if(a)throw l}}return r}function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,n){return t(e)||r(e,n)||l(e,n)||o()}function i(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function l(t,n){if(!t)return;if(typeof t==="string")return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}function u(e){return i(e.data)=="object"&&e.data!==null&&"event"in e.data&&(e.data.event==="resize"||e.data.event==="center")}function d(e){var t;function n(t){t.source===e.contentWindow&&u(t)&&(t.data.event==="resize"&&(e.style.height="".concat(t.data.height,"px")),t.data.event==="center"&&e.scrollIntoView({block:"center",inline:"center"}))}window.addEventListener("message",n),(t=window.wco)===null||t===void 0?void 0:t.frames.set(e,function(){window.removeEventListener("message",n)})}function c(e){if(e.dataset.whopCheckoutMounted)return;var t=e.dataset.whopCheckoutPlanId;if(!t)return;var n;var r=(n=e.dataset.whopCheckoutOrigin)!==null&&n!==void 0?n:"https://whop.com/",o=new URL("/embedded/checkout/".concat(t,"/"),r),a=e.dataset.whopCheckoutTheme;a&&o.searchParams.set("theme",a);var i=e.dataset.whopCheckoutSession;i&&o.searchParams.set("session",i);var l=new URL(window.location.href).origin;o.searchParams.set("h",l);var u=document.createElement("iframe");u.src=o.toString(),u.style.width="100%",u.style.height="480px",u.style.border="none",u.style.overflow="hidden",u.sandbox.add("allow-forms","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation","allow-top-navigation-by-user-activation","allow-downloads"),u.allow="document-domain; execution-while-not-rendered; execution-while-out-of-viewport; payment; paymentRequest; sync-script;",e.dataset.whopCheckoutMounted="true",e.appendChild(u),d(u)}if((typeof window==="undefined"?"undefined":i(window))<"u"&&window.wco&&!window.wco.listening){var s=new MutationObserver(function(e){var t=true,r=false,o=undefined;try{for(var i=e[Symbol.iterator](),l;!(t=(l=i.next()).done);t=true){var u=l.value;var d,s;var f=true,w=false,v=undefined;try{for(var y=u.addedNodes[Symbol.iterator](),h;!(f=(h=y.next()).done);f=true){var m=h.value;n(m,HTMLElement)&&m.dataset.whopCheckoutPlanId&&c(m)}}catch(e){w=true;v=e}finally{try{if(!f&&y.return!=null){y.return()}}finally{if(w){throw v}}}var p=Array.from(u.removedNodes);var b;var g=true,S=false,k=undefined;try{for(var x=((b=(d=window.wco)===null||d===void 0?void 0:d.frames)!==null&&b!==void 0?b:[])[Symbol.iterator](),C;!(g=(C=x.next()).done);g=true){var A=a(C.value,2),I=A[0],L=A[1];p.includes(I)&&(L(),(s=window.wco)===null||s===void 0?void 0:s.frames.delete(I))}}catch(e){S=true;k=e}finally{try{if(!g&&x.return!=null){x.return()}}finally{if(S){throw k}}}}}catch(e){r=true;o=e}finally{try{if(!t&&i.return!=null){i.return()}}finally{if(r){throw o}}}});var f=true,w=false,v=undefined;try{for(var y=document.querySelectorAll("[data-whop-checkout-plan-id]")[Symbol.iterator](),h;!(f=(h=y.next()).done);f=true){var m=h.value;n(m,HTMLElement)&&c(m)}}catch(e){w=true;v=e}finally{try{if(!f&&y.return!=null){y.return()}}finally{if(w){throw v}}}s.observe(document.body,{childList:!0,subtree:!0}),window.wco.listening=!0}
package/dist/loader.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var n=document.currentScript,o=n===null||n===void 0?void 0:n.src;var d;(typeof window==="undefined"?"undefined":e(window))<"u"&&o&&((d=window.wco)!==null&&d!==void 0?d:window.wco=function(){var e=document.createElement("script");return e.src=o.replace(/loader\.js$/,"index.js"),e.async=!0,e.defer=!0,document.head.appendChild(e),{injected:!0,listening:!1}}());
1
+ "use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var n=document.currentScript,o=n===null||n===void 0?void 0:n.src;var d;(typeof window==="undefined"?"undefined":e(window))<"u"&&o&&((d=window.wco)!==null&&d!==void 0?d:window.wco=function(){var e=document.createElement("script");return e.src=o.replace(/loader\.js$/,"index.js"),e.async=!0,e.defer=!0,document.head.appendChild(e),{injected:!0,listening:!1,frames:new Map}}());
package/dist/loader.js CHANGED
@@ -1 +1 @@
1
- "use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}(function(){var n=document.currentScript,o=n===null||n===void 0?void 0:n.src;var d;(typeof window==="undefined"?"undefined":e(window))<"u"&&o&&((d=window.wco)!==null&&d!==void 0?d:window.wco=function(){var e=document.createElement("script");return e.src=o.replace(/loader\.js$/,"index.js"),e.async=!0,e.defer=!0,document.head.appendChild(e),{injected:!0,listening:!1}}())})();
1
+ "use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}(function(){var n=document.currentScript,o=n===null||n===void 0?void 0:n.src;var d;(typeof window==="undefined"?"undefined":e(window))<"u"&&o&&((d=window.wco)!==null&&d!==void 0?d:window.wco=function(){var e=document.createElement("script");return e.src=o.replace(/loader\.js$/,"index.js"),e.async=!0,e.defer=!0,document.head.appendChild(e),{injected:!0,listening:!1,frames:new Map}}())})();
package/dist/loader.mjs CHANGED
@@ -1 +1 @@
1
- function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var n=document.currentScript,o=n===null||n===void 0?void 0:n.src;var d;(typeof window==="undefined"?"undefined":e(window))<"u"&&o&&((d=window.wco)!==null&&d!==void 0?d:window.wco=function(){var e=document.createElement("script");return e.src=o.replace(/loader\.js$/,"index.js"),e.async=!0,e.defer=!0,document.head.appendChild(e),{injected:!0,listening:!1}}());
1
+ function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var n=document.currentScript,o=n===null||n===void 0?void 0:n.src;var d;(typeof window==="undefined"?"undefined":e(window))<"u"&&o&&((d=window.wco)!==null&&d!==void 0?d:window.wco=function(){var e=document.createElement("script");return e.src=o.replace(/loader\.js$/,"index.js"),e.async=!0,e.defer=!0,document.head.appendChild(e),{injected:!0,listening:!1,frames:new Map}}());
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@whop/checkout",
3
3
  "description": "Embed Whop checkout on any website",
4
- "version": "0.0.22",
4
+ "version": "0.0.24",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/whopio/whop-sdk-ts",
@@ -28,7 +28,7 @@
28
28
  "concurrently": "9.1.2",
29
29
  "dotenv": "16.5.0",
30
30
  "serve": "14.2.4",
31
- "ts-proto": "2.7.0",
31
+ "ts-proto": "2.7.1",
32
32
  "tsup": "8.5.0",
33
33
  "typescript": "latest"
34
34
  },