@onside/install-widget 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{AndroidPlatformModal-B_uF1M7D.cjs → AndroidPlatformModal-Bo8KL9YE.cjs} +1 -1
- package/dist-lib/{AndroidPlatformModal-3kGO8HxK.js → AndroidPlatformModal-DGNUxRkK.js} +2 -2
- package/dist-lib/{CheckInstallModal-Do2gfb9L.js → CheckInstallModal-BAx1q0Eh.js} +3 -3
- package/dist-lib/{CheckInstallModal-ClGHu6XA.cjs → CheckInstallModal-CamMs4Ky.cjs} +1 -1
- package/dist-lib/{Dialog-B1D2BvMl.js → Dialog-BpvFTl3s.js} +1 -1
- package/dist-lib/{Dialog-BRBYK08a.cjs → Dialog-H1GsCMbd.cjs} +1 -1
- package/dist-lib/{FaqModal-J1y4DGzd.js → FaqModal-B6YPov5t.js} +3 -3
- package/dist-lib/{FaqModal-BspE3dHf.cjs → FaqModal-BYENishJ.cjs} +1 -1
- package/dist-lib/{GoToSafariModal-Be-O5A-M.cjs → GoToSafariModal-B1EWxzWE.cjs} +1 -1
- package/dist-lib/{GoToSafariModal-BSuOwGJ3.js → GoToSafariModal-pXhEb2yy.js} +2 -2
- package/dist-lib/{UpdateIOSModal-Mxvo1zPl.cjs → UpdateIOSModal-B-jqDkQO.cjs} +1 -1
- package/dist-lib/{UpdateIOSModal-CF7lFNfI.js → UpdateIOSModal-D-cikTQ4.js} +3 -3
- package/dist-lib/{cdn-BmfyFccQ.js → cdn-DQucWvIe.js} +1 -1
- package/dist-lib/{cdn-BonUyxCA.cjs → cdn-ToXHpWOt.cjs} +1 -1
- package/dist-lib/{index-fWIxOyUM.js → index-BqoWsHcB.js} +59 -58
- package/dist-lib/index-DFXiHkdo.cjs +1 -0
- package/dist-lib/install-package-5TE9fTFQ.cjs +1 -0
- package/dist-lib/{install-package-CZGZODly.js → install-package-S3saul1C.js} +170 -170
- package/dist-lib/install-package.cjs +1 -1
- package/dist-lib/install-package.js +1 -1
- package/dist-lib/install-widget.css +1 -1
- package/package.json +10 -2
- package/dist-lib/index-BzQo1EMv.cjs +0 -1
- package/dist-lib/install-package-Dkv3eM_d.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),o=require("./install-package-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),o=require("./install-package-5TE9fTFQ.cjs"),d=require("./Dialog-H1GsCMbd.cjs"),u=require("./utils.cjs"),m=({open:i,onClose:t})=>{const{modal:s}=o.useMessages(),a="is_android",l=n.useCallback(()=>{u.trackModalEvent(a,"click","close"),t()},[t]),c=n.useCallback(r=>{r||l()},[l]);return e.jsx(d.Dialog,{"aria-labelledby":a,className:"outline-hidden",isDisplayingMargins:!0,open:i,onOpenChange:c,children:e.jsxs("div",{className:"flex h-full flex-col items-center justify-between text-center",children:[e.jsxs("div",{className:"m-auto",children:[e.jsx("p",{className:"text-2xl font-bold",children:s.android.title}),e.jsx("p",{className:"mt-3 px-10 font-sans text-xs font-normal",children:s.android.description})]}),e.jsx(o.Button,{className:"mt-2 w-full",onClick:l,size:"lg",type:"button",variant:"secondary",children:s.close})]})})};exports.AndroidPlatformModal=m;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback as n } from "react";
|
|
3
|
-
import { u as d, B as m } from "./install-package-
|
|
4
|
-
import { D as f } from "./Dialog-
|
|
3
|
+
import { u as d, B as m } from "./install-package-S3saul1C.js";
|
|
4
|
+
import { D as f } from "./Dialog-BpvFTl3s.js";
|
|
5
5
|
import { trackModalEvent as p } from "./utils.js";
|
|
6
6
|
const b = ({
|
|
7
7
|
open: i,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as t, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useState as u, useCallback as c } from "react";
|
|
3
|
-
import { u as x, B as i } from "./install-package-
|
|
4
|
-
import { D as k } from "./Dialog-
|
|
5
|
-
import { F as g } from "./FaqModal-
|
|
3
|
+
import { u as x, B as i } from "./install-package-S3saul1C.js";
|
|
4
|
+
import { D as k } from "./Dialog-BpvFTl3s.js";
|
|
5
|
+
import { F as g } from "./FaqModal-B6YPov5t.js";
|
|
6
6
|
import { trackModalEvent as a } from "./utils.js";
|
|
7
7
|
const C = ({
|
|
8
8
|
open: r,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),c=require("./install-package-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),c=require("./install-package-5TE9fTFQ.cjs"),h=require("./Dialog-H1GsCMbd.cjs"),f=require("./FaqModal-BYENishJ.cjs"),a=require("./utils.cjs"),m=({open:o,onClose:l})=>{const{modal:t}=c.useMessages(),[r,n]=s.useState(!1),i=s.useCallback(()=>{a.trackModalEvent("check_install","click","close"),l()},[l]),u=s.useCallback(()=>{a.trackModalEvent("check_install","click","success"),l()},[l]),d=s.useCallback(()=>{a.trackModalEvent("check_install","click","help"),n(!0)},[]),x=s.useCallback(k=>{k||i()},[i]);return e.jsxs(h.Dialog,{"aria-labelledby":"check-install",className:"outline-hidden",isDisplayingMargins:!0,open:o,onOpenChange:x,children:[e.jsxs("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[e.jsxs("div",{className:"mb-8 flex flex-col gap-3",children:[e.jsx("p",{className:"font-serif text-3xl font-medium text-black",children:t.checkInstall.title}),e.jsx("p",{className:"font-sans text-sm font-normal text-black/60",children:t.checkInstall.description})]}),e.jsxs("div",{className:"flex w-full flex-col gap-2",children:[e.jsx(c.Button,{className:"text-2xs w-full font-mono",onClick:u,size:"lg",type:"button",children:t.checkInstall.yes}),e.jsx(c.Button,{className:"text-2xs w-full font-mono",onClick:d,size:"lg",type:"button",variant:"secondary",children:t.checkInstall.no})]})]}),e.jsx(f.FaqModal,{isOpen:r,onClose:()=>{n(!1),l()}})]})};exports.CheckInstallModal=m;
|
|
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
|
2
2
|
import * as a from "@radix-ui/react-dialog";
|
|
3
3
|
import * as l from "react";
|
|
4
4
|
import { forwardRef as y, useState as k, useEffect as C } from "react";
|
|
5
|
-
import { a as i, B as N } from "./install-package-
|
|
5
|
+
import { a as i, B as N } from "./install-package-S3saul1C.js";
|
|
6
6
|
const B = (e) => /* @__PURE__ */ l.createElement("svg", { fill: "none", viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.createElement("path", { d: "m4 12 8-8m-8 0 8 8", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5 })), z = (e) => /* @__PURE__ */ l.createElement("svg", { fill: "none", height: 16, viewBox: "0 0 16 16", width: 16, xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.createElement("path", { d: "m9.7002 13-4.2929-4.29289c-.39052-.39053-.39052-1.02369 0-1.41422l4.2929-4.29289", stroke: "#1e1c1f", strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: 0.84, strokeWidth: 1.5 })), d = "provider-widget-portal-root";
|
|
7
7
|
function D() {
|
|
8
8
|
let e = document.getElementById(d);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),C=require("@radix-ui/react-dialog"),s=require("react"),i=require("./install-package-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),C=require("@radix-ui/react-dialog"),s=require("react"),i=require("./install-package-5TE9fTFQ.cjs");function f(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,l.get?l:{enumerable:!0,get:()=>e[a]})}}return n.default=e,Object.freeze(n)}const o=f(C),r=f(s),N=e=>r.createElement("svg",{fill:"none",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},r.createElement("path",{d:"m4 12 8-8m-8 0 8 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),p=e=>r.createElement("svg",{fill:"none",height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...e},r.createElement("path",{d:"m9.7002 13-4.2929-4.29289c-.39052-.39053-.39052-1.02369 0-1.41422l4.2929-4.29289",stroke:"#1e1c1f",strokeLinecap:"round",strokeLinejoin:"round",strokeOpacity:.84,strokeWidth:1.5})),m="provider-widget-portal-root";function D(){let e=document.getElementById(m);return e||(e=document.createElement("div"),e.id=m,e.style.zIndex="2147483647",e.style.position="relative",document.body.appendChild(e)),e}const x=s.forwardRef((e,n)=>{const{"aria-labelledby":a,"aria-describedby":l,children:h,className:g,footerContent:c,headerContent:b,isDisplayingMargins:w=!0,open:y,onOpenChange:v,showCloseButton:j=!0,onBackClick:d}=e,[u,k]=s.useState(null);return s.useEffect(()=>{k(D())},[]),t.jsx(o.Root,{open:y,onOpenChange:v,children:u&&t.jsxs(o.Portal,{container:u,children:[t.jsx(o.Overlay,{"aria-hidden":!0,className:i.cn("fixed inset-0 bg-black/50 backdrop-blur-sm","!z-[2147483647] pointer-events-auto","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","duration-300")}),t.jsx(o.Content,{ref:n,"aria-labelledby":a,"aria-describedby":l,"aria-modal":"true",className:i.cn("fixed left-1/2 top-1/2 w-full max-w-lg -translate-x-1/2 -translate-y-1/2 outline-none","!z-[2147483647]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]","data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","duration-300",w&&"h-dvh max-h-[calc(100dvh-8px)] max-w-[calc(100dvw-8px)] rounded-2xl bg-white p-4",g),children:t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs(o.Title,{className:"flex flex-shrink-0 flex-row items-center justify-between",children:[t.jsxs("div",{className:"flex items-center",children:[d&&t.jsx(i.Button,{className:"mr-auto rounded-full !bg-lightGray !p-[10px]",onClick:d,children:t.jsx(p,{className:"size-4"})}),b]}),j&&t.jsx(o.Close,{asChild:!0,children:t.jsx("button",{"aria-label":"Close modal",className:"hover:bg-gray-200 ml-auto rounded-full bg-lightGray p-[10px] outline-none",type:"button",children:t.jsx(N,{className:"size-4"})})})]}),t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:h}),c&&t.jsx("footer",{className:"flex flex-shrink-0 flex-col gap-2.5",children:c})]})})]})})});x.displayName="Dialog";exports.Dialog=x;exports.SvgArrowBackIcon=p;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r, Fragment as u } from "react/jsx-runtime";
|
|
2
|
-
import { B as x, V as N, c as m } from "./cdn-
|
|
3
|
-
import { u as d, c as b, B as g } from "./install-package-
|
|
4
|
-
import { D as y, S as q } from "./Dialog-
|
|
2
|
+
import { B as x, V as N, c as m } from "./cdn-DQucWvIe.js";
|
|
3
|
+
import { u as d, c as b, B as g } from "./install-package-S3saul1C.js";
|
|
4
|
+
import { D as y, S as q } from "./Dialog-BpvFTl3s.js";
|
|
5
5
|
import { useCallback as c, useState as w } from "react";
|
|
6
6
|
const C = (a) => {
|
|
7
7
|
const { className: t, text: o = "hello@onside.io" } = a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),i=require("./cdn-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),i=require("./cdn-ToXHpWOt.cjs"),c=require("./install-package-5TE9fTFQ.cjs"),x=require("./Dialog-H1GsCMbd.cjs"),r=require("react"),p=s=>{const{className:a,text:t="hello@onside.io"}=s;return e.jsx("a",{className:a,href:"mailto:hello@onside.io",rel:"noreferrer noopener",target:"_blank",children:t})},f=({action:s,onClick:a})=>{if(s.event==="change_region")return e.jsx(c.Button,{className:"!px-1.5 !py-0",onClick:a,variant:"transparent",children:s.word});if(s.event==="support")return e.jsx(p,{className:"px-1.5 font-medium text-blue",text:s.word})},j=s=>{const{action:a,answer:t,changeDisplay:n,question:l}=s,o=r.useCallback(()=>{n("changeRegion")},[n]);return e.jsxs("li",{className:"flex flex-col gap-6 rounded-3xl bg-lightGray p-6",children:[e.jsx("h3",{className:"leading-7 text-sm font-medium",children:l}),e.jsxs("p",{className:"text-base",children:[t,a?f({action:a,onClick:o}):null]})]})},N=({changeDisplay:s,className:a})=>{const{modal:t}=c.useMessages();return e.jsx("ul",{className:c.clsx("flex flex-col gap-2",a),children:t.faq.items.map((n,l)=>e.jsx(j,{action:n.action,answer:n.answer,changeDisplay:s,question:n.question},`faq-item-${l}`))})},q=i.cdn("/video/change-region.h264.mp4"),b=i.cdn("/video/change-region-poster.png"),g=s=>{const{isOpen:a,onClose:t}=s,{modal:n}=c.useMessages(),[l,o]=r.useState("generic"),m=r.useCallback(()=>{o("generic")},[]),u=r.useCallback(()=>{t(),setTimeout(()=>{o("generic")},500)},[t]);let d=e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"mt-4 text-center text-xl font-medium",children:n.faq.title}),e.jsx(N,{changeDisplay:o,className:"mt-8"})]});return l==="changeRegion"&&(d=e.jsxs("div",{className:"flex flex-col overflow-x-scroll",children:[e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("h2",{className:"mt-4 text-center text-lg font-medium",children:n.faq.changeRegion.title}),e.jsx("p",{className:"text-sm",children:n.faq.changeRegion.label}),e.jsx(i.Breadcrumbs,{breadcrumbs:n.faq.changeRegion.breadcrumbs,className:"flex max-w-[85%] flex-wrap justify-center gap-x-1 gap-y-2"}),e.jsx("p",{className:"text-sm",children:n.faq.changeRegion.caption})]}),e.jsx("div",{className:"mt-6 flex w-full justify-center rounded-2xl bg-lightGray px-7 py-5",children:e.jsx(i.VideoAutoplay,{ariaLabel:"Instruction demonstrating how to change the App Store region",className:"w-full rounded-2xl border-8 border-white",poster:b,children:e.jsx("source",{src:q,type:"video/mp4"})})})]})),e.jsx(x.Dialog,{"aria-labelledby":"faq-modal",headerContent:l==="changeRegion"&&e.jsx(c.Button,{className:"mr-auto rounded-full bg-lightGray !p-[10px]",onClick:m,children:e.jsx(x.SvgArrowBackIcon,{className:"size-4"})}),open:a,onOpenChange:h=>{h||u()},children:d})};g.displayName="FaqModal";exports.FaqModal=g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("./install-package-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("./install-package-5TE9fTFQ.cjs"),s=require("react"),h=require("./Dialog-H1GsCMbd.cjs"),l=require("./utils.cjs");function k(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(a,e,n.get?n:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const u=k(s),w=5e3,y=t=>{const[a,e]=s.useState(!1);return{handleCopy:s.useCallback(()=>{navigator.clipboard.writeText(t),e(!0),setTimeout(()=>e(!1),w)},[t]),isCopied:a}},C=t=>u.createElement("svg",{width:10,height:16,viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},u.createElement("path",{d:"M3.9375 12.25L6.35539 9.83211C6.74592 9.44158 6.74592 8.80842 6.35539 8.41789L3.9375 6",stroke:"#1E1C1F",strokeOpacity:.6,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),j=({open:t,onClose:a})=>{const{modal:e}=r.useMessages(),n=typeof window<"u"?window.location.href.replace(/\/$/,""):"",p=s.useMemo(()=>{const[i]=n.replace(/^https?:\/\//,"").split(/[?#]/);return i?.replace(/\/$/,"")??""},[n]),{handleCopy:c,isCopied:f}=y(n),d=l.getDeviceInfo(),x=d.browser==="opera"&&d.platform==="ios",g=s.useCallback(i=>{i||a()},[a]),m=s.useCallback(()=>{l.trackModalEvent("go_to_safari","click","button"),window.location.href=`x-safari-${n}`},[n]),b=s.useCallback(()=>{l.trackModalEvent("go_to_safari","click","link"),c()},[c]);return o.jsx(h.Dialog,{"aria-labelledby":"go-to-safari-modal",isDisplayingMargins:!0,open:t,onOpenChange:g,showCloseButton:!1,onBackClick:a,children:o.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center",children:[o.jsx("h1",{className:"mt-8 text-center font-sans text-5xl font-medium",children:e.goToSafari.title}),o.jsx("p",{className:"text-tertiary mt-5 w-11/12 text-center font-sans text-lg font-normal",children:e.goToSafari.caption}),o.jsx("p",{className:"text-tertiary w-11/12 text-center font-sans text-lg font-normal",children:e.goToSafari.description}),o.jsxs("div",{className:"mt-10 flex w-full flex-col items-center gap-5",children:[!x&&o.jsxs(r.Button,{className:"flex min-w-[206px] items-center justify-center gap-[6px] font-sans text-lg font-normal text-white!",onClick:m,size:"lg",children:[e.goToSafari.openButton,o.jsx(C,{})]}),o.jsx(r.Button,{className:"flex min-w-[206px] items-center justify-center gap-[6px] font-sans text-lg font-normal",onClick:b,size:"lg",variant:"text",children:f?e.goToSafari.linkCopied:p})]}),o.jsx("p",{className:r.clsx("relative mt-3 rounded-xl bg-black px-4 py-3 font-sans text-xs font-normal text-white transition-[opacity,transform] duration-300","before:absolute before:-top-1 before:left-1/2 before:block before:size-2 before:-translate-x-1/2 before:rotate-45 before:rounded-xs before:bg-black",f?"translate-y-0 opacity-100":"-translate-y-2 opacity-0"),children:e.goToSafari.linkPaste})]})})};exports.GoToSafariModal=j;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { u as w, B as p, c as b } from "./install-package-
|
|
2
|
+
import { u as w, B as p, c as b } from "./install-package-S3saul1C.js";
|
|
3
3
|
import * as m from "react";
|
|
4
4
|
import { useState as y, useCallback as r, useMemo as C } from "react";
|
|
5
|
-
import { D as S } from "./Dialog-
|
|
5
|
+
import { D as S } from "./Dialog-BpvFTl3s.js";
|
|
6
6
|
import { getDeviceInfo as v, trackModalEvent as d } from "./utils.js";
|
|
7
7
|
const T = 5e3, N = (o) => {
|
|
8
8
|
const [n, e] = y(!1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),l=require("./cdn-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),l=require("./cdn-ToXHpWOt.cjs"),c=require("./install-package-5TE9fTFQ.cjs"),d=require("./Dialog-H1GsCMbd.cjs"),u=require("./utils.cjs"),m=l.cdn("/video/update-ios-poster.png"),p=l.cdn("/video/update-ios.h264.mp4"),x=({open:r,onClose:t})=>{const{modal:s}=c.useMessages();o.useEffect(()=>{let a;return r&&(a=setTimeout(()=>{document.querySelector("video")?.play()},600)),()=>{clearTimeout(a)}},[r]);const i=o.useCallback(a=>{a||t()},[t]),n=o.useCallback(()=>{u.trackModalEvent("update_ios","click","close"),t()},[t]);return e.jsx(d.Dialog,{"aria-labelledby":"update-ios",open:r,onOpenChange:i,showCloseButton:!1,onBackClick:t,children:e.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[e.jsx("h2",{className:"mt-3 text-center font-sans text-3xl font-medium",id:"update-ios",children:s.updateIos.title}),e.jsxs("section",{className:"mt-2",children:[e.jsx("p",{className:"mt-3 text-center font-sans text-xs font-normal",children:s.updateIos.description}),e.jsx(l.Breadcrumbs,{breadcrumbs:s.updateIos.breadcrumbs,className:"mt-2 flex gap-1"})]}),e.jsx("div",{className:"relative mt-4 flex w-full grow justify-center overflow-hidden rounded-t-2xl bg-lightGray px-7 pt-7",children:e.jsx(l.VideoAutoplay,{ariaLabel:"Instruction demonstrating the update process",className:"shadow-14-50-98 rounded-t-[20px] border-8 border-b-0 border-white",poster:m,children:e.jsx("source",{src:p,type:"video/mp4"})})}),e.jsx(c.Button,{"aria-label":s.close,className:"mt-4 w-full",onClick:n,size:"lg",type:"button",children:s.close})]})})};exports.UpdateIOSModal=x;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as n, useCallback as l } from "react";
|
|
3
|
-
import { B as m, V as u, c as i } from "./cdn-
|
|
4
|
-
import { u as p, B as f } from "./install-package-
|
|
5
|
-
import { D as h } from "./Dialog-
|
|
3
|
+
import { B as m, V as u, c as i } from "./cdn-DQucWvIe.js";
|
|
4
|
+
import { u as p, B as f } from "./install-package-S3saul1C.js";
|
|
5
|
+
import { D as h } from "./Dialog-BpvFTl3s.js";
|
|
6
6
|
import { trackModalEvent as b } from "./utils.js";
|
|
7
7
|
const x = i("/video/update-ios-poster.png"), g = i("/video/update-ios.h264.mp4"), k = ({
|
|
8
8
|
open: o,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { c as u } from "./install-package-
|
|
2
|
+
import { c as u } from "./install-package-S3saul1C.js";
|
|
3
3
|
import { useRef as g, useEffect as m } from "react";
|
|
4
4
|
const v = "data:image/svg+xml,%3csvg%20width='10'%20height='16'%20viewBox='0%200%2010%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.9375%2012.25L6.35539%209.83211C6.74592%209.44158%206.74592%208.80842%206.35539%208.41789L3.9375%206'%20stroke='%231E1C1F'%20stroke-opacity='0.6'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", j = ({ breadcrumbs: e, className: i }) => /* @__PURE__ */ s("ul", { className: i, children: e.map((n, o) => /* @__PURE__ */ p("li", { className: "inline-flex", children: [
|
|
5
5
|
/* @__PURE__ */ s("p", { className: "rounded-3xl bg-lightGray px-2 py-0.5 text-sm", children: n }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),u=require("./install-package-
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),u=require("./install-package-5TE9fTFQ.cjs"),l=require("react"),g="data:image/svg+xml,%3csvg%20width='10'%20height='16'%20viewBox='0%200%2010%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.9375%2012.25L6.35539%209.83211C6.74592%209.44158%206.74592%208.80842%206.35539%208.41789L3.9375%206'%20stroke='%231E1C1F'%20stroke-opacity='0.6'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",v=({breadcrumbs:e,className:i})=>r.jsx("ul",{className:i,children:e.map((n,s)=>r.jsxs("li",{className:"inline-flex",children:[r.jsx("p",{className:"rounded-3xl bg-lightGray px-2 py-0.5 text-sm",children:n}),s<e.length-1&&r.jsx("img",{alt:"Arrow icon","aria-hidden":"true",className:"ml-1",height:16,src:g,width:10})]},n))}),m=e=>{const{ariaLabel:i,children:n,className:s,poster:o}=e,t=l.useRef(null);return l.useEffect(()=>{const a=()=>{t.current&&t.current.paused&&(t.current.muted=!0,t.current.play())},d=()=>{t.current&&(document.visibilityState==="hidden"?t.current.pause():document.visibilityState==="visible"&&a())},c=()=>{t.current&&t.current.pause()};return document.addEventListener("visibilitychange",d),window.addEventListener("focus",a),window.addEventListener("blur",c),()=>{document.removeEventListener("visibilitychange",d),window.removeEventListener("focus",a),window.removeEventListener("blur",c)}},[]),r.jsx("video",{"aria-label":i,autoPlay:!0,className:u.clsx("mt-2 transform-gpu rounded-2xl object-contain object-top",s),controls:!1,disablePictureInPicture:!0,disableRemotePlayback:!0,draggable:!1,loop:!0,muted:!0,playsInline:!0,poster:o,ref:t,"webkit-playsinline":"true","x-webkit-airplay":"deny",children:n},i)},p={"images/.gitkeep":"images/.gitkeep.e3b0c442","images/install-sad-android.png":"images/install-sad-android.8b24a6e1.png","scripts/1.0.0/install-package.cjs":"scripts/1.0.0/install-package.7ac30417.cjs","scripts/1.0.0/install-package.js":"scripts/1.0.0/install-package.65685adc.js","video/.gitkeep":"video/.gitkeep.e3b0c442","video/change-region-poster.png":"video/change-region-poster.bc6bda65.png","video/change-region.h264.mp4":"video/change-region.h264.c47b9282.mp4","video/get-approved-poster.jpg":"video/get-approved-poster.4e7177ac.jpg","video/get-approved.mp4":"video/get-approved.5b7b5f4a.mp4","video/open-onside-poster.jpg":"video/open-onside-poster.6b71cae6.jpg","video/open-onside.av1.mp4":"video/open-onside.av1.32f1aa51.mp4","video/open-onside.h264.mp4":"video/open-onside.h264.6df2feb6.mp4","video/update-ios-poster.png":"video/update-ios-poster.e59e58f8.png","video/update-ios.h264.mp4":"video/update-ios.h264.8054177e.mp4"},f="https://cdn.onside.io/assets/onside-install-widget/";function h(e){return e.replace(/^\//,"")}function b(e){const i=h(e),n=i.split("/").pop()??i,s=[i,`/${i}`,n,`/${n}`];for(const o of s)if(p[o])return p[o];return null}function w(e){if(!e||/^https?:\/\//i.test(e)||e.endsWith(".svg"))return e;const i=b(e);if(!i)return e;try{return new URL(i,f).toString()}catch{return e}}exports.Breadcrumbs=v;exports.VideoAutoplay=m;exports.cdn=w;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsxs as a, jsx as e, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { jsxs as a, jsx as e, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import { useState as A, useCallback as l, useMemo as F, useEffect as V } from "react";
|
|
4
|
+
import { D as b } from "./Dialog-BpvFTl3s.js";
|
|
5
|
+
import { F as q } from "./FaqModal-B6YPov5t.js";
|
|
6
|
+
import { u, B as O, I as w, c as x, A as T, b as P } from "./install-package-S3saul1C.js";
|
|
7
|
+
import { resolveInstallConditions as j, getDeviceInfo as L, trackModalEvent as E } from "./utils.js";
|
|
8
|
+
import { V as N, c as i } from "./cdn-DQucWvIe.js";
|
|
8
9
|
const R = () => {
|
|
9
|
-
const [n, t] = A(!1), o =
|
|
10
|
+
const [n, t] = A(!1), o = l(() => {
|
|
10
11
|
t(!1);
|
|
11
|
-
}, []), s =
|
|
12
|
+
}, []), s = l(() => {
|
|
12
13
|
t(!0);
|
|
13
14
|
}, []);
|
|
14
15
|
return {
|
|
@@ -17,8 +18,8 @@ const R = () => {
|
|
|
17
18
|
onOpenFaqModal: s,
|
|
18
19
|
setIsOpenFaq: t
|
|
19
20
|
};
|
|
20
|
-
},
|
|
21
|
-
const { modal: t } =
|
|
21
|
+
}, _ = ({ openFaq: n }) => {
|
|
22
|
+
const { modal: t } = u();
|
|
22
23
|
return /* @__PURE__ */ a("div", { className: "flex flex-row items-center justify-center gap-2", children: [
|
|
23
24
|
/* @__PURE__ */ e("p", { className: "font-sans text-lg font-medium", children: t.faq.needHelp }),
|
|
24
25
|
/* @__PURE__ */ e(
|
|
@@ -38,18 +39,18 @@ const R = () => {
|
|
|
38
39
|
step: o,
|
|
39
40
|
openAppHref: s = "#"
|
|
40
41
|
}) => {
|
|
41
|
-
const { modal:
|
|
42
|
-
return o === 1 ? /* @__PURE__ */ a(
|
|
42
|
+
const { modal: m } = u();
|
|
43
|
+
return o === 1 ? /* @__PURE__ */ a(d, { children: [
|
|
43
44
|
/* @__PURE__ */ e(
|
|
44
|
-
|
|
45
|
+
w,
|
|
45
46
|
{
|
|
46
47
|
className: "w-full",
|
|
47
48
|
handleCustomStep: n,
|
|
48
49
|
location: "get_approved"
|
|
49
50
|
}
|
|
50
51
|
),
|
|
51
|
-
/* @__PURE__ */ e(
|
|
52
|
-
] }) : o === 2 ? /* @__PURE__ */ a(
|
|
52
|
+
/* @__PURE__ */ e(_, { openFaq: t })
|
|
53
|
+
] }) : o === 2 ? /* @__PURE__ */ a(d, { children: [
|
|
53
54
|
/* @__PURE__ */ e(
|
|
54
55
|
O,
|
|
55
56
|
{
|
|
@@ -59,28 +60,28 @@ const R = () => {
|
|
|
59
60
|
onClick: n,
|
|
60
61
|
size: "lg",
|
|
61
62
|
variant: "primary",
|
|
62
|
-
children:
|
|
63
|
+
children: m.getApproved.openAppButton
|
|
63
64
|
}
|
|
64
65
|
),
|
|
65
|
-
/* @__PURE__ */ e(
|
|
66
|
-
] }) : /* @__PURE__ */ e(
|
|
67
|
-
}, G = (n) => {
|
|
66
|
+
/* @__PURE__ */ e(_, { openFaq: t })
|
|
67
|
+
] }) : /* @__PURE__ */ e(d, {});
|
|
68
|
+
}, G = (n) => /* @__PURE__ */ p.createElement("svg", { stroke: "customColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ p.createElement("style", null, ".spinner_V8m1{transform-origin:center;animation:spinner_zKoa 2s linear infinite}.spinner_V8m1 circle{stroke-linecap:round;animation:spinner_YpZS 1.5s ease-in-out infinite}@keyframes spinner_zKoa{100%{transform:rotate(360deg)}}@keyframes spinner_YpZS{0%{stroke-dasharray:0 150;stroke-dashoffset:0}47.5%{stroke-dasharray:42 150;stroke-dashoffset:-16}95%,100%{stroke-dasharray:42 150;stroke-dashoffset:-59}}"), /* @__PURE__ */ p.createElement("g", { className: "spinner_V8m1" }, /* @__PURE__ */ p.createElement("circle", { cx: 12, cy: 12, r: 9.5, fill: "none", strokeWidth: 3 }))), H = (n) => {
|
|
68
69
|
const { className: t, spinnerClasses: o, title: s = "Loading..." } = n;
|
|
69
70
|
return /* @__PURE__ */ a(
|
|
70
71
|
"div",
|
|
71
72
|
{
|
|
72
|
-
className:
|
|
73
|
+
className: x(
|
|
73
74
|
"flex flex-col items-center justify-center gap-12",
|
|
74
75
|
t
|
|
75
76
|
),
|
|
76
77
|
children: [
|
|
77
78
|
/* @__PURE__ */ e("h2", { className: "text-center !leading-10 text-lg font-medium", children: s }),
|
|
78
|
-
/* @__PURE__ */ e(
|
|
79
|
+
/* @__PURE__ */ e(G, { className: x("size-16 stroke-blue", o) })
|
|
79
80
|
]
|
|
80
81
|
}
|
|
81
82
|
);
|
|
82
|
-
},
|
|
83
|
-
const { modal: t } =
|
|
83
|
+
}, z = i("/video/get-approved-poster.jpg"), K = i("/video/get-approved.mp4"), Y = i("/video/open-onside-poster.jpg"), Z = i("/video/open-onside.av1.mp4"), Q = i("/video/open-onside.h264.mp4"), W = ({ step: n }) => {
|
|
84
|
+
const { modal: t } = u();
|
|
84
85
|
return n === 1 ? /* @__PURE__ */ a("div", { className: "mt-4 flex flex-col items-center", children: [
|
|
85
86
|
/* @__PURE__ */ e(
|
|
86
87
|
"h2",
|
|
@@ -96,12 +97,12 @@ const R = () => {
|
|
|
96
97
|
{
|
|
97
98
|
ariaLabel: "Instruction demonstrating how to get approved for Onside",
|
|
98
99
|
className: "w-[calc(100%-8px)] self-start",
|
|
99
|
-
poster:
|
|
100
|
-
children: /* @__PURE__ */ e("source", { src:
|
|
100
|
+
poster: z,
|
|
101
|
+
children: /* @__PURE__ */ e("source", { src: K, type: "video/mp4" })
|
|
101
102
|
}
|
|
102
103
|
)
|
|
103
104
|
] }) : n === 2 ? /* @__PURE__ */ e(
|
|
104
|
-
|
|
105
|
+
H,
|
|
105
106
|
{
|
|
106
107
|
className: "flex items-center justify-center",
|
|
107
108
|
title: t.getApproved.installing
|
|
@@ -121,74 +122,74 @@ const R = () => {
|
|
|
121
122
|
{
|
|
122
123
|
ariaLabel: "Instruction demonstrating how to open the Onside app",
|
|
123
124
|
className: "mt-10! w-[calc(100%-8px)] self-start",
|
|
124
|
-
poster:
|
|
125
|
+
poster: Y,
|
|
125
126
|
children: [
|
|
126
127
|
/* @__PURE__ */ e(
|
|
127
128
|
"source",
|
|
128
129
|
{
|
|
129
|
-
src:
|
|
130
|
+
src: Z,
|
|
130
131
|
type: "video/mp4; codecs=av01.0.05M.08"
|
|
131
132
|
}
|
|
132
133
|
),
|
|
133
|
-
/* @__PURE__ */ e("source", { src:
|
|
134
|
+
/* @__PURE__ */ e("source", { src: Q, type: "video/mp4" })
|
|
134
135
|
]
|
|
135
136
|
}
|
|
136
137
|
)
|
|
137
138
|
] }) : null;
|
|
138
|
-
},
|
|
139
|
-
const { open: t, onClose: o, onStep3Complete: s, openAppHref:
|
|
139
|
+
}, oe = (n) => {
|
|
140
|
+
const { open: t, onClose: o, onStep3Complete: s, openAppHref: m } = n, [c, f] = A(1), { isOpenFaq: k, onCloseFaqModal: y, onOpenFaqModal: C } = R(), { installState: I } = j(L()), g = I === "install_available", h = F(
|
|
140
141
|
() => ({
|
|
141
|
-
2: { delay:
|
|
142
|
+
2: { delay: P, action: () => f(3) },
|
|
142
143
|
3: {
|
|
143
|
-
delay:
|
|
144
|
+
delay: T,
|
|
144
145
|
action: () => s?.(),
|
|
145
|
-
skip: !
|
|
146
|
+
skip: !g || !s
|
|
146
147
|
}
|
|
147
148
|
}),
|
|
148
|
-
[s,
|
|
149
|
+
[s, g]
|
|
149
150
|
);
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
if (!
|
|
153
|
-
const D = setTimeout(
|
|
151
|
+
V(() => {
|
|
152
|
+
const r = h[c];
|
|
153
|
+
if (!r || r?.skip) return;
|
|
154
|
+
const D = setTimeout(r.action, r.delay);
|
|
154
155
|
return () => clearTimeout(D);
|
|
155
|
-
}, [c,
|
|
156
|
-
const v =
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
}, [c, h]);
|
|
157
|
+
const v = l(() => {
|
|
158
|
+
E("get_approved", "click", "close"), o(), setTimeout(() => {
|
|
159
|
+
f(1);
|
|
159
160
|
}, 500);
|
|
160
|
-
}, [o]),
|
|
161
|
-
|
|
162
|
-
}, []),
|
|
163
|
-
(
|
|
164
|
-
|
|
161
|
+
}, [o]), M = l(() => {
|
|
162
|
+
f(2), E("get_approved", "click", "install");
|
|
163
|
+
}, []), S = l(
|
|
164
|
+
(r) => {
|
|
165
|
+
r || v();
|
|
165
166
|
},
|
|
166
167
|
[v]
|
|
167
168
|
);
|
|
168
|
-
return /* @__PURE__ */ a(
|
|
169
|
+
return /* @__PURE__ */ a(d, { children: [
|
|
169
170
|
/* @__PURE__ */ e(
|
|
170
|
-
|
|
171
|
+
b,
|
|
171
172
|
{
|
|
172
173
|
"aria-labelledby": "get-approved",
|
|
173
174
|
className: "outline-hidden",
|
|
174
175
|
footerContent: /* @__PURE__ */ e(
|
|
175
176
|
B,
|
|
176
177
|
{
|
|
177
|
-
openAppHref:
|
|
178
|
-
onSubmit:
|
|
179
|
-
openFaq:
|
|
178
|
+
openAppHref: m,
|
|
179
|
+
onSubmit: M,
|
|
180
|
+
openFaq: C,
|
|
180
181
|
step: c
|
|
181
182
|
}
|
|
182
183
|
),
|
|
183
184
|
isDisplayingMargins: !0,
|
|
184
185
|
open: t,
|
|
185
|
-
onOpenChange:
|
|
186
|
-
children: /* @__PURE__ */ e(
|
|
186
|
+
onOpenChange: S,
|
|
187
|
+
children: /* @__PURE__ */ e(W, { step: c })
|
|
187
188
|
}
|
|
188
189
|
),
|
|
189
|
-
/* @__PURE__ */ e(
|
|
190
|
+
/* @__PURE__ */ e(q, { isOpen: k, onClose: y })
|
|
190
191
|
] });
|
|
191
192
|
};
|
|
192
193
|
export {
|
|
193
|
-
|
|
194
|
+
oe as GetApprovedModal
|
|
194
195
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),y=require("./Dialog-H1GsCMbd.cjs"),A=require("./FaqModal-BYENishJ.cjs"),r=require("./install-package-5TE9fTFQ.cjs"),p=require("./utils.cjs"),l=require("./cdn-ToXHpWOt.cjs");function C(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const n in s)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(s,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>s[n]})}}return t.default=s,Object.freeze(t)}const d=C(a),b=()=>{const[s,t]=a.useState(!1),n=a.useCallback(()=>{t(!1)},[]),o=a.useCallback(()=>{t(!0)},[]);return{isOpenFaq:s,onCloseFaqModal:n,onOpenFaqModal:o,setIsOpenFaq:t}},v=({openFaq:s})=>{const{modal:t}=r.useMessages();return e.jsxs("div",{className:"flex flex-row items-center justify-center gap-2",children:[e.jsx("p",{className:"font-sans text-lg font-medium",children:t.faq.needHelp}),e.jsx(r.Button,{className:"px-0! font-sans text-lg font-normal",color:"blue",onClick:s,variant:"transparent",children:t.faq.faqLink})]})},M=({onSubmit:s,openFaq:t,step:n,openAppHref:o="#"})=>{const{modal:m}=r.useMessages();return n===1?e.jsxs(e.Fragment,{children:[e.jsx(r.InstallAppButton,{className:"w-full",handleCustomStep:s,location:"get_approved"}),e.jsx(v,{openFaq:t})]}):n===2?e.jsxs(e.Fragment,{children:[e.jsx(r.Button,{className:"w-full text-center",color:"blue",href:o,onClick:s,size:"lg",variant:"primary",children:m.getApproved.openAppButton}),e.jsx(v,{openFaq:t})]}):e.jsx(e.Fragment,{})},S=s=>d.createElement("svg",{stroke:"customColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...s},d.createElement("style",null,".spinner_V8m1{transform-origin:center;animation:spinner_zKoa 2s linear infinite}.spinner_V8m1 circle{stroke-linecap:round;animation:spinner_YpZS 1.5s ease-in-out infinite}@keyframes spinner_zKoa{100%{transform:rotate(360deg)}}@keyframes spinner_YpZS{0%{stroke-dasharray:0 150;stroke-dashoffset:0}47.5%{stroke-dasharray:42 150;stroke-dashoffset:-16}95%,100%{stroke-dasharray:42 150;stroke-dashoffset:-59}}"),d.createElement("g",{className:"spinner_V8m1"},d.createElement("circle",{cx:12,cy:12,r:9.5,fill:"none",strokeWidth:3}))),q=s=>{const{className:t,spinnerClasses:n,title:o="Loading..."}=s;return e.jsxs("div",{className:r.clsx("flex flex-col items-center justify-center gap-12",t),children:[e.jsx("h2",{className:"text-center !leading-10 text-lg font-medium",children:o}),e.jsx(S,{className:r.clsx("size-16 stroke-blue",n)})]})},F=l.cdn("/video/get-approved-poster.jpg"),I=l.cdn("/video/get-approved.mp4"),D=l.cdn("/video/open-onside-poster.jpg"),w=l.cdn("/video/open-onside.av1.mp4"),P=l.cdn("/video/open-onside.h264.mp4"),V=({step:s})=>{const{modal:t}=r.useMessages();return s===1?e.jsxs("div",{className:"mt-4 flex flex-col items-center",children:[e.jsx("h2",{className:"text-center font-sans text-lg font-normal",id:"get-approved",children:t.getApproved.title}),e.jsx("ol",{className:"mt-5 flex list-decimal flex-col gap-2 ps-6 font-sans text-base font-normal",children:t.getApproved.steps.map(n=>e.jsx("li",{children:n},n))}),e.jsx(l.VideoAutoplay,{ariaLabel:"Instruction demonstrating how to get approved for Onside",className:"w-[calc(100%-8px)] self-start",poster:F,children:e.jsx("source",{src:I,type:"video/mp4"})})]}):s===2?e.jsx(q,{className:"flex items-center justify-center",title:t.getApproved.installing}):s===3?e.jsxs("div",{className:"mt-4 flex flex-col items-center",children:[e.jsx("h2",{className:"text-center font-sans text-lg font-normal",id:"open-onside-app",children:t.getApproved.openApp}),e.jsx("div",{className:"mt-5 font-sans text-base font-normal",children:e.jsx("p",{children:t.getApproved.openAppDescription})}),e.jsxs(l.VideoAutoplay,{ariaLabel:"Instruction demonstrating how to open the Onside app",className:"mt-10! w-[calc(100%-8px)] self-start",poster:D,children:[e.jsx("source",{src:w,type:"video/mp4; codecs=av01.0.05M.08"}),e.jsx("source",{src:P,type:"video/mp4"})]})]}):null},T=s=>{const{open:t,onClose:n,onStep3Complete:o,openAppHref:m}=s,[i,u]=a.useState(1),{isOpenFaq:j,onCloseFaqModal:h,onOpenFaqModal:_}=b(),{installState:E}=p.resolveInstallConditions(p.getDeviceInfo()),f=E==="install_available",x=a.useMemo(()=>({2:{delay:r.AVERAGE_INSTALL_TIME,action:()=>u(3)},3:{delay:r.AVERAGE_CHECK_TIME,action:()=>o?.(),skip:!f||!o}}),[o,f]);a.useEffect(()=>{const c=x[i];if(!c||c?.skip)return;const N=setTimeout(c.action,c.delay);return()=>clearTimeout(N)},[i,x]);const g=a.useCallback(()=>{p.trackModalEvent("get_approved","click","close"),n(),setTimeout(()=>{u(1)},500)},[n]),O=a.useCallback(()=>{u(2),p.trackModalEvent("get_approved","click","install")},[]),k=a.useCallback(c=>{c||g()},[g]);return e.jsxs(e.Fragment,{children:[e.jsx(y.Dialog,{"aria-labelledby":"get-approved",className:"outline-hidden",footerContent:e.jsx(M,{openAppHref:m,onSubmit:O,openFaq:_,step:i}),isDisplayingMargins:!0,open:t,onOpenChange:k,children:e.jsx(V,{step:i})}),e.jsx(A.FaqModal,{isOpen:j,onClose:h})]})};exports.GetApprovedModal=T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),i=require("react"),C=require("./useInstallUrl-iPCPqYWB.cjs"),M=require("./utils.cjs"),$=require("zustand");require("./installUrlService-AjG03i8i.cjs");function H(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const S=H(i);function B(e){var t,o,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(o=B(e[t]))&&(n&&(n+=" "),n+=o)}else for(o in e)e[o]&&(n&&(n+=" "),n+=o);return n}function U(){for(var e,t,o=0,n="",s=arguments.length;o<s;o++)(e=arguments[o])&&(t=B(e))&&(n&&(n+=" "),n+=t);return n}function p(...e){return U(e)}const W={primary:"rounded-full whitespace-nowrap leading-none font-medium transition-bg font-sans duration-300 flex items-center justify-center text-center",secondary:"rounded-full whitespace-nowrap leading-none font-medium font-sans bg-transparent border transition-bg transition-color duration-300 flex items-center justify-center text-center",text:"whitespace-nowrap leading-none font-medium font-sans transition-colors duration-300 flex items-center justify-center text-center",transparent:"rounded-full whitespace-nowrap leading-none font-medium transition-opacity duration-300 flex items-center justify-center text-center"},Y={primary:{blue:"bg-blue text-white hover:bg-buttonHover focus:bg-blue disabled:bg-buttonDisabled",lightBlue:"bg-[#e2eaf8] text-blue hover:opacity-60 focus:opacity-100",white:"bg-white text-blue hover:opacity-90 focus:opacity-100 disabled:opacity-50"},secondary:{blue:"border-blue text-blue hover:bg-blue hover:text-white focus:bg-blue focus:text-white",lightBlue:"border-[#e2eaf8] text-[#e2eaf8] hover:bg-[#e2eaf8] hover:text-white focus:bg-[#e2eaf8] focus:text-white",white:"border-white text-white hover:bg-white hover:text-blue focus:bg-white focus:text-blue"},text:{blue:"bg-transparent text-blue hover:underline focus:underline",lightBlue:"bg-transparent text-[#e2eaf8] hover:underline focus:underline",white:"bg-transparent text-white hover:underline focus:underline"},transparent:{blue:"bg-transparent text-blue hover:opacity-75",lightBlue:"bg-transparent text-[#e2eaf8] hover:opacity-75",white:"bg-transparent text-white hover:opacity-75"}},K={lg:"py-4 px-8 font-sans font-medium text-lg sm:text-xl leading-none!",md:"py-3 px-5 font-sans font-medium text-base sm:text-lg leading-none!"};function w({className:e,...t}){const o=t.variant??"primary",n=t.color??"blue",s=t.size??"md",l=p(W[o],K[o!=="text"?s:"md"],Y[o][n],e);if(typeof t.href>"u"){const h=t;return a.jsx("button",{className:l,...h})}const r=t,{pureLink:b,...c}=r,v=("rel"in c?c.rel:void 0)??(c.target==="_blank"?"noopener noreferrer":void 0);return b?a.jsx("a",{className:l,rel:v,...c}):a.jsx("a",{className:l,rel:v,...c})}const f=" ",Q="ʹ",P={button:{install:"Install Onside",regionUnavailable:"Only available in the EU. Install from an eligible region.",androidOnly:"Onside is for iPhone and iPad",loading:"Loading...",linkError:"Unable to load install link. Please try again."},modal:{close:"Close",goToSafari:{title:"Open in Safari",caption:"Copy the link and open it in Safari to continue.",description:"Onside can only be installed from the Safari browser on your device.",openButton:"Open in Safari",linkCopied:"Link copied",linkPaste:"Paste the link in Safari"},updateIos:{title:"Update your iOS",description:"To install Onside, update your iPhone or iPad to the latest version of iOS.",breadcrumbs:["Settings","General","Software Update"]},getApproved:{title:"Get approved for Onside",steps:["Open the link and sign in with your Apple ID.","Complete the approval steps in the browser.","Return here and tap Install to continue."],installing:"Installing…",openApp:"Open the Onside app",openAppDescription:"Start using Onside from your home screen.",openAppButton:"Open app"},checkInstall:{title:"Did you install Onside?",description:"Let us know if the installation completed successfully.",yes:"Yes, I installed it",no:"No, I need help"},android:{title:"Onside is for iPhone and iPad",description:"To install Onside, please use an iPhone or iPad."},faq:{title:"Frequently asked questions",items:[{question:"How can I install Onside store app outside EU region?",answer:`You can install the${f}Onside store app only if${f}you are using your iPhone in${f}the${f}EU${f}region`},{question:`I am in EU region but still can${Q}t install Onside store app`,answer:"Turn off your VPN and check that country of your Appstore belongs to EU region. You can find instructions on how to change the region",action:{event:"change_region",word:"here"}},{question:`Could not install app due${f}to content restrictions`,answer:"Go to content restrictions in Settings, then “App Store, Media, Web & games” then “Apps” and set to unrated"},{question:"I have another problem",answer:"If you have any other problems, please",action:{event:"support",word:"contact us"}}],changeRegion:{title:`Change your App Store country to install Onside${f}store${f}app`,label:"To change, please go to:",breadcrumbs:["Settings","Your name","Media & Purchases","View Account","Country & Region","Change"],caption:"Then follow the on-screen instructions"},needHelp:"Need help?",faqLink:"FAQ",didntFind:"Didn’t find an answer?"}}},q=i.createContext(P),R=()=>i.useContext(q),Z=7*C.SEC_MS,G=7*C.SEC_MS,z=2*C.SEC_MS,F=$.create(e=>({activeModal:null,openModal:t=>e({activeModal:t}),closeModal:()=>e({activeModal:null})})),J={INSTALL_BUTTON_CLICK:"install_button_click"},X=(e={},t)=>({trackInstallEvent:s=>{const l=M.trackEvent(J.INSTALL_BUTTON_CLICK,{...e,event_type:s});l&&t?.onEvent?.(l)},trackOpenModalEvent:s=>{const l=M.trackModalEvent(s,"opened","install_button",{...e});l&&t?.onEvent?.(l)}}),ee=e=>e?"ios_18_6_plus":"install_click",te=(e,t)=>{e(ee(t))},ne=e=>{e("no_condition_matched")},oe=e=>{const{id:t,location:o="hero",customAnalytics:n,handleCustomStep:s,pathname:l}=e,r=M.resolveInstallConditions(M.getDeviceInfo()),b=r.installState==="install_available",{data:c,error:v}=C.useInstallUrl(b),h=c?.url??null,E=c?.onside_token??null,A=c?.attribution_token??null,g=c?.is_eligible??null,{openModal:d}=F(),[_,k]=i.useState(!1),I=i.useRef(void 0),{trackOpenModalEvent:u,trackInstallEvent:x}=X({page:l,location:o,button_id:t??void 0,onside_token:E??void 0,attribution_token:A??void 0},n),m=i.useCallback(()=>{k(!0);const y=setTimeout(()=>{k(!1)},z);return()=>clearTimeout(y)},[]),j=i.useCallback(y=>{if(!h||!C.isProduction){y.preventDefault();return}if(m(),s){setTimeout(()=>s(),100);return}te(x,r.usesNewInstallFlow),setTimeout(()=>{if(r.usesNewInstallFlow){clearTimeout(I.current),I.current=setTimeout(()=>{d("checkInstall"),u("check_install")},G);return}d("getApproved"),u("get_approved")},100)},[h,s,r.usesNewInstallFlow,x,u,d,m]),O=i.useCallback(()=>{if(m(),r.installState==="go_to_safari"){u("go_to_safari"),d("goToSafari");return}if(r.installState==="update_ios"){u("update_ios"),d("updateIOS");return}ne(x)},[r.installState,d,m,x,u]),N=i.useCallback(()=>{u("is_android"),d("isAndroid")},[d,u]);return{viewMode:r.installState==="android"?"android":_?"loading":h&&b?"link":"button",installUrl:h,error:v,isEligible:g,conditions:r,handleInstallClick:j,handleModalFlowClick:O,handleAndroidClick:N}},ae=e=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M12.1268 5.74646C11.3368 5.74646 10.1139 4.84824 8.82613 4.88071C7.12708 4.90235 5.56872 5.8655 4.69214 7.39139C2.92817 10.454 4.23762 14.9776 5.95831 17.4667C6.80243 18.6787 7.79805 20.0423 9.11832 19.999C10.3845 19.9449 10.8607 19.1765 12.3974 19.1765C13.9233 19.1765 14.3562 19.999 15.6981 19.9665C17.0617 19.9449 17.9274 18.7328 18.7607 17.5099C19.7239 16.1031 20.1243 14.7395 20.1459 14.6638C20.1134 14.653 17.4945 13.6465 17.4621 10.6164C17.4404 8.084 19.5291 6.87195 19.6265 6.81784C18.436 5.0755 16.6071 4.88071 15.9686 4.83742C14.3021 4.70755 12.906 5.74646 12.1268 5.74646ZM14.9406 3.19248C15.644 2.34837 16.1093 1.16877 15.9795 0C14.973 0.0432878 13.761 0.670965 13.0359 1.51508C12.3866 2.26179 11.8238 3.46303 11.9753 4.61016C13.09 4.69673 14.2371 4.03659 14.9406 3.19248Z",fill:"currentColor"})),se=({className:e,onClick:t,children:o,id:n,androidClassName:s,androidTextClassName:l})=>a.jsx(w,{id:n,className:p("bg-white px-7",e,s),variant:"secondary",size:"lg",onClick:t,children:a.jsxs("span",{className:"flex flex-row items-center gap-1",children:[a.jsx(ae,{className:l?"text-[#FF465D]":void 0}),a.jsx("span",{className:p("flex-1",l),children:o})]})}),le=({href:e,onClick:t,children:o,className:n,id:s})=>a.jsx(w,{id:s,href:e,pureLink:!0,size:"lg",onClick:t,className:n,children:o}),L=e=>S.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M17.5 10.0001C17.4999 11.5839 16.9984 13.1271 16.0674 14.4084C15.1364 15.6897 13.8237 16.6434 12.3174 17.1328C10.8111 17.6221 9.1885 17.6221 7.6822 17.1326C6.17591 16.6432 4.86323 15.6894 3.9323 14.4081C3.00138 13.1267 2.49999 11.5835 2.5 9.9997C2.50001 8.41588 3.00142 6.87271 3.93237 5.59137C4.86331 4.31003 6.176 3.3563 7.6823 2.86685C9.1886 2.37741 10.8112 2.37739 12.3175 2.86679",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),ie=e=>{const{id:t,className:o,children:n,showLoaderOnly:s}=e;return a.jsx(w,{id:t,className:p("px-8 py-4",o),disabled:!0,children:a.jsx("span",{className:"flex items-center gap-2",children:s?a.jsx(L,{className:"animate-spin"}):a.jsxs(a.Fragment,{children:[a.jsx(L,{className:"animate-spin"}),n]})})})},re=({message:e})=>a.jsx("p",{className:"mt-2 text-center text-sm text-error",children:e??"Unable to load install link. Please try again."}),D=i.createContext(!1),ce=()=>typeof window<"u"?window.location.pathname:"",de=e=>{const t=R(),{className:o,children:n,handleCustomStep:s,location:l="hero",caption:r,captionClassName:b,showCaption:c=!0,showLoaderOnly:v=!1,androidClassName:h,androidTextClassName:E,customAnalytics:A,id:g}=e,d=n??t.button.install,_=i.useRef(ce()),k=i.useContext(D),{viewMode:I,installUrl:u,error:x,isEligible:m,handleInstallClick:j,handleModalFlowClick:O,handleAndroidClick:N}=oe({id:g,location:l,customAnalytics:A,handleCustomStep:s,pathname:_.current});i.useEffect(()=>{},[k]);const T=c&&(!m||r)&&a.jsx("div",{className:p("text-2xs font-mono opacity-60",b),children:m?r:t.button.regionUnavailable}),y={android:a.jsx(se,{id:g,className:o,androidClassName:h,androidTextClassName:E,onClick:N,children:t.button.androidOnly}),loading:a.jsx(ie,{showLoaderOnly:v,id:g,className:p("bg-buttonHover!",o),children:t.button.loading}),link:a.jsxs(a.Fragment,{children:[a.jsxs(le,{id:g,className:p(o,"flex-col gap-1"),href:u??"",onClick:j,children:[d,T]}),x&&a.jsx(re,{message:t.button.linkError})]}),button:a.jsxs(w,{id:g,className:p(o,"flex-col gap-1"),size:"lg",onClick:O,children:[d,T]})};return a.jsx(a.Fragment,{children:y[I]??y.button})};function V(e,t){if(!t)return e;const o={...e};for(const n of Object.keys(t)){const s=o[n],l=t[n];l!==void 0&&(typeof s=="object"&&s!==null&&!Array.isArray(s)&&typeof l=="object"&&l!==null&&!Array.isArray(l)?o[n]=V(s,l):o[n]=l)}return o}const ue=i.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./AndroidPlatformModal-Bo8KL9YE.cjs"))).AndroidPlatformModal})),pe=i.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./GoToSafariModal-B1EWxzWE.cjs"))).GoToSafariModal})),he=i.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./UpdateIOSModal-B-jqDkQO.cjs"))).UpdateIOSModal})),fe=i.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./index-DFXiHkdo.cjs"))).GetApprovedModal})),ge=i.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./CheckInstallModal-CamMs4Ky.cjs"))).CheckInstallModal})),me=()=>{const{activeModal:e,closeModal:t,openModal:o}=F();let n=null;switch(e){case"goToSafari":n=a.jsx(pe,{open:!0,onClose:t});break;case"updateIOS":n=a.jsx(he,{open:!0,onClose:t});break;case"isAndroid":n=a.jsx(ue,{open:!0,onClose:t});break;case"getApproved":n=a.jsx(fe,{open:!0,onClose:t,onStep3Complete:()=>o("checkInstall")});break;case"checkInstall":n=a.jsx(ge,{open:!0,onClose:t});break;default:n=null}return a.jsx(i.Suspense,{fallback:null,children:n})},be=({children:e,messages:t})=>{const o=i.useMemo(()=>V(P,t),[t]);return a.jsx(q.Provider,{value:o,children:a.jsxs(D.Provider,{value:!0,children:[e,a.jsx(me,{})]})})};exports.AVERAGE_CHECK_TIME=G;exports.AVERAGE_INSTALL_TIME=Z;exports.AVERAGE_LOADING_TIME=z;exports.Button=w;exports.InstallAppButton=de;exports.InstallWidgetProvider=be;exports.clsx=U;exports.cn=p;exports.defaultMessages=P;exports.useMessages=R;
|