@onside/install-widget 1.1.1 → 1.1.3
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-Bo8KL9YE.cjs → AndroidPlatformModal-CWXqqTKT.cjs} +1 -1
- package/dist-lib/{AndroidPlatformModal-DGNUxRkK.js → AndroidPlatformModal-ItDzPe8d.js} +2 -2
- package/dist-lib/{CheckInstallModal-BAx1q0Eh.js → CheckInstallModal-CDA9BG47.js} +3 -3
- package/dist-lib/{CheckInstallModal-CamMs4Ky.cjs → CheckInstallModal-Jm0K6vKV.cjs} +1 -1
- package/dist-lib/{Dialog-H1GsCMbd.cjs → Dialog-D6HEiHrj.cjs} +1 -1
- package/dist-lib/{Dialog-BpvFTl3s.js → Dialog-ZGhZ2nRK.js} +1 -1
- package/dist-lib/{FaqModal-BYENishJ.cjs → FaqModal-CRBjZgZg.cjs} +1 -1
- package/dist-lib/{FaqModal-B6YPov5t.js → FaqModal-DjOZP7Wc.js} +3 -3
- package/dist-lib/{GoToSafariModal-B1EWxzWE.cjs → GoToSafariModal-DKBWHy36.cjs} +1 -1
- package/dist-lib/{GoToSafariModal-pXhEb2yy.js → GoToSafariModal-DR11egJJ.js} +2 -2
- package/dist-lib/{UpdateIOSModal-B-jqDkQO.cjs → UpdateIOSModal-BsynwVE5.cjs} +1 -1
- package/dist-lib/{UpdateIOSModal-D-cikTQ4.js → UpdateIOSModal-CXA_VgQf.js} +3 -3
- package/dist-lib/{cdn-ToXHpWOt.cjs → cdn-ChU_T-E_.cjs} +1 -1
- package/dist-lib/{cdn-DQucWvIe.js → cdn-DSCyM7yz.js} +1 -1
- package/dist-lib/hooks.cjs +1 -1
- package/dist-lib/hooks.d.ts +7 -3
- package/dist-lib/hooks.js +1 -1
- package/dist-lib/{index-DFXiHkdo.cjs → index-BOBYUKQi.cjs} +1 -1
- package/dist-lib/{index-BqoWsHcB.js → index-CnyLT3Gz.js} +4 -4
- package/dist-lib/install-package-CTPfl2Vz.cjs +1 -0
- package/dist-lib/install-package-DFuyKozv.js +3194 -0
- package/dist-lib/install-package.cjs +1 -1
- package/dist-lib/install-package.d.ts +13 -4
- package/dist-lib/install-package.js +2 -2
- package/dist-lib/install-widget.css +1 -1
- package/dist-lib/useInstallUrl-CO3tvV1U.cjs +1 -0
- package/dist-lib/useInstallUrl-Cs9AR5q1.js +66 -0
- package/package.json +1 -1
- package/dist-lib/install-package-5TE9fTFQ.cjs +0 -1
- package/dist-lib/install-package-S3saul1C.js +0 -451
- package/dist-lib/useInstallUrl-McaAuMPK.js +0 -65
- package/dist-lib/useInstallUrl-iPCPqYWB.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-CTPfl2Vz.cjs"),d=require("./Dialog-D6HEiHrj.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-DFuyKozv.js";
|
|
4
|
+
import { D as f } from "./Dialog-ZGhZ2nRK.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-DFuyKozv.js";
|
|
4
|
+
import { D as k } from "./Dialog-ZGhZ2nRK.js";
|
|
5
|
+
import { F as g } from "./FaqModal-DjOZP7Wc.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-CTPfl2Vz.cjs"),h=require("./Dialog-D6HEiHrj.cjs"),f=require("./FaqModal-CRBjZgZg.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;
|
|
@@ -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-CTPfl2Vz.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;
|
|
@@ -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-DFuyKozv.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 e=require("react/jsx-runtime"),i=require("./cdn-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),i=require("./cdn-ChU_T-E_.cjs"),c=require("./install-package-CTPfl2Vz.cjs"),x=require("./Dialog-D6HEiHrj.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,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-DSCyM7yz.js";
|
|
3
|
+
import { u as d, c as b, B as g } from "./install-package-DFuyKozv.js";
|
|
4
|
+
import { D as y, S as q } from "./Dialog-ZGhZ2nRK.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";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-CTPfl2Vz.cjs"),s=require("react"),h=require("./Dialog-D6HEiHrj.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-DFuyKozv.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-ZGhZ2nRK.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-ChU_T-E_.cjs"),c=require("./install-package-CTPfl2Vz.cjs"),d=require("./Dialog-D6HEiHrj.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-DSCyM7yz.js";
|
|
4
|
+
import { u as p, B as f } from "./install-package-DFuyKozv.js";
|
|
5
|
+
import { D as h } from "./Dialog-ZGhZ2nRK.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 +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-CTPfl2Vz.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,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-DFuyKozv.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 }),
|
package/dist-lib/hooks.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./useInstallUrl-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./useInstallUrl-CO3tvV1U.cjs");exports.useInstallUrl=l.useInstallUrl;exports.useInstallUrlStore=l.useInstallUrlStore;
|
package/dist-lib/hooks.d.ts
CHANGED
|
@@ -29,15 +29,19 @@ export declare type InstallUrlStoreData = {
|
|
|
29
29
|
status: InstallUrlStatus;
|
|
30
30
|
data: InstallUrlServiceResponse_2 | null;
|
|
31
31
|
error: Error | null;
|
|
32
|
-
fetchInstallUrl: (
|
|
32
|
+
fetchInstallUrl: (options?: {
|
|
33
|
+
baseUrl?: string;
|
|
34
|
+
}) => Promise<void>;
|
|
33
35
|
reset: () => void;
|
|
34
36
|
};
|
|
35
37
|
|
|
36
|
-
export declare const useInstallUrl: (isAvailable?: boolean) => {
|
|
38
|
+
export declare const useInstallUrl: (isAvailable?: boolean, baseUrl?: string) => {
|
|
37
39
|
status: InstallUrlStatus;
|
|
38
40
|
data: InstallUrlServiceResponse | null;
|
|
39
41
|
error: Error | null;
|
|
40
|
-
fetchInstallUrl: (
|
|
42
|
+
fetchInstallUrl: (options?: {
|
|
43
|
+
baseUrl?: string;
|
|
44
|
+
}) => Promise<void>;
|
|
41
45
|
};
|
|
42
46
|
|
|
43
47
|
export declare const useInstallUrlStore: UseBoundStore<StoreApi<InstallUrlStoreData>>;
|
package/dist-lib/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),y=require("./Dialog-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),y=require("./Dialog-D6HEiHrj.cjs"),A=require("./FaqModal-CRBjZgZg.cjs"),r=require("./install-package-CTPfl2Vz.cjs"),p=require("./utils.cjs"),l=require("./cdn-ChU_T-E_.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;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e, Fragment as d } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "react";
|
|
3
3
|
import { useState as A, useCallback as l, useMemo as F, useEffect as V } from "react";
|
|
4
|
-
import { D as b } from "./Dialog-
|
|
5
|
-
import { F as q } from "./FaqModal-
|
|
6
|
-
import { u, B as O, I as w, c as x, A as T, b as P } from "./install-package-
|
|
4
|
+
import { D as b } from "./Dialog-ZGhZ2nRK.js";
|
|
5
|
+
import { F as q } from "./FaqModal-DjOZP7Wc.js";
|
|
6
|
+
import { u, B as O, I as w, c as x, A as T, b as P } from "./install-package-DFuyKozv.js";
|
|
7
7
|
import { resolveInstallConditions as j, getDeviceInfo as L, trackModalEvent as E } from "./utils.js";
|
|
8
|
-
import { V as N, c as i } from "./cdn-
|
|
8
|
+
import { V as N, c as i } from "./cdn-DSCyM7yz.js";
|
|
9
9
|
const R = () => {
|
|
10
10
|
const [n, t] = A(!1), o = l(() => {
|
|
11
11
|
t(!1);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const f=require("react/jsx-runtime"),x=require("react"),K=require("./useInstallUrl-CO3tvV1U.cjs"),ne=require("./utils.cjs"),He=require("zustand");require("./installUrlService-AjG03i8i.cjs");function Ye(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const se=Ye(x);function Ee(e){var o,r,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(o=0;o<n;o++)e[o]&&(r=Ee(e[o]))&&(t&&(t+=" "),t+=r)}else for(r in e)e[r]&&(t&&(t+=" "),t+=r);return t}function ze(){for(var e,o,r=0,t="",n=arguments.length;r<n;r++)(e=arguments[r])&&(o=Ee(e))&&(t&&(t+=" "),t+=o);return t}const fe="-",Ke=e=>{const o=Ze(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:t}=e;return{getClassGroupId:l=>{const m=l.split(fe);return m[0]===""&&m.length!==1&&m.shift(),Pe(m,o)||Qe(l)},getConflictingClassGroupIds:(l,m)=>{const d=r[l]||[];return m&&t[l]?[...d,...t[l]]:d}}},Pe=(e,o)=>{if(e.length===0)return o.classGroupId;const r=e[0],t=o.nextPart.get(r),n=t?Pe(e.slice(1),t):void 0;if(n)return n;if(o.validators.length===0)return;const i=e.join(fe);return o.validators.find(({validator:l})=>l(i))?.classGroupId},Ce=/^\[(.+)\]$/,Qe=e=>{if(Ce.test(e)){const o=Ce.exec(e)[1],r=o?.substring(0,o.indexOf(":"));if(r)return"arbitrary.."+r}},Ze=e=>{const{theme:o,classGroups:r}=e,t={nextPart:new Map,validators:[]};for(const n in r)ue(r[n],t,n,o);return t},ue=(e,o,r,t)=>{e.forEach(n=>{if(typeof n=="string"){const i=n===""?o:Me(o,n);i.classGroupId=r;return}if(typeof n=="function"){if(Je(n)){ue(n(t),o,r,t);return}o.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([i,l])=>{ue(l,Me(o,i),r,t)})})},Me=(e,o)=>{let r=e;return o.split(fe).forEach(t=>{r.nextPart.has(t)||r.nextPart.set(t,{nextPart:new Map,validators:[]}),r=r.nextPart.get(t)}),r},Je=e=>e.isThemeGetter,Xe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let o=0,r=new Map,t=new Map;const n=(i,l)=>{r.set(i,l),o++,o>e&&(o=0,t=r,r=new Map)};return{get(i){let l=r.get(i);if(l!==void 0)return l;if((l=t.get(i))!==void 0)return n(i,l),l},set(i,l){r.has(i)?r.set(i,l):n(i,l)}}},pe="!",me=":",et=me.length,tt=e=>{const{prefix:o,experimentalParseClassName:r}=e;let t=n=>{const i=[];let l=0,m=0,d=0,g;for(let k=0;k<n.length;k++){let b=n[k];if(l===0&&m===0){if(b===me){i.push(n.slice(d,k)),d=k+et;continue}if(b==="/"){g=k;continue}}b==="["?l++:b==="]"?l--:b==="("?m++:b===")"&&m--}const h=i.length===0?n:n.substring(d),C=ot(h),T=C!==h,S=g&&g>d?g-d:void 0;return{modifiers:i,hasImportantModifier:T,baseClassName:C,maybePostfixModifierPosition:S}};if(o){const n=o+me,i=t;t=l=>l.startsWith(n)?i(l.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(r){const n=t;t=i=>r({className:i,parseClassName:n})}return t},ot=e=>e.endsWith(pe)?e.substring(0,e.length-1):e.startsWith(pe)?e.substring(1):e,rt=e=>{const o=Object.fromEntries(e.orderSensitiveModifiers.map(t=>[t,!0]));return t=>{if(t.length<=1)return t;const n=[];let i=[];return t.forEach(l=>{l[0]==="["||o[l]?(n.push(...i.sort(),l),i=[]):i.push(l)}),n.push(...i.sort()),n}},nt=e=>({cache:Xe(e.cacheSize),parseClassName:tt(e),sortModifiers:rt(e),...Ke(e)}),st=/\s+/,at=(e,o)=>{const{parseClassName:r,getClassGroupId:t,getConflictingClassGroupIds:n,sortModifiers:i}=o,l=[],m=e.trim().split(st);let d="";for(let g=m.length-1;g>=0;g-=1){const h=m[g],{isExternal:C,modifiers:T,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:b}=r(h);if(C){d=h+(d.length>0?" "+d:d);continue}let j=!!b,P=t(j?k.substring(0,b):k);if(!P){if(!j){d=h+(d.length>0?" "+d:d);continue}if(P=t(k),!P){d=h+(d.length>0?" "+d:d);continue}j=!1}const N=i(T).join(":"),v=S?N+pe:N,A=v+P;if(l.includes(A))continue;l.push(A);const I=n(P,j);for(let _=0;_<I.length;++_){const O=I[_];l.push(v+O)}d=h+(d.length>0?" "+d:d)}return d};function it(){let e=0,o,r,t="";for(;e<arguments.length;)(o=arguments[e++])&&(r=_e(o))&&(t&&(t+=" "),t+=r);return t}const _e=e=>{if(typeof e=="string")return e;let o,r="";for(let t=0;t<e.length;t++)e[t]&&(o=_e(e[t]))&&(r&&(r+=" "),r+=o);return r};function lt(e,...o){let r,t,n,i=l;function l(d){const g=o.reduce((h,C)=>C(h),e());return r=nt(g),t=r.cache.get,n=r.cache.set,i=m,m(d)}function m(d){const g=t(d);if(g)return g;const h=at(d,r);return n(d,h),h}return function(){return i(it.apply(null,arguments))}}const w=e=>{const o=r=>r[e]||[];return o.isThemeGetter=!0,o},je=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Te=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ct=/^\d+\/\d+$/,dt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ut=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ft=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,W=e=>ct.test(e),p=e=>!!e&&!Number.isNaN(Number(e)),U=e=>!!e&&Number.isInteger(Number(e)),ce=e=>e.endsWith("%")&&p(e.slice(0,-1)),G=e=>dt.test(e),gt=()=>!0,bt=e=>ut.test(e)&&!pt.test(e),Ne=()=>!1,ht=e=>mt.test(e),xt=e=>ft.test(e),wt=e=>!s(e)&&!a(e),yt=e=>D(e,Le,Ne),s=e=>je.test(e),q=e=>D(e,Ge,bt),de=e=>D(e,It,p),Ie=e=>D(e,Oe,Ne),kt=e=>D(e,Re,xt),oe=e=>D(e,Be,ht),a=e=>Te.test(e),Y=e=>H(e,Ge),vt=e=>H(e,St),Se=e=>H(e,Oe),Ct=e=>H(e,Le),Mt=e=>H(e,Re),re=e=>H(e,Be,!0),D=(e,o,r)=>{const t=je.exec(e);return t?t[1]?o(t[1]):r(t[2]):!1},H=(e,o,r=!1)=>{const t=Te.exec(e);return t?t[1]?o(t[1]):r:!1},Oe=e=>e==="position"||e==="percentage",Re=e=>e==="image"||e==="url",Le=e=>e==="length"||e==="size"||e==="bg-size",Ge=e=>e==="length",It=e=>e==="number",St=e=>e==="family-name",Be=e=>e==="shadow",At=()=>{const e=w("color"),o=w("font"),r=w("text"),t=w("font-weight"),n=w("tracking"),i=w("leading"),l=w("breakpoint"),m=w("container"),d=w("spacing"),g=w("radius"),h=w("shadow"),C=w("inset-shadow"),T=w("text-shadow"),S=w("drop-shadow"),k=w("blur"),b=w("perspective"),j=w("aspect"),P=w("ease"),N=w("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...A(),a,s],_=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],u=()=>[a,s,d],E=()=>[W,"full","auto",...u()],R=()=>[U,"none","subgrid",a,s],be=()=>["auto",{span:["full",U,a,s]},U,a,s],Z=()=>[U,"auto",a,s],he=()=>["auto","min","max","fr",a,s],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...u()],F=()=>[W,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...u()],c=()=>[e,a,s],xe=()=>[...A(),Se,Ie,{position:[a,s]}],we=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ye=()=>["auto","cover","contain",Ct,yt,{size:[a,s]}],ie=()=>[ce,Y,q],M=()=>["","none","full",g,a,s],z=()=>["",p,Y,q],J=()=>["solid","dashed","dotted","double"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],y=()=>[p,ce,Se,Ie],ve=()=>["","none",k,a,s],X=()=>["none",p,a,s],ee=()=>["none",p,a,s],le=()=>[p,a,s],te=()=>[W,"full",...u()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[G],breakpoint:[G],color:[gt],container:[G],"drop-shadow":[G],ease:["in","out","in-out"],font:[wt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[G],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[G],shadow:[G],spacing:["px",p],text:[G],"text-shadow":[G],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",W,s,a,j]}],container:["container"],columns:[{columns:[p,s,a,m]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{start:E()}],end:[{end:E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[U,"auto",a,s]}],basis:[{basis:[W,"full","auto",m,...u()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[p,W,"auto","initial","none",s]}],grow:[{grow:["",p,a,s]}],shrink:[{shrink:["",p,a,s]}],order:[{order:[U,"first","last","none",a,s]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:be()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:be()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":he()}],"auto-rows":[{"auto-rows":he()}],gap:[{gap:u()}],"gap-x":[{"gap-x":u()}],"gap-y":[{"gap-y":u()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:u()}],px:[{px:u()}],py:[{py:u()}],ps:[{ps:u()}],pe:[{pe:u()}],pt:[{pt:u()}],pr:[{pr:u()}],pb:[{pb:u()}],pl:[{pl:u()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":u()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":u()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[m,"screen",...F()]}],"min-w":[{"min-w":[m,"screen","none",...F()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[l]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",r,Y,q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,a,de]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ce,s]}],"font-family":[{font:[vt,s,o]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,a,s]}],"line-clamp":[{"line-clamp":[p,"none",a,de]}],leading:[{leading:[i,...u()]}],"list-image":[{"list-image":["none",a,s]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",a,s]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:c()}],"text-color":[{text:c()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[p,"from-font","auto",a,q]}],"text-decoration-color":[{decoration:c()}],"underline-offset":[{"underline-offset":[p,"auto",a,s]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:u()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",a,s]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",a,s]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:xe()}],"bg-repeat":[{bg:we()}],"bg-size":[{bg:ye()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},U,a,s],radial:["",a,s],conic:[U,a,s]},Mt,kt]}],"bg-color":[{bg:c()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:c()}],"gradient-via":[{via:c()}],"gradient-to":[{to:c()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:c()}],"border-color-x":[{"border-x":c()}],"border-color-y":[{"border-y":c()}],"border-color-s":[{"border-s":c()}],"border-color-e":[{"border-e":c()}],"border-color-t":[{"border-t":c()}],"border-color-r":[{"border-r":c()}],"border-color-b":[{"border-b":c()}],"border-color-l":[{"border-l":c()}],"divide-color":[{divide:c()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[p,a,s]}],"outline-w":[{outline:["",p,Y,q]}],"outline-color":[{outline:c()}],shadow:[{shadow:["","none",h,re,oe]}],"shadow-color":[{shadow:c()}],"inset-shadow":[{"inset-shadow":["none",C,re,oe]}],"inset-shadow-color":[{"inset-shadow":c()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:c()}],"ring-offset-w":[{"ring-offset":[p,q]}],"ring-offset-color":[{"ring-offset":c()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":c()}],"text-shadow":[{"text-shadow":["none",T,re,oe]}],"text-shadow-color":[{"text-shadow":c()}],opacity:[{opacity:[p,a,s]}],"mix-blend":[{"mix-blend":[...ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ke()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[p]}],"mask-image-linear-from-pos":[{"mask-linear-from":y()}],"mask-image-linear-to-pos":[{"mask-linear-to":y()}],"mask-image-linear-from-color":[{"mask-linear-from":c()}],"mask-image-linear-to-color":[{"mask-linear-to":c()}],"mask-image-t-from-pos":[{"mask-t-from":y()}],"mask-image-t-to-pos":[{"mask-t-to":y()}],"mask-image-t-from-color":[{"mask-t-from":c()}],"mask-image-t-to-color":[{"mask-t-to":c()}],"mask-image-r-from-pos":[{"mask-r-from":y()}],"mask-image-r-to-pos":[{"mask-r-to":y()}],"mask-image-r-from-color":[{"mask-r-from":c()}],"mask-image-r-to-color":[{"mask-r-to":c()}],"mask-image-b-from-pos":[{"mask-b-from":y()}],"mask-image-b-to-pos":[{"mask-b-to":y()}],"mask-image-b-from-color":[{"mask-b-from":c()}],"mask-image-b-to-color":[{"mask-b-to":c()}],"mask-image-l-from-pos":[{"mask-l-from":y()}],"mask-image-l-to-pos":[{"mask-l-to":y()}],"mask-image-l-from-color":[{"mask-l-from":c()}],"mask-image-l-to-color":[{"mask-l-to":c()}],"mask-image-x-from-pos":[{"mask-x-from":y()}],"mask-image-x-to-pos":[{"mask-x-to":y()}],"mask-image-x-from-color":[{"mask-x-from":c()}],"mask-image-x-to-color":[{"mask-x-to":c()}],"mask-image-y-from-pos":[{"mask-y-from":y()}],"mask-image-y-to-pos":[{"mask-y-to":y()}],"mask-image-y-from-color":[{"mask-y-from":c()}],"mask-image-y-to-color":[{"mask-y-to":c()}],"mask-image-radial":[{"mask-radial":[a,s]}],"mask-image-radial-from-pos":[{"mask-radial-from":y()}],"mask-image-radial-to-pos":[{"mask-radial-to":y()}],"mask-image-radial-from-color":[{"mask-radial-from":c()}],"mask-image-radial-to-color":[{"mask-radial-to":c()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[p]}],"mask-image-conic-from-pos":[{"mask-conic-from":y()}],"mask-image-conic-to-pos":[{"mask-conic-to":y()}],"mask-image-conic-from-color":[{"mask-conic-from":c()}],"mask-image-conic-to-color":[{"mask-conic-to":c()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:xe()}],"mask-repeat":[{mask:we()}],"mask-size":[{mask:ye()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",a,s]}],filter:[{filter:["","none",a,s]}],blur:[{blur:ve()}],brightness:[{brightness:[p,a,s]}],contrast:[{contrast:[p,a,s]}],"drop-shadow":[{"drop-shadow":["","none",S,re,oe]}],"drop-shadow-color":[{"drop-shadow":c()}],grayscale:[{grayscale:["",p,a,s]}],"hue-rotate":[{"hue-rotate":[p,a,s]}],invert:[{invert:["",p,a,s]}],saturate:[{saturate:[p,a,s]}],sepia:[{sepia:["",p,a,s]}],"backdrop-filter":[{"backdrop-filter":["","none",a,s]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[p,a,s]}],"backdrop-contrast":[{"backdrop-contrast":[p,a,s]}],"backdrop-grayscale":[{"backdrop-grayscale":["",p,a,s]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p,a,s]}],"backdrop-invert":[{"backdrop-invert":["",p,a,s]}],"backdrop-opacity":[{"backdrop-opacity":[p,a,s]}],"backdrop-saturate":[{"backdrop-saturate":[p,a,s]}],"backdrop-sepia":[{"backdrop-sepia":["",p,a,s]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":u()}],"border-spacing-x":[{"border-spacing-x":u()}],"border-spacing-y":[{"border-spacing-y":u()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",a,s]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[p,"initial",a,s]}],ease:[{ease:["linear","initial",P,a,s]}],delay:[{delay:[p,a,s]}],animate:[{animate:["none",N,a,s]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,a,s]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:ee()}],"scale-x":[{"scale-x":ee()}],"scale-y":[{"scale-y":ee()}],"scale-z":[{"scale-z":ee()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[a,s,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:c()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:c()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",a,s]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":u()}],"scroll-mx":[{"scroll-mx":u()}],"scroll-my":[{"scroll-my":u()}],"scroll-ms":[{"scroll-ms":u()}],"scroll-me":[{"scroll-me":u()}],"scroll-mt":[{"scroll-mt":u()}],"scroll-mr":[{"scroll-mr":u()}],"scroll-mb":[{"scroll-mb":u()}],"scroll-ml":[{"scroll-ml":u()}],"scroll-p":[{"scroll-p":u()}],"scroll-px":[{"scroll-px":u()}],"scroll-py":[{"scroll-py":u()}],"scroll-ps":[{"scroll-ps":u()}],"scroll-pe":[{"scroll-pe":u()}],"scroll-pt":[{"scroll-pt":u()}],"scroll-pr":[{"scroll-pr":u()}],"scroll-pb":[{"scroll-pb":u()}],"scroll-pl":[{"scroll-pl":u()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",a,s]}],fill:[{fill:["none",...c()]}],"stroke-w":[{stroke:[p,Y,q,de]}],stroke:[{stroke:["none",...c()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Et=lt(At);function B(...e){return Et(ze(e))}const zt={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"},Pt={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"}},_t={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 Q({className:e,...o}){const r=o.variant??"primary",t=o.color??"blue",n=o.size??"md",i=B(zt[r],_t[r!=="text"?n:"md"],Pt[r][t],e);if(typeof o.href>"u"){const h=o;return f.jsx("button",{className:i,...h})}const l=o,{pureLink:m,...d}=l,g=("rel"in d?d.rel:void 0)??(d.target==="_blank"?"noopener noreferrer":void 0);return m?f.jsx("a",{className:i,rel:g,...d}):f.jsx("a",{className:i,rel:g,...d})}const V=" ",jt="ʹ",ge={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${V}Onside store app only if${V}you are using your iPhone in${V}the${V}EU${V}region`},{question:`I am in EU region but still can${jt}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${V}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${V}store${V}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?"}}},Ue=x.createContext(ge),Ve=()=>x.useContext(Ue),Tt=7*K.SEC_MS,Fe=7*K.SEC_MS,qe=2*K.SEC_MS,$e=He.create(e=>({activeModal:null,openModal:o=>e({activeModal:o}),closeModal:()=>e({activeModal:null})})),Nt={INSTALL_BUTTON_CLICK:"install_button_click"},Ot=(e={},o)=>({trackInstallEvent:n=>{const i=ne.trackEvent(Nt.INSTALL_BUTTON_CLICK,{...e,event_type:n});i&&o?.onEvent?.(i)},trackOpenModalEvent:n=>{const i=ne.trackModalEvent(n,"opened","install_button",{...e});i&&o?.onEvent?.(i)}}),Rt=e=>e?"ios_18_6_plus":"install_click",Lt=(e,o)=>{e(Rt(o))},Gt=e=>{e("no_condition_matched")},Bt=e=>{const{id:o,location:r="hero",customAnalytics:t,handleCustomStep:n,pathname:i,installApiBaseUrl:l}=e,m=ne.resolveInstallConditions(ne.getDeviceInfo()),d=m.installState==="install_available",{data:g,error:h}=K.useInstallUrl(d,l),C=g?.url??null,T=g?.onside_token??null,S=g?.attribution_token??null,k=g?.is_eligible??null,{openModal:b}=$e(),[j,P]=x.useState(!1),N=x.useRef(void 0),{trackOpenModalEvent:v,trackInstallEvent:A}=Ot({page:i,location:r,button_id:o??void 0,onside_token:T??void 0,attribution_token:S??void 0},t),I=x.useCallback(()=>{P(!0);const R=setTimeout(()=>{P(!1)},qe);return()=>clearTimeout(R)},[]),_=x.useCallback(R=>{if(!C||!K.isProduction){R.preventDefault();return}if(I(),n){setTimeout(()=>n(),100);return}Lt(A,m.usesNewInstallFlow),setTimeout(()=>{if(m.usesNewInstallFlow){clearTimeout(N.current),N.current=setTimeout(()=>{b("checkInstall"),v("check_install")},Fe);return}b("getApproved"),v("get_approved")},100)},[C,n,m.usesNewInstallFlow,A,v,b,I]),O=x.useCallback(()=>{if(I(),m.installState==="go_to_safari"){v("go_to_safari"),b("goToSafari");return}if(m.installState==="update_ios"){v("update_ios"),b("updateIOS");return}Gt(A)},[m.installState,b,I,A,v]),u=x.useCallback(()=>{v("is_android"),b("isAndroid")},[b,v]);return{viewMode:m.installState==="android"?"android":j?"loading":C&&d?"link":"button",installUrl:C,error:h,isEligible:k,conditions:m,handleInstallClick:_,handleModalFlowClick:O,handleAndroidClick:u}},Ut=e=>se.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.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"})),Vt=({className:e,onClick:o,children:r,id:t,androidClassName:n,androidTextClassName:i})=>f.jsx(Q,{id:t,className:B("bg-white px-7",e,n),variant:"secondary",size:"lg",onClick:o,children:f.jsxs("span",{className:"flex flex-row items-center gap-1",children:[f.jsx(Ut,{className:i?"text-[#FF465D]":void 0}),f.jsx("span",{className:B("flex-1",i),children:r})]})}),Ft=({href:e,onClick:o,children:r,className:t,id:n})=>f.jsx(Q,{id:n,href:e,pureLink:!0,size:"lg",onClick:o,className:t,children:r}),Ae=e=>se.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.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"})),qt=e=>{const{id:o,className:r,children:t,showLoaderOnly:n}=e;return f.jsx(Q,{id:o,className:B("px-8 py-4",r),disabled:!0,children:f.jsx("span",{className:"flex items-center gap-2",children:n?f.jsx(Ae,{className:"animate-spin"}):f.jsxs(f.Fragment,{children:[f.jsx(Ae,{className:"animate-spin"}),t]})})})},$t=({message:e})=>f.jsx("p",{className:"mt-2 text-center text-sm text-error",children:e??"Unable to load install link. Please try again."}),We=x.createContext({isMounted:!1,installApiBaseUrl:void 0}),Wt=()=>typeof window<"u"?window.location.pathname:"",Dt=e=>{const o=Ve(),{className:r,children:t,handleCustomStep:n,location:i="hero",caption:l,captionClassName:m,showCaption:d=!0,showLoaderOnly:g=!1,androidClassName:h,androidTextClassName:C,customAnalytics:T,id:S}=e,k=t??o.button.install,b=x.useRef(Wt()),{isMounted:j,installApiBaseUrl:P}=x.useContext(We),{viewMode:N,installUrl:v,error:A,isEligible:I,handleInstallClick:_,handleModalFlowClick:O,handleAndroidClick:u}=Bt({id:S,location:i,customAnalytics:T,handleCustomStep:n,pathname:b.current,installApiBaseUrl:P});x.useEffect(()=>{},[j]);const E=d&&(!I||l)&&f.jsx("div",{className:B("text-2xs font-mono opacity-60",m),children:I?l:o.button.regionUnavailable}),R={android:f.jsx(Vt,{id:S,className:r,androidClassName:h,androidTextClassName:C,onClick:u,children:o.button.androidOnly}),loading:f.jsx(qt,{showLoaderOnly:g,id:S,className:B("bg-buttonHover!",r),children:o.button.loading}),link:f.jsxs(f.Fragment,{children:[f.jsxs(Ft,{id:S,className:B(r,"flex-col gap-1"),href:v??"",onClick:_,children:[k,E]}),A&&f.jsx($t,{message:o.button.linkError})]}),button:f.jsxs(Q,{id:S,className:B(r,"flex-col gap-1"),size:"lg",onClick:O,children:[k,E]})};return f.jsx(f.Fragment,{children:R[N]??R.button})};function De(e,o){if(!o)return e;const r={...e};for(const t of Object.keys(o)){const n=r[t],i=o[t];i!==void 0&&(typeof n=="object"&&n!==null&&!Array.isArray(n)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?r[t]=De(n,i):r[t]=i)}return r}const Ht=x.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./AndroidPlatformModal-CWXqqTKT.cjs"))).AndroidPlatformModal})),Yt=x.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./GoToSafariModal-DKBWHy36.cjs"))).GoToSafariModal})),Kt=x.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./UpdateIOSModal-BsynwVE5.cjs"))).UpdateIOSModal})),Qt=x.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./index-BOBYUKQi.cjs"))).GetApprovedModal})),Zt=x.lazy(async()=>({default:(await Promise.resolve().then(()=>require("./CheckInstallModal-Jm0K6vKV.cjs"))).CheckInstallModal})),Jt=()=>{const{activeModal:e,closeModal:o,openModal:r}=$e();let t=null;switch(e){case"goToSafari":t=f.jsx(Yt,{open:!0,onClose:o});break;case"updateIOS":t=f.jsx(Kt,{open:!0,onClose:o});break;case"isAndroid":t=f.jsx(Ht,{open:!0,onClose:o});break;case"getApproved":t=f.jsx(Qt,{open:!0,onClose:o,onStep3Complete:()=>r("checkInstall")});break;case"checkInstall":t=f.jsx(Zt,{open:!0,onClose:o});break;default:t=null}return f.jsx(x.Suspense,{fallback:null,children:t})},Xt=({children:e,messages:o,installApiBaseUrl:r})=>{const t=x.useMemo(()=>De(ge,o),[o]),n=x.useMemo(()=>({isMounted:!0,installApiBaseUrl:r}),[r]);return f.jsx(Ue.Provider,{value:t,children:f.jsxs(We.Provider,{value:n,children:[e,f.jsx(Jt,{})]})})};exports.AVERAGE_CHECK_TIME=Fe;exports.AVERAGE_INSTALL_TIME=Tt;exports.AVERAGE_LOADING_TIME=qe;exports.Button=Q;exports.InstallAppButton=Dt;exports.InstallWidgetProvider=Xt;exports.clsx=ze;exports.cn=B;exports.defaultMessages=ge;exports.useMessages=Ve;
|