@onside/install-widget 1.0.0 → 1.0.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/README.md +149 -37
- package/dist-lib/install-package.cjs +45 -1
- package/dist-lib/install-package.d.ts +28 -21
- package/dist-lib/install-package.js +2467 -745
- package/dist-lib/install-widget.css +1 -0
- package/package.json +38 -43
package/README.md
CHANGED
|
@@ -1,71 +1,183 @@
|
|
|
1
1
|
# Onside Install Widget
|
|
2
2
|
|
|
3
|
-
## Install
|
|
3
|
+
## Install Flow Contract (Target Behavior)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This section defines the expected runtime behavior of the install package.
|
|
6
|
+
It is the source of truth for UX + analytics for partner integrations.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
### Scenario Matrix
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
| Scenario | Condition | Button text | Modal | GTM event(s) | Action |
|
|
11
|
+
| --- | --- | --- | --- | --- | --- |
|
|
12
|
+
| Direct install | `canInstall === true` and `isEligible !== false` and install URL loaded | `Install Onside` | none | `install_button_click` with `event_type=install_click` (or `ios_18_6_plus`) | Redirect to install URL |
|
|
13
|
+
| Browser unsupported on iOS | `shouldGoToSafari === true` | `Install Onside` | `go_to_safari` instruction modal | `go_to_safari.opened` | Block redirect until user opens supported browser |
|
|
14
|
+
| iOS version unsupported | `shouldUpdateIOS === true` | `Install Onside` | `update_ios` instruction modal | `update_ios.opened` | Block redirect until iOS update |
|
|
15
|
+
| Android device | `isAndroid === true` | `Onside is for iPhone and iPad` | `is_android` info modal | `is_android.opened` | Block install |
|
|
16
|
+
| Region not eligible | `isEligible === false` | `Install Onside` + caption `Only available in the EU. Install from an eligible region.` | none | optional `install_button_click` with `event_type=not_eligible` | Allow install attempt (system flow may still permit install) |
|
|
17
|
+
| Install API error | install URL fetch failed after retries | `Install Onside` | none | optional `install_button_click` with `event_type=api_error` | Show inline error only; fallback modal/retry flow is not required for current release |
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
### Notes
|
|
14
20
|
|
|
15
|
-
|
|
21
|
+
- Required analytics context in GTM payload: `location`, `page`, `onside_token`, `attribution_token`, `platform`, `browser`.
|
|
22
|
+
- If a modal is shown, redirect must not happen in the same click action.
|
|
23
|
+
- `onside_token` cookie must be present before requesting install URL.
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
## Delivery Modes
|
|
18
26
|
|
|
19
|
-
|
|
20
|
-
- ESM bundle: `https://<your-cdn>/onside-install-widget/1.0.0/install-package.js`
|
|
21
|
-
- CJS bundle: `https://<your-cdn>/onside-install-widget/1.0.0/install-package.cjs`
|
|
27
|
+
The button is delivered in two supported ways:
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
1. React package (`@onside/install-widget`)
|
|
30
|
+
2. CDN script (IIFE widget, no React required in host app)
|
|
24
31
|
|
|
25
|
-
|
|
32
|
+
### 1) React package
|
|
26
33
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
Install dependencies:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pnpm add @onside/install-widget react react-dom
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Usage:
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
import { InstallAppButton, InstallWidgetProvider } from "@onside/install-widget";
|
|
44
|
+
import "@onside/install-widget/styles.css";
|
|
45
|
+
|
|
46
|
+
function App() {
|
|
47
|
+
return (
|
|
48
|
+
<InstallWidgetProvider>
|
|
49
|
+
<InstallAppButton />
|
|
50
|
+
</InstallWidgetProvider>
|
|
51
|
+
);
|
|
37
52
|
}
|
|
38
|
-
</script>
|
|
39
|
-
<script type="module">
|
|
40
|
-
import { InstallAppButton } from "onside-install-widget";
|
|
41
|
-
// mount InstallAppButton in your app
|
|
42
|
-
</script>
|
|
43
53
|
```
|
|
44
54
|
|
|
45
|
-
|
|
55
|
+
Mount `InstallWidgetProvider` once per page. It hosts all install modals and supports multiple `InstallAppButton` instances.
|
|
56
|
+
For per-button attribution, set `id` and `location` on each button (`button_id` + `location` in analytics events).
|
|
57
|
+
|
|
58
|
+
Optional custom analytics callback:
|
|
46
59
|
|
|
47
60
|
```tsx
|
|
48
|
-
import { InstallAppButton } from "onside
|
|
61
|
+
import { InstallAppButton, InstallWidgetProvider } from "@onside/install-widget";
|
|
62
|
+
import "@onside/install-widget/styles.css";
|
|
49
63
|
|
|
50
64
|
function App() {
|
|
51
|
-
return
|
|
65
|
+
return (
|
|
66
|
+
<InstallWidgetProvider>
|
|
67
|
+
<InstallAppButton
|
|
68
|
+
customAnalytics={{
|
|
69
|
+
onEvent: (event) => {
|
|
70
|
+
// full enriched event payload (event_name, event_properties, url, etc.)
|
|
71
|
+
console.log(event);
|
|
72
|
+
},
|
|
73
|
+
}}
|
|
74
|
+
/>
|
|
75
|
+
</InstallWidgetProvider>
|
|
76
|
+
);
|
|
52
77
|
}
|
|
53
78
|
```
|
|
54
79
|
|
|
55
|
-
|
|
80
|
+
Style customization:
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
<InstallAppButton
|
|
84
|
+
className="w-full"
|
|
85
|
+
captionClassName="opacity-80"
|
|
86
|
+
styleVars={
|
|
87
|
+
{
|
|
88
|
+
"--onside-btn-bg": "#111827",
|
|
89
|
+
"--onside-btn-bg-hover": "#1f2937",
|
|
90
|
+
"--onside-btn-text": "#ffffff",
|
|
91
|
+
"--onside-btn-radius": "16px",
|
|
92
|
+
"--onside-btn-px": "24px",
|
|
93
|
+
"--onside-btn-py": "14px",
|
|
94
|
+
"--onside-btn-font-size": "16px",
|
|
95
|
+
"--onside-caption-color": "rgba(17,24,39,0.7)",
|
|
96
|
+
"--onside-caption-size": "12px",
|
|
97
|
+
"--onside-caption-line-height": "16px",
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 2) CDN script (no React in host)
|
|
56
104
|
|
|
57
|
-
|
|
105
|
+
Build artifacts are produced in `dist/` (widget script) and loaded directly on the partner page.
|
|
106
|
+
|
|
107
|
+
Example:
|
|
58
108
|
|
|
59
109
|
```html
|
|
60
110
|
<!DOCTYPE html>
|
|
61
111
|
<html lang="en">
|
|
62
112
|
<head>
|
|
63
|
-
|
|
64
|
-
|
|
113
|
+
<meta charset="UTF-8" />
|
|
114
|
+
<title>Onside Widget</title>
|
|
65
115
|
</head>
|
|
66
116
|
<body>
|
|
67
|
-
<
|
|
117
|
+
<div class="install-button"></div>
|
|
118
|
+
<script
|
|
119
|
+
src="https://<your-cdn>/provider-widget.iife.js"
|
|
120
|
+
data-selector=".install-button"
|
|
121
|
+
data-css-href="https://<your-cdn>/onside-install-widget.css"
|
|
122
|
+
></script>
|
|
68
123
|
</body>
|
|
69
124
|
</html>
|
|
70
125
|
```
|
|
71
126
|
|
|
127
|
+
Required script attributes:
|
|
128
|
+
|
|
129
|
+
- `data-selector`: CSS selector of target container.
|
|
130
|
+
- `data-css-href`: URL to widget stylesheet.
|
|
131
|
+
|
|
132
|
+
### CDN media manifest (images/video)
|
|
133
|
+
|
|
134
|
+
Media paths are resolved by `cdn("/path/to/file")` using a local manifest snapshot:
|
|
135
|
+
|
|
136
|
+
- source manifest URL: `https://cdn.onside.io/assets/onside-install-widget/manifest.json`
|
|
137
|
+
- generated file in repo: `src/generated/cdnManifest.ts`
|
|
138
|
+
|
|
139
|
+
Update the local snapshot before release:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
pnpm run sync:cdn-manifest
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Release Preflight
|
|
146
|
+
|
|
147
|
+
Run before publishing a new package version:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
pnpm run sync:cdn-manifest
|
|
151
|
+
pnpm run lint
|
|
152
|
+
pnpm run build:lib
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
QA artifacts/checklists:
|
|
156
|
+
|
|
157
|
+
- `docs/checklists/install-flow-release-checklist.md`
|
|
158
|
+
- `docs/checklists/install-flow-qa-report-template.md`
|
|
159
|
+
- `docs/checklists/install-flow-qa-report-draft.md`
|
|
160
|
+
|
|
161
|
+
## Release Flow (GitHub + npm)
|
|
162
|
+
|
|
163
|
+
1. Add a changeset in feature PRs that affect package behavior:
|
|
164
|
+
- `pnpm changeset`
|
|
165
|
+
2. Merge PRs into `main`.
|
|
166
|
+
3. `Release` workflow opens/updates a release PR with version/changelog changes.
|
|
167
|
+
4. Merge the release PR.
|
|
168
|
+
5. `Release` workflow publishes the package to npm via OIDC trusted publishing (no npm token in GitHub secrets).
|
|
169
|
+
|
|
170
|
+
## Troubleshooting
|
|
171
|
+
|
|
172
|
+
- If `sync:cdn-manifest` fails locally due to network restrictions, run the manual workflow:
|
|
173
|
+
- GitHub Actions -> `Sync CDN Manifest` -> `Run workflow`
|
|
174
|
+
- If manifest did not change, no PR is created by the workflow.
|
|
175
|
+
|
|
176
|
+
### Packaging notes
|
|
177
|
+
|
|
178
|
+
- React package output is in `dist-lib/`:
|
|
179
|
+
- `install-package.js` (ESM)
|
|
180
|
+
- `install-package.cjs` (CJS)
|
|
181
|
+
- `install-package.d.ts` (types)
|
|
182
|
+
- Script widget output is in `dist/`:
|
|
183
|
+
- `provider-widget.iife.js`
|
|
@@ -1 +1,45 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),V=require("react"),et=require("zustand");function tt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const H=tt(V);function ze(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=ze(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function ot(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=ze(e))&&(r&&(r+=" "),r+=t);return r}const we="-",rt=e=>{const t=st(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const p=l.split(we);return p[0]===""&&p.length!==1&&p.shift(),De(p,t)||nt(l)},getConflictingClassGroupIds:(l,p)=>{const u=o[l]||[];return p&&r[l]?[...u,...r[l]]:u}}},De=(e,t)=>{if(e.length===0)return t.classGroupId;const o=e[0],r=t.nextPart.get(o),n=r?De(e.slice(1),r):void 0;if(n)return n;if(t.validators.length===0)return;const a=e.join(we);return t.validators.find(({validator:l})=>l(a))?.classGroupId},_e=/^\[(.+)\]$/,nt=e=>{if(_e.test(e)){const t=_e.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},st=e=>{const{theme:t,classGroups:o}=e,r={nextPart:new Map,validators:[]};for(const n in o)fe(o[n],r,n,t);return r},fe=(e,t,o,r)=>{e.forEach(n=>{if(typeof n=="string"){const a=n===""?t:Ee(t,n);a.classGroupId=o;return}if(typeof n=="function"){if(it(n)){fe(n(r),t,o,r);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([a,l])=>{fe(l,Ee(t,a),o,r)})})},Ee=(e,t)=>{let o=e;return t.split(we).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},it=e=>e.isThemeGetter,at=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map;const n=(a,l)=>{o.set(a,l),t++,t>e&&(t=0,r=o,o=new Map)};return{get(a){let l=o.get(a);if(l!==void 0)return l;if((l=r.get(a))!==void 0)return n(a,l),l},set(a,l){o.has(a)?o.set(a,l):n(a,l)}}},be="!",ge=":",lt=ge.length,ct=e=>{const{prefix:t,experimentalParseClassName:o}=e;let r=n=>{const a=[];let l=0,p=0,u=0,g;for(let v=0;v<n.length;v++){let I=n[v];if(l===0&&p===0){if(I===ge){a.push(n.slice(u,v)),u=v+lt;continue}if(I==="/"){g=v;continue}}I==="["?l++:I==="]"?l--:I==="("?p++:I===")"&&p--}const b=a.length===0?n:n.substring(u),C=dt(b),k=C!==b,_=g&&g>u?g-u:void 0;return{modifiers:a,hasImportantModifier:k,baseClassName:C,maybePostfixModifierPosition:_}};if(t){const n=t+ge,a=r;r=l=>l.startsWith(n)?a(l.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(o){const n=r;r=a=>o({className:a,parseClassName:n})}return r},dt=e=>e.endsWith(be)?e.substring(0,e.length-1):e.startsWith(be)?e.substring(1):e,ut=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const n=[];let a=[];return r.forEach(l=>{l[0]==="["||t[l]?(n.push(...a.sort(),l),a=[]):a.push(l)}),n.push(...a.sort()),n}},mt=e=>({cache:at(e.cacheSize),parseClassName:ct(e),sortModifiers:ut(e),...rt(e)}),pt=/\s+/,ft=(e,t)=>{const{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:a}=t,l=[],p=e.trim().split(pt);let u="";for(let g=p.length-1;g>=0;g-=1){const b=p[g],{isExternal:C,modifiers:k,hasImportantModifier:_,baseClassName:v,maybePostfixModifierPosition:I}=o(b);if(C){u=b+(u.length>0?" "+u:u);continue}let z=!!I,T=r(z?v.substring(0,I):v);if(!T){if(!z){u=b+(u.length>0?" "+u:u);continue}if(T=r(v),!T){u=b+(u.length>0?" "+u:u);continue}z=!1}const B=a(k).join(":"),D=_?B+be:B,N=D+T;if(l.includes(N))continue;l.push(N);const E=n(T,z);for(let S=0;S<E.length;++S){const R=E[S];l.push(D+R)}u=b+(u.length>0?" "+u:u)}return u};function bt(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Ge(t))&&(r&&(r+=" "),r+=o);return r}const Ge=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Ge(e[r]))&&(o&&(o+=" "),o+=t);return o};function gt(e,...t){let o,r,n,a=l;function l(u){const g=t.reduce((b,C)=>C(b),e());return o=mt(g),r=o.cache.get,n=o.cache.set,a=p,p(u)}function p(u){const g=r(u);if(g)return g;const b=ft(u,o);return n(u,b),b}return function(){return a(bt.apply(null,arguments))}}const h=e=>{const t=o=>o[e]||[];return t.isThemeGetter=!0,t},Ve=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ue=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ht=/^\d+\/\d+$/,wt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xt=/\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$/,kt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,W=e=>ht.test(e),m=e=>!!e&&!Number.isNaN(Number(e)),G=e=>!!e&&Number.isInteger(Number(e)),ue=e=>e.endsWith("%")&&m(e.slice(0,-1)),L=e=>wt.test(e),It=()=>!0,St=e=>xt.test(e)&&!kt.test(e),Fe=()=>!1,Ot=e=>yt.test(e),_t=e=>vt.test(e),Et=e=>!s(e)&&!i(e),At=e=>X(e,Ke,Fe),s=e=>Ve.test(e),F=e=>X(e,We,St),me=e=>X(e,Nt,m),Ae=e=>X(e,je,Fe),Ct=e=>X(e,Be,_t),re=e=>X(e,$e,Ot),i=e=>Ue.test(e),J=e=>Y(e,We),Tt=e=>Y(e,Pt),Ce=e=>Y(e,je),Rt=e=>Y(e,Ke),Mt=e=>Y(e,Be),ne=e=>Y(e,$e,!0),X=(e,t,o)=>{const r=Ve.exec(e);return r?r[1]?t(r[1]):o(r[2]):!1},Y=(e,t,o=!1)=>{const r=Ue.exec(e);return r?r[1]?t(r[1]):o:!1},je=e=>e==="position"||e==="percentage",Be=e=>e==="image"||e==="url",Ke=e=>e==="length"||e==="size"||e==="bg-size",We=e=>e==="length",Nt=e=>e==="number",Pt=e=>e==="family-name",$e=e=>e==="shadow",Lt=()=>{const e=h("color"),t=h("font"),o=h("text"),r=h("font-weight"),n=h("tracking"),a=h("leading"),l=h("breakpoint"),p=h("container"),u=h("spacing"),g=h("radius"),b=h("shadow"),C=h("inset-shadow"),k=h("text-shadow"),_=h("drop-shadow"),v=h("blur"),I=h("perspective"),z=h("aspect"),T=h("ease"),B=h("animate"),D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...N(),i,s],S=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],d=()=>[i,s,u],A=()=>[W,"full","auto",...d()],Z=()=>[G,"none","subgrid",i,s],q=()=>["auto",{span:["full",G,i,s]},G,i,s],M=()=>[G,"auto",i,s],ke=()=>["auto","min","max","fr",i,s],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...d()],U=()=>[W,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...d()],c=()=>[e,i,s],ye=()=>[...N(),Ce,Ae,{position:[i,s]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ie=()=>["auto","cover","contain",Rt,At,{size:[i,s]}],ce=()=>[ue,J,F],y=()=>["","none","full",g,i,s],O=()=>["",m,J,F],Q=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],x=()=>[m,ue,Ce,Ae],Oe=()=>["","none",v,i,s],ee=()=>["none",m,i,s],te=()=>["none",m,i,s],de=()=>[m,i,s],oe=()=>[W,"full",...d()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[L],breakpoint:[L],color:[It],container:[L],"drop-shadow":[L],ease:["in","out","in-out"],font:[Et],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[L],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[L],shadow:[L],spacing:["px",m],text:[L],"text-shadow":[L],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",W,s,i,z]}],container:["container"],columns:[{columns:[m,s,i,p]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:E()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[G,"auto",i,s]}],basis:[{basis:[W,"full","auto",p,...d()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[m,W,"auto","initial","none",s]}],grow:[{grow:["",m,i,s]}],shrink:[{shrink:["",m,i,s]}],order:[{order:[G,"first","last","none",i,s]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ke()}],"auto-rows":[{"auto-rows":ke()}],gap:[{gap:d()}],"gap-x":[{"gap-x":d()}],"gap-y":[{"gap-y":d()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:d()}],px:[{px:d()}],py:[{py:d()}],ps:[{ps:d()}],pe:[{pe:d()}],pt:[{pt:d()}],pr:[{pr:d()}],pb:[{pb:d()}],pl:[{pl:d()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":d()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":d()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[p,"screen",...U()]}],"min-w":[{"min-w":[p,"screen","none",...U()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[l]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",o,J,F]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,i,me]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ue,s]}],"font-family":[{font:[Tt,s,t]}],"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,i,s]}],"line-clamp":[{"line-clamp":[m,"none",i,me]}],leading:[{leading:[a,...d()]}],"list-image":[{"list-image":["none",i,s]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",i,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:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[m,"from-font","auto",i,F]}],"text-decoration-color":[{decoration:c()}],"underline-offset":[{"underline-offset":[m,"auto",i,s]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:d()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",i,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",i,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:ye()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:Ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},G,i,s],radial:["",i,s],conic:[G,i,s]},Mt,Ct]}],"bg-color":[{bg:c()}],"gradient-from-pos":[{from:ce()}],"gradient-via-pos":[{via:ce()}],"gradient-to-pos":[{to:ce()}],"gradient-from":[{from:c()}],"gradient-via":[{via:c()}],"gradient-to":[{to:c()}],rounded:[{rounded:y()}],"rounded-s":[{"rounded-s":y()}],"rounded-e":[{"rounded-e":y()}],"rounded-t":[{"rounded-t":y()}],"rounded-r":[{"rounded-r":y()}],"rounded-b":[{"rounded-b":y()}],"rounded-l":[{"rounded-l":y()}],"rounded-ss":[{"rounded-ss":y()}],"rounded-se":[{"rounded-se":y()}],"rounded-ee":[{"rounded-ee":y()}],"rounded-es":[{"rounded-es":y()}],"rounded-tl":[{"rounded-tl":y()}],"rounded-tr":[{"rounded-tr":y()}],"rounded-br":[{"rounded-br":y()}],"rounded-bl":[{"rounded-bl":y()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"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:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[m,i,s]}],"outline-w":[{outline:["",m,J,F]}],"outline-color":[{outline:c()}],shadow:[{shadow:["","none",b,ne,re]}],"shadow-color":[{shadow:c()}],"inset-shadow":[{"inset-shadow":["none",C,ne,re]}],"inset-shadow-color":[{"inset-shadow":c()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:c()}],"ring-offset-w":[{"ring-offset":[m,F]}],"ring-offset-color":[{"ring-offset":c()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":c()}],"text-shadow":[{"text-shadow":["none",k,ne,re]}],"text-shadow-color":[{"text-shadow":c()}],opacity:[{opacity:[m,i,s]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"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":[m]}],"mask-image-linear-from-pos":[{"mask-linear-from":x()}],"mask-image-linear-to-pos":[{"mask-linear-to":x()}],"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":x()}],"mask-image-t-to-pos":[{"mask-t-to":x()}],"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":x()}],"mask-image-r-to-pos":[{"mask-r-to":x()}],"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":x()}],"mask-image-b-to-pos":[{"mask-b-to":x()}],"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":x()}],"mask-image-l-to-pos":[{"mask-l-to":x()}],"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":x()}],"mask-image-x-to-pos":[{"mask-x-to":x()}],"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":x()}],"mask-image-y-to-pos":[{"mask-y-to":x()}],"mask-image-y-from-color":[{"mask-y-from":c()}],"mask-image-y-to-color":[{"mask-y-to":c()}],"mask-image-radial":[{"mask-radial":[i,s]}],"mask-image-radial-from-pos":[{"mask-radial-from":x()}],"mask-image-radial-to-pos":[{"mask-radial-to":x()}],"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":N()}],"mask-image-conic-pos":[{"mask-conic":[m]}],"mask-image-conic-from-pos":[{"mask-conic-from":x()}],"mask-image-conic-to-pos":[{"mask-conic-to":x()}],"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:ye()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:Ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",i,s]}],filter:[{filter:["","none",i,s]}],blur:[{blur:Oe()}],brightness:[{brightness:[m,i,s]}],contrast:[{contrast:[m,i,s]}],"drop-shadow":[{"drop-shadow":["","none",_,ne,re]}],"drop-shadow-color":[{"drop-shadow":c()}],grayscale:[{grayscale:["",m,i,s]}],"hue-rotate":[{"hue-rotate":[m,i,s]}],invert:[{invert:["",m,i,s]}],saturate:[{saturate:[m,i,s]}],sepia:[{sepia:["",m,i,s]}],"backdrop-filter":[{"backdrop-filter":["","none",i,s]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[m,i,s]}],"backdrop-contrast":[{"backdrop-contrast":[m,i,s]}],"backdrop-grayscale":[{"backdrop-grayscale":["",m,i,s]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m,i,s]}],"backdrop-invert":[{"backdrop-invert":["",m,i,s]}],"backdrop-opacity":[{"backdrop-opacity":[m,i,s]}],"backdrop-saturate":[{"backdrop-saturate":[m,i,s]}],"backdrop-sepia":[{"backdrop-sepia":["",m,i,s]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":d()}],"border-spacing-x":[{"border-spacing-x":d()}],"border-spacing-y":[{"border-spacing-y":d()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",i,s]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[m,"initial",i,s]}],ease:[{ease:["linear","initial",T,i,s]}],delay:[{delay:[m,i,s]}],animate:[{animate:["none",B,i,s]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[I,i,s]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[i,s,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"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",i,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":d()}],"scroll-mx":[{"scroll-mx":d()}],"scroll-my":[{"scroll-my":d()}],"scroll-ms":[{"scroll-ms":d()}],"scroll-me":[{"scroll-me":d()}],"scroll-mt":[{"scroll-mt":d()}],"scroll-mr":[{"scroll-mr":d()}],"scroll-mb":[{"scroll-mb":d()}],"scroll-ml":[{"scroll-ml":d()}],"scroll-p":[{"scroll-p":d()}],"scroll-px":[{"scroll-px":d()}],"scroll-py":[{"scroll-py":d()}],"scroll-ps":[{"scroll-ps":d()}],"scroll-pe":[{"scroll-pe":d()}],"scroll-pt":[{"scroll-pt":d()}],"scroll-pr":[{"scroll-pr":d()}],"scroll-pb":[{"scroll-pb":d()}],"scroll-pl":[{"scroll-pl":d()}],"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",i,s]}],fill:[{fill:["none",...c()]}],"stroke-w":[{stroke:[m,J,F,me]}],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"]}},zt=gt(Lt);function j(...e){return zt(ot(e))}const Dt={primary:"rounded-full whitespace-nowrap leading-none !font-medium transition-bg duration-300 flex items-center justify-center text-center",secondary:"rounded-full whitespace-nowrap leading-none !font-medium bg-transparent border transition-bg transition-color duration-300 flex items-center justify-center text-center",text:"whitespace-nowrap leading-none !font-medium 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"},Gt={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"}},Vt={lg:"py-4 px-8 text-button-l",md:"py-3 px-5 text-button-m"};function ae({className:e,...t}){const o=t.variant??"primary",r=t.color??"blue",n=t.size??"md",a=j(Dt[o],Vt[o!=="text"?n:"md"],Gt[o][r],e);if(typeof t.href>"u"){const g=t;return w.jsx("button",{className:a,...g})}const{purelink:l,...p}=t,u=("rel"in p?p.rel:void 0)??(p.target==="_blank"?"noopener noreferrer":void 0);return w.jsx("a",{className:a,rel:u,...p})}const Ut="https://onside.io/web-api/v1/marketplace/install",xe=1e3,Ft=e=>{if(typeof document>"u")return null;const t=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`));if(!t)return null;const o=t.indexOf("=");return o!==-1?t.slice(o+1):null},Te=(e,t,o)=>{if(typeof document>"u")return;const r=new Date(Date.now()+o*1e3),n=typeof window<"u"&&window.location?.protocol==="https:"?"; Secure":"";document.cookie=`${e}=${t}; expires=${r.toUTCString()}; path=/; SameSite=Lax${n}`},jt=7*xe,Bt=7*xe,He=2*xe,he="onside_token_data",Re=15552e3,Kt=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("Secure random UUID generation is not available");const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,o=>o.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`},Xe=()=>{const e=Ft(he);if(!e)return null;try{return JSON.parse(decodeURIComponent(e)).token}catch{return null}},Wt=()=>{const e=Xe();if(e){const r={token:e,createdAt:Date.now()};return Te(he,encodeURIComponent(JSON.stringify(r)),Re),e}const t=Kt(),o={token:t,createdAt:Date.now()};return Te(he,encodeURIComponent(JSON.stringify(o)),Re),t},$t=async e=>{const t=await fetch(Ut,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({referer_url:window.location.href,onside_token:e})});if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);const o=await t.json();if(!o.url||!o.attribution_token||!o.exp)throw new Error("Invalid response format");return o},Ht=async()=>{const t=Xe()||Wt(),o=await $t(t);return{installUrl:o.url,attribution_token:o.attribution_token,is_eligible:o.is_eligible,onside_token:t}},Me=3,Xt=e=>Math.min(1e3*2**e,3e4),pe={installUrl:null,attribution_token:null,isEligible:null,onside_token:null,isLoading:!1,error:null},Yt=et.create((e,t)=>({...pe,fetchInstallData:async()=>{if(t().isLoading)return;e({isLoading:!0,error:null});let o=null;for(let r=0;r<Me;r++)try{const n=await Ht();e({...pe,installUrl:n.installUrl,attribution_token:n.attribution_token,isEligible:n.is_eligible,onside_token:n.onside_token,isLoading:!1,error:null});return}catch(n){o=n instanceof Error?n:new Error(String(n)),r<Me-1&&await new Promise(a=>setTimeout(a,Xt(r)))}e({isLoading:!1,error:o})},reset:()=>e(pe)})),Ye=(e=!0)=>{const{installUrl:t,attribution_token:o,isEligible:r,onside_token:n,isLoading:a,error:l,fetchInstallData:p}=Yt(),u=V.useRef(!1);return V.useEffect(()=>{e&&!u.current&&(u.current=!0,p())},[e,p]),{installUrl:t,attribution_token:o,isEligible:r,onside_token:n,isLoading:a,error:l,fetchInstallData:p}},ie={IOS:/iPhone|iPad|iPod/i,IPAD:/iPad/i,ANDROID:/Android/i,INTEL_MAC:/Intel Mac/i},f={IOS_CHROME:/CriOS/i,IOS_FIREFOX:/FxiOS/i,IOS_EDGE:/EdgiOS/i,IOS_OPERA:/OPiOS/i,IOS_OPERA_NEW:/OPT\//i,IOS_BRAVE:/Brave\//i,IOS_DUCKDUCKGO:/Ddg\//i,IOS_GOOGLE_APP:/GSA/i,SAFARI:/Safari/i,CHROME:/Chrome|CriOS/i,FIREFOX:/Firefox|FxiOS/i,EDGE:/Edge|Edg/i,OPERA:/Opera|OPiOS|OPT\/|OPR\/|OPX\//i},se={IOS_VERSION:/Version\/(\d+[_\.\d]*)/,IOS_OS:/(?:iPhone|iPad|iPod).*?OS (\d+[_\.\d]*)/i,ANDROID_VERSION:/Android\s+(\d+[\.\d]*)/,MACOS_VERSION:/Mac OS X (\d+[_\.\d]*)/i},Ne={MOBILE:/Mobile/i,ANDROID_TABLET_KEYWORDS:/Tablet|SM-T|SM-P|GT-P|SCH-I|SCH-T/i},$={IOS_INSTAGRAM:/\bInstagram\b/i,IOS_FACEBOOK:/\bFBAN\/FBIOS\b|\bFBAV\b/i,IOS_LINKEDIN:/LinkedInApp/i,IOS_DISCORD:/\bDiscord\b/i,IOS_TWITTER:/Twitter for iPhone/i,IOS_TIKTOK:/\bTikTok\b/i},qt=768,Jt=()=>typeof window<"u"&&("ontouchstart"in window||window.navigator?.maxTouchPoints>0||window.navigator?.msMaxTouchPoints>0),Zt=()=>typeof window>"u"?"":window.navigator.userAgent,Qt=e=>{if(ie.IOS.test(e)){const t=ie.IPAD.test(e);return{platform:"ios",isMobile:!t,isTablet:t,isDesktop:!1}}if(ie.ANDROID.test(e)){const t=Ne.MOBILE.test(e)&&(window.innerWidth>=qt||Ne.ANDROID_TABLET_KEYWORDS.test(e));return{platform:"android",isMobile:!t,isTablet:t,isDesktop:!1}}return eo(e)?{platform:"ios",isMobile:!1,isTablet:!0,isDesktop:!1}:f.IOS_GOOGLE_APP.test(e)?{platform:"ios",isMobile:!0,isTablet:!1,isDesktop:!1}:{platform:"desktop",isMobile:!1,isTablet:!1,isDesktop:!0}},eo=e=>f.SAFARI.test(e)&&ie.INTEL_MAC.test(e)&&!f.CHROME.test(e)&&!f.FIREFOX.test(e)&&!f.OPERA.test(e)?Jt():!1,Pe=()=>typeof window?.TelegramWebviewProxy<"u",to=e=>{const t=(...o)=>o.some(r=>r.test(e));return t(f.IOS_EDGE,f.EDGE)?"edge":t(f.IOS_OPERA,f.IOS_OPERA_NEW,f.OPERA)?"opera":t(f.IOS_BRAVE)?"brave":t(f.IOS_DUCKDUCKGO)?"duckduckgo":t(f.IOS_CHROME,f.CHROME)?"chrome":t(f.IOS_GOOGLE_APP)?"google":t(f.IOS_FIREFOX,f.FIREFOX)?"firefox":f.SAFARI.test(e)&&!f.CHROME.test(e)&&!f.FIREFOX.test(e)&&!f.OPERA.test(e)&&!f.IOS_BRAVE.test(e)&&!f.IOS_DUCKDUCKGO.test(e)&&!f.IOS_GOOGLE_APP.test(e)&&!Pe()?"safari":t($.IOS_INSTAGRAM,$.IOS_FACEBOOK,$.IOS_LINKEDIN,$.IOS_DISCORD,$.IOS_TWITTER,$.IOS_TIKTOK)||Pe()?"in-app":"unknown"},oo=(e,t)=>{switch(t){case"ios":{let o=e.match(se.IOS_OS);if(o||(o=e.match(se.IOS_VERSION)),o){const r=o[1].replace(/_/g,".");return parseFloat(r)}return}case"android":{const o=e.match(se.ANDROID_VERSION);return o?parseFloat(o[1]):void 0}case"desktop":{const o=e.match(se.MACOS_VERSION);if(o){const r=o[1].replace(/_/g,".");return parseFloat(r)}return}default:return}},ro={platform:"unknown",browser:"unknown",isMobile:!1,isTablet:!1,isDesktop:!1,version:void 0,userAgent:""};function qe(){if(typeof window>"u")return ro;const e=Zt(),t=Qt(e),o=to(e),r=oo(e,t.platform);return{...t,browser:o,version:r,userAgent:e}}const Le=17.6,no=18.6,so=["safari","chrome","edge","brave","duckduckgo"];function io(e){return e.platform==="ios"&&(e.isMobile||e.isTablet)?so.includes(e.browser):!1}function ao(e){return!!(e.platform==="ios"&&e.version&&e.version>=no)}const Je=()=>{const e=qe(),t=io(e),o=!!(e.platform==="ios"&&e.version&&e.version>=Le),r=!!(e.platform==="ios"&&e.version&&e.version<Le),n=e.platform==="ios"&&(e.isMobile||e.isTablet)&&!r&&!t,a=ao(e),l=o&&t,p=e.platform==="android";return{canInstall:l,shouldGoToSafari:n,shouldUpdateIOS:r,isIOS186PlusVersion:a,isAndroid:p}};function Ze(e,t={},o){try{if(typeof window>"u")return;window.dataLayer||(window.dataLayer=[]);const r={...t,...qe()};window.dataLayer.push({event:"amplitude_event",event_name:e,event_properties:{timestamp:Date.now(),...r},...o?{user_properties:o}:{}}),console.log("🎯 Analytics Event:",{event_name:e,event_properties:{timestamp:new Date().toISOString(),...r},user_properties:o,url:window.location.href})}catch(r){console.error("Analytics error:",r)}}function lo(e,t,o,r={}){const n=`${e}.${t}`,a={modal_name:e,event_type:t,...r};a.action=o,Ze(n,a)}const co={INSTALL_BUTTON_CLICK:"install_button_click"},Qe=(e={})=>({trackInstallEvent:r=>{Ze(co.INSTALL_BUTTON_CLICK,{...e,event_type:r})},trackOpenModalEvent:r=>{lo(r,"opened","install_button",{...e})}}),uo=e=>H.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},H.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"})),mo=({className:e,onClick:t,children:o,id:r,androidClassName:n,androidTextClassName:a})=>w.jsx(ae,{id:r,className:j("bg-white px-7",e,n),variant:"secondary",size:"lg",onClick:t,children:w.jsxs("span",{className:"flex flex-row items-center gap-1",children:[w.jsx(uo,{className:a?"text-[#FF465D]":void 0}),w.jsx("span",{className:j("flex-1",a),children:o})]})}),po=({href:e,onClick:t,children:o,className:r,id:n})=>w.jsx(ae,{id:n,href:e,purelink:!0,size:"lg",onClick:t,className:r,children:o}),fo=e=>H.createElement("svg",{stroke:"customColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},H.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}}"),H.createElement("g",{className:"spinner_V8m1"},H.createElement("circle",{cx:12,cy:12,r:9.5,fill:"none",strokeWidth:3}))),bo=e=>{const{id:t,className:o,children:r="Loading...",showLoaderOnly:n}=e;return w.jsx(ae,{id:t,className:j("px-8 py-4",o),disabled:!0,children:w.jsxs("span",{className:"flex items-center gap-2",children:[w.jsx(fo,{className:"size-5 animate-spin stroke-blue"}),!n&&r]})})},go=()=>w.jsx("p",{className:"mt-2 text-center text-sm text-red-600",children:"Unable to load install link. Please try again."}),ho=e=>{const{className:t,children:o="Install Onside",handleCustomStep:r,location:n="hero",caption:a,showCaption:l=!0,showLoaderOnly:p=!1,androidClassName:u,androidTextClassName:g,id:b}=e,C=typeof window<"u"?window.location.pathname:"",k=Je();console.log("conditions",k);const{installUrl:_,error:v,onside_token:I,attribution_token:z,isEligible:T}=Ye(k.canInstall);console.log("installUrl",_);const[B,D]=V.useState(!1),N=V.useCallback(()=>{D(!0);const M=setTimeout(()=>{D(!1),clearTimeout(M)},He)},[]),E=M=>{console.log("openModal",M)},{trackOpenModalEvent:S,trackInstallEvent:R}=Qe({page:C,location:n,onside_token:I??void 0,attribution_token:z??void 0}),d=V.useCallback(M=>{if(!_){M.preventDefault();return}if(r){r();return}R(k.isIOS186PlusVersion?"ios_18_6_plus":"install_click"),window.location.href=_},[_,r,k.isIOS186PlusVersion,R]),A=V.useCallback(()=>{if(N(),k.shouldGoToSafari){S("go_to_safari"),E("goToSafari");return}if(k.shouldUpdateIOS){S("update_ios"),E("updateIOS");return}R("no_condition_matched")},[N,k.shouldGoToSafari,k.shouldUpdateIOS,S,E,R]),Z=V.useCallback(()=>{S("is_android"),E("isAndroid")},[E,S]),q=l&&(!T||a)&&w.jsx("div",{className:"text-2xs font-mono opacity-60",children:T?a:"Only available in the EU. Install from an eligible region."});return k.isAndroid?w.jsx(mo,{id:b,className:t,androidClassName:u,androidTextClassName:g,onClick:Z,children:"Onside is for iPhone and iPad"}):B?w.jsx(bo,{showLoaderOnly:p,id:b,className:j("bg-buttonHover!",t)}):_&&k.canInstall?w.jsxs(w.Fragment,{children:[w.jsxs(po,{id:b,className:j(t,"flex-col gap-1"),href:_,onClick:d,children:[o,q]}),v&&w.jsx(go,{})]}):w.jsxs(ae,{id:b,className:j(t,"flex-col gap-1"),size:"lg",onClick:A,children:[o,q]})};exports.AVERAGE_CHECK_TIME=Bt;exports.AVERAGE_INSTALL_TIME=jt;exports.AVERAGE_LOADING_TIME=He;exports.InstallAppButton=ho;exports.createInstallAnalyticsHandler=Qe;exports.useInstallConditions=Je;exports.useInstallUrl=Ye;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),R=require("react"),zt=require("react-dom");function Ut(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=Ut(R),Ln=Ut(zt);function Wt(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Wt(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tt(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Wt(e))&&(r&&(r+=" "),r+=t);return r}const nt="-",Fn=e=>{const t=zn(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(nt);return a[0]===""&&a.length!==1&&a.shift(),Vt(a,t)||Bn(i)},getConflictingClassGroupIds:(i,a)=>{const d=n[i]||[];return a&&r[i]?[...d,...r[i]]:d}}},Vt=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Vt(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(nt);return t.validators.find(({validator:i})=>i(s))?.classGroupId},pt=/^\[(.+)\]$/,Bn=e=>{if(pt.test(e)){const t=pt.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},zn=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Ye(n[o],r,o,t);return r},Ye=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:mt(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Un(o)){Ye(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Ye(i,mt(t,s),n,r)})})},mt=(e,t)=>{let n=e;return t.split(nt).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Un=e=>e.isThemeGetter,Wn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},qe="!",Ze=":",Vn=Ze.length,Gn=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,d=0,u;for(let S=0;S<o.length;S++){let f=o[S];if(i===0&&a===0){if(f===Ze){s.push(o.slice(d,S)),d=S+Vn;continue}if(f==="/"){u=S;continue}}f==="["?i++:f==="]"?i--:f==="("?a++:f===")"&&a--}const p=s.length===0?o:o.substring(d),m=$n(p),v=m!==p,y=u&&u>d?u-d:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:m,maybePostfixModifierPosition:y}};if(t){const o=t+Ze,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},$n=e=>e.endsWith(qe)?e.substring(0,e.length-1):e.startsWith(qe)?e.substring(1):e,Kn=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},Hn=e=>({cache:Wn(e.cacheSize),parseClassName:Gn(e),sortModifiers:Kn(e),...Fn(e)}),Xn=/\s+/,Yn=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(Xn);let d="";for(let u=a.length-1;u>=0;u-=1){const p=a[u],{isExternal:m,modifiers:v,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:f}=n(p);if(m){d=p+(d.length>0?" "+d:d);continue}let x=!!f,E=r(x?S.substring(0,f):S);if(!E){if(!x){d=p+(d.length>0?" "+d:d);continue}if(E=r(S),!E){d=p+(d.length>0?" "+d:d);continue}x=!1}const _=s(v).join(":"),N=y?_+qe:_,O=N+E;if(i.includes(O))continue;i.push(O);const I=o(E,x);for(let T=0;T<I.length;++T){const C=I[T];i.push(N+C)}d=p+(d.length>0?" "+d:d)}return d};function qn(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Gt(t))&&(r&&(r+=" "),r+=n);return r}const Gt=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Gt(e[r]))&&(n&&(n+=" "),n+=t);return n};function Zn(e,...t){let n,r,o,s=i;function i(d){const u=t.reduce((p,m)=>m(p),e());return n=Hn(u),r=n.cache.get,o=n.cache.set,s=a,a(d)}function a(d){const u=r(d);if(u)return u;const p=Yn(d,n);return o(d,p),p}return function(){return s(qn.apply(null,arguments))}}const M=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},$t=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Kt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jn=/^\d+\/\d+$/,Qn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,er=/\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$/,tr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ne=e=>Jn.test(e),k=e=>!!e&&!Number.isNaN(Number(e)),H=e=>!!e&&Number.isInteger(Number(e)),Fe=e=>e.endsWith("%")&&k(e.slice(0,-1)),G=e=>Qn.test(e),or=()=>!0,sr=e=>er.test(e)&&!tr.test(e),Ht=()=>!1,ar=e=>nr.test(e),ir=e=>rr.test(e),lr=e=>!g(e)&&!h(e),cr=e=>le(e,qt,Ht),g=e=>$t.test(e),Z=e=>le(e,Zt,sr),Be=e=>le(e,mr,k),gt=e=>le(e,Xt,Ht),dr=e=>le(e,Yt,ir),xe=e=>le(e,Jt,ar),h=e=>Kt.test(e),de=e=>ce(e,Zt),ur=e=>ce(e,gr),ht=e=>ce(e,Xt),fr=e=>ce(e,qt),pr=e=>ce(e,Yt),we=e=>ce(e,Jt,!0),le=(e,t,n)=>{const r=$t.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ce=(e,t,n=!1)=>{const r=Kt.exec(e);return r?r[1]?t(r[1]):n:!1},Xt=e=>e==="position"||e==="percentage",Yt=e=>e==="image"||e==="url",qt=e=>e==="length"||e==="size"||e==="bg-size",Zt=e=>e==="length",mr=e=>e==="number",gr=e=>e==="family-name",Jt=e=>e==="shadow",hr=()=>{const e=M("color"),t=M("font"),n=M("text"),r=M("font-weight"),o=M("tracking"),s=M("leading"),i=M("breakpoint"),a=M("container"),d=M("spacing"),u=M("radius"),p=M("shadow"),m=M("inset-shadow"),v=M("text-shadow"),y=M("drop-shadow"),S=M("blur"),f=M("perspective"),x=M("aspect"),E=M("ease"),_=M("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...O(),h,g],T=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],b=()=>[h,g,d],P=()=>[ne,"full","auto",...b()],B=()=>[H,"none","subgrid",h,g],me=()=>["auto",{span:["full",H,h,g]},H,h,g],ee=()=>[H,"auto",h,g],ge=()=>["auto","min","max","fr",h,g],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...b()],q=()=>[ne,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...b()],w=()=>[e,h,g],lt=()=>[...O(),ht,gt,{position:[h,g]}],ct=()=>["no-repeat",{repeat:["","x","y","space","round"]}],dt=()=>["auto","cover","contain",fr,cr,{size:[h,g]}],je=()=>[Fe,de,Z],j=()=>["","none","full",u,h,g],F=()=>["",k,de,Z],he=()=>["solid","dashed","dotted","double"],ut=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>[k,Fe,ht,gt],ft=()=>["","none",S,h,g],ve=()=>["none",k,h,g],be=()=>["none",k,h,g],Le=()=>[k,h,g],ye=()=>[ne,"full",...b()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[G],breakpoint:[G],color:[or],container:[G],"drop-shadow":[G],ease:["in","out","in-out"],font:[lr],"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",k],text:[G],"text-shadow":[G],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ne,g,h,x]}],container:["container"],columns:[{columns:[k,g,h,a]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[H,"auto",h,g]}],basis:[{basis:[ne,"full","auto",a,...b()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[k,ne,"auto","initial","none",g]}],grow:[{grow:["",k,h,g]}],shrink:[{shrink:["",k,h,g]}],order:[{order:[H,"first","last","none",h,g]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:me()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:me()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ge()}],"auto-rows":[{"auto-rows":ge()}],gap:[{gap:b()}],"gap-x":[{"gap-x":b()}],"gap-y":[{"gap-y":b()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:b()}],px:[{px:b()}],py:[{py:b()}],ps:[{ps:b()}],pe:[{pe:b()}],pt:[{pt:b()}],pr:[{pr:b()}],pb:[{pb:b()}],pl:[{pl:b()}],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":b()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":b()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[a,"screen",...q()]}],"min-w":[{"min-w":[a,"screen","none",...q()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,de,Z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,h,Be]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Fe,g]}],"font-family":[{font:[ur,g,t]}],"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:[o,h,g]}],"line-clamp":[{"line-clamp":[k,"none",h,Be]}],leading:[{leading:[s,...b()]}],"list-image":[{"list-image":["none",h,g]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",h,g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:w()}],"text-color":[{text:w()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[k,"from-font","auto",h,Z]}],"text-decoration-color":[{decoration:w()}],"underline-offset":[{"underline-offset":[k,"auto",h,g]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",h,g]}],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",h,g]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:lt()}],"bg-repeat":[{bg:ct()}],"bg-size":[{bg:dt()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},H,h,g],radial:["",h,g],conic:[H,h,g]},pr,dr]}],"bg-color":[{bg:w()}],"gradient-from-pos":[{from:je()}],"gradient-via-pos":[{via:je()}],"gradient-to-pos":[{to:je()}],"gradient-from":[{from:w()}],"gradient-via":[{via:w()}],"gradient-to":[{to:w()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:w()}],"border-color-x":[{"border-x":w()}],"border-color-y":[{"border-y":w()}],"border-color-s":[{"border-s":w()}],"border-color-e":[{"border-e":w()}],"border-color-t":[{"border-t":w()}],"border-color-r":[{"border-r":w()}],"border-color-b":[{"border-b":w()}],"border-color-l":[{"border-l":w()}],"divide-color":[{divide:w()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[k,h,g]}],"outline-w":[{outline:["",k,de,Z]}],"outline-color":[{outline:w()}],shadow:[{shadow:["","none",p,we,xe]}],"shadow-color":[{shadow:w()}],"inset-shadow":[{"inset-shadow":["none",m,we,xe]}],"inset-shadow-color":[{"inset-shadow":w()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:w()}],"ring-offset-w":[{"ring-offset":[k,Z]}],"ring-offset-color":[{"ring-offset":w()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":w()}],"text-shadow":[{"text-shadow":["none",v,we,xe]}],"text-shadow-color":[{"text-shadow":w()}],opacity:[{opacity:[k,h,g]}],"mix-blend":[{"mix-blend":[...ut(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ut()}],"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":[k]}],"mask-image-linear-from-pos":[{"mask-linear-from":D()}],"mask-image-linear-to-pos":[{"mask-linear-to":D()}],"mask-image-linear-from-color":[{"mask-linear-from":w()}],"mask-image-linear-to-color":[{"mask-linear-to":w()}],"mask-image-t-from-pos":[{"mask-t-from":D()}],"mask-image-t-to-pos":[{"mask-t-to":D()}],"mask-image-t-from-color":[{"mask-t-from":w()}],"mask-image-t-to-color":[{"mask-t-to":w()}],"mask-image-r-from-pos":[{"mask-r-from":D()}],"mask-image-r-to-pos":[{"mask-r-to":D()}],"mask-image-r-from-color":[{"mask-r-from":w()}],"mask-image-r-to-color":[{"mask-r-to":w()}],"mask-image-b-from-pos":[{"mask-b-from":D()}],"mask-image-b-to-pos":[{"mask-b-to":D()}],"mask-image-b-from-color":[{"mask-b-from":w()}],"mask-image-b-to-color":[{"mask-b-to":w()}],"mask-image-l-from-pos":[{"mask-l-from":D()}],"mask-image-l-to-pos":[{"mask-l-to":D()}],"mask-image-l-from-color":[{"mask-l-from":w()}],"mask-image-l-to-color":[{"mask-l-to":w()}],"mask-image-x-from-pos":[{"mask-x-from":D()}],"mask-image-x-to-pos":[{"mask-x-to":D()}],"mask-image-x-from-color":[{"mask-x-from":w()}],"mask-image-x-to-color":[{"mask-x-to":w()}],"mask-image-y-from-pos":[{"mask-y-from":D()}],"mask-image-y-to-pos":[{"mask-y-to":D()}],"mask-image-y-from-color":[{"mask-y-from":w()}],"mask-image-y-to-color":[{"mask-y-to":w()}],"mask-image-radial":[{"mask-radial":[h,g]}],"mask-image-radial-from-pos":[{"mask-radial-from":D()}],"mask-image-radial-to-pos":[{"mask-radial-to":D()}],"mask-image-radial-from-color":[{"mask-radial-from":w()}],"mask-image-radial-to-color":[{"mask-radial-to":w()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[k]}],"mask-image-conic-from-pos":[{"mask-conic-from":D()}],"mask-image-conic-to-pos":[{"mask-conic-to":D()}],"mask-image-conic-from-color":[{"mask-conic-from":w()}],"mask-image-conic-to-color":[{"mask-conic-to":w()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:lt()}],"mask-repeat":[{mask:ct()}],"mask-size":[{mask:dt()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",h,g]}],filter:[{filter:["","none",h,g]}],blur:[{blur:ft()}],brightness:[{brightness:[k,h,g]}],contrast:[{contrast:[k,h,g]}],"drop-shadow":[{"drop-shadow":["","none",y,we,xe]}],"drop-shadow-color":[{"drop-shadow":w()}],grayscale:[{grayscale:["",k,h,g]}],"hue-rotate":[{"hue-rotate":[k,h,g]}],invert:[{invert:["",k,h,g]}],saturate:[{saturate:[k,h,g]}],sepia:[{sepia:["",k,h,g]}],"backdrop-filter":[{"backdrop-filter":["","none",h,g]}],"backdrop-blur":[{"backdrop-blur":ft()}],"backdrop-brightness":[{"backdrop-brightness":[k,h,g]}],"backdrop-contrast":[{"backdrop-contrast":[k,h,g]}],"backdrop-grayscale":[{"backdrop-grayscale":["",k,h,g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[k,h,g]}],"backdrop-invert":[{"backdrop-invert":["",k,h,g]}],"backdrop-opacity":[{"backdrop-opacity":[k,h,g]}],"backdrop-saturate":[{"backdrop-saturate":[k,h,g]}],"backdrop-sepia":[{"backdrop-sepia":["",k,h,g]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":b()}],"border-spacing-x":[{"border-spacing-x":b()}],"border-spacing-y":[{"border-spacing-y":b()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",h,g]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[k,"initial",h,g]}],ease:[{ease:["linear","initial",E,h,g]}],delay:[{delay:[k,h,g]}],animate:[{animate:["none",_,h,g]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,h,g]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:ve()}],"rotate-x":[{"rotate-x":ve()}],"rotate-y":[{"rotate-y":ve()}],"rotate-z":[{"rotate-z":ve()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Le()}],"skew-x":[{"skew-x":Le()}],"skew-y":[{"skew-y":Le()}],transform:[{transform:[h,g,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":["translate-none"],accent:[{accent:w()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:w()}],"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",h,g]}],"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":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"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",h,g]}],fill:[{fill:["none",...w()]}],"stroke-w":[{stroke:[k,de,Z,Be]}],stroke:[{stroke:["none",...w()]}],"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"]}},vr=Zn(hr);function V(...e){return vr(tt(e))}const br={primary:"rounded-[var(--onside-btn-radius,9999px)] whitespace-nowrap leading-none !font-medium transition-bg duration-300 flex items-center justify-center text-center",secondary:"rounded-[var(--onside-btn-radius,9999px)] whitespace-nowrap leading-none !font-medium bg-transparent border transition-bg transition-color duration-300 flex items-center justify-center text-center",text:"whitespace-nowrap leading-none !font-medium transition-colors duration-300 flex items-center justify-center text-center",transparent:"rounded-[var(--onside-btn-radius,9999px)] whitespace-nowrap leading-none !font-medium transition-opacity duration-300 flex items-center justify-center text-center"},yr={primary:{blue:"bg-[var(--onside-btn-bg,#0A5EFF)] text-[color:var(--onside-btn-text,#FFFFFF)] hover:bg-[var(--onside-btn-bg-hover,#337AFF)] focus:bg-[var(--onside-btn-bg,#0A5EFF)] disabled:bg-[var(--onside-btn-disabled-bg,rgba(10,94,255,0.2))]",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"}},xr={lg:"py-[var(--onside-btn-py,1rem)] px-[var(--onside-btn-px,2rem)] text-[length:var(--onside-btn-font-size,1.125rem)] font-medium",md:"py-[var(--onside-btn-py,0.75rem)] px-[var(--onside-btn-px,1.25rem)] text-[length:var(--onside-btn-font-size,1rem)] font-medium"};function $({className:e,...t}){const n=t.variant??"primary",r=t.color??"blue",o=t.size??"md",s=V(br[n],xr[n!=="text"?o:"md"],yr[n][r],e);if(typeof t.href>"u"){const d=t;return c.jsx("button",{className:s,...d})}const i={...t};delete i.purelink;const a=("rel"in i?i.rel:void 0)??(i.target==="_blank"?"noopener noreferrer":void 0);return c.jsx("a",{className:s,rel:a,...i})}const wr="https://onside.io/web-api/v1/marketplace/install",rt=1e3,vt=e=>{let t;const n=new Set,r=(u,p)=>{const m=typeof u=="function"?u(t):u;if(!Object.is(m,t)){const v=t;t=p??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(y=>y(t,v))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>d,subscribe:u=>(n.add(u),()=>n.delete(u))},d=t=e(r,o,a);return a},Er=(e=>e?vt(e):vt),Sr=e=>e;function kr(e,t=Sr){const n=R.useSyncExternalStore(e.subscribe,R.useCallback(()=>t(e.getState()),[e,t]),R.useCallback(()=>t(e.getInitialState()),[e,t]));return R.useDebugValue(n),n}const bt=e=>{const t=Er(e),n=r=>kr(t,r);return Object.assign(n,t),n},Qt=(e=>e?bt(e):bt),Cr=e=>{if(typeof document>"u")return null;const t=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`));if(!t)return null;const n=t.indexOf("=");return n!==-1?t.slice(n+1):null},yt=(e,t,n)=>{if(typeof document>"u")return;const r=new Date(Date.now()+n*1e3),o=typeof window<"u"&&window.location?.protocol==="https:"?"; Secure":"";document.cookie=`${e}=${t}; expires=${r.toUTCString()}; path=/; SameSite=Lax${o}`},Or=7*rt,Ir=7*rt,en=2*rt,Je="onside_token_data",xt=15552e3,_r=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("Secure random UUID generation is not available");const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`},tn=()=>{const e=Cr(Je);if(!e)return null;try{return JSON.parse(decodeURIComponent(e)).token}catch{return null}},Nr=()=>{const e=tn();if(e){const r={token:e,createdAt:Date.now()};return yt(Je,encodeURIComponent(JSON.stringify(r)),xt),e}const t=_r(),n={token:t,createdAt:Date.now()};return yt(Je,encodeURIComponent(JSON.stringify(n)),xt),t},Rr=async e=>{const t=await fetch(wr,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({referer_url:window.location.href,onside_token:e})});if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);const n=await t.json();if(!n.url||!n.attribution_token||!n.exp)throw new Error("Invalid response format");return n},Ar=async()=>{const t=tn()||Nr(),n=await Rr(t);return{installUrl:n.url,attribution_token:n.attribution_token,is_eligible:n.is_eligible,onside_token:t}},wt=3,Pr=e=>Math.min(1e3*2**e,3e4),ze={installUrl:null,attribution_token:null,isEligible:null,onside_token:null,isLoading:!1,error:null},Tr=Qt((e,t)=>({...ze,fetchInstallData:async()=>{if(t().isLoading)return;e({isLoading:!0,error:null});let n=null;for(let r=0;r<wt;r++)try{const o=await Ar();e({...ze,installUrl:o.installUrl,attribution_token:o.attribution_token,isEligible:o.is_eligible,onside_token:o.onside_token,isLoading:!1,error:null});return}catch(o){n=o instanceof Error?o:new Error(String(o)),r<wt-1&&await new Promise(s=>setTimeout(s,Pr(r)))}e({isLoading:!1,error:n})},reset:()=>e(ze)})),Mr=(e=!0)=>{const{installUrl:t,attribution_token:n,isEligible:r,onside_token:o,isLoading:s,error:i,fetchInstallData:a}=Tr(),d=R.useRef(!1);return R.useEffect(()=>{e&&!d.current&&(d.current=!0,a())},[e,a]),{installUrl:t,attribution_token:n,isEligible:r,onside_token:o,isLoading:s,error:i,fetchInstallData:a}},_e={IOS:/iPhone|iPad|iPod/i,IPAD:/iPad/i,ANDROID:/Android/i,INTEL_MAC:/Intel Mac/i},A={IOS_CHROME:/CriOS/i,IOS_FIREFOX:/FxiOS/i,IOS_EDGE:/EdgiOS/i,IOS_OPERA:/OPiOS/i,IOS_OPERA_NEW:/OPT\//i,IOS_BRAVE:/Brave\//i,IOS_DUCKDUCKGO:/Ddg\//i,IOS_GOOGLE_APP:/GSA/i,SAFARI:/Safari/i,CHROME:/Chrome|CriOS/i,FIREFOX:/Firefox|FxiOS/i,EDGE:/Edge|Edg/i,OPERA:/Opera|OPiOS|OPT\/|OPR\/|OPX\//i},Ee={IOS_VERSION:/Version\/(\d+[_.\d]*)/,IOS_OS:/(?:iPhone|iPad|iPod).*?OS (\d+[_.\d]*)/i,ANDROID_VERSION:/Android\s+(\d+[.\d]*)/,MACOS_VERSION:/Mac OS X (\d+[_.\d]*)/i},Et={MOBILE:/Mobile/i,ANDROID_TABLET_KEYWORDS:/Tablet|SM-T|SM-P|GT-P|SCH-I|SCH-T/i},re={IOS_INSTAGRAM:/\bInstagram\b/i,IOS_FACEBOOK:/\bFBAN\/FBIOS\b|\bFBAV\b/i,IOS_LINKEDIN:/LinkedInApp/i,IOS_DISCORD:/\bDiscord\b/i,IOS_TWITTER:/Twitter for iPhone/i,IOS_TIKTOK:/\bTikTok\b/i},Dr=768,jr=()=>typeof window<"u"&&("ontouchstart"in window||window.navigator?.maxTouchPoints>0||window.navigator?.msMaxTouchPoints>0),Lr=()=>typeof window>"u"?"":window.navigator.userAgent,Fr=e=>{if(_e.IOS.test(e)){const t=_e.IPAD.test(e);return{platform:"ios",isMobile:!t,isTablet:t,isDesktop:!1}}if(_e.ANDROID.test(e)){const t=Et.MOBILE.test(e)&&(window.innerWidth>=Dr||Et.ANDROID_TABLET_KEYWORDS.test(e));return{platform:"android",isMobile:!t,isTablet:t,isDesktop:!1}}return Br(e)?{platform:"ios",isMobile:!1,isTablet:!0,isDesktop:!1}:A.IOS_GOOGLE_APP.test(e)?{platform:"ios",isMobile:!0,isTablet:!1,isDesktop:!1}:{platform:"desktop",isMobile:!1,isTablet:!1,isDesktop:!0}},Br=e=>A.SAFARI.test(e)&&_e.INTEL_MAC.test(e)&&!A.CHROME.test(e)&&!A.FIREFOX.test(e)&&!A.OPERA.test(e)?jr():!1,St=()=>typeof window?.TelegramWebviewProxy<"u",zr=e=>{const t=(...n)=>n.some(r=>r.test(e));return t(A.IOS_EDGE,A.EDGE)?"edge":t(A.IOS_OPERA,A.IOS_OPERA_NEW,A.OPERA)?"opera":t(A.IOS_BRAVE)?"brave":t(A.IOS_DUCKDUCKGO)?"duckduckgo":t(A.IOS_CHROME,A.CHROME)?"chrome":t(A.IOS_GOOGLE_APP)?"google":t(A.IOS_FIREFOX,A.FIREFOX)?"firefox":A.SAFARI.test(e)&&!A.CHROME.test(e)&&!A.FIREFOX.test(e)&&!A.OPERA.test(e)&&!A.IOS_BRAVE.test(e)&&!A.IOS_DUCKDUCKGO.test(e)&&!A.IOS_GOOGLE_APP.test(e)&&!St()?"safari":t(re.IOS_INSTAGRAM,re.IOS_FACEBOOK,re.IOS_LINKEDIN,re.IOS_DISCORD,re.IOS_TWITTER,re.IOS_TIKTOK)||St()?"in-app":"unknown"},Ur=(e,t)=>{switch(t){case"ios":{let n=e.match(Ee.IOS_OS);if(n||(n=e.match(Ee.IOS_VERSION)),n){const r=n[1].replace(/_/g,".");return parseFloat(r)}return}case"android":{const n=e.match(Ee.ANDROID_VERSION);return n?parseFloat(n[1]):void 0}case"desktop":{const n=e.match(Ee.MACOS_VERSION);if(n){const r=n[1].replace(/_/g,".");return parseFloat(r)}return}default:return}},Wr={platform:"unknown",browser:"unknown",isMobile:!1,isTablet:!1,isDesktop:!1,version:void 0,userAgent:""};function ot(){if(typeof window>"u")return Wr;const e=Lr(),t=Fr(e),n=zr(e),r=Ur(e,t.platform);return{...t,browser:n,version:r,userAgent:e}}const kt=17.6,Vr=18.6,Gr=["safari","chrome","edge","brave","duckduckgo"];function $r(e){return e.platform==="ios"&&(e.isMobile||e.isTablet)?Gr.includes(e.browser):!1}function Kr(e){return!!(e.platform==="ios"&&e.version&&e.version>=Vr)}const Hr=()=>{const e=ot(),t=$r(e),n=!!(e.platform==="ios"&&e.version&&e.version>=kt),r=!!(e.platform==="ios"&&e.version&&e.version<kt),o=e.platform==="ios"&&(e.isMobile||e.isTablet)&&!r&&!t,s=Kr(e),i=n&&t,a=e.platform==="android";return{canInstall:i,shouldGoToSafari:o,shouldUpdateIOS:r,isIOS186PlusVersion:s,isAndroid:a}},nn=Qt(e=>({activeModal:null,openModal:t=>e({activeModal:t}),closeModal:()=>e({activeModal:null})}));function Xr(){return typeof window>"u"?!1:localStorage.getItem("onside_analytics_logging")==="true"}function rn(e,t={},n){try{if(typeof window>"u")return null;window.dataLayer||(window.dataLayer=[]);const r={...t,...ot()},o={event:"amplitude_event",event_name:e,event_properties:{timestamp:Date.now(),...r},...n?{user_properties:n}:{},url:window.location.href};return window.dataLayer.push({event:o.event,event_name:o.event_name,event_properties:o.event_properties,...o.user_properties?{user_properties:o.user_properties}:{}}),Xr()&&console.log("🎯 Analytics Event:",{event_name:o.event_name,event_properties:o.event_properties,user_properties:o.user_properties,url:o.url}),o}catch(r){return console.error("Analytics error:",r),null}}function ue(e,t,n,r={}){const o=`${e}.${t}`,s={modal_name:e,event_type:t,...r};return n&&(s.action=n),rn(o,s)}const Yr={INSTALL_BUTTON_CLICK:"install_button_click"},qr=(e={},t)=>({trackInstallEvent:o=>{const s=rn(Yr.INSTALL_BUTTON_CLICK,{...e,event_type:o});s&&t?.onEvent?.(s)},trackOpenModalEvent:o=>{const s=ue(o,"opened","install_button",{...e});s&&t?.onEvent?.(s)}}),Zr="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.1268%205.74646C11.3368%205.74646%2010.1139%204.84824%208.82613%204.88071C7.12708%204.90235%205.56872%205.8655%204.69214%207.39139C2.92817%2010.454%204.23762%2014.9776%205.95831%2017.4667C6.80243%2018.6787%207.79805%2020.0423%209.11832%2019.999C10.3845%2019.9449%2010.8607%2019.1765%2012.3974%2019.1765C13.9233%2019.1765%2014.3562%2019.999%2015.6981%2019.9665C17.0617%2019.9449%2017.9274%2018.7328%2018.7607%2017.5099C19.7239%2016.1031%2020.1243%2014.7395%2020.1459%2014.6638C20.1134%2014.653%2017.4945%2013.6465%2017.4621%2010.6164C17.4404%208.084%2019.5291%206.87195%2019.6265%206.81784C18.436%205.0755%2016.6071%204.88071%2015.9686%204.83742C14.3021%204.70755%2012.906%205.74646%2012.1268%205.74646ZM14.9406%203.19248C15.644%202.34837%2016.1093%201.16877%2015.9795%200C14.973%200.0432878%2013.761%200.670965%2013.0359%201.51508C12.3866%202.26179%2011.8238%203.46303%2011.9753%204.61016C13.09%204.69673%2014.2371%204.03659%2014.9406%203.19248Z'%20fill='currentColor'/%3e%3c/svg%3e",Jr=({className:e,onClick:t,children:n,id:r,androidClassName:o,androidTextClassName:s})=>c.jsx($,{id:r,className:V("bg-white px-7",e,o),variant:"secondary",size:"lg",onClick:t,children:c.jsxs("span",{className:"flex flex-row items-center gap-1",children:[c.jsx(Zr,{className:s?"text-[#FF465D]":void 0}),c.jsx("span",{className:V("flex-1",s),children:n})]})}),Qr=({href:e,onClick:t,children:n,className:r,id:o})=>c.jsx($,{id:o,href:e,purelink:!0,size:"lg",onClick:t,className:r,children:n}),eo="data:image/svg+xml,%3csvg%20stroke='customColor'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e.spinner_V8m1{transform-origin:center;animation:spinner_zKoa%202s%20linear%20infinite}.spinner_V8m1%20circle{stroke-linecap:round;animation:spinner_YpZS%201.5s%20ease-in-out%20infinite}@keyframes%20spinner_zKoa{100%25{transform:rotate(360deg)}}@keyframes%20spinner_YpZS{0%25{stroke-dasharray:0%20150;stroke-dashoffset:0}47.5%25{stroke-dasharray:42%20150;stroke-dashoffset:-16}95%25,100%25{stroke-dasharray:42%20150;stroke-dashoffset:-59}}%3c/style%3e%3cg%20class='spinner_V8m1'%3e%3ccircle%20cx='12'%20cy='12'%20r='9.5'%20fill='none'%20stroke-width='3'%3e%3c/circle%3e%3c/g%3e%3c/svg%3e",to=e=>{const{id:t,className:n,children:r="Loading...",showLoaderOnly:o}=e;return c.jsx($,{id:t,className:V("px-8 py-4",n),disabled:!0,children:c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx(eo,{className:"size-5 animate-spin stroke-blue"}),!o&&r]})})},no=()=>c.jsx("p",{className:"mt-2 text-center text-sm text-red-600",children:"Unable to load install link. Please try again."}),ro=e=>{const{className:t,children:n="Install Onside",handleCustomStep:r,location:o="hero",caption:s,captionClassName:i,showCaption:a=!0,showLoaderOnly:d=!1,androidClassName:u,androidTextClassName:p,customAnalytics:m,styleVars:v,id:y}=e,S=typeof window<"u"?window.location.pathname:"",f=Hr(),{installUrl:x,error:E,onside_token:_,attribution_token:N,isEligible:O}=Mr(f.canInstall),{openModal:I}=nn(),[T,C]=R.useState(!1),b=R.useCallback(()=>{C(!0);const L=setTimeout(()=>{C(!1),clearTimeout(L)},en)},[]),{trackOpenModalEvent:P,trackInstallEvent:B}=qr({page:S,location:o,button_id:y??void 0,onside_token:_??void 0,attribution_token:N??void 0},m),me=R.useCallback(L=>{if(!x){L.preventDefault();return}if(r){r();return}B(f.isIOS186PlusVersion?"ios_18_6_plus":"install_click"),window.location.href=x},[x,r,f.isIOS186PlusVersion,B]),ee=R.useCallback(()=>{if(f.shouldGoToSafari){P("go_to_safari"),I("goToSafari");return}if(f.shouldUpdateIOS){P("update_ios"),I("updateIOS");return}b(),B("no_condition_matched")},[b,f.shouldGoToSafari,f.shouldUpdateIOS,P,I,B]),ge=R.useCallback(()=>{P("is_android"),I("isAndroid")},[I,P]),te=a&&(!O||s)&&c.jsx("div",{className:V("text-2xs font-mono opacity-60 [color:var(--onside-caption-color,rgba(30,28,31,0.6))] [font-size:var(--onside-caption-size,var(--text-2xs))] [line-height:var(--onside-caption-line-height,var(--text-2xs--line-height))]",i),children:O?s:"Only available in the EU. Install from an eligible region."}),z={"data-provider-widget-host":"",style:v};return f.isAndroid?c.jsx("div",{...z,children:c.jsx(Jr,{id:y,className:t,androidClassName:u,androidTextClassName:p,onClick:ge,children:"Onside is for iPhone and iPad"})}):T?c.jsx("div",{...z,children:c.jsx(to,{showLoaderOnly:d,id:y,className:V("bg-buttonHover!",t)})}):x&&f.canInstall?c.jsxs("div",{...z,children:[c.jsxs(Qr,{id:y,className:V(t,"flex-col gap-1"),href:x,onClick:me,children:[n,te]}),E&&c.jsx(no,{})]}):c.jsx("div",{...z,children:c.jsxs($,{id:y,className:V(t,"flex-col gap-1"),size:"lg",onClick:ee,children:[n,te]})})};function Y(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Ct(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function on(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Ct(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Ct(e[o],null)}}}}function Q(...e){return l.useCallback(on(...e),e)}function oo(e,t){const n=l.createContext(t),r=s=>{const{children:i,...a}=s,d=l.useMemo(()=>a,Object.values(a));return c.jsx(n.Provider,{value:d,children:i})};r.displayName=e+"Provider";function o(s){const i=l.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function so(e,t=[]){let n=[];function r(s,i){const a=l.createContext(i),d=n.length;n=[...n,i];const u=m=>{const{scope:v,children:y,...S}=m,f=v?.[e]?.[d]||a,x=l.useMemo(()=>S,Object.values(S));return c.jsx(f.Provider,{value:x,children:y})};u.displayName=s+"Provider";function p(m,v){const y=v?.[e]?.[d]||a,S=l.useContext(y);if(S)return S;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[u,p]}const o=()=>{const s=n.map(i=>l.createContext(i));return function(a){const d=a?.[e]||s;return l.useMemo(()=>({[`__scope${e}`]:{...a,[e]:d}}),[a,d])}};return o.scopeName=e,[r,ao(o,...t)]}function ao(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:d,scopeName:u})=>{const m=d(s)[`__scope${u}`];return{...a,...m}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var fe=globalThis?.document?l.useLayoutEffect:()=>{},io=l[" useId ".trim().toString()]||(()=>{}),lo=0;function Ue(e){const[t,n]=l.useState(io());return fe(()=>{n(r=>r??String(lo++))},[e]),e||(t?`radix-${t}`:"")}var co=l[" useInsertionEffect ".trim().toString()]||fe;function uo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=fo({defaultProp:t,onChange:n}),a=e!==void 0,d=a?e:o;{const p=l.useRef(e!==void 0);l.useEffect(()=>{const m=p.current;m!==a&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=a},[a,r])}const u=l.useCallback(p=>{if(a){const m=po(p)?p(e):p;m!==e&&i.current?.(m)}else s(p)},[a,e,s,i]);return[d,u]}function fo({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),s=l.useRef(t);return co(()=>{s.current=t},[t]),l.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function po(e){return typeof e=="function"}function sn(e){const t=mo(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,a=l.Children.toArray(s),d=a.find(ho);if(d){const u=d.props.children,p=a.map(m=>m===d?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return c.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,p):null})}return c.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function mo(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=bo(o),a=vo(s,o.props);return o.type!==l.Fragment&&(a.ref=r?on(r,i):i),l.cloneElement(o,a)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var go=Symbol("radix.slottable");function ho(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===go}function vo(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const d=s(...a);return o(...a),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function bo(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yo=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],K=yo.reduce((e,t)=>{const n=sn(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...a}=o,d=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function xo(e,t){e&&Ln.flushSync(()=>e.dispatchEvent(t))}function pe(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current?.(...n),[])}function wo(e,t=globalThis?.document){const n=pe(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Eo="DismissableLayer",Qe="dismissableLayer.update",So="dismissableLayer.pointerDownOutside",ko="dismissableLayer.focusOutside",Ot,an=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ln=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...d}=e,u=l.useContext(an),[p,m]=l.useState(null),v=p?.ownerDocument??globalThis?.document,[,y]=l.useState({}),S=Q(t,C=>m(C)),f=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),E=f.indexOf(x),_=p?f.indexOf(p):-1,N=u.layersWithOutsidePointerEventsDisabled.size>0,O=_>=E,I=Io(C=>{const b=C.target,P=[...u.branches].some(B=>B.contains(b));!O||P||(o?.(C),i?.(C),C.defaultPrevented||a?.())},v),T=_o(C=>{const b=C.target;[...u.branches].some(B=>B.contains(b))||(s?.(C),i?.(C),C.defaultPrevented||a?.())},v);return wo(C=>{_===u.layers.size-1&&(r?.(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},v),l.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ot=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),It(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Ot)}},[p,v,n,u]),l.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),It())},[p,u]),l.useEffect(()=>{const C=()=>y({});return document.addEventListener(Qe,C),()=>document.removeEventListener(Qe,C)},[]),c.jsx(K.div,{...d,ref:S,style:{pointerEvents:N?O?"auto":"none":void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,I.onPointerDownCapture)})});ln.displayName=Eo;var Co="DismissableLayerBranch",Oo=l.forwardRef((e,t)=>{const n=l.useContext(an),r=l.useRef(null),o=Q(t,r);return l.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsx(K.div,{...e,ref:o})});Oo.displayName=Co;function Io(e,t=globalThis?.document){const n=pe(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let d=function(){cn(So,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function _o(e,t=globalThis?.document){const n=pe(e),r=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!r.current&&cn(ko,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function It(){const e=new CustomEvent(Qe);document.dispatchEvent(e)}function cn(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?xo(o,s):o.dispatchEvent(s)}var We="focusScope.autoFocusOnMount",Ve="focusScope.autoFocusOnUnmount",_t={bubbles:!1,cancelable:!0},No="FocusScope",dn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,d]=l.useState(null),u=pe(o),p=pe(s),m=l.useRef(null),v=Q(t,f=>d(f)),y=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let f=function(N){if(y.paused||!a)return;const O=N.target;a.contains(O)?m.current=O:X(m.current,{select:!0})},x=function(N){if(y.paused||!a)return;const O=N.relatedTarget;O!==null&&(a.contains(O)||X(m.current,{select:!0}))},E=function(N){if(document.activeElement===document.body)for(const I of N)I.removedNodes.length>0&&X(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",x);const _=new MutationObserver(E);return a&&_.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",x),_.disconnect()}}},[r,a,y.paused]),l.useEffect(()=>{if(a){Rt.add(y);const f=document.activeElement;if(!a.contains(f)){const E=new CustomEvent(We,_t);a.addEventListener(We,u),a.dispatchEvent(E),E.defaultPrevented||(Ro(Do(un(a)),{select:!0}),document.activeElement===f&&X(a))}return()=>{a.removeEventListener(We,u),setTimeout(()=>{const E=new CustomEvent(Ve,_t);a.addEventListener(Ve,p),a.dispatchEvent(E),E.defaultPrevented||X(f??document.body,{select:!0}),a.removeEventListener(Ve,p),Rt.remove(y)},0)}}},[a,u,p,y]);const S=l.useCallback(f=>{if(!n&&!r||y.paused)return;const x=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,E=document.activeElement;if(x&&E){const _=f.currentTarget,[N,O]=Ao(_);N&&O?!f.shiftKey&&E===O?(f.preventDefault(),n&&X(N,{select:!0})):f.shiftKey&&E===N&&(f.preventDefault(),n&&X(O,{select:!0})):E===_&&f.preventDefault()}},[n,r,y.paused]);return c.jsx(K.div,{tabIndex:-1,...i,ref:v,onKeyDown:S})});dn.displayName=No;function Ro(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(X(r,{select:t}),document.activeElement!==n)return}function Ao(e){const t=un(e),n=Nt(t,e),r=Nt(t.reverse(),e);return[n,r]}function un(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Nt(e,t){for(const n of e)if(!Po(n,{upTo:t}))return n}function Po(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function To(e){return e instanceof HTMLInputElement&&"select"in e}function X(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&To(e)&&t&&e.select()}}var Rt=Mo();function Mo(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=At(e,t),e.unshift(t)},remove(t){e=At(e,t),e[0]?.resume()}}}function At(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Do(e){return e.filter(t=>t.tagName!=="A")}var jo="Portal",fn=l.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=l.useState(!1);fe(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?zt.createPortal(c.jsx(K.div,{...r,ref:t}),i):null});fn.displayName=jo;function Lo(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Pe=e=>{const{present:t,children:n}=e,r=Fo(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=Q(r.ref,Bo(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};Pe.displayName="Presence";function Fo(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[a,d]=Lo(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Se(r.current);s.current=a==="mounted"?u:"none"},[a]),fe(()=>{const u=r.current,p=o.current;if(p!==e){const v=s.current,y=Se(u);e?d("MOUNT"):y==="none"||u?.display==="none"?d("UNMOUNT"):d(p&&v!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),fe(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,m=y=>{const f=Se(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&f&&(d("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},v=y=>{y.target===t&&(s.current=Se(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Se(e){return e?.animationName||"none"}function Bo(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ge=0;function zo(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Pt()),document.body.insertAdjacentElement("beforeend",e[1]??Pt()),Ge++,()=>{Ge===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ge--}},[])}function Pt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var W=function(){return W=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},W.apply(this,arguments)};function pn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Uo(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Ne="right-scroll-bar-position",Re="width-before-scroll-bar",Wo="with-scroll-bars-hidden",Vo="--removed-body-scroll-bar-size";function $e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Go(e,t){var n=R.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var $o=typeof window<"u"?l.useLayoutEffect:l.useEffect,Tt=new WeakMap;function Ko(e,t){var n=Go(null,function(r){return e.forEach(function(o){return $e(o,r)})});return $o(function(){var r=Tt.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||$e(a,null)}),s.forEach(function(a){o.has(a)||$e(a,i)})}Tt.set(n,e)},[e]),n}function Ho(e){return e}function Xo(e,t){t===void 0&&(t=Ho);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var d=function(){var p=i;i=[],p.forEach(s)},u=function(){return Promise.resolve().then(d)};u(),n={push:function(p){i.push(p),u()},filter:function(p){return i=i.filter(p),n}}}};return o}function Yo(e){e===void 0&&(e={});var t=Xo(null);return t.options=W({async:!0,ssr:!1},e),t}var mn=function(e){var t=e.sideCar,n=pn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,W({},n))};mn.isSideCarExport=!0;function qo(e,t){return e.useMedium(t),mn}var gn=Yo(),Ke=function(){},Te=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:Ke,onWheelCapture:Ke,onTouchMoveCapture:Ke}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,d=e.className,u=e.removeScrollBar,p=e.enabled,m=e.shards,v=e.sideCar,y=e.noRelative,S=e.noIsolation,f=e.inert,x=e.allowPinchZoom,E=e.as,_=E===void 0?"div":E,N=e.gapMode,O=pn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=v,T=Ko([n,t]),C=W(W({},O),o);return l.createElement(l.Fragment,null,p&&l.createElement(I,{sideCar:gn,removeScrollBar:u,shards:m,noRelative:y,noIsolation:S,inert:f,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:N}),i?l.cloneElement(l.Children.only(a),W(W({},C),{ref:T})):l.createElement(_,W({},C,{className:d,ref:T}),a))});Te.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Te.classNames={fullWidth:Re,zeroRight:Ne};var Zo=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Jo(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Zo();return t&&e.setAttribute("nonce",t),e}function Qo(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function es(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ts=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Jo())&&(Qo(t,n),es(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ns=function(){var e=ts();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},hn=function(){var e=ns(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},rs={left:0,top:0,right:0,gap:0},He=function(e){return parseInt(e||"",10)||0},os=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[He(n),He(r),He(o)]},ss=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rs;var t=os(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},as=hn(),ie="data-scroll-locked",is=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(Wo,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(ie,`] {
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(o,`px;
|
|
11
|
+
padding-top: `).concat(s,`px;
|
|
12
|
+
padding-right: `).concat(i,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(Ne,` {
|
|
20
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(Re,` {
|
|
24
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(Ne," .").concat(Ne,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(Re," .").concat(Re,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(ie,`] {
|
|
36
|
+
`).concat(Vo,": ").concat(a,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},Mt=function(){var e=parseInt(document.body.getAttribute(ie)||"0",10);return isFinite(e)?e:0},ls=function(){l.useEffect(function(){return document.body.setAttribute(ie,(Mt()+1).toString()),function(){var e=Mt()-1;e<=0?document.body.removeAttribute(ie):document.body.setAttribute(ie,e.toString())}},[])},cs=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ls();var s=l.useMemo(function(){return ss(o)},[o]);return l.createElement(as,{styles:is(s,!t,o,n?"":"!important")})},et=!1;if(typeof window<"u")try{var ke=Object.defineProperty({},"passive",{get:function(){return et=!0,!0}});window.addEventListener("test",ke,ke),window.removeEventListener("test",ke,ke)}catch{et=!1}var oe=et?{passive:!1}:!1,ds=function(e){return e.tagName==="TEXTAREA"},vn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ds(e)&&n[t]==="visible")},us=function(e){return vn(e,"overflowY")},fs=function(e){return vn(e,"overflowX")},Dt=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=bn(e,r);if(o){var s=yn(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ps=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ms=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},bn=function(e,t){return e==="v"?us(t):fs(t)},yn=function(e,t){return e==="v"?ps(t):ms(t)},gs=function(e,t){return e==="h"&&t==="rtl"?-1:1},hs=function(e,t,n,r,o){var s=gs(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,d=t.contains(a),u=!1,p=i>0,m=0,v=0;do{if(!a)break;var y=yn(e,a),S=y[0],f=y[1],x=y[2],E=f-x-s*S;(S||E)&&bn(e,a)&&(m+=E,v+=S);var _=a.parentNode;a=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!d&&a!==document.body||d&&(t.contains(a)||t===a));return(p&&Math.abs(m)<1||!p&&Math.abs(v)<1)&&(u=!0),u},Ce=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jt=function(e){return[e.deltaX,e.deltaY]},Lt=function(e){return e&&"current"in e?e.current:e},vs=function(e,t){return e[0]===t[0]&&e[1]===t[1]},bs=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},ys=0,se=[];function xs(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(ys++)[0],s=l.useState(hn)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=Uo([e.lockRef.current],(e.shards||[]).map(Lt),!0).filter(Boolean);return f.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=l.useCallback(function(f,x){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!i.current.allowPinchZoom;var E=Ce(f),_=n.current,N="deltaX"in f?f.deltaX:_[0]-E[0],O="deltaY"in f?f.deltaY:_[1]-E[1],I,T=f.target,C=Math.abs(N)>Math.abs(O)?"h":"v";if("touches"in f&&C==="h"&&T.type==="range")return!1;var b=Dt(C,T);if(!b)return!0;if(b?I=C:(I=C==="v"?"h":"v",b=Dt(C,T)),!b)return!1;if(!r.current&&"changedTouches"in f&&(N||O)&&(r.current=I),!I)return!0;var P=r.current||I;return hs(P,x,f,P==="h"?N:O)},[]),d=l.useCallback(function(f){var x=f;if(!(!se.length||se[se.length-1]!==s)){var E="deltaY"in x?jt(x):Ce(x),_=t.current.filter(function(I){return I.name===x.type&&(I.target===x.target||x.target===I.shadowParent)&&vs(I.delta,E)})[0];if(_&&_.should){x.cancelable&&x.preventDefault();return}if(!_){var N=(i.current.shards||[]).map(Lt).filter(Boolean).filter(function(I){return I.contains(x.target)}),O=N.length>0?a(x,N[0]):!i.current.noIsolation;O&&x.cancelable&&x.preventDefault()}}},[]),u=l.useCallback(function(f,x,E,_){var N={name:f,delta:x,target:E,should:_,shadowParent:ws(E)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(O){return O!==N})},1)},[]),p=l.useCallback(function(f){n.current=Ce(f),r.current=void 0},[]),m=l.useCallback(function(f){u(f.type,jt(f),f.target,a(f,e.lockRef.current))},[]),v=l.useCallback(function(f){u(f.type,Ce(f),f.target,a(f,e.lockRef.current))},[]);l.useEffect(function(){return se.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,oe),document.addEventListener("touchmove",d,oe),document.addEventListener("touchstart",p,oe),function(){se=se.filter(function(f){return f!==s}),document.removeEventListener("wheel",d,oe),document.removeEventListener("touchmove",d,oe),document.removeEventListener("touchstart",p,oe)}},[]);var y=e.removeScrollBar,S=e.inert;return l.createElement(l.Fragment,null,S?l.createElement(s,{styles:bs(o)}):null,y?l.createElement(cs,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ws(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Es=qo(gn,xs);var xn=l.forwardRef(function(e,t){return l.createElement(Te,W({},e,{ref:t,sideCar:Es}))});xn.classNames=Te.classNames;var Ss=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ae=new WeakMap,Oe=new WeakMap,Ie={},Xe=0,wn=function(e){return e&&(e.host||wn(e.parentNode))},ks=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=wn(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Cs=function(e,t,n,r){var o=ks(t,Array.isArray(e)?e:[e]);Ie[n]||(Ie[n]=new WeakMap);var s=Ie[n],i=[],a=new Set,d=new Set(o),u=function(m){!m||a.has(m)||(a.add(m),u(m.parentNode))};o.forEach(u);var p=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(v){if(a.has(v))p(v);else try{var y=v.getAttribute(r),S=y!==null&&y!=="false",f=(ae.get(v)||0)+1,x=(s.get(v)||0)+1;ae.set(v,f),s.set(v,x),i.push(v),f===1&&S&&Oe.set(v,!0),x===1&&v.setAttribute(n,"true"),S||v.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",v,E)}})};return p(t),a.clear(),Xe++,function(){i.forEach(function(m){var v=ae.get(m)-1,y=s.get(m)-1;ae.set(m,v),s.set(m,y),v||(Oe.has(m)||m.removeAttribute(r),Oe.delete(m)),y||m.removeAttribute(n)}),Xe--,Xe||(ae=new WeakMap,ae=new WeakMap,Oe=new WeakMap,Ie={})}},Os=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Ss(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Cs(r,o,n,"aria-hidden")):function(){return null}},Me="Dialog",[En,da]=so(Me),[Is,U]=En(Me),Sn=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=l.useRef(null),d=l.useRef(null),[u,p]=uo({prop:r,defaultProp:o??!1,onChange:s,caller:Me});return c.jsx(Is,{scope:t,triggerRef:a,contentRef:d,contentId:Ue(),titleId:Ue(),descriptionId:Ue(),open:u,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(m=>!m),[p]),modal:i,children:n})};Sn.displayName=Me;var kn="DialogTrigger",_s=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=U(kn,n),s=Q(t,o.triggerRef);return c.jsx(K.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":it(o.open),...r,ref:s,onClick:Y(e.onClick,o.onOpenToggle)})});_s.displayName=kn;var st="DialogPortal",[Ns,Cn]=En(st,{forceMount:void 0}),On=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=U(st,t);return c.jsx(Ns,{scope:t,forceMount:n,children:l.Children.map(r,i=>c.jsx(Pe,{present:n||s.open,children:c.jsx(fn,{asChild:!0,container:o,children:i})}))})};On.displayName=st;var Ae="DialogOverlay",In=l.forwardRef((e,t)=>{const n=Cn(Ae,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=U(Ae,e.__scopeDialog);return s.modal?c.jsx(Pe,{present:r||s.open,children:c.jsx(As,{...o,ref:t})}):null});In.displayName=Ae;var Rs=sn("DialogOverlay.RemoveScroll"),As=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=U(Ae,n);return c.jsx(xn,{as:Rs,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(K.div,{"data-state":it(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),J="DialogContent",_n=l.forwardRef((e,t)=>{const n=Cn(J,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=U(J,e.__scopeDialog);return c.jsx(Pe,{present:r||s.open,children:s.modal?c.jsx(Ps,{...o,ref:t}):c.jsx(Ts,{...o,ref:t})})});_n.displayName=J;var Ps=l.forwardRef((e,t)=>{const n=U(J,e.__scopeDialog),r=l.useRef(null),o=Q(t,n.contentRef,r);return l.useEffect(()=>{const s=r.current;if(s)return Os(s)},[]),c.jsx(Nn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Y(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Y(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:Y(e.onFocusOutside,s=>s.preventDefault())})}),Ts=l.forwardRef((e,t)=>{const n=U(J,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return c.jsx(Nn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Nn=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=U(J,n),d=l.useRef(null),u=Q(t,d);return zo(),c.jsxs(c.Fragment,{children:[c.jsx(dn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsx(ln,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":it(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(Ds,{titleId:a.titleId}),c.jsx(Ls,{contentRef:d,descriptionId:a.descriptionId})]})]})}),at="DialogTitle",Rn=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=U(at,n);return c.jsx(K.h2,{id:o.titleId,...r,ref:t})});Rn.displayName=at;var An="DialogDescription",Ms=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=U(An,n);return c.jsx(K.p,{id:o.descriptionId,...r,ref:t})});Ms.displayName=An;var Pn="DialogClose",Tn=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=U(Pn,n);return c.jsx(K.button,{type:"button",...r,ref:t,onClick:Y(e.onClick,()=>o.onOpenChange(!1))})});Tn.displayName=Pn;function it(e){return e?"open":"closed"}var Mn="DialogTitleWarning",[ua,Dn]=oo(Mn,{contentName:J,titleName:at,docsSlug:"dialog"}),Ds=({titleId:e})=>{const t=Dn(Mn),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
+
|
|
43
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
+
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},js="DialogDescriptionWarning",Ls=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Dn(js).contentName}}.`;return l.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Fs=Sn,Bs=On,zs=In,Us=_n,Ws=Rn,Vs=Tn;const Gs="data:image/svg+xml,%3csvg%20fill='none'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m4%2012%208-8m-8%200%208%208'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'/%3e%3c/svg%3e",$s="data:image/svg+xml,%3csvg%20fill='none'%20height='16'%20viewBox='0%200%2016%2016'%20width='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m9.7002%2013-4.2929-4.29289c-.39052-.39053-.39052-1.02369%200-1.41422l4.2929-4.29289'%20stroke='%231e1c1f'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-opacity='.84'%20stroke-width='1.5'/%3e%3c/svg%3e",Ft="provider-widget-portal-root";function Ks(){let e=document.getElementById(Ft);return e||(e=document.createElement("div"),e.id=Ft,e.setAttribute("data-provider-widget-host",""),e.style.zIndex="2147483647",e.style.position="relative",document.body.appendChild(e)),e}const De=R.forwardRef((e,t)=>{const{"aria-labelledby":n,"aria-describedby":r,children:o,className:s,footerContent:i,headerContent:a,isDisplayingMargins:d=!0,open:u,onOpenChange:p,showCloseButton:m=!0,onBackClick:v}=e,[y,S]=R.useState(null);return R.useEffect(()=>{S(Ks())},[]),c.jsx(Fs,{open:u,onOpenChange:p,children:y&&c.jsxs(Bs,{container:y,children:[c.jsx(zs,{"aria-hidden":!0,className:V("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")}),c.jsx(Us,{ref:t,"aria-labelledby":n,"aria-describedby":r,"aria-modal":"true",className:V("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",d&&"h-dvh max-h-[calc(100dvh-8px)] max-w-[calc(100dvw-8px)] rounded-2xl bg-white p-4",s),children:c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsxs(Ws,{className:"flex flex-shrink-0 flex-row items-center justify-between",children:[c.jsxs("div",{className:"flex items-center",children:[v&&c.jsx($,{className:"mr-auto rounded-full !bg-lightGray !p-[10px]",onClick:v,children:c.jsx($s,{className:"size-4"})}),a]}),m&&c.jsx(Vs,{asChild:!0,children:c.jsx("button",{"aria-label":"Close modal",className:"hover:bg-gray-200 ml-auto rounded-full bg-lightGray p-[10px] outline-none",type:"button",children:c.jsx(Gs,{className:"size-4"})})})]}),c.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o}),i&&c.jsx("footer",{className:"flex flex-shrink-0 flex-col gap-2.5",children:i})]})})]})})});De.displayName="Dialog";const Hs=({open:e,onClose:t})=>{const n="is_android",r=R.useCallback(()=>{ue(n,"click","close"),t()},[t]),o=R.useCallback(s=>{s||r()},[r]);return c.jsx(De,{"aria-labelledby":n,className:"outline-hidden",isDisplayingMargins:!0,open:e,onOpenChange:o,children:c.jsxs("div",{className:"flex h-full flex-col items-center justify-between text-center",children:[c.jsxs("div",{className:"m-auto",children:[c.jsx("p",{className:"text-2xl font-bold",children:"Onside is for iPhone and iPad"}),c.jsx("p",{className:"mt-3 px-10 font-sans text-xs font-normal",children:"To install Onside, please use an iPhone or iPad."})]}),c.jsx($,{className:"mt-2 w-full",onClick:r,size:"lg",type:"button",variant:"secondary",children:"Close"})]})})},Xs=5e3,Ys=e=>{const[t,n]=R.useState(!1);return{handleCopy:R.useCallback(()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),Xs)},[e]),isCopied:t}},qs="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",Zs=({open:e,onClose:t})=>{const n=typeof window<"u"?window.location.href.replace(/\/$/,""):"",r=R.useMemo(()=>{const[m]=n.replace(/^https?:\/\//,"").split(/[?#]/);return m?.replace(/\/$/,"")??""},[n]),{handleCopy:o,isCopied:s}=Ys(n),i=ot(),a=i.browser==="opera"&&i.platform==="ios",d=R.useCallback(m=>{m||t()},[t]),u=R.useCallback(()=>{ue("go_to_safari","click","button"),window.location.href=`x-safari-${n}`},[n]),p=R.useCallback(()=>{ue("go_to_safari","click","link"),o()},[o]);return c.jsx(De,{"aria-labelledby":"go-to-safari-modal",isDisplayingMargins:!0,open:e,onOpenChange:d,showCloseButton:!1,onBackClick:t,children:c.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center",children:[c.jsx("h1",{className:"mt-8 text-center font-sans text-5xl font-medium",children:"Open in Safari"}),c.jsx("p",{className:"text-tertiary mt-5 w-11/12 text-center font-sans text-lg font-normal",children:"Copy the link and open it in Safari to continue."}),c.jsx("p",{className:"text-tertiary w-11/12 text-center font-sans text-lg font-normal",children:"Onside can only be installed from the Safari browser on your device."}),c.jsxs("div",{className:"mt-10 flex w-full flex-col items-center gap-5",children:[!a&&c.jsxs($,{className:"flex min-w-[206px] items-center justify-center gap-[6px] font-sans text-lg font-normal text-white!",onClick:u,size:"lg",children:["Open in Safari",c.jsx(qs,{})]}),c.jsx($,{className:"flex min-w-[206px] items-center justify-center gap-[6px] font-sans text-lg font-normal",onClick:p,size:"lg",variant:"text",children:s?"Link copied":r})]}),c.jsx("p",{className:tt("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",s?"translate-y-0 opacity-100":"-translate-y-2 opacity-0"),children:"Paste the link in Safari"})]})})},Js="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",Qs=({breadcrumbs:e,className:t})=>c.jsx("ul",{className:t,children:e.map((n,r)=>c.jsxs("li",{className:"inline-flex",children:[c.jsx("p",{className:"rounded-3xl bg-lightGray px-2 py-0.5 text-sm",children:n}),r<e.length-1&&c.jsx("img",{alt:"Arrow icon","aria-hidden":"true",className:"ml-1",height:16,src:Js,width:10})]},n))}),ea=e=>{const{ariaLabel:t,children:n,className:r,poster:o}=e,s=R.useRef(null);return R.useEffect(()=>{const i=()=>{s.current&&s.current.paused&&(s.current.muted=!0,s.current.play())},a=()=>{s.current&&(document.visibilityState==="hidden"?s.current.pause():document.visibilityState==="visible"&&i())},d=()=>{s.current&&s.current.pause()};return document.addEventListener("visibilitychange",a),window.addEventListener("focus",i),window.addEventListener("blur",d),()=>{document.removeEventListener("visibilitychange",a),window.removeEventListener("focus",i),window.removeEventListener("blur",d)}},[]),c.jsx("video",{"aria-label":t,autoPlay:!0,className:tt("mt-2 transform-gpu rounded-2xl object-contain object-top",r),controls:!1,disablePictureInPicture:!0,disableRemotePlayback:!0,draggable:!1,loop:!0,muted:!0,playsInline:!0,poster:o,ref:s,"webkit-playsinline":"true","x-webkit-airplay":"deny",children:n},t)},Bt={"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"},ta="https://cdn.onside.io/assets/onside-install-widget/";function na(e){return e.replace(/^\//,"")}function ra(e){const t=na(e),n=t.split("/").pop()??t,r=[t,`/${t}`,n,`/${n}`];for(const o of r)if(Bt[o])return Bt[o];return null}function jn(e){if(!e||/^https?:\/\//i.test(e)||e.endsWith(".svg"))return e;const t=ra(e);if(!t)return e;try{return new URL(t,ta).toString()}catch{return e}}const oa=["Settings","General","Software Update"],sa=jn("/video/update-ios-poster.png"),aa=jn("/video/update-ios.h264.mp4"),ia=({open:e,onClose:t})=>{R.useEffect(()=>{let o;return e&&(o=setTimeout(()=>{document.querySelector("video")?.play()},600)),()=>{clearTimeout(o)}},[e]);const n=R.useCallback(o=>{o||t()},[t]),r=R.useCallback(()=>{ue("update_ios","click","close"),t()},[t]);return c.jsx(De,{"aria-labelledby":"update-ios",open:e,onOpenChange:n,showCloseButton:!1,onBackClick:t,children:c.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[c.jsx("h2",{className:"mt-3 text-center font-sans text-3xl font-medium",id:"update-ios",children:"Update your iOS"}),c.jsxs("section",{className:"mt-2",children:[c.jsx("p",{className:"mt-3 text-center font-sans text-xs font-normal",children:"To install Onside, update your iPhone or iPad to the latest version of iOS."}),c.jsx(Qs,{breadcrumbs:oa,className:"mt-2 flex gap-1"})]}),c.jsx("div",{className:"relative mt-4 flex w-full grow justify-center overflow-hidden rounded-t-2xl bg-lightGray px-7 pt-7",children:c.jsx(ea,{ariaLabel:"Instruction demonstrating the update process",className:"shadow-14-50-98 rounded-t-[20px] border-8 border-b-0 border-white",poster:sa,children:c.jsx("source",{src:aa,type:"video/mp4"})})}),c.jsx($,{"aria-label":"Close",className:"mt-4 w-full",onClick:r,size:"lg",type:"button",children:"Close"})]})})},la=()=>{const{activeModal:e,closeModal:t}=nn();return c.jsxs(c.Fragment,{children:[c.jsx(Zs,{open:e==="goToSafari",onClose:t}),c.jsx(ia,{open:e==="updateIOS",onClose:t}),c.jsx(Hs,{open:e==="isAndroid",onClose:t})]})},ca=({children:e})=>c.jsxs(c.Fragment,{children:[e,c.jsx(la,{})]});exports.AVERAGE_CHECK_TIME=Ir;exports.AVERAGE_INSTALL_TIME=Or;exports.AVERAGE_LOADING_TIME=en;exports.InstallAppButton=ro;exports.InstallWidgetProvider=ca;
|