@monetize.software/sdk-extension 3.0.0-alpha.8 → 3.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{ar-nh4l4WDE.js → ar-CHae8g-2.js} +4 -3
- package/dist/chunks/ar-CHae8g-2.js.map +1 -0
- package/dist/chunks/ar-E1mc8SO_.js +2 -0
- package/dist/chunks/ar-E1mc8SO_.js.map +1 -0
- package/dist/chunks/{chrome-port-PhlW29BV.js → chrome-port-BzNV1ahF.js} +2 -2
- package/dist/chunks/{chrome-port-PhlW29BV.js.map → chrome-port-BzNV1ahF.js.map} +1 -1
- package/dist/chunks/{chrome-port-CxW3Pwc2.js → chrome-port-rVd4zwU3.js} +21 -21
- package/dist/chunks/{chrome-port-CxW3Pwc2.js.map → chrome-port-rVd4zwU3.js.map} +1 -1
- package/dist/chunks/cs-Dccq6LAT.js +2 -0
- package/dist/chunks/cs-Dccq6LAT.js.map +1 -0
- package/dist/chunks/{cs-2UYO2rWf.js → cs-eZTedzaK.js} +2 -1
- package/dist/chunks/cs-eZTedzaK.js.map +1 -0
- package/dist/chunks/da-C_4MbEh5.js +2 -0
- package/dist/chunks/da-C_4MbEh5.js.map +1 -0
- package/dist/chunks/{da-BD0O_HfV.js → da-Dca6j8fp.js} +2 -1
- package/dist/chunks/da-Dca6j8fp.js.map +1 -0
- package/dist/chunks/{de-BkCiXPsn.js → de-BCjn3PUI.js} +3 -1
- package/dist/chunks/de-BCjn3PUI.js.map +1 -0
- package/dist/chunks/de-DulxcJj-.js +2 -0
- package/dist/chunks/de-DulxcJj-.js.map +1 -0
- package/dist/chunks/{el-cIcxTp07.js → el-BpXtDTez.js} +2 -1
- package/dist/chunks/el-BpXtDTez.js.map +1 -0
- package/dist/chunks/el-CVG_1iKB.js +2 -0
- package/dist/chunks/el-CVG_1iKB.js.map +1 -0
- package/dist/chunks/{es-CJBC_jrV.js → es-B3P4nlMw.js} +3 -1
- package/dist/chunks/es-B3P4nlMw.js.map +1 -0
- package/dist/chunks/es-ri0uKzUW.js +2 -0
- package/dist/chunks/es-ri0uKzUW.js.map +1 -0
- package/dist/chunks/{fi-DyV7ynBf.js → fi-BbQ_Bs0Z.js} +2 -1
- package/dist/chunks/fi-BbQ_Bs0Z.js.map +1 -0
- package/dist/chunks/fi-CNZqWHjw.js +2 -0
- package/dist/chunks/fi-CNZqWHjw.js.map +1 -0
- package/dist/chunks/{fr-BLQ4AIu7.js → fr-BKDUXceO.js} +3 -1
- package/dist/chunks/fr-BKDUXceO.js.map +1 -0
- package/dist/chunks/fr-CfFOw4hD.js +2 -0
- package/dist/chunks/fr-CfFOw4hD.js.map +1 -0
- package/dist/chunks/{he-Bg-Bqi7r.js → he-BVCHlTtT.js} +2 -1
- package/dist/chunks/he-BVCHlTtT.js.map +1 -0
- package/dist/chunks/he-DN2JEtQb.js +2 -0
- package/dist/chunks/he-DN2JEtQb.js.map +1 -0
- package/dist/chunks/hi-DxfOerNP.js +2 -0
- package/dist/chunks/hi-DxfOerNP.js.map +1 -0
- package/dist/chunks/{hi-wQeE43oY.js → hi-H_Hshh-7.js} +4 -3
- package/dist/chunks/hi-H_Hshh-7.js.map +1 -0
- package/dist/chunks/hu-BTImywuV.js +2 -0
- package/dist/chunks/{hu-DXtscQ8_.js.map → hu-BTImywuV.js.map} +1 -1
- package/dist/chunks/{hu-D9qxzu0r.js → hu-ZWiNfzvN.js} +2 -1
- package/dist/chunks/{hu-D9qxzu0r.js.map → hu-ZWiNfzvN.js.map} +1 -1
- package/dist/chunks/{id-Rx_wYvqy.js → id-DeiRYsJ1.js} +2 -1
- package/dist/chunks/id-DeiRYsJ1.js.map +1 -0
- package/dist/chunks/id-YFuArJA6.js +2 -0
- package/dist/chunks/id-YFuArJA6.js.map +1 -0
- package/dist/chunks/{it-B1SRPZ3e.js → it-UH9OzFhg.js} +3 -1
- package/dist/chunks/it-UH9OzFhg.js.map +1 -0
- package/dist/chunks/it-mhkzXBM9.js +2 -0
- package/dist/chunks/it-mhkzXBM9.js.map +1 -0
- package/dist/chunks/{ja-CMC3Parn.js → ja-6l_z_G9k.js} +2 -2
- package/dist/chunks/ja-6l_z_G9k.js.map +1 -0
- package/dist/chunks/{ja-DiItm8te.js → ja-BYC8FRN8.js} +3 -1
- package/dist/chunks/ja-BYC8FRN8.js.map +1 -0
- package/dist/chunks/{ko-CdGFWAKX.js → ko-Bjs2ZRcF.js} +3 -1
- package/dist/chunks/ko-Bjs2ZRcF.js.map +1 -0
- package/dist/chunks/ko-YAl4XwHu.js +2 -0
- package/dist/chunks/ko-YAl4XwHu.js.map +1 -0
- package/dist/chunks/nl-C-9zHtfb.js +2 -0
- package/dist/chunks/nl-C-9zHtfb.js.map +1 -0
- package/dist/chunks/{nl-CmZ3vEvj.js → nl-Ch5HFWQO.js} +3 -1
- package/dist/chunks/nl-Ch5HFWQO.js.map +1 -0
- package/dist/chunks/{no-BuxByZpq.js → no-CljpinWz.js} +2 -1
- package/dist/chunks/no-CljpinWz.js.map +1 -0
- package/dist/chunks/no-qzPitLlx.js +2 -0
- package/dist/chunks/no-qzPitLlx.js.map +1 -0
- package/dist/chunks/{pl-jZFCnDb8.js → pl-CUcSS0zZ.js} +2 -1
- package/dist/chunks/pl-CUcSS0zZ.js.map +1 -0
- package/dist/chunks/pl-MAIYeuhW.js +2 -0
- package/dist/chunks/pl-MAIYeuhW.js.map +1 -0
- package/dist/chunks/{pt-Cld7MwIW.js → pt-BHK0LwkC.js} +3 -1
- package/dist/chunks/pt-BHK0LwkC.js.map +1 -0
- package/dist/chunks/pt-DqDabE4v.js +2 -0
- package/dist/chunks/pt-DqDabE4v.js.map +1 -0
- package/dist/chunks/ro-BVs-lHH-.js +2 -0
- package/dist/chunks/ro-BVs-lHH-.js.map +1 -0
- package/dist/chunks/{ro-CuKDqj3C.js → ro-Bj8cwU2n.js} +2 -1
- package/dist/chunks/ro-Bj8cwU2n.js.map +1 -0
- package/dist/chunks/{ru-B7cjqJUm.js → ru-CgqNy0Gb.js} +10 -1
- package/dist/chunks/ru-CgqNy0Gb.js.map +1 -0
- package/dist/chunks/ru-DP7qDAmE.js +2 -0
- package/dist/chunks/ru-DP7qDAmE.js.map +1 -0
- package/dist/chunks/sv-B3QEYGgd.js +2 -0
- package/dist/chunks/sv-B3QEYGgd.js.map +1 -0
- package/dist/chunks/{sv-D9y-M1Fo.js → sv-H7jroOQ5.js} +2 -1
- package/dist/chunks/sv-H7jroOQ5.js.map +1 -0
- package/dist/chunks/{th-D9umBjEy.js → th-Dqm-gpGe.js} +2 -1
- package/dist/chunks/th-Dqm-gpGe.js.map +1 -0
- package/dist/chunks/th-DzQau9aW.js +2 -0
- package/dist/chunks/th-DzQau9aW.js.map +1 -0
- package/dist/chunks/{tr-BddMywiw.js → tr-D3zPcNtT.js} +2 -1
- package/dist/chunks/tr-D3zPcNtT.js.map +1 -0
- package/dist/chunks/tr-cG1YuE1E.js +2 -0
- package/dist/chunks/tr-cG1YuE1E.js.map +1 -0
- package/dist/chunks/{uk-Dbd31hFt.js → uk-CoIIs3QI.js} +10 -1
- package/dist/chunks/uk-CoIIs3QI.js.map +1 -0
- package/dist/chunks/uk-Cvbo0IBW.js +2 -0
- package/dist/chunks/uk-Cvbo0IBW.js.map +1 -0
- package/dist/chunks/vi-BRtYSBUp.js +2 -0
- package/dist/chunks/{vi-CJefLP_g.js.map → vi-BRtYSBUp.js.map} +1 -1
- package/dist/chunks/{vi-Do3BMOdh.js → vi-C_fruIbh.js} +2 -1
- package/dist/chunks/{vi-Do3BMOdh.js.map → vi-C_fruIbh.js.map} +1 -1
- package/dist/chunks/zh-CwczPMPp.js +2 -0
- package/dist/chunks/zh-CwczPMPp.js.map +1 -0
- package/dist/chunks/{zh-gQSYLZI3.js → zh-LDkEV2D9.js} +3 -1
- package/dist/chunks/zh-LDkEV2D9.js.map +1 -0
- package/dist/content.cjs +3 -3
- package/dist/content.cjs.map +1 -1
- package/dist/content.js +777 -813
- package/dist/content.js.map +1 -1
- package/dist/offscreen.cjs +1 -1
- package/dist/offscreen.js +1 -1
- package/package.json +3 -3
- package/dist/chunks/ar-BUQInJ5a.js +0 -2
- package/dist/chunks/ar-BUQInJ5a.js.map +0 -1
- package/dist/chunks/ar-nh4l4WDE.js.map +0 -1
- package/dist/chunks/cs-2UYO2rWf.js.map +0 -1
- package/dist/chunks/cs-i5K4KTFV.js +0 -2
- package/dist/chunks/cs-i5K4KTFV.js.map +0 -1
- package/dist/chunks/da-BD0O_HfV.js.map +0 -1
- package/dist/chunks/da-CZbhtVJO.js +0 -2
- package/dist/chunks/da-CZbhtVJO.js.map +0 -1
- package/dist/chunks/de-Bc-GoLgC.js +0 -2
- package/dist/chunks/de-Bc-GoLgC.js.map +0 -1
- package/dist/chunks/de-BkCiXPsn.js.map +0 -1
- package/dist/chunks/el-CcMEbl_F.js +0 -2
- package/dist/chunks/el-CcMEbl_F.js.map +0 -1
- package/dist/chunks/el-cIcxTp07.js.map +0 -1
- package/dist/chunks/es-BvYmomAz.js +0 -2
- package/dist/chunks/es-BvYmomAz.js.map +0 -1
- package/dist/chunks/es-CJBC_jrV.js.map +0 -1
- package/dist/chunks/fi-DyV7ynBf.js.map +0 -1
- package/dist/chunks/fi-aZR-qmZN.js +0 -2
- package/dist/chunks/fi-aZR-qmZN.js.map +0 -1
- package/dist/chunks/fr-BLQ4AIu7.js.map +0 -1
- package/dist/chunks/fr-BgbFAgHx.js +0 -2
- package/dist/chunks/fr-BgbFAgHx.js.map +0 -1
- package/dist/chunks/he-Bg-Bqi7r.js.map +0 -1
- package/dist/chunks/he-CQ4yCuja.js +0 -2
- package/dist/chunks/he-CQ4yCuja.js.map +0 -1
- package/dist/chunks/hi-DtUsj1c-.js +0 -2
- package/dist/chunks/hi-DtUsj1c-.js.map +0 -1
- package/dist/chunks/hi-wQeE43oY.js.map +0 -1
- package/dist/chunks/hu-DXtscQ8_.js +0 -2
- package/dist/chunks/id-BByOYpeo.js +0 -2
- package/dist/chunks/id-BByOYpeo.js.map +0 -1
- package/dist/chunks/id-Rx_wYvqy.js.map +0 -1
- package/dist/chunks/it-52Ip42pa.js +0 -2
- package/dist/chunks/it-52Ip42pa.js.map +0 -1
- package/dist/chunks/it-B1SRPZ3e.js.map +0 -1
- package/dist/chunks/ja-CMC3Parn.js.map +0 -1
- package/dist/chunks/ja-DiItm8te.js.map +0 -1
- package/dist/chunks/ko-3qY21q40.js +0 -2
- package/dist/chunks/ko-3qY21q40.js.map +0 -1
- package/dist/chunks/ko-CdGFWAKX.js.map +0 -1
- package/dist/chunks/nl-Borc5nw1.js +0 -2
- package/dist/chunks/nl-Borc5nw1.js.map +0 -1
- package/dist/chunks/nl-CmZ3vEvj.js.map +0 -1
- package/dist/chunks/no-BuxByZpq.js.map +0 -1
- package/dist/chunks/no-Do2iGedg.js +0 -2
- package/dist/chunks/no-Do2iGedg.js.map +0 -1
- package/dist/chunks/pl-jZFCnDb8.js.map +0 -1
- package/dist/chunks/pl-mRaky_7k.js +0 -2
- package/dist/chunks/pl-mRaky_7k.js.map +0 -1
- package/dist/chunks/pt-Cld7MwIW.js.map +0 -1
- package/dist/chunks/pt-DilDTXfs.js +0 -2
- package/dist/chunks/pt-DilDTXfs.js.map +0 -1
- package/dist/chunks/ro-CuKDqj3C.js.map +0 -1
- package/dist/chunks/ro-DF2uzPIB.js +0 -2
- package/dist/chunks/ro-DF2uzPIB.js.map +0 -1
- package/dist/chunks/ru-B7cjqJUm.js.map +0 -1
- package/dist/chunks/ru-YeaXnTO-.js +0 -2
- package/dist/chunks/ru-YeaXnTO-.js.map +0 -1
- package/dist/chunks/sv-2pHEvuSe.js +0 -2
- package/dist/chunks/sv-2pHEvuSe.js.map +0 -1
- package/dist/chunks/sv-D9y-M1Fo.js.map +0 -1
- package/dist/chunks/th-D9umBjEy.js.map +0 -1
- package/dist/chunks/th-u2QSDF0G.js +0 -2
- package/dist/chunks/th-u2QSDF0G.js.map +0 -1
- package/dist/chunks/tr-BddMywiw.js.map +0 -1
- package/dist/chunks/tr-Bhgm6_ti.js +0 -2
- package/dist/chunks/tr-Bhgm6_ti.js.map +0 -1
- package/dist/chunks/uk-7vwqsaVK.js +0 -2
- package/dist/chunks/uk-7vwqsaVK.js.map +0 -1
- package/dist/chunks/uk-Dbd31hFt.js.map +0 -1
- package/dist/chunks/vi-CJefLP_g.js +0 -2
- package/dist/chunks/zh-D5C3BzYL.js +0 -2
- package/dist/chunks/zh-D5C3BzYL.js.map +0 -1
- package/dist/chunks/zh-gQSYLZI3.js.map +0 -1
package/dist/content.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { P as
|
|
2
|
-
import { render as X, h as
|
|
3
|
-
import { jsx as o, jsxs as
|
|
4
|
-
import { useState as x, useEffect as
|
|
5
|
-
import { P as
|
|
6
|
-
const Se = '@layer theme,base,components,utilities;@layer theme{@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-mauve-50: oklch(98.5% 0 0); --color-mauve-100: oklch(96% .003 325.6); --color-mauve-200: oklch(92.2% .005 325.62); --color-mauve-300: oklch(86.5% .012 325.68); --color-mauve-400: oklch(71.1% .019 323.02); --color-mauve-500: oklch(54.2% .034 322.5); --color-mauve-600: oklch(43.5% .029 321.78); --color-mauve-700: oklch(36.4% .029 323.89); --color-mauve-800: oklch(26.3% .024 320.12); --color-mauve-900: oklch(21.2% .019 322.12); --color-mauve-950: oklch(14.5% .008 326); --color-olive-50: oklch(98.8% .003 106.5); --color-olive-100: oklch(96.6% .005 106.5); --color-olive-200: oklch(93% .007 106.5); --color-olive-300: oklch(88% .011 106.6); --color-olive-400: oklch(73.7% .021 106.9); --color-olive-500: oklch(58% .031 107.3); --color-olive-600: oklch(46.6% .025 107.3); --color-olive-700: oklch(39.4% .023 107.4); --color-olive-800: oklch(28.6% .016 107.4); --color-olive-900: oklch(22.8% .013 107.4); --color-olive-950: oklch(15.3% .006 107.1); --color-mist-50: oklch(98.7% .002 197.1); --color-mist-100: oklch(96.3% .002 197.1); --color-mist-200: oklch(92.5% .005 214.3); --color-mist-300: oklch(87.2% .007 219.6); --color-mist-400: oklch(72.3% .014 214.4); --color-mist-500: oklch(56% .021 213.5); --color-mist-600: oklch(45% .017 213.2); --color-mist-700: oklch(37.8% .015 216); --color-mist-800: oklch(27.5% .011 216.9); --color-mist-900: oklch(21.8% .008 223.9); --color-mist-950: oklch(14.8% .004 228.8); --color-taupe-50: oklch(98.6% .002 67.8); --color-taupe-100: oklch(96% .002 17.2); --color-taupe-200: oklch(92.2% .005 34.3); --color-taupe-300: oklch(86.8% .007 39.5); --color-taupe-400: oklch(71.4% .014 41.2); --color-taupe-500: oklch(54.7% .021 43.1); --color-taupe-600: oklch(43.8% .017 39.3); --color-taupe-700: oklch(36.7% .016 35.7); --color-taupe-800: oklch(26.8% .011 36.5); --color-taupe-900: oklch(21.4% .009 43.1); --color-taupe-950: oklch(14.7% .004 49.3); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme( --font-sans--font-feature-settings, initial ); --default-font-variation-settings: --theme( --font-sans--font-variation-settings, initial ); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme( --font-mono--font-feature-settings, initial ); --default-mono-font-variation-settings: --theme( --font-mono--font-variation-settings, initial ); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:--theme(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:--theme(--default-font-feature-settings,normal);font-variation-settings:--theme(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:--theme(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:--theme(--default-mono-font-feature-settings,normal);font-variation-settings:--theme(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{@tailwind utilities;}@source "../**/*.{ts,tsx,js,jsx}";@layer base{:host{all:initial;color-scheme:light;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}*,*:before,*:after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box}button{font-family:inherit;cursor:pointer}button:disabled{cursor:not-allowed}[role=button],[role=radio]{cursor:pointer}}.pw-cta-shimmer:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.35) 50%,transparent);animation:pw-cta-shimmer 3s infinite;z-index:1}@keyframes pw-cta-shimmer{0%{left:-100%}to{left:100%}}';
|
|
7
|
-
let
|
|
8
|
-
function
|
|
9
|
-
if (
|
|
1
|
+
import { P as B, B as Ue, E as je, c as Re, A as le, w as ze, a as K, r as De, b as qe } from "./chunks/chrome-port-rVd4zwU3.js";
|
|
2
|
+
import { render as X, h as ce, createContext as Ne } from "preact";
|
|
3
|
+
import { jsx as o, jsxs as u, Fragment as oe } from "preact/jsx-runtime";
|
|
4
|
+
import { useState as x, useEffect as O, useContext as Fe, useRef as z, useMemo as Ve, useLayoutEffect as $e } from "preact/hooks";
|
|
5
|
+
import { P as He } from "./chunks/port-name-BPfQKtdb.js";
|
|
6
|
+
const ve = '@layer theme,base,components,utilities;@layer theme{@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-mauve-50: oklch(98.5% 0 0); --color-mauve-100: oklch(96% .003 325.6); --color-mauve-200: oklch(92.2% .005 325.62); --color-mauve-300: oklch(86.5% .012 325.68); --color-mauve-400: oklch(71.1% .019 323.02); --color-mauve-500: oklch(54.2% .034 322.5); --color-mauve-600: oklch(43.5% .029 321.78); --color-mauve-700: oklch(36.4% .029 323.89); --color-mauve-800: oklch(26.3% .024 320.12); --color-mauve-900: oklch(21.2% .019 322.12); --color-mauve-950: oklch(14.5% .008 326); --color-olive-50: oklch(98.8% .003 106.5); --color-olive-100: oklch(96.6% .005 106.5); --color-olive-200: oklch(93% .007 106.5); --color-olive-300: oklch(88% .011 106.6); --color-olive-400: oklch(73.7% .021 106.9); --color-olive-500: oklch(58% .031 107.3); --color-olive-600: oklch(46.6% .025 107.3); --color-olive-700: oklch(39.4% .023 107.4); --color-olive-800: oklch(28.6% .016 107.4); --color-olive-900: oklch(22.8% .013 107.4); --color-olive-950: oklch(15.3% .006 107.1); --color-mist-50: oklch(98.7% .002 197.1); --color-mist-100: oklch(96.3% .002 197.1); --color-mist-200: oklch(92.5% .005 214.3); --color-mist-300: oklch(87.2% .007 219.6); --color-mist-400: oklch(72.3% .014 214.4); --color-mist-500: oklch(56% .021 213.5); --color-mist-600: oklch(45% .017 213.2); --color-mist-700: oklch(37.8% .015 216); --color-mist-800: oklch(27.5% .011 216.9); --color-mist-900: oklch(21.8% .008 223.9); --color-mist-950: oklch(14.8% .004 228.8); --color-taupe-50: oklch(98.6% .002 67.8); --color-taupe-100: oklch(96% .002 17.2); --color-taupe-200: oklch(92.2% .005 34.3); --color-taupe-300: oklch(86.8% .007 39.5); --color-taupe-400: oklch(71.4% .014 41.2); --color-taupe-500: oklch(54.7% .021 43.1); --color-taupe-600: oklch(43.8% .017 39.3); --color-taupe-700: oklch(36.7% .016 35.7); --color-taupe-800: oklch(26.8% .011 36.5); --color-taupe-900: oklch(21.4% .009 43.1); --color-taupe-950: oklch(14.7% .004 49.3); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme( --font-sans--font-feature-settings, initial ); --default-font-variation-settings: --theme( --font-sans--font-variation-settings, initial ); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme( --font-mono--font-feature-settings, initial ); --default-mono-font-variation-settings: --theme( --font-mono--font-variation-settings, initial ); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:--theme(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:--theme(--default-font-feature-settings,normal);font-variation-settings:--theme(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:--theme(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:--theme(--default-mono-font-feature-settings,normal);font-variation-settings:--theme(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{@tailwind utilities;}@source "../**/*.{ts,tsx,js,jsx}";@layer base{:host{all:initial;color-scheme:light;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}*,*:before,*:after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box}button{font-family:inherit;cursor:pointer}button:disabled{cursor:not-allowed}[role=button],[role=radio]{cursor:pointer}}.pw-cta-shimmer:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.35) 50%,transparent);animation:pw-cta-shimmer 3s infinite;z-index:1}@keyframes pw-cta-shimmer{0%{left:-100%}to{left:100%}}';
|
|
7
|
+
let ue = !1;
|
|
8
|
+
function Ge() {
|
|
9
|
+
if (ue || (ue = !0, typeof CSS > "u" || typeof CSS.registerProperty != "function")) return;
|
|
10
10
|
let r;
|
|
11
11
|
try {
|
|
12
12
|
const e = new CSSStyleSheet();
|
|
13
|
-
e.replaceSync(
|
|
13
|
+
e.replaceSync(ve), r = e.cssRules;
|
|
14
14
|
} catch {
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
@@ -28,10 +28,10 @@ function We() {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function We(r, e, t = {}) {
|
|
32
32
|
if (typeof document > "u")
|
|
33
33
|
throw new Error("mountShadow called in non-DOM environment");
|
|
34
|
-
|
|
34
|
+
Ge();
|
|
35
35
|
const n = t.host ?? document.createElement("div");
|
|
36
36
|
n.setAttribute("data-paywall-host", ""), n.style.cssText = t.inline ? "all: initial; position: absolute; inset: 0; z-index: 1; pointer-events: none;" : "all: initial; position: fixed; inset: 0; z-index: 2147483647; pointer-events: none;", !n.isConnected && !t.inline && document.body.appendChild(n);
|
|
37
37
|
const i = n.attachShadow({ mode: t.shadowMode ?? "closed" }), s = `
|
|
@@ -53,21 +53,21 @@ function Ze(r, e, t = {}) {
|
|
|
53
53
|
visibility: visible !important;
|
|
54
54
|
}
|
|
55
55
|
`, a = document.createElement("style");
|
|
56
|
-
a.textContent = s +
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
let
|
|
60
|
-
return X(
|
|
56
|
+
a.textContent = s + ve + (t.injectCss ?? ""), i.appendChild(a);
|
|
57
|
+
const c = document.createElement("div");
|
|
58
|
+
c.style.pointerEvents = "auto", i.appendChild(c);
|
|
59
|
+
let l = e;
|
|
60
|
+
return X(ce(r, l), c), {
|
|
61
61
|
shadowRoot: i,
|
|
62
|
-
update(
|
|
63
|
-
|
|
62
|
+
update(f) {
|
|
63
|
+
l = { ...l, ...f }, X(ce(r, l), c);
|
|
64
64
|
},
|
|
65
65
|
unmount() {
|
|
66
|
-
X(null,
|
|
66
|
+
X(null, c), n.remove();
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
const
|
|
70
|
+
const Ze = (r, e, t) => {
|
|
71
71
|
const n = r[e];
|
|
72
72
|
return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((i, s) => {
|
|
73
73
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
@@ -79,7 +79,7 @@ const Ye = (r, e, t) => {
|
|
|
79
79
|
)
|
|
80
80
|
);
|
|
81
81
|
});
|
|
82
|
-
},
|
|
82
|
+
}, Ye = [
|
|
83
83
|
"ru",
|
|
84
84
|
"uk",
|
|
85
85
|
"de",
|
|
@@ -107,8 +107,8 @@ const Ye = (r, e, t) => {
|
|
|
107
107
|
"th",
|
|
108
108
|
"vi",
|
|
109
109
|
"he"
|
|
110
|
-
],
|
|
111
|
-
function
|
|
110
|
+
], _e = (r, e, t) => Ce(e, t), Se = Ne({ t: _e, locale: "en" });
|
|
111
|
+
function Ce(r, e) {
|
|
112
112
|
if (!e) return r;
|
|
113
113
|
let t = r;
|
|
114
114
|
for (const [n, i] of Object.entries(e))
|
|
@@ -116,10 +116,10 @@ function Le(r, e) {
|
|
|
116
116
|
return t;
|
|
117
117
|
}
|
|
118
118
|
const J = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map();
|
|
119
|
-
function
|
|
120
|
-
return
|
|
119
|
+
function Ie(r) {
|
|
120
|
+
return Ye.includes(r);
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function Ke(r) {
|
|
123
123
|
const e = [];
|
|
124
124
|
if (typeof navigator < "u" && navigator.language) {
|
|
125
125
|
e.push(navigator.language);
|
|
@@ -133,18 +133,18 @@ function Xe(r) {
|
|
|
133
133
|
n && n !== t && e.push(n);
|
|
134
134
|
}
|
|
135
135
|
for (const n of e)
|
|
136
|
-
if (
|
|
136
|
+
if (Ie(n)) return n;
|
|
137
137
|
return null;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
return !!r.locales &&
|
|
139
|
+
function Xe(r, e) {
|
|
140
|
+
return !!r.locales && r.locales[e] !== void 0;
|
|
141
141
|
}
|
|
142
|
-
async function
|
|
142
|
+
async function Je(r) {
|
|
143
143
|
const e = J.get(r);
|
|
144
144
|
if (e) return e;
|
|
145
145
|
const t = Q.get(r);
|
|
146
146
|
if (t) return t;
|
|
147
|
-
const n =
|
|
147
|
+
const n = Ze(/* @__PURE__ */ Object.assign({ "./locales/ar.ts": () => import("./chunks/ar-CHae8g-2.js"), "./locales/cs.ts": () => import("./chunks/cs-eZTedzaK.js"), "./locales/da.ts": () => import("./chunks/da-Dca6j8fp.js"), "./locales/de.ts": () => import("./chunks/de-BCjn3PUI.js"), "./locales/el.ts": () => import("./chunks/el-BpXtDTez.js"), "./locales/es.ts": () => import("./chunks/es-B3P4nlMw.js"), "./locales/fi.ts": () => import("./chunks/fi-BbQ_Bs0Z.js"), "./locales/fr.ts": () => import("./chunks/fr-BKDUXceO.js"), "./locales/he.ts": () => import("./chunks/he-BVCHlTtT.js"), "./locales/hi.ts": () => import("./chunks/hi-H_Hshh-7.js"), "./locales/hu.ts": () => import("./chunks/hu-ZWiNfzvN.js"), "./locales/id.ts": () => import("./chunks/id-DeiRYsJ1.js"), "./locales/it.ts": () => import("./chunks/it-UH9OzFhg.js"), "./locales/ja.ts": () => import("./chunks/ja-BYC8FRN8.js"), "./locales/ko.ts": () => import("./chunks/ko-Bjs2ZRcF.js"), "./locales/nl.ts": () => import("./chunks/nl-Ch5HFWQO.js"), "./locales/no.ts": () => import("./chunks/no-CljpinWz.js"), "./locales/pl.ts": () => import("./chunks/pl-CUcSS0zZ.js"), "./locales/pt.ts": () => import("./chunks/pt-BHK0LwkC.js"), "./locales/ro.ts": () => import("./chunks/ro-Bj8cwU2n.js"), "./locales/ru.ts": () => import("./chunks/ru-CgqNy0Gb.js"), "./locales/sv.ts": () => import("./chunks/sv-H7jroOQ5.js"), "./locales/th.ts": () => import("./chunks/th-Dqm-gpGe.js"), "./locales/tr.ts": () => import("./chunks/tr-D3zPcNtT.js"), "./locales/uk.ts": () => import("./chunks/uk-CoIIs3QI.js"), "./locales/vi.ts": () => import("./chunks/vi-C_fruIbh.js"), "./locales/zh.ts": () => import("./chunks/zh-LDkEV2D9.js") }), `./locales/${r}.ts`, 3).then((i) => {
|
|
148
148
|
const s = i.default ?? {};
|
|
149
149
|
return J.set(r, s), s;
|
|
150
150
|
}).catch((i) => {
|
|
@@ -156,33 +156,37 @@ async function Qe(r) {
|
|
|
156
156
|
});
|
|
157
157
|
return Q.set(r, n), n;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Qe({ bootstrap: r, forceLocale: e, children: t }) {
|
|
160
160
|
const [n, i] = x("en"), [s, a] = x(null);
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
|
|
161
|
+
O(() => {
|
|
162
|
+
const f = (e && Ie(e) ? e : null) ?? (() => {
|
|
163
|
+
if (!r) return null;
|
|
164
|
+
const d = Ke(r);
|
|
165
|
+
return !d || !Xe(r, d) ? null : d;
|
|
166
|
+
})();
|
|
167
|
+
if (!f) {
|
|
164
168
|
(s !== null || n !== "en") && (i("en"), a(null));
|
|
165
169
|
return;
|
|
166
170
|
}
|
|
167
|
-
if (
|
|
168
|
-
let
|
|
169
|
-
return
|
|
170
|
-
|
|
171
|
+
if (f === n && s) return;
|
|
172
|
+
let h = !1;
|
|
173
|
+
return Je(f).then((d) => {
|
|
174
|
+
h || (i(f), a(d));
|
|
171
175
|
}), () => {
|
|
172
|
-
|
|
176
|
+
h = !0;
|
|
173
177
|
};
|
|
174
178
|
}, [r, e]);
|
|
175
|
-
const
|
|
179
|
+
const c = {
|
|
176
180
|
locale: n,
|
|
177
|
-
t: s ? (
|
|
181
|
+
t: s ? (l, f, h) => Ce(s[l] ?? f, h) : _e
|
|
178
182
|
};
|
|
179
|
-
return /* @__PURE__ */ o(
|
|
183
|
+
return /* @__PURE__ */ o(Se.Provider, { value: c, children: t });
|
|
180
184
|
}
|
|
181
|
-
function
|
|
182
|
-
return
|
|
185
|
+
function k() {
|
|
186
|
+
return Fe(Se);
|
|
183
187
|
}
|
|
184
|
-
const
|
|
185
|
-
function
|
|
188
|
+
const de = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
189
|
+
function et({
|
|
186
190
|
open: r,
|
|
187
191
|
onClose: e,
|
|
188
192
|
labelledBy: t,
|
|
@@ -190,57 +194,57 @@ function tt({
|
|
|
190
194
|
topBanner: i,
|
|
191
195
|
allowClose: s = !0,
|
|
192
196
|
hideCloseButton: a = !1,
|
|
193
|
-
inline:
|
|
194
|
-
children:
|
|
197
|
+
inline: c = !1,
|
|
198
|
+
children: l
|
|
195
199
|
}) {
|
|
196
|
-
const { t:
|
|
197
|
-
return
|
|
200
|
+
const { t: f } = k(), h = z(null), d = z(null);
|
|
201
|
+
return O(() => {
|
|
198
202
|
if (!r) return;
|
|
199
|
-
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
const
|
|
203
|
-
if (
|
|
203
|
+
d.current = document.activeElement ?? null;
|
|
204
|
+
const p = h.current;
|
|
205
|
+
p && (p.querySelector(de) ?? p).focus({ preventScroll: !0 });
|
|
206
|
+
const y = (_) => {
|
|
207
|
+
if (_.key === "Escape") {
|
|
204
208
|
if (!s) return;
|
|
205
|
-
|
|
209
|
+
_.stopPropagation(), e();
|
|
206
210
|
return;
|
|
207
211
|
}
|
|
208
|
-
if (
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
).filter((
|
|
212
|
-
if (
|
|
213
|
-
|
|
212
|
+
if (_.key !== "Tab" || !h.current) return;
|
|
213
|
+
const S = Array.from(
|
|
214
|
+
h.current.querySelectorAll(de)
|
|
215
|
+
).filter((T) => !T.hasAttribute("disabled") && T.tabIndex !== -1);
|
|
216
|
+
if (S.length === 0) {
|
|
217
|
+
_.preventDefault();
|
|
214
218
|
return;
|
|
215
219
|
}
|
|
216
|
-
const
|
|
217
|
-
|
|
220
|
+
const P = S[0], M = S[S.length - 1], j = document.activeElement;
|
|
221
|
+
_.shiftKey && j === P ? (_.preventDefault(), M.focus()) : !_.shiftKey && j === M && (_.preventDefault(), P.focus());
|
|
218
222
|
};
|
|
219
|
-
document.addEventListener("keydown",
|
|
220
|
-
const
|
|
221
|
-
return
|
|
222
|
-
document.removeEventListener("keydown",
|
|
223
|
+
document.addEventListener("keydown", y, !0);
|
|
224
|
+
const U = document.body.style.overflow;
|
|
225
|
+
return c || (document.body.style.overflow = "hidden"), () => {
|
|
226
|
+
document.removeEventListener("keydown", y, !0), c || (document.body.style.overflow = U), d.current?.focus?.({ preventScroll: !0 });
|
|
223
227
|
};
|
|
224
|
-
}, [r, e, s,
|
|
228
|
+
}, [r, e, s, c]), r ? /* @__PURE__ */ u(
|
|
225
229
|
"div",
|
|
226
230
|
{
|
|
227
|
-
class: `${
|
|
228
|
-
onClick: (
|
|
229
|
-
s &&
|
|
231
|
+
class: `${c ? "absolute z-[1]" : "fixed z-[2147483647]"} inset-0 flex items-center justify-center bg-slate-950/50 p-2 sm:p-4 backdrop-blur-md animate-[pw-fade-in_180ms_ease-out]`,
|
|
232
|
+
onClick: (p) => {
|
|
233
|
+
s && p.target === p.currentTarget && e();
|
|
230
234
|
},
|
|
231
235
|
"data-pw-root": !0,
|
|
232
236
|
children: [
|
|
233
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ u(
|
|
234
238
|
"div",
|
|
235
239
|
{
|
|
236
240
|
class: "relative flex w-full max-w-[400px] flex-col animate-[pw-scale-in_220ms_cubic-bezier(0.16,1,0.3,1)]",
|
|
237
241
|
style: { "--pw-accent": n ?? "#3b82f6" },
|
|
238
242
|
children: [
|
|
239
243
|
i,
|
|
240
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ u(
|
|
241
245
|
"div",
|
|
242
246
|
{
|
|
243
|
-
ref:
|
|
247
|
+
ref: h,
|
|
244
248
|
role: "dialog",
|
|
245
249
|
"aria-modal": "true",
|
|
246
250
|
"aria-labelledby": t,
|
|
@@ -250,13 +254,13 @@ function tt({
|
|
|
250
254
|
boxShadow: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
|
|
251
255
|
},
|
|
252
256
|
children: [
|
|
253
|
-
|
|
257
|
+
l,
|
|
254
258
|
s && !a ? /* @__PURE__ */ o(
|
|
255
259
|
"button",
|
|
256
260
|
{
|
|
257
261
|
type: "button",
|
|
258
262
|
onClick: e,
|
|
259
|
-
"aria-label":
|
|
263
|
+
"aria-label": f("modal.close_aria", "Close"),
|
|
260
264
|
class: "absolute right-3 top-3 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white/80 text-gray-500 backdrop-blur-sm transition-colors hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
|
|
261
265
|
children: /* @__PURE__ */ o("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ o(
|
|
262
266
|
"path",
|
|
@@ -286,7 +290,7 @@ function tt({
|
|
|
286
290
|
}
|
|
287
291
|
) : null;
|
|
288
292
|
}
|
|
289
|
-
function
|
|
293
|
+
function tt(r, e) {
|
|
290
294
|
switch (r) {
|
|
291
295
|
case "google":
|
|
292
296
|
return e("auth.continue_with_google", "Continue with Google");
|
|
@@ -298,9 +302,9 @@ function rt(r, e) {
|
|
|
298
302
|
return e("auth.continue_with_facebook", "Continue with Facebook");
|
|
299
303
|
}
|
|
300
304
|
}
|
|
301
|
-
function
|
|
305
|
+
function he(r, e, t) {
|
|
302
306
|
const n = e === "signup" ? t("auth.signup_failed", "Sign-up failed") : t("auth.signin_failed", "Sign-in failed");
|
|
303
|
-
if (!(r instanceof
|
|
307
|
+
if (!(r instanceof B)) return n;
|
|
304
308
|
switch (r.code) {
|
|
305
309
|
case "invalid_credentials":
|
|
306
310
|
return t("auth.invalid_credentials", "Invalid email or password");
|
|
@@ -332,14 +336,14 @@ function fe(r, e, t) {
|
|
|
332
336
|
return n;
|
|
333
337
|
}
|
|
334
338
|
}
|
|
335
|
-
function
|
|
339
|
+
function Ae({ block: r, ctx: e }) {
|
|
336
340
|
const t = e.auth, n = e.authSession, i = r.allow_signup !== !1, s = r.allow_password_reset !== !1, a = r.hide_when_authenticated !== !1;
|
|
337
341
|
if (!t)
|
|
338
342
|
return typeof console < "u" && console.warn("[paywall] auth_panel rendered without AuthClient — pass `auth: true` to PaywallUI"), null;
|
|
339
|
-
const
|
|
340
|
-
return
|
|
343
|
+
const c = n && !n.user.is_anonymous ? n : null;
|
|
344
|
+
return c && a ? null : c ? /* @__PURE__ */ o(rt, { email: c.user.email ?? "", onSignOut: () => t.signOut().catch(() => {
|
|
341
345
|
}) }) : /* @__PURE__ */ o(
|
|
342
|
-
|
|
346
|
+
nt,
|
|
343
347
|
{
|
|
344
348
|
block: r,
|
|
345
349
|
allowSignup: i,
|
|
@@ -348,10 +352,10 @@ function Ee({ block: r, ctx: e }) {
|
|
|
348
352
|
}
|
|
349
353
|
);
|
|
350
354
|
}
|
|
351
|
-
function
|
|
352
|
-
const { t } =
|
|
353
|
-
return /* @__PURE__ */
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
+
function rt({ email: r, onSignOut: e }) {
|
|
356
|
+
const { t } = k();
|
|
357
|
+
return /* @__PURE__ */ u("div", { class: "flex items-center justify-between gap-3 rounded-2xl bg-gray-100 px-4 py-3", children: [
|
|
358
|
+
/* @__PURE__ */ u("div", { class: "flex flex-col", children: [
|
|
355
359
|
/* @__PURE__ */ o("span", { class: "text-[10px] font-semibold uppercase tracking-wider text-gray-500", children: t("auth.signed_in", "Signed in") }),
|
|
356
360
|
/* @__PURE__ */ o("span", { class: "text-sm font-medium text-gray-900", children: r })
|
|
357
361
|
] }),
|
|
@@ -366,182 +370,177 @@ function nt({ email: r, onSignOut: e }) {
|
|
|
366
370
|
)
|
|
367
371
|
] });
|
|
368
372
|
}
|
|
369
|
-
function
|
|
370
|
-
const { t: i } =
|
|
371
|
-
|
|
373
|
+
function nt({ block: r, allowSignup: e, allowReset: t, ctx: n }) {
|
|
374
|
+
const { t: i } = k(), s = n.auth, a = r.providers ?? [], c = n.initialAuthMode === "signup" && e ? "signup" : "signin", [l, f] = x(c), [h, d] = x(""), [b, w] = x(""), [v, p] = x(""), [y, U] = x(""), [_, S] = x(null), [P, M] = x(null), [j, T] = x(null), [D, q] = x(!1), [E, L] = x(null);
|
|
375
|
+
O(() => {
|
|
372
376
|
if (typeof s.getLastLogin != "function") return;
|
|
373
|
-
let
|
|
377
|
+
let I = !1;
|
|
374
378
|
return s.getLastLogin().then(
|
|
375
|
-
(
|
|
376
|
-
|
|
379
|
+
(A) => {
|
|
380
|
+
I || !A || (L(A), A.email && d((V) => V === "" ? A.email : V));
|
|
377
381
|
},
|
|
378
382
|
() => {
|
|
379
383
|
}
|
|
380
384
|
), () => {
|
|
381
|
-
|
|
385
|
+
I = !0;
|
|
382
386
|
};
|
|
383
387
|
}, [s]);
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
},
|
|
387
|
-
if (
|
|
388
|
-
if (
|
|
389
|
-
if (!
|
|
388
|
+
const R = (I) => {
|
|
389
|
+
f(I), M(null), T(null), q(!1);
|
|
390
|
+
}, N = async (I) => {
|
|
391
|
+
if (I.preventDefault(), !_) {
|
|
392
|
+
if (M(null), T(null), l === "signup" && !D) {
|
|
393
|
+
if (!h.trim()) return;
|
|
390
394
|
q(!0);
|
|
391
395
|
return;
|
|
392
396
|
}
|
|
393
|
-
if (l === "signup" &&
|
|
394
|
-
|
|
397
|
+
if (l === "signup" && b !== v) {
|
|
398
|
+
M(i("auth.passwords_mismatch", "Passwords don't match"));
|
|
395
399
|
return;
|
|
396
400
|
}
|
|
397
|
-
|
|
401
|
+
S("email");
|
|
398
402
|
try {
|
|
399
|
-
l === "signin" ? await s.signInWithEmail({ email:
|
|
403
|
+
l === "signin" ? await s.signInWithEmail({ email: h, password: b }) : l === "signup" ? (await s.signUp({ email: h, password: b })).kind === "confirmation_required" && (w(""), f("signup_verify"), T(i("auth.check_email_message", "Check your email for a confirmation code."))) : l === "forgot" ? (await s.requestPasswordReset({ email: h }), f("reset_sent"), T(
|
|
400
404
|
i("auth.reset_sent_message", "If that email exists, a reset code has been sent.")
|
|
401
|
-
)) : l === "reset_verify" && (await s.verifyOtp({
|
|
402
|
-
email:
|
|
403
|
-
token:
|
|
404
|
-
type:
|
|
405
|
-
}),
|
|
406
|
-
} catch (
|
|
407
|
-
|
|
405
|
+
)) : l === "signup_verify" ? await s.verifyOtp({ email: h, token: y, type: "email" }) : l === "reset_verify" && (await s.verifyOtp({
|
|
406
|
+
email: h,
|
|
407
|
+
token: y,
|
|
408
|
+
type: b ? "recovery" : "email"
|
|
409
|
+
}), b && await s.updatePassword({ password: b }));
|
|
410
|
+
} catch (A) {
|
|
411
|
+
M(he(A, l === "signup" ? "signup" : l === "signup_verify" || l === "reset_verify" ? "otp" : l === "forgot" ? "reset" : "signin", i));
|
|
408
412
|
} finally {
|
|
409
|
-
|
|
413
|
+
S(null);
|
|
410
414
|
}
|
|
411
415
|
}
|
|
412
|
-
},
|
|
413
|
-
if (!
|
|
414
|
-
|
|
416
|
+
}, Y = async (I) => {
|
|
417
|
+
if (!_) {
|
|
418
|
+
S(I), M(null), T(null);
|
|
415
419
|
try {
|
|
416
420
|
await s.signInWithOAuth({
|
|
417
|
-
provider:
|
|
418
|
-
onPopupOpened: () =>
|
|
421
|
+
provider: I,
|
|
422
|
+
onPopupOpened: () => S(null)
|
|
419
423
|
});
|
|
420
|
-
} catch (
|
|
421
|
-
if (
|
|
424
|
+
} catch (A) {
|
|
425
|
+
if (A instanceof B && (A.code === "oauth_cancelled" || A.code === "oauth_timeout"))
|
|
422
426
|
return;
|
|
423
|
-
|
|
427
|
+
M(he(A, "signin", i));
|
|
424
428
|
} finally {
|
|
425
|
-
|
|
429
|
+
S(null);
|
|
426
430
|
}
|
|
427
431
|
}
|
|
428
|
-
}, m = a.length > 0 && (l === "signin" || l === "signup"),
|
|
429
|
-
return /* @__PURE__ */
|
|
430
|
-
/* @__PURE__ */ o(
|
|
431
|
-
m ? /* @__PURE__ */
|
|
432
|
-
a.map((
|
|
433
|
-
/* @__PURE__ */
|
|
432
|
+
}, m = a.length > 0 && (l === "signin" || l === "signup"), g = l === "signin" || l === "signup" || l === "forgot", C = l === "signin" || l === "signup" && D;
|
|
433
|
+
return /* @__PURE__ */ u("div", { class: "flex flex-col gap-5", children: [
|
|
434
|
+
/* @__PURE__ */ o(it, { mode: l, customHeading: r.heading, customSubheading: r.subheading }),
|
|
435
|
+
m ? /* @__PURE__ */ u("div", { class: "flex flex-col gap-2.5", children: [
|
|
436
|
+
a.map((I) => /* @__PURE__ */ u("div", { class: "relative", children: [
|
|
437
|
+
/* @__PURE__ */ u(
|
|
434
438
|
"button",
|
|
435
439
|
{
|
|
436
440
|
type: "button",
|
|
437
|
-
onClick: () =>
|
|
438
|
-
disabled:
|
|
441
|
+
onClick: () => Y(I),
|
|
442
|
+
disabled: _ !== null,
|
|
439
443
|
class: "flex h-12 w-full items-center justify-center gap-2.5 rounded-full border-1 border-gray-200 bg-white px-5 text-base font-medium text-gray-900 transition-all hover:border-gray-300 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
|
|
440
444
|
children: [
|
|
441
|
-
|
|
442
|
-
/* @__PURE__ */ o("span", { children:
|
|
445
|
+
_ === I ? /* @__PURE__ */ o("span", { class: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-gray-700" }) : /* @__PURE__ */ o(ft, { provider: I }),
|
|
446
|
+
/* @__PURE__ */ o("span", { children: tt(I, i) })
|
|
443
447
|
]
|
|
444
448
|
}
|
|
445
449
|
),
|
|
446
|
-
|
|
447
|
-
] },
|
|
450
|
+
E?.method === I ? /* @__PURE__ */ o(dt, { email: E.email }) : null
|
|
451
|
+
] }, I)),
|
|
448
452
|
/* @__PURE__ */ o(pt, {})
|
|
449
453
|
] }) : null,
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
-
|
|
452
|
-
|
|
454
|
+
/* @__PURE__ */ u("form", { onSubmit: N, class: "flex flex-col gap-3", children: [
|
|
455
|
+
g && /* @__PURE__ */ o(
|
|
456
|
+
pe,
|
|
453
457
|
{
|
|
454
458
|
type: "email",
|
|
455
459
|
placeholder: i("auth.email", "Email address"),
|
|
456
|
-
value:
|
|
457
|
-
onInput:
|
|
460
|
+
value: h,
|
|
461
|
+
onInput: d,
|
|
458
462
|
autocomplete: "email",
|
|
459
463
|
required: !0
|
|
460
464
|
}
|
|
461
465
|
),
|
|
462
|
-
|
|
466
|
+
C && /* @__PURE__ */ o(
|
|
463
467
|
ee,
|
|
464
468
|
{
|
|
465
469
|
placeholder: i("auth.password", "Password"),
|
|
466
|
-
value:
|
|
467
|
-
onInput:
|
|
470
|
+
value: b,
|
|
471
|
+
onInput: w,
|
|
468
472
|
autocomplete: l === "signin" ? "current-password" : "new-password",
|
|
469
473
|
required: !0
|
|
470
474
|
}
|
|
471
475
|
),
|
|
472
|
-
l === "signup" &&
|
|
476
|
+
l === "signup" && D && /* @__PURE__ */ o(
|
|
473
477
|
ee,
|
|
474
478
|
{
|
|
475
479
|
placeholder: i("auth.repeat_password", "Repeat password"),
|
|
476
|
-
value:
|
|
477
|
-
onInput:
|
|
480
|
+
value: v,
|
|
481
|
+
onInput: p,
|
|
478
482
|
autocomplete: "new-password",
|
|
479
483
|
required: !0
|
|
480
484
|
}
|
|
481
485
|
),
|
|
482
|
-
l === "reset_verify" && /* @__PURE__ */
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
l
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
label: at(l, R, r.submit_label ?? r.heading, i)
|
|
518
|
-
}
|
|
519
|
-
),
|
|
520
|
-
l === "signin" && D?.method === "email" ? /* @__PURE__ */ o(me, { email: D.email }) : null
|
|
521
|
-
] })
|
|
486
|
+
(l === "signup_verify" || l === "reset_verify") && /* @__PURE__ */ o(
|
|
487
|
+
pe,
|
|
488
|
+
{
|
|
489
|
+
type: "text",
|
|
490
|
+
placeholder: i("auth.confirmation_code", "Confirmation code"),
|
|
491
|
+
value: y,
|
|
492
|
+
onInput: U,
|
|
493
|
+
autocomplete: "one-time-code",
|
|
494
|
+
inputMode: "numeric",
|
|
495
|
+
required: !0
|
|
496
|
+
}
|
|
497
|
+
),
|
|
498
|
+
l === "reset_verify" && /* @__PURE__ */ o(
|
|
499
|
+
ee,
|
|
500
|
+
{
|
|
501
|
+
placeholder: i(
|
|
502
|
+
"auth.new_password_optional",
|
|
503
|
+
"New password (optional — only for password reset)"
|
|
504
|
+
),
|
|
505
|
+
value: b,
|
|
506
|
+
onInput: w,
|
|
507
|
+
autocomplete: "new-password"
|
|
508
|
+
}
|
|
509
|
+
),
|
|
510
|
+
l === "reset_sent" && j && /* @__PURE__ */ o("p", { class: "rounded-2xl bg-gray-100 px-4 py-3 text-sm text-gray-600", children: j }),
|
|
511
|
+
l === "signin" && t && /* @__PURE__ */ o("div", { class: "flex justify-end text-sm", children: /* @__PURE__ */ o(Z, { onClick: () => R("forgot"), children: i("auth.forgot_password", "Forgot password?") }) }),
|
|
512
|
+
P && /* @__PURE__ */ o("p", { class: "text-sm text-red-600", children: P }),
|
|
513
|
+
j && l !== "reset_sent" && /* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: j }),
|
|
514
|
+
l !== "reset_sent" && /* @__PURE__ */ o(
|
|
515
|
+
lt,
|
|
516
|
+
{
|
|
517
|
+
busy: _ === "email",
|
|
518
|
+
label: st(l, D, r.submit_label ?? r.heading, i)
|
|
519
|
+
}
|
|
520
|
+
)
|
|
522
521
|
] }),
|
|
523
522
|
/* @__PURE__ */ o(
|
|
524
|
-
|
|
523
|
+
at,
|
|
525
524
|
{
|
|
526
525
|
mode: l,
|
|
527
526
|
allowSignup: e,
|
|
528
|
-
onSwitch:
|
|
527
|
+
onSwitch: R
|
|
529
528
|
}
|
|
530
529
|
)
|
|
531
530
|
] });
|
|
532
531
|
}
|
|
533
|
-
function
|
|
532
|
+
function it({
|
|
534
533
|
mode: r,
|
|
535
534
|
customHeading: e,
|
|
536
535
|
customSubheading: t
|
|
537
536
|
}) {
|
|
538
|
-
const { t: n } =
|
|
539
|
-
return /* @__PURE__ */
|
|
537
|
+
const { t: n } = k(), i = ot(r, n), s = r === "signin" || r === "signup", a = s && e ? e : i.title, c = s && t !== void 0 ? t || null : i.subtitle;
|
|
538
|
+
return /* @__PURE__ */ u("div", { class: "flex flex-col gap-2", children: [
|
|
540
539
|
/* @__PURE__ */ o("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: a }),
|
|
541
|
-
|
|
540
|
+
c ? /* @__PURE__ */ o("p", { class: "text-base leading-relaxed text-gray-600", children: c }) : null
|
|
542
541
|
] });
|
|
543
542
|
}
|
|
544
|
-
function
|
|
543
|
+
function ot(r, e) {
|
|
545
544
|
switch (r) {
|
|
546
545
|
case "signin":
|
|
547
546
|
return {
|
|
@@ -574,9 +573,17 @@ function st(r, e) {
|
|
|
574
573
|
"Enter the code from your email and a new password."
|
|
575
574
|
)
|
|
576
575
|
};
|
|
576
|
+
case "signup_verify":
|
|
577
|
+
return {
|
|
578
|
+
title: e("auth.confirm_email_title", "Confirm your email"),
|
|
579
|
+
subtitle: e(
|
|
580
|
+
"auth.confirm_email_subtitle",
|
|
581
|
+
"Enter the code we sent to your email to finish creating your account."
|
|
582
|
+
)
|
|
583
|
+
};
|
|
577
584
|
}
|
|
578
585
|
}
|
|
579
|
-
function
|
|
586
|
+
function st(r, e, t, n) {
|
|
580
587
|
if (r === "signin" && t) return t;
|
|
581
588
|
switch (r) {
|
|
582
589
|
case "signin":
|
|
@@ -585,27 +592,28 @@ function at(r, e, t, n) {
|
|
|
585
592
|
return e ? n("auth.create_account", "Create Account") : n("auth.sign_up", "Sign Up");
|
|
586
593
|
case "forgot":
|
|
587
594
|
return n("auth.send_reset", "Send Reset Email");
|
|
595
|
+
case "signup_verify":
|
|
588
596
|
case "reset_verify":
|
|
589
597
|
return n("auth.verify", "Verify");
|
|
590
598
|
default:
|
|
591
599
|
return n("cta.continue", "Continue");
|
|
592
600
|
}
|
|
593
601
|
}
|
|
594
|
-
function
|
|
602
|
+
function at({
|
|
595
603
|
mode: r,
|
|
596
604
|
allowSignup: e,
|
|
597
605
|
onSwitch: t
|
|
598
606
|
}) {
|
|
599
|
-
const { t: n } =
|
|
600
|
-
return r === "signin" && e ? /* @__PURE__ */
|
|
607
|
+
const { t: n } = k();
|
|
608
|
+
return r === "signin" && e ? /* @__PURE__ */ u("p", { class: "text-center text-sm text-gray-600", children: [
|
|
601
609
|
n("auth.no_account", "Don't have an account?"),
|
|
602
610
|
" ",
|
|
603
611
|
/* @__PURE__ */ o(Z, { onClick: () => t("signup"), children: n("auth.sign_up_link", "Sign Up") })
|
|
604
|
-
] }) : r === "signup" ? /* @__PURE__ */
|
|
612
|
+
] }) : r === "signup" || r === "signup_verify" ? /* @__PURE__ */ u("p", { class: "text-center text-sm text-gray-600", children: [
|
|
605
613
|
n("auth.have_account", "Already have an account?"),
|
|
606
614
|
" ",
|
|
607
615
|
/* @__PURE__ */ o(Z, { onClick: () => t("signin"), children: n("auth.log_in_link", "Log In") })
|
|
608
|
-
] }) : r === "forgot" || r === "reset_sent" || r === "reset_verify" ? /* @__PURE__ */
|
|
616
|
+
] }) : r === "forgot" || r === "reset_sent" || r === "reset_verify" ? /* @__PURE__ */ u("p", { class: "text-center text-sm text-gray-600", children: [
|
|
609
617
|
n("auth.no_account", "Don't have an account?"),
|
|
610
618
|
" ",
|
|
611
619
|
/* @__PURE__ */ o(Z, { onClick: () => t("signup"), children: n("auth.sign_up_link", "Sign Up") })
|
|
@@ -626,7 +634,7 @@ function Z({
|
|
|
626
634
|
}
|
|
627
635
|
);
|
|
628
636
|
}
|
|
629
|
-
function
|
|
637
|
+
function lt({ busy: r, label: e }) {
|
|
630
638
|
return /* @__PURE__ */ o(
|
|
631
639
|
"button",
|
|
632
640
|
{
|
|
@@ -641,14 +649,14 @@ function ct({ busy: r, label: e }) {
|
|
|
641
649
|
}
|
|
642
650
|
);
|
|
643
651
|
}
|
|
644
|
-
function
|
|
652
|
+
function pe({ type: r, placeholder: e, value: t, onInput: n, autocomplete: i, inputMode: s, required: a }) {
|
|
645
653
|
return /* @__PURE__ */ o(
|
|
646
654
|
"input",
|
|
647
655
|
{
|
|
648
656
|
type: r,
|
|
649
657
|
value: t,
|
|
650
658
|
placeholder: e,
|
|
651
|
-
onInput: (
|
|
659
|
+
onInput: (c) => n(c.target.value),
|
|
652
660
|
autocomplete: i,
|
|
653
661
|
inputMode: s,
|
|
654
662
|
required: a,
|
|
@@ -657,21 +665,21 @@ function ge({ type: r, placeholder: e, value: t, onInput: n, autocomplete: i, in
|
|
|
657
665
|
);
|
|
658
666
|
}
|
|
659
667
|
function ee({ placeholder: r, value: e, onInput: t, autocomplete: n, required: i }) {
|
|
660
|
-
const { t: s } =
|
|
661
|
-
|
|
662
|
-
const
|
|
663
|
-
|
|
668
|
+
const { t: s } = k(), [a, c] = x(!1), l = z(null);
|
|
669
|
+
O(() => {
|
|
670
|
+
const d = l.current;
|
|
671
|
+
d && d.value !== e && (d.value = e);
|
|
664
672
|
}, [a, e]);
|
|
665
|
-
const
|
|
666
|
-
return /* @__PURE__ */
|
|
673
|
+
const f = s("auth.show_password", "Show password"), h = s("auth.hide_password", "Hide password");
|
|
674
|
+
return /* @__PURE__ */ u("div", { class: "relative", children: [
|
|
667
675
|
/* @__PURE__ */ o(
|
|
668
676
|
"input",
|
|
669
677
|
{
|
|
670
|
-
ref:
|
|
678
|
+
ref: l,
|
|
671
679
|
type: a ? "text" : "password",
|
|
672
680
|
value: e,
|
|
673
681
|
placeholder: r,
|
|
674
|
-
onInput: (
|
|
682
|
+
onInput: (d) => t(d.target.value),
|
|
675
683
|
autocomplete: n,
|
|
676
684
|
required: i,
|
|
677
685
|
class: "h-14 w-full rounded-2xl bg-gray-100 pl-5 pr-12 text-base text-gray-900 outline-none transition-all placeholder:text-gray-500 hover:bg-gray-200/60 focus:bg-gray-200/60 focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--pw-accent)_30%,transparent)]"
|
|
@@ -681,17 +689,17 @@ function ee({ placeholder: r, value: e, onInput: t, autocomplete: n, required: i
|
|
|
681
689
|
"button",
|
|
682
690
|
{
|
|
683
691
|
type: "button",
|
|
684
|
-
onClick: () =>
|
|
685
|
-
"aria-label": a ?
|
|
692
|
+
onClick: () => c((d) => !d),
|
|
693
|
+
"aria-label": a ? h : f,
|
|
686
694
|
tabIndex: -1,
|
|
687
695
|
class: "absolute right-4 top-1/2 -translate-y-1/2 flex h-6 w-6 items-center justify-center rounded text-gray-500 transition-colors hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
|
|
688
|
-
children: a ? /* @__PURE__ */ o(
|
|
696
|
+
children: a ? /* @__PURE__ */ o(ut, {}) : /* @__PURE__ */ o(ct, {})
|
|
689
697
|
}
|
|
690
698
|
)
|
|
691
699
|
] });
|
|
692
700
|
}
|
|
693
|
-
function
|
|
694
|
-
return /* @__PURE__ */
|
|
701
|
+
function ct() {
|
|
702
|
+
return /* @__PURE__ */ u("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
695
703
|
/* @__PURE__ */ o(
|
|
696
704
|
"path",
|
|
697
705
|
{
|
|
@@ -705,8 +713,8 @@ function ut() {
|
|
|
705
713
|
/* @__PURE__ */ o("circle", { cx: "10", cy: "10", r: "2.5", stroke: "currentColor", "stroke-width": "1.5" })
|
|
706
714
|
] });
|
|
707
715
|
}
|
|
708
|
-
function
|
|
709
|
-
return /* @__PURE__ */
|
|
716
|
+
function ut() {
|
|
717
|
+
return /* @__PURE__ */ u("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
710
718
|
/* @__PURE__ */ o(
|
|
711
719
|
"path",
|
|
712
720
|
{
|
|
@@ -729,8 +737,8 @@ function dt() {
|
|
|
729
737
|
)
|
|
730
738
|
] });
|
|
731
739
|
}
|
|
732
|
-
function
|
|
733
|
-
const { t: e } =
|
|
740
|
+
function dt({ email: r }) {
|
|
741
|
+
const { t: e } = k(), t = r ? e("auth.last_used", "Last · {email}", { email: ht(r) }) : e("auth.last_used_no_email", "Last");
|
|
734
742
|
return /* @__PURE__ */ o("span", { class: "pointer-events-none absolute -top-2 right-3 max-w-[75%] truncate rounded-full bg-gray-900 px-2 py-0.5 text-[10px] font-semibold tracking-wide text-white shadow-sm", children: t });
|
|
735
743
|
}
|
|
736
744
|
function ht(r) {
|
|
@@ -738,15 +746,15 @@ function ht(r) {
|
|
|
738
746
|
return t ? `${e.slice(0, 3)}*****@${t}` : r;
|
|
739
747
|
}
|
|
740
748
|
function pt() {
|
|
741
|
-
const { t: r } =
|
|
742
|
-
return /* @__PURE__ */
|
|
749
|
+
const { t: r } = k();
|
|
750
|
+
return /* @__PURE__ */ u("div", { class: "flex items-center gap-3 py-1 text-sm text-gray-400", children: [
|
|
743
751
|
/* @__PURE__ */ o("div", { class: "h-px flex-1 bg-gray-200" }),
|
|
744
752
|
/* @__PURE__ */ o("span", { children: r("auth.or", "or") }),
|
|
745
753
|
/* @__PURE__ */ o("div", { class: "h-px flex-1 bg-gray-200" })
|
|
746
754
|
] });
|
|
747
755
|
}
|
|
748
756
|
function ft({ provider: r }) {
|
|
749
|
-
return r === "google" ? /* @__PURE__ */
|
|
757
|
+
return r === "google" ? /* @__PURE__ */ u("svg", { width: "20", height: "20", viewBox: "0 0 18 18", "aria-hidden": "true", children: [
|
|
750
758
|
/* @__PURE__ */ o("path", { fill: "#4285F4", d: "M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.49h4.84a4.14 4.14 0 0 1-1.79 2.71v2.26h2.9c1.7-1.56 2.69-3.87 2.69-6.62Z" }),
|
|
751
759
|
/* @__PURE__ */ o("path", { fill: "#34A853", d: "M9 18c2.43 0 4.47-.8 5.96-2.18l-2.9-2.26c-.8.54-1.83.86-3.06.86-2.36 0-4.36-1.59-5.07-3.74H.92v2.33A9 9 0 0 0 9 18Z" }),
|
|
752
760
|
/* @__PURE__ */ o("path", { fill: "#FBBC05", d: "M3.93 10.68a5.4 5.4 0 0 1 0-3.36V4.99H.92a9 9 0 0 0 0 8.02l3-2.33Z" }),
|
|
@@ -765,9 +773,10 @@ function gt({
|
|
|
765
773
|
authSession: n,
|
|
766
774
|
onBack: i,
|
|
767
775
|
showBack: s = !0,
|
|
768
|
-
intent: a = "preauth"
|
|
776
|
+
intent: a = "preauth",
|
|
777
|
+
initialMode: c
|
|
769
778
|
}) {
|
|
770
|
-
const { t: l } =
|
|
779
|
+
const { t: l } = k(), f = {
|
|
771
780
|
bootstrap: e,
|
|
772
781
|
selectedPriceId: null,
|
|
773
782
|
setSelectedPriceId: () => {
|
|
@@ -775,8 +784,9 @@ function gt({
|
|
|
775
784
|
onAction: () => {
|
|
776
785
|
},
|
|
777
786
|
auth: t,
|
|
778
|
-
authSession: n
|
|
779
|
-
|
|
787
|
+
authSession: n,
|
|
788
|
+
initialAuthMode: c
|
|
789
|
+
}, h = a === "restore" ? {
|
|
780
790
|
...r,
|
|
781
791
|
heading: l("auth.restore_purchases_heading", "Restore Purchases"),
|
|
782
792
|
subheading: l(
|
|
@@ -796,9 +806,9 @@ function gt({
|
|
|
796
806
|
// переносятся на 2 строки. Явный короткий submit_label решает.
|
|
797
807
|
submit_label: l("auth.log_in", "Sign In")
|
|
798
808
|
} : r;
|
|
799
|
-
return /* @__PURE__ */
|
|
809
|
+
return /* @__PURE__ */ u("div", { class: "relative flex-1 min-h-0 overflow-y-auto p-6 sm:p-8", children: [
|
|
800
810
|
s ? /* @__PURE__ */ o(mt, { onClick: i, ariaLabel: l("nav.back_aria", "Back") }) : null,
|
|
801
|
-
/* @__PURE__ */ o(
|
|
811
|
+
/* @__PURE__ */ o(Ae, { block: h, ctx: f })
|
|
802
812
|
] });
|
|
803
813
|
}
|
|
804
814
|
function mt({ onClick: r, ariaLabel: e }) {
|
|
@@ -809,7 +819,7 @@ function mt({ onClick: r, ariaLabel: e }) {
|
|
|
809
819
|
onClick: r,
|
|
810
820
|
"aria-label": e,
|
|
811
821
|
class: "absolute right-4 top-4 z-10 flex h-8 w-8 items-center justify-center rounded-full text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
|
|
812
|
-
children: /* @__PURE__ */
|
|
822
|
+
children: /* @__PURE__ */ u("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
813
823
|
/* @__PURE__ */ o(
|
|
814
824
|
"path",
|
|
815
825
|
{
|
|
@@ -834,70 +844,7 @@ function mt({ onClick: r, ariaLabel: e }) {
|
|
|
834
844
|
}
|
|
835
845
|
);
|
|
836
846
|
}
|
|
837
|
-
|
|
838
|
-
auth: r,
|
|
839
|
-
onSuccess: e,
|
|
840
|
-
onBack: t,
|
|
841
|
-
heading: n,
|
|
842
|
-
description: i
|
|
843
|
-
}) {
|
|
844
|
-
const { t: s } = w(), a = n ?? s("anon.heading_default", "Continue as guest"), l = i ?? s("anon.description_default", "Setting up your guest session…"), [d, p] = x({ kind: "signing-in" }), u = z(!0);
|
|
845
|
-
T(() => () => {
|
|
846
|
-
u.current = !1;
|
|
847
|
-
}, []);
|
|
848
|
-
const h = () => {
|
|
849
|
-
p({ kind: "signing-in" }), (async () => {
|
|
850
|
-
try {
|
|
851
|
-
const b = await r.signInAnonymously();
|
|
852
|
-
if (!u.current) return;
|
|
853
|
-
e(b);
|
|
854
|
-
} catch (b) {
|
|
855
|
-
if (!u.current) return;
|
|
856
|
-
p({
|
|
857
|
-
kind: "error",
|
|
858
|
-
message: b instanceof Error ? b.message : "Anonymous sign-in failed"
|
|
859
|
-
});
|
|
860
|
-
}
|
|
861
|
-
})();
|
|
862
|
-
};
|
|
863
|
-
return T(() => {
|
|
864
|
-
h();
|
|
865
|
-
}, []), /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
|
|
866
|
-
t ? /* @__PURE__ */ o(
|
|
867
|
-
"button",
|
|
868
|
-
{
|
|
869
|
-
type: "button",
|
|
870
|
-
onClick: t,
|
|
871
|
-
class: "-ml-1 self-start rounded-md px-1.5 py-0.5 text-xs font-medium text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
|
|
872
|
-
children: s("nav.back", "← Back")
|
|
873
|
-
}
|
|
874
|
-
) : null,
|
|
875
|
-
/* @__PURE__ */ c("div", { class: "flex flex-col gap-1", children: [
|
|
876
|
-
/* @__PURE__ */ o("h2", { class: "text-xl font-semibold text-gray-900", children: a }),
|
|
877
|
-
/* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: l })
|
|
878
|
-
] }),
|
|
879
|
-
d.kind === "signing-in" ? /* @__PURE__ */ o("div", { class: "flex items-center justify-center py-6", children: /* @__PURE__ */ o(xt, {}) }) : null,
|
|
880
|
-
d.kind === "error" ? /* @__PURE__ */ c("div", { class: "flex flex-col gap-3", children: [
|
|
881
|
-
/* @__PURE__ */ o("div", { class: "rounded-lg bg-red-50 px-3 py-2 text-sm text-red-700", children: d.message }),
|
|
882
|
-
/* @__PURE__ */ o(
|
|
883
|
-
"button",
|
|
884
|
-
{
|
|
885
|
-
type: "button",
|
|
886
|
-
onClick: h,
|
|
887
|
-
class: "self-start rounded-md bg-[var(--pw-accent)] px-3 py-1.5 text-sm font-medium text-white hover:opacity-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)] focus-visible:ring-offset-2",
|
|
888
|
-
children: s("anon.try_again", "Try again")
|
|
889
|
-
}
|
|
890
|
-
)
|
|
891
|
-
] }) : null
|
|
892
|
-
] });
|
|
893
|
-
}
|
|
894
|
-
function xt() {
|
|
895
|
-
return /* @__PURE__ */ c("svg", { class: "h-5 w-5 animate-spin text-[var(--pw-accent)]", viewBox: "0 0 24 24", fill: "none", children: [
|
|
896
|
-
/* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", "stroke-width": "3", "stroke-opacity": "0.2" }),
|
|
897
|
-
/* @__PURE__ */ o("path", { d: "M22 12a10 10 0 0 0-10-10", stroke: "currentColor", "stroke-width": "3", "stroke-linecap": "round" })
|
|
898
|
-
] });
|
|
899
|
-
}
|
|
900
|
-
const Pe = (r) => `pw-offer-${r}-start`;
|
|
847
|
+
const Le = (r) => `pw-offer-${r}-start`;
|
|
901
848
|
function te(r) {
|
|
902
849
|
const e = r - Date.now();
|
|
903
850
|
return e <= 0 ? { days: 0, hours: 0, minutes: 0, seconds: 0, expired: !0 } : {
|
|
@@ -908,7 +855,7 @@ function te(r) {
|
|
|
908
855
|
expired: !1
|
|
909
856
|
};
|
|
910
857
|
}
|
|
911
|
-
function
|
|
858
|
+
function yt(r) {
|
|
912
859
|
if (r.expires_at) {
|
|
913
860
|
const e = Date.parse(r.expires_at);
|
|
914
861
|
return Number.isFinite(e) ? e : null;
|
|
@@ -916,7 +863,7 @@ function bt(r) {
|
|
|
916
863
|
if (r.duration_minutes && r.duration_minutes > 0) {
|
|
917
864
|
if (typeof window > "u") return null;
|
|
918
865
|
try {
|
|
919
|
-
const e =
|
|
866
|
+
const e = Le(r.id);
|
|
920
867
|
let t = window.localStorage.getItem(e);
|
|
921
868
|
return t || (t = (/* @__PURE__ */ new Date()).toISOString(), window.localStorage.setItem(e, t)), Date.parse(t) + r.duration_minutes * 6e4;
|
|
922
869
|
} catch {
|
|
@@ -925,7 +872,7 @@ function bt(r) {
|
|
|
925
872
|
}
|
|
926
873
|
return null;
|
|
927
874
|
}
|
|
928
|
-
function
|
|
875
|
+
function Me(r, e) {
|
|
929
876
|
if (!r || r.length === 0) return null;
|
|
930
877
|
if (e) {
|
|
931
878
|
const t = r.find((n) => n.id === e);
|
|
@@ -933,11 +880,11 @@ function Te(r, e) {
|
|
|
933
880
|
}
|
|
934
881
|
return r.find((t) => t.expires_at || t.duration_minutes) ?? null;
|
|
935
882
|
}
|
|
936
|
-
function
|
|
937
|
-
const e = r ?
|
|
883
|
+
function Ee(r) {
|
|
884
|
+
const e = r ? yt(r) : null, [t, n] = x(
|
|
938
885
|
() => e !== null ? te(e) : null
|
|
939
886
|
), i = z(e);
|
|
940
|
-
return i.current = e,
|
|
887
|
+
return i.current = e, O(() => {
|
|
941
888
|
if (e === null) {
|
|
942
889
|
n(null);
|
|
943
890
|
return;
|
|
@@ -947,18 +894,18 @@ function Me(r) {
|
|
|
947
894
|
const a = te(i.current ?? 0);
|
|
948
895
|
if (n(a), a.expired && (clearInterval(s), r?.duration_minutes && typeof window < "u"))
|
|
949
896
|
try {
|
|
950
|
-
window.localStorage.removeItem(
|
|
897
|
+
window.localStorage.removeItem(Le(r.id));
|
|
951
898
|
} catch {
|
|
952
899
|
}
|
|
953
900
|
}, 1e3);
|
|
954
901
|
return () => clearInterval(s);
|
|
955
902
|
}, [e, r?.duration_minutes, r?.id]), t;
|
|
956
903
|
}
|
|
957
|
-
function
|
|
958
|
-
const { t } =
|
|
904
|
+
function xt({ block: r, ctx: e }) {
|
|
905
|
+
const { t } = k(), n = Me(e.bootstrap.offers, r.offer_id), i = Ee(n);
|
|
959
906
|
if (!n || i === null || i.expired && !r.force) return null;
|
|
960
907
|
const s = r.title ?? n.label ?? t("offer.limited_time", "Limited-time offer"), a = n.discount_percent ? `${s} ${n.discount_percent}%` : s;
|
|
961
|
-
return /* @__PURE__ */
|
|
908
|
+
return /* @__PURE__ */ u(
|
|
962
909
|
"div",
|
|
963
910
|
{
|
|
964
911
|
class: "flex flex-wrap items-center justify-center gap-2 rounded-2xl px-4 py-3 text-[15px] font-semibold leading-tight text-white",
|
|
@@ -968,16 +915,16 @@ function wt({ block: r, ctx: e }) {
|
|
|
968
915
|
},
|
|
969
916
|
role: "status",
|
|
970
917
|
children: [
|
|
971
|
-
/* @__PURE__ */ o(
|
|
918
|
+
/* @__PURE__ */ o(Te, {}),
|
|
972
919
|
/* @__PURE__ */ o("span", { children: a }),
|
|
973
|
-
/* @__PURE__ */ o(
|
|
920
|
+
/* @__PURE__ */ o(Pe, { value: i, t })
|
|
974
921
|
]
|
|
975
922
|
}
|
|
976
923
|
);
|
|
977
924
|
}
|
|
978
|
-
function
|
|
979
|
-
return /* @__PURE__ */
|
|
980
|
-
r.days > 0 ? /* @__PURE__ */
|
|
925
|
+
function Pe({ value: r, t: e }) {
|
|
926
|
+
return /* @__PURE__ */ u("div", { class: "flex items-center gap-1 font-mono text-sm", children: [
|
|
927
|
+
r.days > 0 ? /* @__PURE__ */ u(oe, { children: [
|
|
981
928
|
/* @__PURE__ */ o($, { children: String(r.days) }),
|
|
982
929
|
/* @__PURE__ */ o("span", { class: "text-xs", children: e("countdown.d", "d") })
|
|
983
930
|
] }) : null,
|
|
@@ -992,11 +939,11 @@ function Be({ value: r, t: e }) {
|
|
|
992
939
|
function $({ children: r }) {
|
|
993
940
|
return /* @__PURE__ */ o("span", { class: "rounded bg-black/20 px-1.5 py-0.5 text-xs font-bold", children: r });
|
|
994
941
|
}
|
|
995
|
-
function
|
|
996
|
-
const { t: e } =
|
|
942
|
+
function bt({ offer: r }) {
|
|
943
|
+
const { t: e } = k(), t = Ee(r);
|
|
997
944
|
if (t === null || t.expired) return null;
|
|
998
945
|
const n = r.label ?? e("offer.limited_time", "Limited-time offer"), i = r.discount_percent ? `${n} ${r.discount_percent}%` : n;
|
|
999
|
-
return /* @__PURE__ */
|
|
946
|
+
return /* @__PURE__ */ u(
|
|
1000
947
|
"div",
|
|
1001
948
|
{
|
|
1002
949
|
class: "-mb-2 flex flex-wrap items-center justify-center gap-2 rounded-t-xl px-4 pb-5 pt-3 text-[15px] font-semibold leading-tight text-white",
|
|
@@ -1006,14 +953,14 @@ function kt({ offer: r }) {
|
|
|
1006
953
|
},
|
|
1007
954
|
role: "status",
|
|
1008
955
|
children: [
|
|
1009
|
-
/* @__PURE__ */ o(
|
|
956
|
+
/* @__PURE__ */ o(Te, {}),
|
|
1010
957
|
/* @__PURE__ */ o("span", { children: i }),
|
|
1011
|
-
/* @__PURE__ */ o(
|
|
958
|
+
/* @__PURE__ */ o(Pe, { value: t, t: e })
|
|
1012
959
|
]
|
|
1013
960
|
}
|
|
1014
961
|
);
|
|
1015
962
|
}
|
|
1016
|
-
function
|
|
963
|
+
function Te() {
|
|
1017
964
|
return /* @__PURE__ */ o(
|
|
1018
965
|
"svg",
|
|
1019
966
|
{
|
|
@@ -1032,43 +979,40 @@ function Oe() {
|
|
|
1032
979
|
}
|
|
1033
980
|
);
|
|
1034
981
|
}
|
|
1035
|
-
const
|
|
1036
|
-
function
|
|
1037
|
-
const { t: i } =
|
|
1038
|
-
const L = (a ??
|
|
1039
|
-
return
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
min: re,
|
|
1044
|
-
max: ne
|
|
1045
|
-
})), (m.length < 1 || m.length > ie) && (L.message = i("support.message_length", "{min}–{max} characters", {
|
|
982
|
+
const fe = 3, ge = 200, me = 5e3, re = 5, wt = 10 * 1024 * 1024, ye = ["image/jpeg", "image/png", "image/webp"], kt = /.+@.+\..+/;
|
|
983
|
+
function vt({ client: r, authSession: e, origin: t, onBack: n }) {
|
|
984
|
+
const { t: i } = k(), s = e?.user.email ?? "", a = s || null, [c, l] = x(s), [f, h] = x(""), [d, b] = x(""), [w, v] = x([]), [p, y] = x(!1), [U, _] = x(null), [S, P] = x({}), M = () => {
|
|
985
|
+
const E = {}, L = (a ?? c).trim(), R = f.trim(), N = d.trim();
|
|
986
|
+
return L ? kt.test(L.toLowerCase()) || (E.email = i("support.invalid_email", "Invalid email")) : E.email = i("support.required", "Required"), (R.length < fe || R.length > ge) && (E.subject = i("support.subject_length", "{min}–{max} characters", {
|
|
987
|
+
min: fe,
|
|
988
|
+
max: ge
|
|
989
|
+
})), (N.length < 1 || N.length > me) && (E.message = i("support.message_length", "{min}–{max} characters", {
|
|
1046
990
|
min: 1,
|
|
1047
|
-
max:
|
|
1048
|
-
})),
|
|
1049
|
-
},
|
|
1050
|
-
if (
|
|
1051
|
-
|
|
991
|
+
max: me
|
|
992
|
+
})), P(E), Object.keys(E).length === 0;
|
|
993
|
+
}, j = async (E) => {
|
|
994
|
+
if (E.preventDefault(), !p && M()) {
|
|
995
|
+
y(!0), P((L) => ({ ...L, submit: void 0 }));
|
|
1052
996
|
try {
|
|
1053
|
-
const
|
|
997
|
+
const L = (a ?? c).trim();
|
|
1054
998
|
await r.createSupportTicket({
|
|
1055
|
-
subject:
|
|
1056
|
-
content:
|
|
1057
|
-
email:
|
|
1058
|
-
files:
|
|
1059
|
-
}),
|
|
1060
|
-
} catch (
|
|
1061
|
-
const
|
|
1062
|
-
|
|
999
|
+
subject: f.trim(),
|
|
1000
|
+
content: d.trim(),
|
|
1001
|
+
email: L || void 0,
|
|
1002
|
+
files: w.length > 0 ? w : void 0
|
|
1003
|
+
}), _(L);
|
|
1004
|
+
} catch (L) {
|
|
1005
|
+
const R = L instanceof B && L.message || "Failed to send. Please try again.";
|
|
1006
|
+
P((N) => ({ ...N, submit: R }));
|
|
1063
1007
|
} finally {
|
|
1064
|
-
|
|
1008
|
+
y(!1);
|
|
1065
1009
|
}
|
|
1066
1010
|
}
|
|
1067
|
-
},
|
|
1068
|
-
|
|
1069
|
-
}, D = "flex flex-col gap-3 bg-white px-6 pb-6 pt-3 sm:px-8",
|
|
1070
|
-
return
|
|
1071
|
-
/* @__PURE__ */
|
|
1011
|
+
}, T = () => {
|
|
1012
|
+
h(""), b(""), v([]), P({}), _(null);
|
|
1013
|
+
}, D = "flex flex-col gap-3 bg-white px-6 pb-6 pt-3 sm:px-8", q = { boxShadow: "0 -4px 12px -4px rgba(15,23,42,0.06)" };
|
|
1014
|
+
return U ? /* @__PURE__ */ u("div", { class: "relative flex-1 min-h-0 flex flex-col", children: [
|
|
1015
|
+
/* @__PURE__ */ u("div", { class: "flex-1 min-h-0 overflow-y-auto flex flex-col items-center gap-4 px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8 text-center", children: [
|
|
1072
1016
|
/* @__PURE__ */ o(
|
|
1073
1017
|
"div",
|
|
1074
1018
|
{
|
|
@@ -1089,17 +1033,17 @@ function _t({ client: r, authSession: e, origin: t, onBack: n }) {
|
|
|
1089
1033
|
}
|
|
1090
1034
|
),
|
|
1091
1035
|
/* @__PURE__ */ o("div", { class: "text-lg font-semibold tracking-tight text-gray-900", children: i("support.success_heading", "Request submitted") }),
|
|
1092
|
-
/* @__PURE__ */
|
|
1036
|
+
/* @__PURE__ */ u("div", { class: "max-w-[320px] text-sm leading-relaxed text-gray-500", children: [
|
|
1093
1037
|
i(
|
|
1094
1038
|
"support.success_message_prefix",
|
|
1095
1039
|
"We've received your message and will respond to"
|
|
1096
1040
|
),
|
|
1097
1041
|
" ",
|
|
1098
|
-
/* @__PURE__ */ o("b", { class: "text-gray-700", children:
|
|
1042
|
+
/* @__PURE__ */ o("b", { class: "text-gray-700", children: U }),
|
|
1099
1043
|
"."
|
|
1100
1044
|
] })
|
|
1101
1045
|
] }),
|
|
1102
|
-
/* @__PURE__ */ o("div", { class: D, style:
|
|
1046
|
+
/* @__PURE__ */ o("div", { class: D, style: q, children: /* @__PURE__ */ u("div", { class: "flex items-center justify-center gap-3", children: [
|
|
1103
1047
|
/* @__PURE__ */ o(
|
|
1104
1048
|
"button",
|
|
1105
1049
|
{
|
|
@@ -1113,7 +1057,7 @@ function _t({ client: r, authSession: e, origin: t, onBack: n }) {
|
|
|
1113
1057
|
"button",
|
|
1114
1058
|
{
|
|
1115
1059
|
type: "button",
|
|
1116
|
-
onClick:
|
|
1060
|
+
onClick: T,
|
|
1117
1061
|
class: "flex h-10 items-center justify-center rounded-xl px-4 text-sm font-semibold text-white transition-all hover:-translate-y-px hover:brightness-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
|
|
1118
1062
|
style: {
|
|
1119
1063
|
background: "linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 92%, white), var(--pw-accent))",
|
|
@@ -1123,63 +1067,63 @@ function _t({ client: r, authSession: e, origin: t, onBack: n }) {
|
|
|
1123
1067
|
}
|
|
1124
1068
|
)
|
|
1125
1069
|
] }) })
|
|
1126
|
-
] }) : /* @__PURE__ */
|
|
1127
|
-
/* @__PURE__ */ o(
|
|
1128
|
-
/* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */
|
|
1129
|
-
/* @__PURE__ */
|
|
1070
|
+
] }) : /* @__PURE__ */ u("form", { onSubmit: j, class: "relative flex-1 min-h-0 flex flex-col", children: [
|
|
1071
|
+
/* @__PURE__ */ o(_t, { onClick: n, ariaLabel: i("nav.back_aria", "Back") }),
|
|
1072
|
+
/* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ u("div", { class: "flex flex-col gap-5", children: [
|
|
1073
|
+
/* @__PURE__ */ u("div", { class: "flex flex-col gap-2 pr-10", children: [
|
|
1130
1074
|
/* @__PURE__ */ o("h2", { class: "text-3xl font-bold tracking-tight text-gray-900", children: i("support.heading", "Support") }),
|
|
1131
1075
|
/* @__PURE__ */ o("p", { class: "text-base leading-relaxed text-gray-600", children: i("support.instruction", "Please fill out the form below to submit your support request.") })
|
|
1132
1076
|
] }),
|
|
1133
|
-
/* @__PURE__ */
|
|
1134
|
-
a ? /* @__PURE__ */
|
|
1077
|
+
/* @__PURE__ */ u("div", { class: "flex flex-col gap-3", children: [
|
|
1078
|
+
a ? /* @__PURE__ */ u("div", { class: "rounded-2xl bg-gray-100 px-5 py-3 text-sm text-gray-600", children: [
|
|
1135
1079
|
i("support.sending_as", "Sending as"),
|
|
1136
1080
|
" ",
|
|
1137
1081
|
/* @__PURE__ */ o("b", { class: "font-medium text-gray-900", children: a })
|
|
1138
1082
|
] }) : /* @__PURE__ */ o(
|
|
1139
|
-
|
|
1083
|
+
xe,
|
|
1140
1084
|
{
|
|
1141
1085
|
type: "email",
|
|
1142
1086
|
placeholder: i("support.email_placeholder", "Enter your email *"),
|
|
1143
|
-
value:
|
|
1144
|
-
onInput:
|
|
1145
|
-
error:
|
|
1087
|
+
value: c,
|
|
1088
|
+
onInput: l,
|
|
1089
|
+
error: S.email,
|
|
1146
1090
|
autocomplete: "email",
|
|
1147
1091
|
required: !0
|
|
1148
1092
|
}
|
|
1149
1093
|
),
|
|
1150
1094
|
/* @__PURE__ */ o(
|
|
1151
|
-
|
|
1095
|
+
xe,
|
|
1152
1096
|
{
|
|
1153
1097
|
type: "text",
|
|
1154
1098
|
placeholder: i("support.subject_placeholder", "Enter your subject *"),
|
|
1155
|
-
value:
|
|
1156
|
-
onInput:
|
|
1157
|
-
error:
|
|
1099
|
+
value: f,
|
|
1100
|
+
onInput: h,
|
|
1101
|
+
error: S.subject,
|
|
1158
1102
|
required: !0
|
|
1159
1103
|
}
|
|
1160
1104
|
),
|
|
1161
1105
|
/* @__PURE__ */ o(
|
|
1162
|
-
|
|
1106
|
+
St,
|
|
1163
1107
|
{
|
|
1164
1108
|
placeholder: i("support.message_placeholder", "Enter your message *"),
|
|
1165
|
-
value:
|
|
1109
|
+
value: d,
|
|
1166
1110
|
onInput: b,
|
|
1167
|
-
error:
|
|
1111
|
+
error: S.message,
|
|
1168
1112
|
required: !0
|
|
1169
1113
|
}
|
|
1170
1114
|
),
|
|
1171
|
-
/* @__PURE__ */ o(
|
|
1115
|
+
/* @__PURE__ */ o(Ct, { files: w, onChange: v, disabled: p })
|
|
1172
1116
|
] })
|
|
1173
1117
|
] }) }),
|
|
1174
|
-
/* @__PURE__ */
|
|
1175
|
-
|
|
1176
|
-
/* @__PURE__ */
|
|
1118
|
+
/* @__PURE__ */ u("div", { class: D, style: q, children: [
|
|
1119
|
+
S.submit && /* @__PURE__ */ o("p", { class: "text-sm text-red-600", children: S.submit }),
|
|
1120
|
+
/* @__PURE__ */ u("div", { class: "flex items-center justify-end gap-3", children: [
|
|
1177
1121
|
/* @__PURE__ */ o(
|
|
1178
1122
|
"button",
|
|
1179
1123
|
{
|
|
1180
1124
|
type: "button",
|
|
1181
1125
|
onClick: n,
|
|
1182
|
-
disabled:
|
|
1126
|
+
disabled: p,
|
|
1183
1127
|
class: "rounded-full px-4 py-2 text-base font-medium text-gray-700 transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
|
|
1184
1128
|
children: t === "standalone" ? i("support.close_button", "Close") : i("nav.back_aria", "Back")
|
|
1185
1129
|
}
|
|
@@ -1188,20 +1132,20 @@ function _t({ client: r, authSession: e, origin: t, onBack: n }) {
|
|
|
1188
1132
|
"button",
|
|
1189
1133
|
{
|
|
1190
1134
|
type: "submit",
|
|
1191
|
-
disabled:
|
|
1135
|
+
disabled: p,
|
|
1192
1136
|
class: "pw-cta-shimmer relative flex h-12 items-center justify-center overflow-hidden rounded-full px-8 text-base font-semibold text-white transition-transform duration-150 active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-60 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
|
|
1193
1137
|
style: {
|
|
1194
1138
|
background: "linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 55%, white) 0%, var(--pw-accent) 55%, color-mix(in srgb, var(--pw-accent) 90%, black) 100%)",
|
|
1195
1139
|
boxShadow: "0 0 20px 0 color-mix(in srgb, var(--pw-accent) 25%, transparent), inset 0 0 8px 0 color-mix(in srgb, white 25%, transparent)"
|
|
1196
1140
|
},
|
|
1197
|
-
children:
|
|
1141
|
+
children: p ? /* @__PURE__ */ o("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ o("span", { class: "relative z-10", children: i("support.send_button", "Send") })
|
|
1198
1142
|
}
|
|
1199
1143
|
)
|
|
1200
1144
|
] })
|
|
1201
1145
|
] })
|
|
1202
1146
|
] });
|
|
1203
1147
|
}
|
|
1204
|
-
function
|
|
1148
|
+
function _t({ onClick: r, ariaLabel: e }) {
|
|
1205
1149
|
return /* @__PURE__ */ o(
|
|
1206
1150
|
"button",
|
|
1207
1151
|
{
|
|
@@ -1209,7 +1153,7 @@ function St({ onClick: r, ariaLabel: e }) {
|
|
|
1209
1153
|
onClick: r,
|
|
1210
1154
|
"aria-label": e,
|
|
1211
1155
|
class: "absolute right-4 top-4 z-10 flex h-8 w-8 items-center justify-center rounded-full text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--pw-accent)]",
|
|
1212
|
-
children: /* @__PURE__ */
|
|
1156
|
+
children: /* @__PURE__ */ u("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1213
1157
|
/* @__PURE__ */ o(
|
|
1214
1158
|
"path",
|
|
1215
1159
|
{
|
|
@@ -1234,7 +1178,7 @@ function St({ onClick: r, ariaLabel: e }) {
|
|
|
1234
1178
|
}
|
|
1235
1179
|
);
|
|
1236
1180
|
}
|
|
1237
|
-
function
|
|
1181
|
+
function xe({
|
|
1238
1182
|
type: r,
|
|
1239
1183
|
placeholder: e,
|
|
1240
1184
|
value: t,
|
|
@@ -1243,14 +1187,14 @@ function be({
|
|
|
1243
1187
|
autocomplete: s,
|
|
1244
1188
|
required: a
|
|
1245
1189
|
}) {
|
|
1246
|
-
return /* @__PURE__ */
|
|
1190
|
+
return /* @__PURE__ */ u("div", { children: [
|
|
1247
1191
|
/* @__PURE__ */ o(
|
|
1248
1192
|
"input",
|
|
1249
1193
|
{
|
|
1250
1194
|
type: r,
|
|
1251
1195
|
value: t,
|
|
1252
1196
|
placeholder: e,
|
|
1253
|
-
onInput: (
|
|
1197
|
+
onInput: (c) => n(c.target.value),
|
|
1254
1198
|
autocomplete: s,
|
|
1255
1199
|
required: a,
|
|
1256
1200
|
class: `h-14 w-full rounded-2xl bg-gray-100 px-5 text-base text-gray-900 outline-none transition-all placeholder:text-gray-500 hover:bg-gray-200/60 focus:bg-gray-200/60 ${i ? "shadow-[0_0_0_2px_rgba(239,68,68,0.5)]" : "focus:shadow-[0_0_0_2px_color-mix(in_srgb,var(--pw-accent)_30%,transparent)]"}`
|
|
@@ -1259,14 +1203,14 @@ function be({
|
|
|
1259
1203
|
i && /* @__PURE__ */ o("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: i })
|
|
1260
1204
|
] });
|
|
1261
1205
|
}
|
|
1262
|
-
function
|
|
1206
|
+
function St({
|
|
1263
1207
|
placeholder: r,
|
|
1264
1208
|
value: e,
|
|
1265
1209
|
onInput: t,
|
|
1266
1210
|
error: n,
|
|
1267
1211
|
required: i
|
|
1268
1212
|
}) {
|
|
1269
|
-
return /* @__PURE__ */
|
|
1213
|
+
return /* @__PURE__ */ u("div", { children: [
|
|
1270
1214
|
/* @__PURE__ */ o(
|
|
1271
1215
|
"textarea",
|
|
1272
1216
|
{
|
|
@@ -1281,45 +1225,45 @@ function Ct({
|
|
|
1281
1225
|
n && /* @__PURE__ */ o("span", { class: "mt-1 ml-2 block text-sm text-red-600", children: n })
|
|
1282
1226
|
] });
|
|
1283
1227
|
}
|
|
1284
|
-
function
|
|
1285
|
-
const { t: n } =
|
|
1286
|
-
if (!
|
|
1287
|
-
|
|
1288
|
-
const
|
|
1289
|
-
if (r.length +
|
|
1290
|
-
|
|
1228
|
+
function Ct({ files: r, onChange: e, disabled: t }) {
|
|
1229
|
+
const { t: n } = k(), i = z(null), [s, a] = x(!1), [c, l] = x(null), f = (h) => {
|
|
1230
|
+
if (!h || t) return;
|
|
1231
|
+
l(null);
|
|
1232
|
+
const d = Array.from(h);
|
|
1233
|
+
if (r.length + d.length > re) {
|
|
1234
|
+
l(n("support.too_many_files", "Up to {max} files", { max: re }));
|
|
1291
1235
|
return;
|
|
1292
1236
|
}
|
|
1293
|
-
const b =
|
|
1294
|
-
(
|
|
1237
|
+
const b = d.filter(
|
|
1238
|
+
(w) => ye.includes(w.type) && w.size <= wt
|
|
1295
1239
|
);
|
|
1296
|
-
if (b.length !==
|
|
1297
|
-
|
|
1240
|
+
if (b.length !== d.length) {
|
|
1241
|
+
l(n("support.invalid_file", "Only JPEG/PNG/WebP, ≤ 10MB each"));
|
|
1298
1242
|
return;
|
|
1299
1243
|
}
|
|
1300
1244
|
e([...r, ...b]);
|
|
1301
1245
|
};
|
|
1302
|
-
return /* @__PURE__ */
|
|
1246
|
+
return /* @__PURE__ */ u("div", { children: [
|
|
1303
1247
|
/* @__PURE__ */ o("span", { class: "text-xs font-medium text-gray-700", children: n("support.attachments_label", "Attachments (optional)") }),
|
|
1304
|
-
/* @__PURE__ */
|
|
1248
|
+
/* @__PURE__ */ u(
|
|
1305
1249
|
"div",
|
|
1306
1250
|
{
|
|
1307
1251
|
role: "button",
|
|
1308
1252
|
tabIndex: 0,
|
|
1309
1253
|
"aria-label": n("support.attachments_aria", "Attachments upload"),
|
|
1310
1254
|
onClick: () => !t && i.current?.click(),
|
|
1311
|
-
onDragOver: (
|
|
1312
|
-
|
|
1255
|
+
onDragOver: (h) => {
|
|
1256
|
+
h.preventDefault(), t || a(!0);
|
|
1313
1257
|
},
|
|
1314
1258
|
onDragLeave: () => a(!1),
|
|
1315
|
-
onDrop: (
|
|
1316
|
-
|
|
1259
|
+
onDrop: (h) => {
|
|
1260
|
+
h.preventDefault(), a(!1), f(h.dataTransfer?.files ?? null);
|
|
1317
1261
|
},
|
|
1318
1262
|
class: `mt-1.5 cursor-pointer rounded-2xl border border-dashed p-3.5 text-center transition-all ${s ? "border-[var(--pw-accent)] bg-[color-mix(in_srgb,var(--pw-accent)_6%,white)]" : "border-gray-300 hover:border-gray-400 hover:bg-gray-50/60"} ${t ? "cursor-not-allowed opacity-60" : ""}`,
|
|
1319
1263
|
children: [
|
|
1320
1264
|
/* @__PURE__ */ o("div", { class: "text-xs text-gray-500", children: n("support.dropzone_text", "Drop images here or click to select") }),
|
|
1321
1265
|
/* @__PURE__ */ o("div", { class: "mt-0.5 text-[11px] text-gray-400", children: n("support.file_requirements", "JPEG/PNG/WebP, up to {max} files, ≤ 10MB each", {
|
|
1322
|
-
max:
|
|
1266
|
+
max: re
|
|
1323
1267
|
}) })
|
|
1324
1268
|
]
|
|
1325
1269
|
}
|
|
@@ -1332,39 +1276,39 @@ function It({ files: r, onChange: e, disabled: t }) {
|
|
|
1332
1276
|
multiple: !0,
|
|
1333
1277
|
accept: ye.join(","),
|
|
1334
1278
|
class: "hidden",
|
|
1335
|
-
onChange: (
|
|
1336
|
-
|
|
1279
|
+
onChange: (h) => {
|
|
1280
|
+
f(h.target.files), h.currentTarget.value = "";
|
|
1337
1281
|
}
|
|
1338
1282
|
}
|
|
1339
1283
|
),
|
|
1340
|
-
|
|
1341
|
-
r.length > 0 && /* @__PURE__ */ o("ul", { class: "mt-2 flex flex-col gap-1", children: r.map((
|
|
1284
|
+
c && /* @__PURE__ */ o("p", { class: "mt-1 text-xs text-red-600", children: c }),
|
|
1285
|
+
r.length > 0 && /* @__PURE__ */ o("ul", { class: "mt-2 flex flex-col gap-1", children: r.map((h, d) => /* @__PURE__ */ u(
|
|
1342
1286
|
"li",
|
|
1343
1287
|
{
|
|
1344
1288
|
class: "flex items-center justify-between gap-2 rounded bg-gray-50 px-2 py-1 text-xs",
|
|
1345
1289
|
children: [
|
|
1346
|
-
/* @__PURE__ */ o("span", { class: "truncate text-gray-700", children:
|
|
1290
|
+
/* @__PURE__ */ o("span", { class: "truncate text-gray-700", children: h.name }),
|
|
1347
1291
|
/* @__PURE__ */ o(
|
|
1348
1292
|
"button",
|
|
1349
1293
|
{
|
|
1350
1294
|
type: "button",
|
|
1351
1295
|
onClick: () => {
|
|
1352
1296
|
const b = [...r];
|
|
1353
|
-
b.splice(
|
|
1297
|
+
b.splice(d, 1), e(b);
|
|
1354
1298
|
},
|
|
1355
1299
|
disabled: t,
|
|
1356
1300
|
class: "text-gray-500 hover:text-red-600 disabled:cursor-not-allowed disabled:opacity-60",
|
|
1357
|
-
"aria-label": n("support.remove_file_aria", "Remove {filename}", { filename:
|
|
1301
|
+
"aria-label": n("support.remove_file_aria", "Remove {filename}", { filename: h.name }),
|
|
1358
1302
|
children: "✕"
|
|
1359
1303
|
}
|
|
1360
1304
|
)
|
|
1361
1305
|
]
|
|
1362
1306
|
},
|
|
1363
|
-
`${
|
|
1307
|
+
`${h.name}-${h.size}-${d}`
|
|
1364
1308
|
)) })
|
|
1365
1309
|
] });
|
|
1366
1310
|
}
|
|
1367
|
-
const
|
|
1311
|
+
const It = {
|
|
1368
1312
|
day: "cta.get_plan_daily",
|
|
1369
1313
|
week: "cta.get_plan_weekly",
|
|
1370
1314
|
month: "cta.get_plan_monthly",
|
|
@@ -1375,24 +1319,24 @@ const Lt = {
|
|
|
1375
1319
|
month: "Get Monthly Plan",
|
|
1376
1320
|
year: "Get Yearly Plan"
|
|
1377
1321
|
};
|
|
1378
|
-
function
|
|
1322
|
+
function Lt(r, e, t, n) {
|
|
1379
1323
|
if (e === "close") return n("cta.close", "Close");
|
|
1380
1324
|
if (!r) return n("cta.continue", "Continue");
|
|
1381
1325
|
if (!t && r.trial_days && r.interval && r.interval !== "lifetime")
|
|
1382
1326
|
return n("cta.start_trial", "Start {days}-Day Free Trial", { days: r.trial_days });
|
|
1383
1327
|
if (!r.interval || r.interval === "lifetime")
|
|
1384
1328
|
return n("cta.get_lifetime_access", "Get Lifetime Access");
|
|
1385
|
-
const i =
|
|
1329
|
+
const i = It[r.interval];
|
|
1386
1330
|
return i ? n(i, At[r.interval]) : n("cta.get_plan_generic", "Get {interval} Plan", {
|
|
1387
|
-
interval:
|
|
1331
|
+
interval: Mt(r.interval)
|
|
1388
1332
|
});
|
|
1389
1333
|
}
|
|
1390
|
-
function
|
|
1334
|
+
function Mt(r) {
|
|
1391
1335
|
return r.length ? r[0].toUpperCase() + r.slice(1) : r;
|
|
1392
1336
|
}
|
|
1393
|
-
function
|
|
1394
|
-
const { t } =
|
|
1395
|
-
return /* @__PURE__ */
|
|
1337
|
+
function Et({ block: r, ctx: e }) {
|
|
1338
|
+
const { t } = k(), [n, i] = x(!1), s = r.priceId ?? e.selectedPriceId, a = n || r.action === "checkout" && !s, c = s ? e.bootstrap.prices.find((d) => d.id === s) ?? null : null, l = e.bootstrap.user?.had_previous_trial ?? !1, f = r.label ?? Lt(c, r.action, l, t);
|
|
1339
|
+
return /* @__PURE__ */ u(
|
|
1396
1340
|
"button",
|
|
1397
1341
|
{
|
|
1398
1342
|
type: "button",
|
|
@@ -1423,15 +1367,15 @@ function Tt({ block: r, ctx: e }) {
|
|
|
1423
1367
|
"aria-hidden": "true"
|
|
1424
1368
|
}
|
|
1425
1369
|
),
|
|
1426
|
-
n ? /* @__PURE__ */ o("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ o("span", { class: "relative z-10", children:
|
|
1370
|
+
n ? /* @__PURE__ */ o("span", { class: "relative z-10 inline-block h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white" }) : /* @__PURE__ */ o("span", { class: "relative z-10", children: f })
|
|
1427
1371
|
]
|
|
1428
1372
|
}
|
|
1429
1373
|
);
|
|
1430
1374
|
}
|
|
1431
|
-
function
|
|
1432
|
-
const { t: e } =
|
|
1375
|
+
function Pt({ ctx: r }) {
|
|
1376
|
+
const { t: e } = k(), t = r.authSession, n = r.auth, [i, s] = x(!1), a = () => r.onAction("support");
|
|
1433
1377
|
if (t && !t.user.is_anonymous) {
|
|
1434
|
-
const
|
|
1378
|
+
const c = async () => {
|
|
1435
1379
|
if (!(!n || i)) {
|
|
1436
1380
|
s(!0);
|
|
1437
1381
|
try {
|
|
@@ -1442,22 +1386,22 @@ function Mt({ ctx: r }) {
|
|
|
1442
1386
|
}
|
|
1443
1387
|
}
|
|
1444
1388
|
};
|
|
1445
|
-
return /* @__PURE__ */
|
|
1446
|
-
/* @__PURE__ */
|
|
1389
|
+
return /* @__PURE__ */ u("div", { class: "-mt-3 flex flex-col items-center gap-1.5 pt-1 text-center text-[13px] text-gray-500", children: [
|
|
1390
|
+
/* @__PURE__ */ u("span", { children: [
|
|
1447
1391
|
e("session.signed_in_as_prefix", "Signed in as"),
|
|
1448
1392
|
" ",
|
|
1449
1393
|
/* @__PURE__ */ o("b", { class: "font-medium text-gray-700", children: t.user.email })
|
|
1450
1394
|
] }),
|
|
1451
|
-
/* @__PURE__ */
|
|
1452
|
-
/* @__PURE__ */ o(H, { onClick:
|
|
1453
|
-
/* @__PURE__ */ o(
|
|
1395
|
+
/* @__PURE__ */ u("div", { class: "flex items-center justify-center gap-3", children: [
|
|
1396
|
+
/* @__PURE__ */ o(H, { onClick: c, disabled: !n || i, children: i ? e("session.signing_out", "Signing out…") : e("session.sign_out", "Sign Out") }),
|
|
1397
|
+
/* @__PURE__ */ o(be, {}),
|
|
1454
1398
|
/* @__PURE__ */ o(H, { onClick: a, children: e("session.contact_support", "Contact Support") })
|
|
1455
1399
|
] })
|
|
1456
1400
|
] });
|
|
1457
1401
|
}
|
|
1458
|
-
return /* @__PURE__ */
|
|
1402
|
+
return /* @__PURE__ */ u("div", { class: "-mt-3 flex items-center justify-center gap-3 pt-1 text-center text-[13px]", children: [
|
|
1459
1403
|
/* @__PURE__ */ o(H, { onClick: () => r.onAction("restore"), children: e("session.restore_purchases", "Restore purchases") }),
|
|
1460
|
-
/* @__PURE__ */ o(
|
|
1404
|
+
/* @__PURE__ */ o(be, {}),
|
|
1461
1405
|
/* @__PURE__ */ o(H, { onClick: a, children: e("session.contact_support", "Contact Support") })
|
|
1462
1406
|
] });
|
|
1463
1407
|
}
|
|
@@ -1478,11 +1422,11 @@ function H({
|
|
|
1478
1422
|
}
|
|
1479
1423
|
);
|
|
1480
1424
|
}
|
|
1481
|
-
function
|
|
1425
|
+
function be() {
|
|
1482
1426
|
return /* @__PURE__ */ o("span", { class: "h-1 w-1 rounded-full bg-gray-300", "aria-hidden": "true" });
|
|
1483
1427
|
}
|
|
1484
|
-
function
|
|
1485
|
-
return r.items.length ? /* @__PURE__ */ o("ul", { class: "flex flex-col gap-2.5", role: "list", children: r.items.map((e) => /* @__PURE__ */
|
|
1428
|
+
function Tt({ block: r }) {
|
|
1429
|
+
return r.items.length ? /* @__PURE__ */ o("ul", { class: "flex flex-col gap-2.5", role: "list", children: r.items.map((e) => /* @__PURE__ */ u("li", { class: "flex items-start gap-3 text-sm text-gray-700", children: [
|
|
1486
1430
|
/* @__PURE__ */ o(
|
|
1487
1431
|
"svg",
|
|
1488
1432
|
{
|
|
@@ -1504,18 +1448,18 @@ function Bt({ block: r }) {
|
|
|
1504
1448
|
)
|
|
1505
1449
|
}
|
|
1506
1450
|
),
|
|
1507
|
-
/* @__PURE__ */
|
|
1451
|
+
/* @__PURE__ */ u("div", { class: "flex flex-col gap-0.5", children: [
|
|
1508
1452
|
/* @__PURE__ */ o("span", { class: "font-medium leading-snug text-gray-900", children: e.name }),
|
|
1509
1453
|
e.desc ? /* @__PURE__ */ o("span", { class: "text-xs leading-relaxed text-gray-400", children: e.desc }) : null
|
|
1510
1454
|
] })
|
|
1511
1455
|
] }, e.id)) }) : null;
|
|
1512
1456
|
}
|
|
1513
|
-
function
|
|
1514
|
-
const { t: e } =
|
|
1515
|
-
return /* @__PURE__ */
|
|
1516
|
-
/* @__PURE__ */
|
|
1517
|
-
i ? /* @__PURE__ */ o(
|
|
1518
|
-
s ? /* @__PURE__ */
|
|
1457
|
+
function Bt({ block: r }) {
|
|
1458
|
+
const { t: e } = k(), t = r.title ?? e("pricing.money_back", "30-day money-back guarantee"), n = r.subtitle, i = (r.icon ?? "dollar_shield") !== "none", s = Ot(t);
|
|
1459
|
+
return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-1.5 border-b-1 pb-4 mb-1 border-gray-100", children: [
|
|
1460
|
+
/* @__PURE__ */ u("div", { class: "inline-flex items-center gap-2 text-[12px] text-gray-700", children: [
|
|
1461
|
+
i ? /* @__PURE__ */ o(Ut, {}) : null,
|
|
1462
|
+
s ? /* @__PURE__ */ u("span", { children: [
|
|
1519
1463
|
/* @__PURE__ */ o("b", { class: "font-bold text-gray-900", children: s.bold }),
|
|
1520
1464
|
" ",
|
|
1521
1465
|
/* @__PURE__ */ o("span", { class: "font-medium", children: s.rest })
|
|
@@ -1524,12 +1468,12 @@ function Ot({ block: r }) {
|
|
|
1524
1468
|
n ? /* @__PURE__ */ o("span", { class: "text-center text-xs leading-relaxed text-gray-500", children: n }) : null
|
|
1525
1469
|
] });
|
|
1526
1470
|
}
|
|
1527
|
-
function
|
|
1471
|
+
function Ot(r) {
|
|
1528
1472
|
const e = r.match(/^(\d+[-\s]?days?)\s+(.+)$/i);
|
|
1529
1473
|
return e ? { bold: e[1], rest: e[2] } : null;
|
|
1530
1474
|
}
|
|
1531
|
-
function
|
|
1532
|
-
return /* @__PURE__ */
|
|
1475
|
+
function Ut() {
|
|
1476
|
+
return /* @__PURE__ */ u(
|
|
1533
1477
|
"svg",
|
|
1534
1478
|
{
|
|
1535
1479
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1563,22 +1507,22 @@ function jt() {
|
|
|
1563
1507
|
}
|
|
1564
1508
|
);
|
|
1565
1509
|
}
|
|
1566
|
-
const
|
|
1567
|
-
function
|
|
1568
|
-
const t = e *
|
|
1569
|
-
let n =
|
|
1570
|
-
for (r.style.fontSize = `${n}px`; r.scrollHeight > t && n >
|
|
1510
|
+
const Be = 24, jt = 16, Rt = 2;
|
|
1511
|
+
function zt(r, e) {
|
|
1512
|
+
const t = e * Rt;
|
|
1513
|
+
let n = Be;
|
|
1514
|
+
for (r.style.fontSize = `${n}px`; r.scrollHeight > t && n > jt; )
|
|
1571
1515
|
n -= 1, r.style.fontSize = `${n}px`;
|
|
1572
1516
|
}
|
|
1573
|
-
function
|
|
1517
|
+
function Dt({ block: r, ctx: e }) {
|
|
1574
1518
|
const t = r.level ?? 1, n = `h${t}`, i = t === 1 ? "text-[22px] sm:text-2xl font-semibold leading-tight text-center text-balance text-gray-800" : t === 2 ? "text-xl font-semibold leading-snug text-gray-900 tracking-tight" : "text-base font-medium text-gray-900", s = z(null), a = t === 1 && !!e.bootstrap.settings.title_auto_fit;
|
|
1575
|
-
return
|
|
1519
|
+
return O(() => {
|
|
1576
1520
|
if (!a || !s.current) return;
|
|
1577
|
-
const
|
|
1578
|
-
|
|
1521
|
+
const c = getComputedStyle(s.current), l = parseFloat(c.lineHeight) || Be * 1.5;
|
|
1522
|
+
zt(s.current, l);
|
|
1579
1523
|
}, [a, r.text]), /* @__PURE__ */ o(n, { ref: s, class: i, children: r.text });
|
|
1580
1524
|
}
|
|
1581
|
-
function
|
|
1525
|
+
function qt(r) {
|
|
1582
1526
|
const e = r.local ?? { currency: r.currency, amount: r.amount };
|
|
1583
1527
|
if (r.interval === "year") {
|
|
1584
1528
|
const t = (r.interval_count ?? 1) * 12;
|
|
@@ -1586,7 +1530,7 @@ function Nt(r) {
|
|
|
1586
1530
|
}
|
|
1587
1531
|
return { amount: e.amount, currency: e.currency };
|
|
1588
1532
|
}
|
|
1589
|
-
function
|
|
1533
|
+
function ne(r, e) {
|
|
1590
1534
|
const t = r % 1 !== 0 ? 2 : 0;
|
|
1591
1535
|
try {
|
|
1592
1536
|
const n = new Intl.NumberFormat(void 0, {
|
|
@@ -1604,13 +1548,13 @@ function se(r, e) {
|
|
|
1604
1548
|
return { currency: e, amount: String(r) };
|
|
1605
1549
|
}
|
|
1606
1550
|
}
|
|
1607
|
-
function
|
|
1608
|
-
const { amount: t, currency: n } =
|
|
1551
|
+
function se(r, e) {
|
|
1552
|
+
const { amount: t, currency: n } = qt(r);
|
|
1609
1553
|
if (!e) {
|
|
1610
|
-
const { currency:
|
|
1611
|
-
return { currency:
|
|
1554
|
+
const { currency: c, amount: l } = ne(t, n);
|
|
1555
|
+
return { currency: c, amount: l, originalAmount: null };
|
|
1612
1556
|
}
|
|
1613
|
-
const i = t * (1 - e / 100), s =
|
|
1557
|
+
const i = t * (1 - e / 100), s = ne(i, n), a = ne(t, n);
|
|
1614
1558
|
return {
|
|
1615
1559
|
currency: s.currency,
|
|
1616
1560
|
amount: s.amount,
|
|
@@ -1626,7 +1570,7 @@ function G(r, e) {
|
|
|
1626
1570
|
(i) => i.price_id == null && i.discount_percent && i.discount_percent > 0
|
|
1627
1571
|
) ?? null);
|
|
1628
1572
|
}
|
|
1629
|
-
function
|
|
1573
|
+
function Oe(r, e) {
|
|
1630
1574
|
if (r.label) return r.label.toUpperCase();
|
|
1631
1575
|
if (!r.interval || r.interval === "lifetime")
|
|
1632
1576
|
return e("pricing.plan_label.lifetime", "LIFETIME");
|
|
@@ -1638,15 +1582,15 @@ function je(r, e) {
|
|
|
1638
1582
|
}[r.interval];
|
|
1639
1583
|
return n ? e(n.key, n.fallback) : `${r.interval.toUpperCase()} PLAN`;
|
|
1640
1584
|
}
|
|
1641
|
-
function
|
|
1585
|
+
function ae(r, e) {
|
|
1642
1586
|
if (!r.interval || r.interval === "lifetime")
|
|
1643
1587
|
return e("pricing.interval.lifetime_short", "lifetime");
|
|
1644
1588
|
if (r.interval === "year") return e("pricing.interval.month", "month");
|
|
1645
1589
|
const t = r.interval_count ?? 1;
|
|
1646
1590
|
return t === 1 ? e(`pricing.interval.${r.interval}`, r.interval) : `${t} ${r.interval}s`;
|
|
1647
1591
|
}
|
|
1648
|
-
function
|
|
1649
|
-
const { t } =
|
|
1592
|
+
function Nt({ block: r, ctx: e }) {
|
|
1593
|
+
const { t } = k(), n = r.priceIds && r.priceIds.length > 0 ? new Set(r.priceIds) : null, i = e.bootstrap.prices.filter((a) => !n || n.has(a.id));
|
|
1650
1594
|
if (i.length === 0)
|
|
1651
1595
|
return /* @__PURE__ */ o("p", { class: "text-sm text-gray-500", children: t("pricing.no_prices", "No prices available.") });
|
|
1652
1596
|
const s = r.popular_label ?? t("pricing.most_popular", "Most popular");
|
|
@@ -1657,11 +1601,11 @@ function Ft({ block: r, ctx: e }) {
|
|
|
1657
1601
|
class: "flex w-full flex-col rounded-xl border border-gray-200 bg-gray-50",
|
|
1658
1602
|
role: "radiogroup",
|
|
1659
1603
|
"aria-label": t("pricing.plans_aria", "Plans"),
|
|
1660
|
-
children: i.map((a,
|
|
1661
|
-
|
|
1604
|
+
children: i.map((a, c) => /* @__PURE__ */ o(
|
|
1605
|
+
Vt,
|
|
1662
1606
|
{
|
|
1663
1607
|
price: a,
|
|
1664
|
-
isLast:
|
|
1608
|
+
isLast: c === i.length - 1,
|
|
1665
1609
|
isPopular: r.popular_price_id === a.id,
|
|
1666
1610
|
popularLabel: s,
|
|
1667
1611
|
offer: G(e.bootstrap.offers, a.id),
|
|
@@ -1676,8 +1620,8 @@ function Ft({ block: r, ctx: e }) {
|
|
|
1676
1620
|
}
|
|
1677
1621
|
);
|
|
1678
1622
|
if (r.view === "horizontal") {
|
|
1679
|
-
const a = Math.min(i.length, 3),
|
|
1680
|
-
(
|
|
1623
|
+
const a = Math.min(i.length, 3), c = i.some(
|
|
1624
|
+
(l) => (G(e.bootstrap.offers, l.id)?.discount_percent ?? 0) > 0
|
|
1681
1625
|
);
|
|
1682
1626
|
return /* @__PURE__ */ o(
|
|
1683
1627
|
"div",
|
|
@@ -1686,21 +1630,21 @@ function Ft({ block: r, ctx: e }) {
|
|
|
1686
1630
|
style: { gridTemplateColumns: `repeat(${a}, minmax(0, 1fr))` },
|
|
1687
1631
|
role: "radiogroup",
|
|
1688
1632
|
"aria-label": t("pricing.plans_aria", "Plans"),
|
|
1689
|
-
children: i.map((
|
|
1690
|
-
|
|
1633
|
+
children: i.map((l) => /* @__PURE__ */ o(
|
|
1634
|
+
$t,
|
|
1691
1635
|
{
|
|
1692
|
-
price:
|
|
1693
|
-
isPopular: r.popular_price_id ===
|
|
1636
|
+
price: l,
|
|
1637
|
+
isPopular: r.popular_price_id === l.id,
|
|
1694
1638
|
popularLabel: s,
|
|
1695
|
-
offer: G(e.bootstrap.offers,
|
|
1696
|
-
reserveStrikeRow:
|
|
1697
|
-
selected: e.selectedPriceId ===
|
|
1639
|
+
offer: G(e.bootstrap.offers, l.id),
|
|
1640
|
+
reserveStrikeRow: c,
|
|
1641
|
+
selected: e.selectedPriceId === l.id,
|
|
1698
1642
|
onSelect: () => {
|
|
1699
|
-
e.setSelectedPriceId(
|
|
1643
|
+
e.setSelectedPriceId(l.id), e.onAction("price_selected", { priceId: l.id, price: l });
|
|
1700
1644
|
},
|
|
1701
1645
|
t
|
|
1702
1646
|
},
|
|
1703
|
-
|
|
1647
|
+
l.id
|
|
1704
1648
|
))
|
|
1705
1649
|
}
|
|
1706
1650
|
);
|
|
@@ -1712,13 +1656,13 @@ function Ft({ block: r, ctx: e }) {
|
|
|
1712
1656
|
role: "radiogroup",
|
|
1713
1657
|
"aria-label": t("pricing.plans_aria", "Plans"),
|
|
1714
1658
|
children: i.map((a) => {
|
|
1715
|
-
const
|
|
1716
|
-
return /* @__PURE__ */
|
|
1659
|
+
const c = e.selectedPriceId === a.id, l = r.popular_price_id === a.id, h = G(e.bootstrap.offers, a.id)?.discount_percent ?? null, { currency: d, amount: b, originalAmount: w } = se(a, h);
|
|
1660
|
+
return /* @__PURE__ */ u(
|
|
1717
1661
|
"button",
|
|
1718
1662
|
{
|
|
1719
1663
|
type: "button",
|
|
1720
1664
|
role: "radio",
|
|
1721
|
-
"aria-checked":
|
|
1665
|
+
"aria-checked": c,
|
|
1722
1666
|
onClick: () => {
|
|
1723
1667
|
e.setSelectedPriceId(a.id), e.onAction("price_selected", { priceId: a.id, price: a });
|
|
1724
1668
|
},
|
|
@@ -1727,7 +1671,7 @@ function Ft({ block: r, ctx: e }) {
|
|
|
1727
1671
|
// Везде border 2px — selection выражается только цветом, layout
|
|
1728
1672
|
// не прыгает (равная толщина у selected/unselected). Цветовая
|
|
1729
1673
|
// разница accent vs gray достаточно сильная для visual hierarchy.
|
|
1730
|
-
|
|
1674
|
+
c ? "border-[var(--pw-accent)] bg-transparent" : "border-gray-200 bg-transparent hover:bg-gray-50"
|
|
1731
1675
|
].join(" "),
|
|
1732
1676
|
children: [
|
|
1733
1677
|
/* @__PURE__ */ o(
|
|
@@ -1735,14 +1679,14 @@ function Ft({ block: r, ctx: e }) {
|
|
|
1735
1679
|
{
|
|
1736
1680
|
class: [
|
|
1737
1681
|
"flex h-6.5 w-6.5 flex-shrink-0 items-center justify-center rounded-full border transition-colors",
|
|
1738
|
-
|
|
1682
|
+
c ? "border-[var(--pw-accent)] text-white" : "border-gray-300 bg-transparent text-transparent",
|
|
1739
1683
|
// Popular-label badge сидит absolute сверху-справа карточки и
|
|
1740
1684
|
// визуально сдвигает центр content'а вниз. flex items-center
|
|
1741
1685
|
// на карточке держит галочку по геометрическому центру, что
|
|
1742
1686
|
// делает её визуально выше — компенсируем небольшим mt'ом.
|
|
1743
|
-
|
|
1687
|
+
l ? "mt-3" : ""
|
|
1744
1688
|
].join(" "),
|
|
1745
|
-
style:
|
|
1689
|
+
style: c ? {
|
|
1746
1690
|
background: "linear-gradient(135deg, color-mix(in srgb, var(--pw-accent) 70%, white) 0%, var(--pw-accent) 50%, color-mix(in srgb, var(--pw-accent) 85%, black) 100%)"
|
|
1747
1691
|
} : void 0,
|
|
1748
1692
|
"aria-hidden": "true",
|
|
@@ -1754,7 +1698,7 @@ function Ft({ block: r, ctx: e }) {
|
|
|
1754
1698
|
viewBox: "0 0 17 12",
|
|
1755
1699
|
fill: "none",
|
|
1756
1700
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1757
|
-
class:
|
|
1701
|
+
class: c ? "opacity-100" : "opacity-0",
|
|
1758
1702
|
children: /* @__PURE__ */ o(
|
|
1759
1703
|
"path",
|
|
1760
1704
|
{
|
|
@@ -1766,37 +1710,37 @@ function Ft({ block: r, ctx: e }) {
|
|
|
1766
1710
|
)
|
|
1767
1711
|
}
|
|
1768
1712
|
),
|
|
1769
|
-
/* @__PURE__ */
|
|
1770
|
-
/* @__PURE__ */
|
|
1771
|
-
/* @__PURE__ */ o("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children:
|
|
1772
|
-
|
|
1713
|
+
/* @__PURE__ */ u("div", { class: "flex flex-1 flex-col gap-0.5", children: [
|
|
1714
|
+
/* @__PURE__ */ u("div", { class: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
|
|
1715
|
+
/* @__PURE__ */ o("span", { class: "text-xs font-normal uppercase tracking-normal text-gray-800/70", children: Oe(a, t) }),
|
|
1716
|
+
w ? (
|
|
1773
1717
|
// opacity-60 приглушает strike: глаз сначала ловит label
|
|
1774
1718
|
// и discount-badge, потом main price; original «бывшая цена»
|
|
1775
1719
|
// — третичная информация, не должна конкурировать с label.
|
|
1776
|
-
/* @__PURE__ */ o("span", { class: "text-[15px] font-normal text-gray-400 opacity-60 line-through decoration-gray-400 decoration-[1.5px]", children:
|
|
1720
|
+
/* @__PURE__ */ o("span", { class: "text-[15px] font-normal text-gray-400 opacity-60 line-through decoration-gray-400 decoration-[1.5px]", children: w })
|
|
1777
1721
|
) : null,
|
|
1778
|
-
|
|
1722
|
+
h ? (
|
|
1779
1723
|
// Emerald pill — фиксированный «успех/выгода», не зависит от
|
|
1780
1724
|
// brand_color. Читается даже на тёмных бренд-акцентах.
|
|
1781
|
-
/* @__PURE__ */
|
|
1725
|
+
/* @__PURE__ */ u("span", { class: "rounded-full bg-emerald-100 px-2.5 py-1 text-xs font-bold leading-none text-emerald-700", children: [
|
|
1782
1726
|
"-",
|
|
1783
|
-
|
|
1727
|
+
h,
|
|
1784
1728
|
"%"
|
|
1785
1729
|
] })
|
|
1786
1730
|
) : null
|
|
1787
1731
|
] }),
|
|
1788
|
-
/* @__PURE__ */ o("div", { class: "flex items-baseline gap-2 flex-wrap", children: /* @__PURE__ */
|
|
1789
|
-
/* @__PURE__ */ o("span", { class: "opacity-90", children:
|
|
1732
|
+
/* @__PURE__ */ o("div", { class: "flex items-baseline gap-2 flex-wrap", children: /* @__PURE__ */ u("span", { class: "text-[26px] leading-tight whitespace-nowrap text-gray-800 font-medium", children: [
|
|
1733
|
+
/* @__PURE__ */ o("span", { class: "opacity-90", children: d }),
|
|
1790
1734
|
b,
|
|
1791
|
-
/* @__PURE__ */
|
|
1735
|
+
/* @__PURE__ */ u("span", { class: "text-sm font-normal text-gray-500", children: [
|
|
1792
1736
|
" ",
|
|
1793
1737
|
"/ ",
|
|
1794
|
-
|
|
1738
|
+
ae(a, t)
|
|
1795
1739
|
] })
|
|
1796
1740
|
] }) }),
|
|
1797
1741
|
a.description ? /* @__PURE__ */ o("span", { class: "mt-1 text-xs leading-relaxed text-gray-500", children: a.description }) : null
|
|
1798
1742
|
] }),
|
|
1799
|
-
|
|
1743
|
+
l ? /* @__PURE__ */ o(
|
|
1800
1744
|
"span",
|
|
1801
1745
|
{
|
|
1802
1746
|
class: "absolute -top-[9px] -right-[6px] rounded-[11px] border-[5px] border-white px-2 py-1 text-[12px] font-semibold text-white",
|
|
@@ -1812,10 +1756,10 @@ function Ft({ block: r, ctx: e }) {
|
|
|
1812
1756
|
}
|
|
1813
1757
|
);
|
|
1814
1758
|
}
|
|
1815
|
-
function
|
|
1759
|
+
function Ft(r, e) {
|
|
1816
1760
|
return r.label ? r.label : !r.interval || r.interval === "lifetime" ? e("pricing.interval.lifetime_short", "lifetime") : e(`pricing.interval.${r.interval}`, r.interval);
|
|
1817
1761
|
}
|
|
1818
|
-
function
|
|
1762
|
+
function Vt({
|
|
1819
1763
|
price: r,
|
|
1820
1764
|
isLast: e,
|
|
1821
1765
|
isPopular: t,
|
|
@@ -1823,10 +1767,10 @@ function $t({
|
|
|
1823
1767
|
offer: i,
|
|
1824
1768
|
selected: s,
|
|
1825
1769
|
onSelect: a,
|
|
1826
|
-
t:
|
|
1770
|
+
t: c
|
|
1827
1771
|
}) {
|
|
1828
|
-
const
|
|
1829
|
-
return /* @__PURE__ */
|
|
1772
|
+
const l = i?.discount_percent ?? null, { currency: f, amount: h, originalAmount: d } = se(r, l);
|
|
1773
|
+
return /* @__PURE__ */ u(
|
|
1830
1774
|
"button",
|
|
1831
1775
|
{
|
|
1832
1776
|
type: "button",
|
|
@@ -1866,7 +1810,7 @@ function $t({
|
|
|
1866
1810
|
)
|
|
1867
1811
|
}
|
|
1868
1812
|
),
|
|
1869
|
-
/* @__PURE__ */
|
|
1813
|
+
/* @__PURE__ */ u(
|
|
1870
1814
|
"div",
|
|
1871
1815
|
{
|
|
1872
1816
|
class: [
|
|
@@ -1874,8 +1818,8 @@ function $t({
|
|
|
1874
1818
|
e ? "" : "border-b border-gray-200"
|
|
1875
1819
|
].join(" "),
|
|
1876
1820
|
children: [
|
|
1877
|
-
/* @__PURE__ */
|
|
1878
|
-
/* @__PURE__ */ o("span", { class: "text-base font-normal capitalize text-gray-800", children:
|
|
1821
|
+
/* @__PURE__ */ u("div", { class: "flex flex-wrap items-center gap-1 gap-x-1.5", children: [
|
|
1822
|
+
/* @__PURE__ */ o("span", { class: "text-base font-normal capitalize text-gray-800", children: Ft(r, c) }),
|
|
1879
1823
|
t ? (
|
|
1880
1824
|
// Pastel brand-mix pill — точно как `badge` в TelegramPricingRadio.
|
|
1881
1825
|
// Низкий visual weight: pill про "имя плана" (most popular), а не
|
|
@@ -1892,22 +1836,22 @@ function $t({
|
|
|
1892
1836
|
}
|
|
1893
1837
|
)
|
|
1894
1838
|
) : null,
|
|
1895
|
-
|
|
1839
|
+
l ? /* @__PURE__ */ u("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
|
|
1896
1840
|
"-",
|
|
1897
|
-
|
|
1841
|
+
l,
|
|
1898
1842
|
"%"
|
|
1899
1843
|
] }) : null
|
|
1900
1844
|
] }),
|
|
1901
1845
|
/* @__PURE__ */ o("div", { class: "flex-1" }),
|
|
1902
|
-
/* @__PURE__ */
|
|
1903
|
-
|
|
1904
|
-
/* @__PURE__ */
|
|
1905
|
-
/* @__PURE__ */ o("span", { class: "opacity-90", children:
|
|
1906
|
-
|
|
1907
|
-
/* @__PURE__ */
|
|
1846
|
+
/* @__PURE__ */ u("span", { class: "flex items-baseline gap-1.5 text-base font-normal text-gray-600", children: [
|
|
1847
|
+
d ? /* @__PURE__ */ o("span", { class: "text-xs text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: d }) : null,
|
|
1848
|
+
/* @__PURE__ */ u("span", { class: "whitespace-nowrap", children: [
|
|
1849
|
+
/* @__PURE__ */ o("span", { class: "opacity-90", children: f }),
|
|
1850
|
+
h,
|
|
1851
|
+
/* @__PURE__ */ u("span", { class: "text-xs text-gray-400", children: [
|
|
1908
1852
|
" ",
|
|
1909
1853
|
"/ ",
|
|
1910
|
-
|
|
1854
|
+
ae(r, c)
|
|
1911
1855
|
] })
|
|
1912
1856
|
] })
|
|
1913
1857
|
] })
|
|
@@ -1918,7 +1862,7 @@ function $t({
|
|
|
1918
1862
|
}
|
|
1919
1863
|
);
|
|
1920
1864
|
}
|
|
1921
|
-
function
|
|
1865
|
+
function $t({
|
|
1922
1866
|
price: r,
|
|
1923
1867
|
isPopular: e,
|
|
1924
1868
|
popularLabel: t,
|
|
@@ -1926,10 +1870,10 @@ function Ht({
|
|
|
1926
1870
|
reserveStrikeRow: i,
|
|
1927
1871
|
selected: s,
|
|
1928
1872
|
onSelect: a,
|
|
1929
|
-
t:
|
|
1873
|
+
t: c
|
|
1930
1874
|
}) {
|
|
1931
|
-
const
|
|
1932
|
-
return /* @__PURE__ */
|
|
1875
|
+
const l = n?.discount_percent ?? null, { currency: f, amount: h, originalAmount: d } = se(r, l);
|
|
1876
|
+
return /* @__PURE__ */ u(
|
|
1933
1877
|
"button",
|
|
1934
1878
|
{
|
|
1935
1879
|
type: "button",
|
|
@@ -1942,22 +1886,22 @@ function Ht({
|
|
|
1942
1886
|
].join(" "),
|
|
1943
1887
|
style: s ? { background: "color-mix(in srgb, var(--pw-accent) 6%, transparent)" } : void 0,
|
|
1944
1888
|
children: [
|
|
1945
|
-
/* @__PURE__ */ o("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children:
|
|
1946
|
-
i ? /* @__PURE__ */
|
|
1947
|
-
|
|
1948
|
-
|
|
1889
|
+
/* @__PURE__ */ o("span", { class: "flex min-h-[2.4em] items-center text-[10px] font-normal uppercase leading-tight text-gray-800/70", children: Oe(r, c) }),
|
|
1890
|
+
i ? /* @__PURE__ */ u("div", { class: "flex h-[22px] items-center justify-center gap-1.5", children: [
|
|
1891
|
+
d ? /* @__PURE__ */ o("span", { class: "text-[12px] text-gray-400 line-through decoration-gray-400 decoration-[1.5px]", children: d }) : null,
|
|
1892
|
+
l ? /* @__PURE__ */ u("span", { class: "rounded-md bg-emerald-100 px-1.5 py-0.5 text-[10px] font-bold leading-none text-emerald-700", children: [
|
|
1949
1893
|
"-",
|
|
1950
|
-
|
|
1894
|
+
l,
|
|
1951
1895
|
"%"
|
|
1952
1896
|
] }) : null
|
|
1953
1897
|
] }) : null,
|
|
1954
|
-
/* @__PURE__ */
|
|
1955
|
-
/* @__PURE__ */ o("span", { class: "opacity-90", children:
|
|
1956
|
-
|
|
1898
|
+
/* @__PURE__ */ u("span", { class: "text-[26px] leading-none whitespace-nowrap text-gray-800 font-medium", children: [
|
|
1899
|
+
/* @__PURE__ */ o("span", { class: "opacity-90", children: f }),
|
|
1900
|
+
h
|
|
1957
1901
|
] }),
|
|
1958
|
-
/* @__PURE__ */
|
|
1902
|
+
/* @__PURE__ */ u("span", { class: "text-xs font-normal text-gray-500", children: [
|
|
1959
1903
|
"/ ",
|
|
1960
|
-
|
|
1904
|
+
ae(r, c)
|
|
1961
1905
|
] }),
|
|
1962
1906
|
e ? /* @__PURE__ */ o(
|
|
1963
1907
|
"span",
|
|
@@ -1971,28 +1915,28 @@ function Ht({
|
|
|
1971
1915
|
}
|
|
1972
1916
|
);
|
|
1973
1917
|
}
|
|
1974
|
-
function
|
|
1918
|
+
function Ht({ block: r }) {
|
|
1975
1919
|
return /* @__PURE__ */ o("p", { class: "text-[0.9375rem] leading-relaxed text-gray-600", children: r.text });
|
|
1976
1920
|
}
|
|
1977
|
-
const
|
|
1921
|
+
const Gt = {
|
|
1978
1922
|
week: 0.25,
|
|
1979
1923
|
month: 1,
|
|
1980
1924
|
year: 12
|
|
1981
1925
|
};
|
|
1982
|
-
function
|
|
1926
|
+
function Wt(r, e) {
|
|
1983
1927
|
return r ? e(`pricing.interval.${r}`, r) : e("pricing.interval.period", "period");
|
|
1984
1928
|
}
|
|
1985
|
-
function
|
|
1986
|
-
const { t } =
|
|
1929
|
+
function Zt({ block: r, ctx: e }) {
|
|
1930
|
+
const { t } = k();
|
|
1987
1931
|
if (!r.queries.length) return null;
|
|
1988
|
-
const i = e.bootstrap.prices.find((a) => a.id === e.selectedPriceId)?.interval ?? null, s = i ?
|
|
1989
|
-
return /* @__PURE__ */
|
|
1932
|
+
const i = e.bootstrap.prices.find((a) => a.id === e.selectedPriceId)?.interval ?? null, s = i ? Gt[i] : void 0;
|
|
1933
|
+
return /* @__PURE__ */ u("div", { class: "flex flex-col gap-2", children: [
|
|
1990
1934
|
/* @__PURE__ */ o("div", { class: "text-sm font-semibold text-gray-800", children: !i || i === "lifetime" ? t("pricing.included_total", "Included for lifetime:") : t("pricing.included_per", "Included per {interval}:", {
|
|
1991
|
-
interval:
|
|
1935
|
+
interval: Wt(i, t)
|
|
1992
1936
|
}) }),
|
|
1993
1937
|
/* @__PURE__ */ o("ul", { class: "flex flex-col gap-2", role: "list", children: r.queries.map((a) => {
|
|
1994
|
-
const
|
|
1995
|
-
return /* @__PURE__ */
|
|
1938
|
+
const c = Number.isFinite(a.count) ? a.count : 0, l = s !== void 0 ? Math.round(c * s) : c;
|
|
1939
|
+
return /* @__PURE__ */ u("li", { class: `flex gap-3 ${a.desc ? "items-start" : "items-center"}`, children: [
|
|
1996
1940
|
/* @__PURE__ */ o(
|
|
1997
1941
|
"svg",
|
|
1998
1942
|
{
|
|
@@ -2014,11 +1958,11 @@ function Yt({ block: r, ctx: e }) {
|
|
|
2014
1958
|
)
|
|
2015
1959
|
}
|
|
2016
1960
|
),
|
|
2017
|
-
/* @__PURE__ */
|
|
2018
|
-
/* @__PURE__ */ o("span", { class: "font-semibold text-gray-900 text-sm", children:
|
|
1961
|
+
/* @__PURE__ */ u("div", { children: [
|
|
1962
|
+
/* @__PURE__ */ o("span", { class: "font-semibold text-gray-900 text-sm", children: l }),
|
|
2019
1963
|
" ",
|
|
2020
1964
|
/* @__PURE__ */ o("span", { class: "text-sm text-gray-800", children: a.name }),
|
|
2021
|
-
a.desc ? /* @__PURE__ */
|
|
1965
|
+
a.desc ? /* @__PURE__ */ u(oe, { children: [
|
|
2022
1966
|
/* @__PURE__ */ o("br", {}),
|
|
2023
1967
|
/* @__PURE__ */ o("span", { class: "text-xs text-gray-400", children: a.desc })
|
|
2024
1968
|
] }) : null
|
|
@@ -2027,37 +1971,37 @@ function Yt({ block: r, ctx: e }) {
|
|
|
2027
1971
|
}) })
|
|
2028
1972
|
] });
|
|
2029
1973
|
}
|
|
2030
|
-
const
|
|
2031
|
-
heading:
|
|
2032
|
-
text:
|
|
2033
|
-
price_grid:
|
|
2034
|
-
cta_button:
|
|
2035
|
-
auth_panel:
|
|
2036
|
-
current_session:
|
|
2037
|
-
features_list:
|
|
2038
|
-
tokenization_gate:
|
|
2039
|
-
guarantee_badge:
|
|
2040
|
-
offer_banner:
|
|
1974
|
+
const Yt = {
|
|
1975
|
+
heading: Dt,
|
|
1976
|
+
text: Ht,
|
|
1977
|
+
price_grid: Nt,
|
|
1978
|
+
cta_button: Et,
|
|
1979
|
+
auth_panel: Ae,
|
|
1980
|
+
current_session: Pt,
|
|
1981
|
+
features_list: Tt,
|
|
1982
|
+
tokenization_gate: Zt,
|
|
1983
|
+
guarantee_badge: Bt,
|
|
1984
|
+
offer_banner: xt
|
|
2041
1985
|
};
|
|
2042
|
-
function
|
|
2043
|
-
const a =
|
|
2044
|
-
for (const
|
|
2045
|
-
if (
|
|
2046
|
-
return
|
|
1986
|
+
function Kt({ layout: r, bootstrap: e, onAction: t, auth: n, authSession: i, hasTopBanner: s }) {
|
|
1987
|
+
const a = Ve(() => {
|
|
1988
|
+
for (const v of r.blocks)
|
|
1989
|
+
if (v.type === "price_grid" && v.popular_price_id && e.prices.some((p) => p.id === v.popular_price_id))
|
|
1990
|
+
return v.popular_price_id;
|
|
2047
1991
|
return e.prices[0]?.id ?? null;
|
|
2048
|
-
}, [r.blocks, e.prices]), [
|
|
1992
|
+
}, [r.blocks, e.prices]), [c, l] = x(a), f = {
|
|
2049
1993
|
bootstrap: e,
|
|
2050
|
-
selectedPriceId:
|
|
2051
|
-
setSelectedPriceId:
|
|
1994
|
+
selectedPriceId: c,
|
|
1995
|
+
setSelectedPriceId: l,
|
|
2052
1996
|
onAction: t,
|
|
2053
1997
|
auth: n,
|
|
2054
1998
|
authSession: i
|
|
2055
|
-
},
|
|
2056
|
-
const
|
|
2057
|
-
return
|
|
1999
|
+
}, h = r.blocks.findIndex((v) => v.type === "cta_button"), d = h === -1 ? r.blocks : r.blocks.slice(0, h), b = h === -1 ? [] : r.blocks.slice(h), w = (v, p) => {
|
|
2000
|
+
const y = Yt[v.type];
|
|
2001
|
+
return y ? /* @__PURE__ */ o(y, { block: v, ctx: f }, `${v.type}-${p}`) : (typeof console < "u" && console.warn(`[paywall] unknown block type: ${v.type}`), null);
|
|
2058
2002
|
};
|
|
2059
|
-
return /* @__PURE__ */
|
|
2060
|
-
/* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ o("div", { class: "flex flex-col gap-6", children:
|
|
2003
|
+
return /* @__PURE__ */ u(oe, { children: [
|
|
2004
|
+
/* @__PURE__ */ o("div", { class: "flex-1 min-h-0 overflow-y-auto px-6 pb-3 pt-6 sm:px-8 sm:pb-4 sm:pt-8", children: /* @__PURE__ */ o("div", { class: "flex flex-col gap-6", children: d.map(w) }) }),
|
|
2061
2005
|
b.length > 0 ? (
|
|
2062
2006
|
// Тонкий shadow-top вместо border-t — создаёт depth, читается как
|
|
2063
2007
|
// «footer закреплён к низу dialog'а». Линия выглядела как divider
|
|
@@ -2067,169 +2011,170 @@ function Xt({ layout: r, bootstrap: e, onAction: t, auth: n, authSession: i, has
|
|
|
2067
2011
|
{
|
|
2068
2012
|
class: "flex flex-col gap-4 bg-white px-6 pb-6 pt-3 sm:px-8",
|
|
2069
2013
|
style: { boxShadow: "0 -4px 12px -4px rgba(15,23,42,0.06)" },
|
|
2070
|
-
children: b.map((
|
|
2014
|
+
children: b.map((v, p) => w(v, d.length + p))
|
|
2071
2015
|
}
|
|
2072
2016
|
)
|
|
2073
2017
|
) : null
|
|
2074
2018
|
] });
|
|
2075
2019
|
}
|
|
2076
|
-
function
|
|
2077
|
-
return r ? n ? { open: !0, view: "purchased", error: null } : e.status === "idle" || e.status === "loading" ? { open: !0, view: "loading", error: null } : e.status === "error" ? { open: !0, view: "error", error: e.error } : t.kind === "support" ? { open: !0, view: "support", error: null } : t.kind === "auth_gate" ? { open: !0, view: "auth", error: null } : t.kind === "
|
|
2020
|
+
function Xt(r, e, t, n) {
|
|
2021
|
+
return r ? n ? { open: !0, view: "purchased", error: null } : e.status === "idle" || e.status === "loading" ? { open: !0, view: "loading", error: null } : e.status === "error" ? { open: !0, view: "error", error: e.error } : t.kind === "support" ? { open: !0, view: "support", error: null } : t.kind === "auth_gate" ? { open: !0, view: "auth", error: null } : t.kind === "awaiting_payment" ? { open: !0, view: "awaiting_payment", error: null } : t.kind === "popup_blocked" ? { open: !0, view: "popup_blocked", error: null } : t.kind === "purchase_success" ? { open: !0, view: "purchased", error: null } : t.kind === "verifying" ? { open: !0, view: "loading", error: null } : { open: !0, view: "layout", error: null } : { open: !1, view: null, error: null };
|
|
2078
2022
|
}
|
|
2079
|
-
function
|
|
2023
|
+
function Jt(r, e) {
|
|
2080
2024
|
return r.open === e.open && r.view === e.view && r.error === e.error;
|
|
2081
2025
|
}
|
|
2082
|
-
function
|
|
2026
|
+
function Qt({
|
|
2083
2027
|
client: r,
|
|
2084
2028
|
open: e,
|
|
2085
2029
|
onClose: t,
|
|
2086
2030
|
onEvent: n,
|
|
2087
2031
|
initialView: i,
|
|
2088
|
-
|
|
2089
|
-
|
|
2032
|
+
initialAuthMode: s,
|
|
2033
|
+
purchased: a,
|
|
2034
|
+
renew: c,
|
|
2090
2035
|
onState: l,
|
|
2091
|
-
inline:
|
|
2092
|
-
locale:
|
|
2036
|
+
inline: f,
|
|
2037
|
+
locale: h
|
|
2093
2038
|
}) {
|
|
2094
|
-
const [
|
|
2039
|
+
const [d, b] = x({ status: "idle" }), [w, v] = x(
|
|
2095
2040
|
() => r.auth?.getCachedSession() ?? null
|
|
2096
|
-
), [
|
|
2097
|
-
|
|
2041
|
+
), [p, y] = x(() => i === "support" ? { kind: "support", origin: "standalone" } : i === "auth" ? { kind: "auth_gate", origin: "standalone" } : { kind: "layout" }), U = z(!1), _ = z(null);
|
|
2042
|
+
O(() => {
|
|
2098
2043
|
if (!l) return;
|
|
2099
|
-
const m =
|
|
2100
|
-
|
|
2101
|
-
}, [e,
|
|
2044
|
+
const m = Xt(e, d, p, a), g = _.current;
|
|
2045
|
+
g && Jt(g, m) || (_.current = m, l(m));
|
|
2046
|
+
}, [e, d, p, a, l]), O(() => {
|
|
2102
2047
|
if (r.auth)
|
|
2103
|
-
return r.auth.onAuthChange((m,
|
|
2104
|
-
}, [r.auth]),
|
|
2048
|
+
return r.auth.onAuthChange((m, g) => v(g));
|
|
2049
|
+
}, [r.auth]), O(() => {
|
|
2105
2050
|
if (typeof r.onBootstrapChange == "function")
|
|
2106
2051
|
return r.onBootstrapChange((m) => {
|
|
2107
|
-
|
|
2108
|
-
(
|
|
2052
|
+
b(
|
|
2053
|
+
(g) => g.status === "ready" ? { status: "ready", data: m } : g
|
|
2109
2054
|
);
|
|
2110
2055
|
});
|
|
2111
|
-
}, [r]),
|
|
2112
|
-
if (!e ||
|
|
2056
|
+
}, [r]), O(() => {
|
|
2057
|
+
if (!e || d.status === "ready" || d.status === "loading") return;
|
|
2113
2058
|
let m = !1;
|
|
2114
|
-
return
|
|
2115
|
-
m || (
|
|
2059
|
+
return b({ status: "loading" }), r.bootstrap().then((g) => {
|
|
2060
|
+
m || (b({ status: "ready", data: g }), n("ready", g), g.user?.has_active_subscription && !c && !i && (n("purchase_completed", {
|
|
2116
2061
|
priceId: null,
|
|
2117
2062
|
sessionId: null,
|
|
2118
2063
|
restored: !0
|
|
2119
|
-
}),
|
|
2120
|
-
}).catch((
|
|
2064
|
+
}), y({ kind: "purchase_success", restored: !0 })));
|
|
2065
|
+
}).catch((g) => {
|
|
2121
2066
|
if (m) return;
|
|
2122
|
-
const
|
|
2123
|
-
|
|
2067
|
+
const C = g instanceof B ? g : new B("unknown", "Failed to load paywall", { cause: g });
|
|
2068
|
+
b({ status: "error", error: C }), n("error", C);
|
|
2124
2069
|
}), () => {
|
|
2125
2070
|
m = !0;
|
|
2126
2071
|
};
|
|
2127
|
-
}, [e, r]),
|
|
2072
|
+
}, [e, r]), $e(() => {
|
|
2128
2073
|
if (!e) {
|
|
2129
|
-
|
|
2074
|
+
y({ kind: "layout" }), U.current = !1;
|
|
2130
2075
|
return;
|
|
2131
2076
|
}
|
|
2132
|
-
i === "support" ?
|
|
2077
|
+
i === "support" ? y({ kind: "support", origin: "standalone" }) : i === "auth" && y({ kind: "auth_gate", origin: "standalone" });
|
|
2133
2078
|
}, [e, i]);
|
|
2134
|
-
const
|
|
2079
|
+
const S = async (m) => {
|
|
2135
2080
|
try {
|
|
2136
|
-
const
|
|
2081
|
+
const g = await r.createCheckout({
|
|
2137
2082
|
priceId: m,
|
|
2138
|
-
ignoreActivePurchase:
|
|
2083
|
+
ignoreActivePurchase: c === !0
|
|
2139
2084
|
});
|
|
2140
|
-
if (n("checkout_started", { priceId: m, url:
|
|
2141
|
-
const
|
|
2142
|
-
if (
|
|
2085
|
+
if (n("checkout_started", { priceId: m, url: g.url, acquiring: g.acquiring }), typeof window > "u" || !g.url) return;
|
|
2086
|
+
const C = window.open(g.url, "_blank");
|
|
2087
|
+
if (C) {
|
|
2143
2088
|
try {
|
|
2144
|
-
|
|
2089
|
+
C.opener = null;
|
|
2145
2090
|
} catch {
|
|
2146
2091
|
}
|
|
2147
|
-
|
|
2092
|
+
y({ kind: "awaiting_payment", priceId: m, url: g.url });
|
|
2148
2093
|
} else
|
|
2149
|
-
|
|
2150
|
-
} catch (
|
|
2151
|
-
if (
|
|
2094
|
+
y({ kind: "popup_blocked", priceId: m, url: g.url });
|
|
2095
|
+
} catch (g) {
|
|
2096
|
+
if (g instanceof B && g.code === "already_purchased") {
|
|
2152
2097
|
try {
|
|
2153
2098
|
await r.getUser({ force: !0 });
|
|
2154
2099
|
} catch {
|
|
2155
2100
|
}
|
|
2156
|
-
n("purchase_completed", { priceId: m, sessionId: null, restored: !0 }),
|
|
2101
|
+
n("purchase_completed", { priceId: m, sessionId: null, restored: !0 }), y({ kind: "purchase_success", restored: !0 });
|
|
2157
2102
|
return;
|
|
2158
2103
|
}
|
|
2159
|
-
const
|
|
2160
|
-
n("error",
|
|
2104
|
+
const C = g instanceof B ? g : new B("checkout_failed", "Checkout failed", { cause: g });
|
|
2105
|
+
n("error", C), y({ kind: "layout" });
|
|
2161
2106
|
}
|
|
2162
|
-
},
|
|
2107
|
+
}, P = (m, g) => {
|
|
2163
2108
|
if (typeof window > "u") return;
|
|
2164
|
-
const
|
|
2165
|
-
if (
|
|
2109
|
+
const C = window.open(g, "_blank");
|
|
2110
|
+
if (C) {
|
|
2166
2111
|
try {
|
|
2167
|
-
|
|
2112
|
+
C.opener = null;
|
|
2168
2113
|
} catch {
|
|
2169
2114
|
}
|
|
2170
|
-
|
|
2115
|
+
y({ kind: "awaiting_payment", priceId: m, url: g });
|
|
2171
2116
|
}
|
|
2172
2117
|
};
|
|
2173
|
-
|
|
2174
|
-
if (
|
|
2175
|
-
|
|
2176
|
-
const m =
|
|
2177
|
-
|
|
2178
|
-
if (!
|
|
2118
|
+
O(() => {
|
|
2119
|
+
if (p.kind !== "auth_gate" || !w || w.user.is_anonymous || U.current) return;
|
|
2120
|
+
U.current = !0;
|
|
2121
|
+
const m = p.pendingCheckout, g = p.origin;
|
|
2122
|
+
y({ kind: "verifying" }), (async () => {
|
|
2123
|
+
if (!c)
|
|
2179
2124
|
try {
|
|
2180
2125
|
if ((await r.getUser({ force: !0 })).has_active_subscription) {
|
|
2181
2126
|
n("purchase_completed", {
|
|
2182
2127
|
priceId: m?.priceId ?? null,
|
|
2183
2128
|
sessionId: null,
|
|
2184
2129
|
restored: !0
|
|
2185
|
-
}),
|
|
2130
|
+
}), y({ kind: "purchase_success", restored: !0 });
|
|
2186
2131
|
return;
|
|
2187
2132
|
}
|
|
2188
2133
|
} catch {
|
|
2189
2134
|
}
|
|
2190
2135
|
if (!m) {
|
|
2191
|
-
|
|
2136
|
+
g === "standalone" ? t() : y({ kind: "layout" });
|
|
2192
2137
|
return;
|
|
2193
2138
|
}
|
|
2194
|
-
await
|
|
2139
|
+
await S(m.priceId);
|
|
2195
2140
|
})().finally(() => {
|
|
2196
|
-
|
|
2141
|
+
U.current = !1;
|
|
2197
2142
|
});
|
|
2198
|
-
}, [
|
|
2199
|
-
const
|
|
2143
|
+
}, [w, p]);
|
|
2144
|
+
const M = async (m, g) => {
|
|
2200
2145
|
if (m === "close") {
|
|
2201
2146
|
t();
|
|
2202
2147
|
return;
|
|
2203
2148
|
}
|
|
2204
2149
|
if (m === "price_selected") {
|
|
2205
|
-
n("price_selected",
|
|
2150
|
+
n("price_selected", g);
|
|
2206
2151
|
return;
|
|
2207
2152
|
}
|
|
2208
2153
|
if (m === "restore") {
|
|
2209
2154
|
if (!r.auth) return;
|
|
2210
|
-
const
|
|
2211
|
-
if (
|
|
2212
|
-
|
|
2155
|
+
const C = r.auth.getCachedSession();
|
|
2156
|
+
if (C && !C.user.is_anonymous) return;
|
|
2157
|
+
y({ kind: "auth_gate", intent: "restore" });
|
|
2213
2158
|
return;
|
|
2214
2159
|
}
|
|
2215
2160
|
if (m === "support") {
|
|
2216
|
-
|
|
2161
|
+
y({ kind: "support", origin: "layout" });
|
|
2217
2162
|
return;
|
|
2218
2163
|
}
|
|
2219
|
-
if (m === "checkout" &&
|
|
2220
|
-
const
|
|
2221
|
-
if (!
|
|
2222
|
-
n("error", new
|
|
2164
|
+
if (m === "checkout" && d.status === "ready") {
|
|
2165
|
+
const C = g?.priceId;
|
|
2166
|
+
if (!C) {
|
|
2167
|
+
n("error", new B("no_price", "No price selected"));
|
|
2223
2168
|
return;
|
|
2224
2169
|
}
|
|
2225
|
-
const
|
|
2226
|
-
if (
|
|
2227
|
-
|
|
2170
|
+
const I = d.data.settings.checkout_mode ?? "guest", A = r.auth?.getCachedSession() ?? null, V = !!A && !A.user.is_anonymous;
|
|
2171
|
+
if (I === "preauth" && !!r.auth && !V) {
|
|
2172
|
+
y({ kind: "auth_gate", pendingCheckout: { priceId: C } });
|
|
2228
2173
|
return;
|
|
2229
2174
|
}
|
|
2230
|
-
await
|
|
2175
|
+
await S(C);
|
|
2231
2176
|
}
|
|
2232
|
-
},
|
|
2177
|
+
}, j = d.status === "ready" ? d.data.settings.brand_color : null, T = d.status === "ready" ? d.data.settings.allow_close !== !1 : !0, q = p.kind === "layout" && d.status === "ready" ? Me(d.data.offers) : null, E = q ? /* @__PURE__ */ o(bt, { offer: q }) : null, L = {
|
|
2233
2178
|
type: "auth_panel",
|
|
2234
2179
|
// Заголовок не задаём — AuthGate сам решит по intent'у (restore →
|
|
2235
2180
|
// "Restore Purchases", остальные → дефолтный "Welcome back!").
|
|
@@ -2238,91 +2183,83 @@ function er({
|
|
|
2238
2183
|
// Не скрываем при наличии сессии — auto-resume useEffect отрабатывает быстрее,
|
|
2239
2184
|
// чем хотим показывать "Signed in as ..." промежуточным экраном.
|
|
2240
2185
|
hide_when_authenticated: !1,
|
|
2241
|
-
providers:
|
|
2242
|
-
},
|
|
2243
|
-
|
|
2186
|
+
providers: d.status === "ready" ? d.data.settings.auth_providers : void 0
|
|
2187
|
+
}, R = p.kind === "support" ? /* @__PURE__ */ o(
|
|
2188
|
+
vt,
|
|
2244
2189
|
{
|
|
2245
2190
|
client: r,
|
|
2246
|
-
authSession:
|
|
2247
|
-
origin:
|
|
2191
|
+
authSession: w,
|
|
2192
|
+
origin: p.origin,
|
|
2248
2193
|
onBack: () => {
|
|
2249
|
-
|
|
2194
|
+
p.origin === "standalone" ? t() : y({ kind: "layout" });
|
|
2250
2195
|
}
|
|
2251
2196
|
}
|
|
2252
|
-
) : null,
|
|
2253
|
-
return /* @__PURE__ */ o(
|
|
2254
|
-
|
|
2197
|
+
) : null, N = p.kind === "auth_gate" && p.origin !== "standalone" || p.kind === "support", Y = d.status === "ready" ? d.data : null;
|
|
2198
|
+
return /* @__PURE__ */ o(Qe, { bootstrap: Y, forceLocale: h, children: /* @__PURE__ */ o(
|
|
2199
|
+
et,
|
|
2255
2200
|
{
|
|
2256
2201
|
open: e,
|
|
2257
2202
|
onClose: t,
|
|
2258
|
-
brandColor:
|
|
2259
|
-
topBanner:
|
|
2260
|
-
allowClose:
|
|
2261
|
-
hideCloseButton:
|
|
2262
|
-
inline:
|
|
2203
|
+
brandColor: j,
|
|
2204
|
+
topBanner: E,
|
|
2205
|
+
allowClose: T,
|
|
2206
|
+
hideCloseButton: N,
|
|
2207
|
+
inline: f,
|
|
2263
2208
|
labelledBy: "pw-title",
|
|
2264
|
-
children:
|
|
2209
|
+
children: a ? /* @__PURE__ */ o(we, { onContinue: t }) : p.kind === "purchase_success" ? /* @__PURE__ */ o(we, { restored: p.restored, onContinue: t }) : R || (d.status === "loading" || d.status === "idle" || p.kind === "verifying" ? /* @__PURE__ */ o(er, { verifying: p.kind === "verifying" }) : d.status === "error" ? /* @__PURE__ */ o(tr, { message: d.error.message }) : p.kind === "auth_gate" && r.auth ? /* @__PURE__ */ o(
|
|
2265
2210
|
gt,
|
|
2266
2211
|
{
|
|
2267
|
-
block:
|
|
2268
|
-
bootstrap:
|
|
2212
|
+
block: L,
|
|
2213
|
+
bootstrap: d.data,
|
|
2269
2214
|
auth: r.auth,
|
|
2270
|
-
authSession:
|
|
2271
|
-
showBack:
|
|
2272
|
-
intent:
|
|
2215
|
+
authSession: w,
|
|
2216
|
+
showBack: p.origin !== "standalone",
|
|
2217
|
+
intent: p.intent ?? (p.origin === "standalone" ? "standalone" : "preauth"),
|
|
2218
|
+
initialMode: p.origin === "standalone" ? s : void 0,
|
|
2273
2219
|
onBack: () => {
|
|
2274
|
-
|
|
2220
|
+
p.origin === "standalone" ? t() : y({ kind: "layout" });
|
|
2275
2221
|
}
|
|
2276
2222
|
}
|
|
2277
|
-
) :
|
|
2278
|
-
|
|
2279
|
-
{
|
|
2280
|
-
auth: r.auth,
|
|
2281
|
-
onSuccess: () => {
|
|
2282
|
-
f.origin === "standalone" ? t() : g({ kind: "layout" });
|
|
2283
|
-
},
|
|
2284
|
-
onBack: f.origin === "standalone" ? void 0 : () => g({ kind: "layout" })
|
|
2285
|
-
}
|
|
2286
|
-
) : f.kind === "awaiting_payment" ? /* @__PURE__ */ o(
|
|
2287
|
-
ir,
|
|
2223
|
+
) : p.kind === "awaiting_payment" ? /* @__PURE__ */ o(
|
|
2224
|
+
nr,
|
|
2288
2225
|
{
|
|
2289
2226
|
client: r,
|
|
2290
|
-
onBack: () =>
|
|
2227
|
+
onBack: () => y({ kind: "layout" }),
|
|
2291
2228
|
onReopen: () => {
|
|
2292
2229
|
if (typeof window > "u") return;
|
|
2293
|
-
const m = window.open(
|
|
2230
|
+
const m = window.open(p.url, "_blank");
|
|
2294
2231
|
if (m)
|
|
2295
2232
|
try {
|
|
2296
2233
|
m.opener = null;
|
|
2297
2234
|
} catch {
|
|
2298
2235
|
}
|
|
2299
2236
|
},
|
|
2300
|
-
onRetry: () =>
|
|
2237
|
+
onRetry: () => S(p.priceId)
|
|
2301
2238
|
}
|
|
2302
|
-
) :
|
|
2303
|
-
|
|
2239
|
+
) : p.kind === "popup_blocked" ? /* @__PURE__ */ o(rr, { onReopen: () => P(p.priceId, p.url) }) : /* @__PURE__ */ o(
|
|
2240
|
+
Kt,
|
|
2304
2241
|
{
|
|
2305
|
-
layout:
|
|
2306
|
-
bootstrap:
|
|
2307
|
-
onAction:
|
|
2242
|
+
layout: d.data.layout,
|
|
2243
|
+
bootstrap: d.data,
|
|
2244
|
+
onAction: M,
|
|
2308
2245
|
auth: r.auth,
|
|
2309
|
-
authSession:
|
|
2246
|
+
authSession: w
|
|
2310
2247
|
}
|
|
2311
2248
|
))
|
|
2312
2249
|
}
|
|
2313
2250
|
) });
|
|
2314
2251
|
}
|
|
2315
|
-
function
|
|
2316
|
-
const { t: e } =
|
|
2317
|
-
return /* @__PURE__ */
|
|
2252
|
+
function er({ verifying: r }) {
|
|
2253
|
+
const { t: e } = k();
|
|
2254
|
+
return /* @__PURE__ */ u("div", { class: "flex flex-col items-center justify-center gap-3 py-12", children: [
|
|
2318
2255
|
/* @__PURE__ */ o("span", { class: "inline-block h-7 w-7 animate-spin rounded-full border-[2.5px] border-gray-200 border-t-[var(--pw-accent)]" }),
|
|
2319
2256
|
/* @__PURE__ */ o("span", { class: "text-xs font-medium tracking-wide text-gray-500", children: r ? e("modal.verifying_subscription", "Checking your subscription…") : e("modal.loading", "Loading…") })
|
|
2320
2257
|
] });
|
|
2321
2258
|
}
|
|
2322
|
-
function
|
|
2323
|
-
const { t: e } =
|
|
2324
|
-
return /* @__PURE__ */
|
|
2325
|
-
/* @__PURE__ */ o("div", { class: "flex h-11 w-11 items-center justify-center rounded-full bg-red-50", children: /* @__PURE__ */
|
|
2259
|
+
function tr({ message: r }) {
|
|
2260
|
+
const { t: e } = k();
|
|
2261
|
+
return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-2 py-8 text-center", children: [
|
|
2262
|
+
/* @__PURE__ */ o("div", { class: "flex h-11 w-11 items-center justify-center rounded-full bg-red-50", children: /* @__PURE__ */ u("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
2326
2263
|
/* @__PURE__ */ o("path", { d: "M10 6v5M10 14h.01", stroke: "#dc2626", "stroke-width": "2", "stroke-linecap": "round" }),
|
|
2327
2264
|
/* @__PURE__ */ o("circle", { cx: "10", cy: "10", r: "8", stroke: "#dc2626", "stroke-width": "1.75" })
|
|
2328
2265
|
] }) }),
|
|
@@ -2330,16 +2267,16 @@ function rr({ message: r }) {
|
|
|
2330
2267
|
/* @__PURE__ */ o("p", { class: "text-xs leading-relaxed text-gray-500", children: r })
|
|
2331
2268
|
] });
|
|
2332
2269
|
}
|
|
2333
|
-
function
|
|
2334
|
-
const { t: e } =
|
|
2335
|
-
return /* @__PURE__ */
|
|
2270
|
+
function rr({ onReopen: r }) {
|
|
2271
|
+
const { t: e } = k();
|
|
2272
|
+
return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
|
|
2336
2273
|
/* @__PURE__ */ o(
|
|
2337
2274
|
"div",
|
|
2338
2275
|
{
|
|
2339
2276
|
class: "flex h-11 w-11 items-center justify-center rounded-full",
|
|
2340
2277
|
style: { background: "color-mix(in srgb, var(--pw-accent) 12%, white)", color: "var(--pw-accent)" },
|
|
2341
2278
|
"aria-hidden": "true",
|
|
2342
|
-
children: /* @__PURE__ */
|
|
2279
|
+
children: /* @__PURE__ */ u("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [
|
|
2343
2280
|
/* @__PURE__ */ o("path", { d: "M4 5h12v10H4z", stroke: "currentColor", "stroke-width": "1.75", "stroke-linejoin": "round" }),
|
|
2344
2281
|
/* @__PURE__ */ o("path", { d: "M7 9l3 3 4-5", stroke: "currentColor", "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" })
|
|
2345
2282
|
] })
|
|
@@ -2362,35 +2299,35 @@ function nr({ onReopen: r }) {
|
|
|
2362
2299
|
)
|
|
2363
2300
|
] });
|
|
2364
2301
|
}
|
|
2365
|
-
function
|
|
2302
|
+
function nr({
|
|
2366
2303
|
client: r,
|
|
2367
2304
|
onBack: e,
|
|
2368
2305
|
onReopen: t,
|
|
2369
2306
|
onRetry: n
|
|
2370
2307
|
}) {
|
|
2371
|
-
const { t: i } =
|
|
2372
|
-
|
|
2373
|
-
|
|
2308
|
+
const { t: i } = k(), [s, a] = x(!1), [c, l] = x(!1), f = z(null);
|
|
2309
|
+
O(() => () => {
|
|
2310
|
+
f.current !== null && clearTimeout(f.current);
|
|
2374
2311
|
}, []);
|
|
2375
|
-
const
|
|
2312
|
+
const h = async () => {
|
|
2376
2313
|
if (!s) {
|
|
2377
|
-
a(!0),
|
|
2314
|
+
a(!0), l(!1);
|
|
2378
2315
|
try {
|
|
2379
2316
|
if ((await r.getUser({ force: !0 })).has_active_subscription) {
|
|
2380
2317
|
typeof window < "u" && window.postMessage({ type: "paywall_purchase" }, "*");
|
|
2381
2318
|
return;
|
|
2382
2319
|
}
|
|
2383
|
-
|
|
2384
|
-
|
|
2320
|
+
l(!0), f.current !== null && clearTimeout(f.current), f.current = setTimeout(() => {
|
|
2321
|
+
l(!1), f.current = null;
|
|
2385
2322
|
}, 5e3);
|
|
2386
2323
|
} catch {
|
|
2387
|
-
|
|
2324
|
+
l(!0);
|
|
2388
2325
|
} finally {
|
|
2389
2326
|
a(!1);
|
|
2390
2327
|
}
|
|
2391
2328
|
}
|
|
2392
2329
|
};
|
|
2393
|
-
return /* @__PURE__ */
|
|
2330
|
+
return /* @__PURE__ */ u("div", { class: "flex flex-col gap-3 px-6 pb-6 pt-4 sm:px-8 sm:pb-8 sm:pt-5", children: [
|
|
2394
2331
|
/* @__PURE__ */ o(
|
|
2395
2332
|
"button",
|
|
2396
2333
|
{
|
|
@@ -2400,8 +2337,8 @@ function ir({
|
|
|
2400
2337
|
children: i("nav.back", "← Back")
|
|
2401
2338
|
}
|
|
2402
2339
|
),
|
|
2403
|
-
/* @__PURE__ */
|
|
2404
|
-
/* @__PURE__ */
|
|
2340
|
+
/* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-3 py-6 text-center", children: [
|
|
2341
|
+
/* @__PURE__ */ u("div", { class: "relative flex h-12 w-12 items-center justify-center", children: [
|
|
2405
2342
|
/* @__PURE__ */ o(
|
|
2406
2343
|
"span",
|
|
2407
2344
|
{
|
|
@@ -2421,7 +2358,7 @@ function ir({
|
|
|
2421
2358
|
"button",
|
|
2422
2359
|
{
|
|
2423
2360
|
type: "button",
|
|
2424
|
-
onClick:
|
|
2361
|
+
onClick: h,
|
|
2425
2362
|
disabled: s,
|
|
2426
2363
|
class: "mt-1 rounded-xl px-5 py-2.5 text-sm font-semibold text-white transition-all hover:-translate-y-px hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:translate-y-0 disabled:hover:brightness-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--pw-accent)]",
|
|
2427
2364
|
style: {
|
|
@@ -2431,9 +2368,9 @@ function ir({
|
|
|
2431
2368
|
children: s ? i("payment.checking", "Checking…") : i("payment.ive_paid", "I've paid")
|
|
2432
2369
|
}
|
|
2433
2370
|
),
|
|
2434
|
-
|
|
2371
|
+
c ? /* @__PURE__ */ o("p", { class: "text-xs leading-relaxed text-gray-500", children: i("payment.still_processing", "Payment is still being processed. Please try again in a moment.") }) : null
|
|
2435
2372
|
] }),
|
|
2436
|
-
/* @__PURE__ */
|
|
2373
|
+
/* @__PURE__ */ u("div", { class: "rounded-2xl border border-gray-200 bg-gray-50/60 p-3.5", children: [
|
|
2437
2374
|
/* @__PURE__ */ o("p", { class: "text-xs leading-relaxed text-gray-600", children: i("payment.popup_help_text", "Checkout window didn't open or got blocked? Click here to open it again.") }),
|
|
2438
2375
|
/* @__PURE__ */ o(
|
|
2439
2376
|
"button",
|
|
@@ -2456,12 +2393,12 @@ function ir({
|
|
|
2456
2393
|
)
|
|
2457
2394
|
] });
|
|
2458
2395
|
}
|
|
2459
|
-
function
|
|
2396
|
+
function we({
|
|
2460
2397
|
onContinue: r,
|
|
2461
2398
|
restored: e = !1
|
|
2462
2399
|
}) {
|
|
2463
|
-
const { t } =
|
|
2464
|
-
return /* @__PURE__ */
|
|
2400
|
+
const { t } = k();
|
|
2401
|
+
return /* @__PURE__ */ u("div", { class: "flex flex-col items-center gap-3 py-8 text-center", children: [
|
|
2465
2402
|
/* @__PURE__ */ o(
|
|
2466
2403
|
"div",
|
|
2467
2404
|
{
|
|
@@ -2505,17 +2442,17 @@ function ke({
|
|
|
2505
2442
|
)
|
|
2506
2443
|
] });
|
|
2507
2444
|
}
|
|
2508
|
-
const
|
|
2509
|
-
class
|
|
2445
|
+
const ir = 10 * 6e4, or = 5e3, sr = 3e4;
|
|
2446
|
+
class ar {
|
|
2510
2447
|
constructor(e) {
|
|
2511
2448
|
this.timer = null, this.timeoutTimer = null, this.visibilityHandler = null, this.focusHandler = null, this.messageHandler = null, this.stopped = !1, this.checking = !1, this.opts = {
|
|
2512
2449
|
client: e.client,
|
|
2513
2450
|
onActive: e.onActive,
|
|
2514
2451
|
onTimeout: e.onTimeout ?? (() => {
|
|
2515
2452
|
}),
|
|
2516
|
-
timeoutMs: e.timeoutMs ??
|
|
2517
|
-
visibleIntervalMs: e.visibleIntervalMs ??
|
|
2518
|
-
hiddenIntervalMs: e.hiddenIntervalMs ??
|
|
2453
|
+
timeoutMs: e.timeoutMs ?? ir,
|
|
2454
|
+
visibleIntervalMs: e.visibleIntervalMs ?? or,
|
|
2455
|
+
hiddenIntervalMs: e.hiddenIntervalMs ?? sr
|
|
2519
2456
|
};
|
|
2520
2457
|
}
|
|
2521
2458
|
start() {
|
|
@@ -2554,19 +2491,19 @@ class lr {
|
|
|
2554
2491
|
!t || typeof t != "object" || t.type === "paywall_purchase" && this.check();
|
|
2555
2492
|
}
|
|
2556
2493
|
}
|
|
2557
|
-
function
|
|
2494
|
+
function lr() {
|
|
2558
2495
|
return !(typeof document > "u" || typeof window > "u" || typeof location < "u" && location.protocol === "chrome-extension:");
|
|
2559
2496
|
}
|
|
2560
|
-
const
|
|
2497
|
+
const ie = { open: !1, view: null, error: null }, F = {
|
|
2561
2498
|
status: "paywall_status",
|
|
2562
2499
|
priceId: "paywall_price_id",
|
|
2563
2500
|
sessionId: "paywall_session_id"
|
|
2564
2501
|
};
|
|
2565
|
-
let
|
|
2502
|
+
let cr = class {
|
|
2566
2503
|
constructor(e) {
|
|
2567
|
-
this.handle = null, this.isOpen = !1, this.listeners = /* @__PURE__ */ new Map(), this.userUnsub = null, this.authUnsub = null, this.watcher = null, this.tracker = null, this.purchased = !1, this.trialStore = null, this.trialStoreConfig = null, this.lastTrialStatus = null, this.trialExpiredFired = !1, this.lastVisibility = null, this.currentState =
|
|
2568
|
-
const { auth: t, ownsAuth: n } =
|
|
2569
|
-
this.auth = t, this.ownsAuth = n, this.billing = e.client ?? new
|
|
2504
|
+
this.handle = null, this.isOpen = !1, this.listeners = /* @__PURE__ */ new Map(), this.userUnsub = null, this.authUnsub = null, this.watcher = null, this.tracker = null, this.purchased = !1, this.trialStore = null, this.trialStoreConfig = null, this.lastTrialStatus = null, this.trialExpiredFired = !1, this.lastVisibility = null, this.currentState = ie, this.stateListeners = /* @__PURE__ */ new Set();
|
|
2505
|
+
const { auth: t, ownsAuth: n } = ur(e);
|
|
2506
|
+
this.auth = t, this.ownsAuth = n, this.billing = e.client ?? new Ue({ ...e, auth: this.auth }), this.host = e.host, this.shadowMode = e.shadowMode ?? "closed", this.mountThenLoad = e.mountThenLoad ?? !0, this.inline = e.inline === !0, this.forceLocale = e.locale ?? null, this.userUnsub = this.billing.onUserChange((i) => {
|
|
2570
2507
|
this.emit("userChange", i);
|
|
2571
2508
|
}), this.auth && (this.authUnsub = this.auth.onAuthChange((i, s) => {
|
|
2572
2509
|
this.emit("authChange", { event: i, session: s });
|
|
@@ -2577,7 +2514,7 @@ let ur = class {
|
|
|
2577
2514
|
const t = typeof e == "object" && e !== null ? e : {};
|
|
2578
2515
|
if (t.enabled === !1) return;
|
|
2579
2516
|
const n = t.endpoint ?? `${this.billing.apiOrigin}/api/v1/paywall/${this.billing.paywallId}/events`;
|
|
2580
|
-
this.tracker = new
|
|
2517
|
+
this.tracker = new je({
|
|
2581
2518
|
endpoint: n,
|
|
2582
2519
|
paywallId: this.billing.paywallId,
|
|
2583
2520
|
capabilities: this.billing.capabilities,
|
|
@@ -2744,30 +2681,50 @@ let ur = class {
|
|
|
2744
2681
|
this.auth && this.openInternal("auth", { ...e, skipTrial: !0 });
|
|
2745
2682
|
}
|
|
2746
2683
|
/**
|
|
2747
|
-
*
|
|
2748
|
-
* `
|
|
2749
|
-
*
|
|
2750
|
-
*
|
|
2751
|
-
*
|
|
2752
|
-
*
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2684
|
+
* Шорткат над `openAuth()` — открывает модалку сразу на signin-форме.
|
|
2685
|
+
* Эквивалент `openAuth()` (signin — дефолт). Существует для симметрии с
|
|
2686
|
+
* `openSignup()` и читаемости host-кода:
|
|
2687
|
+
* - `paywall.openSignin()` — «вход в существующий аккаунт»
|
|
2688
|
+
* - `paywall.openSignup()` — «новая регистрация»
|
|
2689
|
+
* Без managed-auth — no-op.
|
|
2690
|
+
*/
|
|
2691
|
+
openSignin(e = {}) {
|
|
2692
|
+
this.auth && this.openInternal("auth", { ...e, skipTrial: !0, authMode: "signin" });
|
|
2693
|
+
}
|
|
2694
|
+
/**
|
|
2695
|
+
* Открывает модалку с auth-gate сразу в режиме регистрации (signup-mode
|
|
2696
|
+
* AuthPanel'а — email/password/repeat). Если в paywall layout админ
|
|
2697
|
+
* отключил allow_signup, AuthPanel игнорит mode и стартует с signin —
|
|
2698
|
+
* соблюдается admin-конфиг.
|
|
2699
|
+
* Без managed-auth — no-op.
|
|
2700
|
+
*/
|
|
2701
|
+
openSignup(e = {}) {
|
|
2702
|
+
this.auth && this.openInternal("auth", { ...e, skipTrial: !0, authMode: "signup" });
|
|
2703
|
+
}
|
|
2704
|
+
/**
|
|
2705
|
+
* Headless anonymous signin без открытия модалки. Внутри:
|
|
2706
|
+
* idempotent (если уже анон — instant return) → resume через сохранённый
|
|
2707
|
+
* refresh_token → fresh /auth/anonymous/signin. Дедуплицирует
|
|
2708
|
+
* параллельные вызовы внутри AuthClient'а.
|
|
2758
2709
|
*
|
|
2759
|
-
*
|
|
2760
|
-
*
|
|
2761
|
-
*
|
|
2710
|
+
* Удобно для host-кнопок типа «Continue as guest» — host сам управляет
|
|
2711
|
+
* loading-стейтом на своей кнопке, без полупустой модалки со спиннером.
|
|
2712
|
+
* Без managed-auth — резолвится rejected promise'ом (нет AuthClient'а
|
|
2713
|
+
* чтобы делать signin).
|
|
2762
2714
|
*/
|
|
2763
|
-
|
|
2764
|
-
this.auth
|
|
2715
|
+
signInAnonymously() {
|
|
2716
|
+
return this.auth ? this.auth.signInAnonymously() : Promise.reject(
|
|
2717
|
+
new B(
|
|
2718
|
+
"invalid_config",
|
|
2719
|
+
"signInAnonymously requires managed-auth. Pass `auth: true` to PaywallUI."
|
|
2720
|
+
)
|
|
2721
|
+
);
|
|
2765
2722
|
}
|
|
2766
2723
|
openInternal(e, t) {
|
|
2767
2724
|
t.identity && this.billing.setIdentity(t.identity), this.purchased = !1;
|
|
2768
|
-
const n = t.skipTrial === !0 || e === "support", i = t.skipVisibility === !0 || e === "support" || e === "auth"
|
|
2725
|
+
const n = t.skipTrial === !0 || e === "support", i = t.skipVisibility === !0 || e === "support" || e === "auth", s = t.renew === !0;
|
|
2769
2726
|
if (n && i) {
|
|
2770
|
-
this.mountAndShow(e, { renew: s });
|
|
2727
|
+
this.mountAndShow(e, { renew: s, authMode: t.authMode });
|
|
2771
2728
|
return;
|
|
2772
2729
|
}
|
|
2773
2730
|
const a = this.billing.getCachedBootstrap();
|
|
@@ -2776,11 +2733,11 @@ let ur = class {
|
|
|
2776
2733
|
return;
|
|
2777
2734
|
}
|
|
2778
2735
|
if (this.mountThenLoad) {
|
|
2779
|
-
this.mountAndShow(e, { renew: s }), this.billing.bootstrap().then((
|
|
2736
|
+
this.mountAndShow(e, { renew: s }), this.billing.bootstrap().then((c) => this.runDelayedGates(c, { skipTrial: n, skipVisibility: i })).catch(() => {
|
|
2780
2737
|
});
|
|
2781
2738
|
return;
|
|
2782
2739
|
}
|
|
2783
|
-
this.billing.bootstrap().then((
|
|
2740
|
+
this.billing.bootstrap().then((c) => this.runOpenGates(e, c, { skipTrial: n, skipVisibility: i, renew: s })).catch(() => {
|
|
2784
2741
|
this.mountAndShow(e, { renew: s });
|
|
2785
2742
|
});
|
|
2786
2743
|
}
|
|
@@ -2845,8 +2802,8 @@ let ur = class {
|
|
|
2845
2802
|
return;
|
|
2846
2803
|
}
|
|
2847
2804
|
if (a.blocked) {
|
|
2848
|
-
const
|
|
2849
|
-
this.lastTrialStatus =
|
|
2805
|
+
const c = await s.recordBlock();
|
|
2806
|
+
this.lastTrialStatus = c, this.emit("trial_blocked", c);
|
|
2850
2807
|
return;
|
|
2851
2808
|
}
|
|
2852
2809
|
this.trialExpiredFired || (this.trialExpiredFired = !0, this.emit("trial_expired")), this.mountAndShow(e, { renew: n });
|
|
@@ -2855,31 +2812,38 @@ let ur = class {
|
|
|
2855
2812
|
});
|
|
2856
2813
|
}
|
|
2857
2814
|
ensureTrialStore(e) {
|
|
2858
|
-
if (this.trialStore && this.trialStoreConfig &&
|
|
2815
|
+
if (this.trialStore && this.trialStoreConfig && pr(this.trialStoreConfig, e))
|
|
2859
2816
|
return this.trialStore;
|
|
2860
2817
|
this.trialStoreConfig = e;
|
|
2861
2818
|
const t = this.billing.createTrialStore;
|
|
2862
|
-
return this.trialStore = typeof t == "function" ? t.call(this.billing, e) :
|
|
2819
|
+
return this.trialStore = typeof t == "function" ? t.call(this.billing, e) : Re(this.billing.getStorage(), this.billing.paywallId, e), this.trialStore;
|
|
2863
2820
|
}
|
|
2864
2821
|
mountAndShow(e, t = {}) {
|
|
2865
|
-
const n = t.renew === !0;
|
|
2822
|
+
const n = t.renew === !0, i = t.authMode;
|
|
2866
2823
|
if (this.handle) {
|
|
2867
|
-
this.isOpen = !0, this.handle.update({
|
|
2824
|
+
this.isOpen = !0, this.handle.update({
|
|
2825
|
+
open: !0,
|
|
2826
|
+
initialView: e,
|
|
2827
|
+
initialAuthMode: i,
|
|
2828
|
+
purchased: !1,
|
|
2829
|
+
renew: n
|
|
2830
|
+
}), this.emit("open");
|
|
2868
2831
|
return;
|
|
2869
2832
|
}
|
|
2870
|
-
this.isOpen = !0, this.handle =
|
|
2871
|
-
|
|
2833
|
+
this.isOpen = !0, this.handle = We(
|
|
2834
|
+
Qt,
|
|
2872
2835
|
{
|
|
2873
2836
|
client: this.billing,
|
|
2874
2837
|
open: !0,
|
|
2875
2838
|
initialView: e,
|
|
2839
|
+
initialAuthMode: i,
|
|
2876
2840
|
purchased: !1,
|
|
2877
2841
|
renew: n,
|
|
2878
2842
|
onClose: () => this.close(),
|
|
2879
|
-
onEvent: (
|
|
2880
|
-
this.emit(
|
|
2843
|
+
onEvent: (s, a) => {
|
|
2844
|
+
this.emit(s, a), s === "checkout_started" && this.startUserWatcher();
|
|
2881
2845
|
},
|
|
2882
|
-
onState: (
|
|
2846
|
+
onState: (s) => this.applyState(s),
|
|
2883
2847
|
inline: this.inline,
|
|
2884
2848
|
locale: this.forceLocale
|
|
2885
2849
|
},
|
|
@@ -2887,7 +2851,7 @@ let ur = class {
|
|
|
2887
2851
|
), this.emit("open");
|
|
2888
2852
|
}
|
|
2889
2853
|
applyState(e) {
|
|
2890
|
-
if (!
|
|
2854
|
+
if (!hr(this.currentState, e)) {
|
|
2891
2855
|
this.currentState = e;
|
|
2892
2856
|
for (const t of this.stateListeners)
|
|
2893
2857
|
try {
|
|
@@ -3035,8 +2999,8 @@ let ur = class {
|
|
|
3035
2999
|
try {
|
|
3036
3000
|
if (s = await this.ensureTrialStore(a).check(), this.lastTrialStatus = s, s.blocked)
|
|
3037
3001
|
return { access: "granted", reason: "trial_blocked", visibility: i, trial: s, user: n };
|
|
3038
|
-
} catch (
|
|
3039
|
-
typeof console < "u" && console.warn("[paywall] getAccess: trial check failed",
|
|
3002
|
+
} catch (c) {
|
|
3003
|
+
typeof console < "u" && console.warn("[paywall] getAccess: trial check failed", c);
|
|
3040
3004
|
}
|
|
3041
3005
|
}
|
|
3042
3006
|
return { access: "blocked", reason: "no_subscription", visibility: i, trial: s, user: n };
|
|
@@ -3053,7 +3017,7 @@ let ur = class {
|
|
|
3053
3017
|
// В extension popup runtime — no-op (popup не доживёт). Там полагаемся на
|
|
3054
3018
|
// bootstrap при следующем открытии.
|
|
3055
3019
|
startUserWatcher() {
|
|
3056
|
-
this.watcher ||
|
|
3020
|
+
this.watcher || lr() && (this.watcher = new ar({
|
|
3057
3021
|
client: this.billing,
|
|
3058
3022
|
onActive: (e) => {
|
|
3059
3023
|
this.watcher = null, this.emit("purchase_completed", { priceId: null, sessionId: null });
|
|
@@ -3072,7 +3036,7 @@ let ur = class {
|
|
|
3072
3036
|
}), this.watcher.start());
|
|
3073
3037
|
}
|
|
3074
3038
|
close() {
|
|
3075
|
-
!this.isOpen || !this.handle || (this.isOpen = !1, this.purchased = !1, this.handle.update({ open: !1, purchased: !1 }), this.applyState(
|
|
3039
|
+
!this.isOpen || !this.handle || (this.isOpen = !1, this.purchased = !1, this.handle.update({ open: !1, purchased: !1 }), this.applyState(ie), this.emit("close"));
|
|
3076
3040
|
}
|
|
3077
3041
|
/**
|
|
3078
3042
|
* Сканирует текущий URL на маркеры возврата с checkout и эмитит
|
|
@@ -3082,23 +3046,23 @@ let ur = class {
|
|
|
3082
3046
|
*/
|
|
3083
3047
|
checkReturn() {
|
|
3084
3048
|
if (typeof window > "u") return;
|
|
3085
|
-
const e = new URL(window.location.href), t =
|
|
3049
|
+
const e = new URL(window.location.href), t = ke(e.hash.replace(/^#/, "")), n = ke(e.search.replace(/^\?/, "")), i = t ?? n;
|
|
3086
3050
|
i && (i.status === "paid" ? (this.emit("purchase_completed", {
|
|
3087
3051
|
priceId: i.priceId,
|
|
3088
3052
|
sessionId: i.sessionId
|
|
3089
|
-
}),
|
|
3053
|
+
}), fr(i)) : (i.status === "failed" || i.status === "cancelled") && this.emit("purchase_failed", { reason: i.status }), gr(e));
|
|
3090
3054
|
}
|
|
3091
3055
|
destroy() {
|
|
3092
|
-
this.tracker?.destroy(), this.tracker = null, this.listeners.clear(), this.stateListeners.clear(), this.watcher?.stop(), this.watcher = null, this.userUnsub?.(), this.userUnsub = null, this.authUnsub?.(), this.authUnsub = null, this.ownsAuth && this.auth && this.auth.destroy?.(), this.ownsAuth = !1, this.billing.destroy?.(), this.handle?.unmount(), this.handle = null, this.isOpen = !1, this.currentState =
|
|
3056
|
+
this.tracker?.destroy(), this.tracker = null, this.listeners.clear(), this.stateListeners.clear(), this.watcher?.stop(), this.watcher = null, this.userUnsub?.(), this.userUnsub = null, this.authUnsub?.(), this.authUnsub = null, this.ownsAuth && this.auth && this.auth.destroy?.(), this.ownsAuth = !1, this.billing.destroy?.(), this.handle?.unmount(), this.handle = null, this.isOpen = !1, this.currentState = ie;
|
|
3093
3057
|
}
|
|
3094
3058
|
};
|
|
3095
|
-
function
|
|
3059
|
+
function ur(r) {
|
|
3096
3060
|
if (!r.auth) return { auth: void 0, ownsAuth: !1 };
|
|
3097
|
-
if (r.auth instanceof
|
|
3061
|
+
if (r.auth instanceof le || dr(r.auth))
|
|
3098
3062
|
return { auth: r.auth, ownsAuth: !1 };
|
|
3099
3063
|
const e = r.auth === !0 ? {} : r.auth;
|
|
3100
3064
|
return {
|
|
3101
|
-
auth: new
|
|
3065
|
+
auth: new le({
|
|
3102
3066
|
paywallId: r.paywallId,
|
|
3103
3067
|
apiOrigin: e.apiOrigin ?? r.apiOrigin,
|
|
3104
3068
|
storage: e.storage ?? r.storage,
|
|
@@ -3108,18 +3072,18 @@ function dr(r) {
|
|
|
3108
3072
|
ownsAuth: !0
|
|
3109
3073
|
};
|
|
3110
3074
|
}
|
|
3111
|
-
function
|
|
3075
|
+
function dr(r) {
|
|
3112
3076
|
if (typeof r != "object" || r === null) return !1;
|
|
3113
3077
|
const e = r;
|
|
3114
3078
|
return typeof e.onAuthChange == "function" && typeof e.getCachedSession == "function" && typeof e.signOut == "function";
|
|
3115
3079
|
}
|
|
3116
|
-
function
|
|
3080
|
+
function hr(r, e) {
|
|
3117
3081
|
return r.open === e.open && r.view === e.view && r.error === e.error;
|
|
3118
3082
|
}
|
|
3119
|
-
function
|
|
3083
|
+
function pr(r, e) {
|
|
3120
3084
|
return r.mode === e.mode && r.payload === e.payload && r.storage === e.storage;
|
|
3121
3085
|
}
|
|
3122
|
-
function
|
|
3086
|
+
function ke(r) {
|
|
3123
3087
|
if (!r) return null;
|
|
3124
3088
|
const e = new URLSearchParams(r), t = e.get(F.status);
|
|
3125
3089
|
return t ? {
|
|
@@ -3128,7 +3092,7 @@ function ve(r) {
|
|
|
3128
3092
|
sessionId: e.get(F.sessionId)
|
|
3129
3093
|
} : null;
|
|
3130
3094
|
}
|
|
3131
|
-
function
|
|
3095
|
+
function fr(r) {
|
|
3132
3096
|
if (!(typeof window > "u" || !window.opener))
|
|
3133
3097
|
try {
|
|
3134
3098
|
window.opener.postMessage(
|
|
@@ -3143,7 +3107,7 @@ function gr(r) {
|
|
|
3143
3107
|
} catch {
|
|
3144
3108
|
}
|
|
3145
3109
|
}
|
|
3146
|
-
function
|
|
3110
|
+
function gr(r) {
|
|
3147
3111
|
const e = (n, i) => {
|
|
3148
3112
|
if (!n) return "";
|
|
3149
3113
|
const s = new URLSearchParams(n.replace(/^[?#]/, ""));
|
|
@@ -3153,7 +3117,7 @@ function mr(r) {
|
|
|
3153
3117
|
}, t = r.pathname + e(r.search, "?") + e(r.hash, "#");
|
|
3154
3118
|
window.history.replaceState(null, "", t);
|
|
3155
3119
|
}
|
|
3156
|
-
class
|
|
3120
|
+
class mr {
|
|
3157
3121
|
constructor(e, t, n) {
|
|
3158
3122
|
this.transport = e, this.paywallId = t, this.config = n;
|
|
3159
3123
|
}
|
|
@@ -3176,7 +3140,7 @@ class yr {
|
|
|
3176
3140
|
});
|
|
3177
3141
|
}
|
|
3178
3142
|
}
|
|
3179
|
-
class
|
|
3143
|
+
class yr {
|
|
3180
3144
|
constructor(e, t) {
|
|
3181
3145
|
this.transport = e, this.cachedBootstrap = null, this.cachedUser = null, this.cachedBalances = null, this.identity = null, this.userListeners = /* @__PURE__ */ new Set(), this.balanceListeners = /* @__PURE__ */ new Set(), this.bootstrapListeners = /* @__PURE__ */ new Set(), this.unsubUserBroadcast = null, this.unsubBalancesBroadcast = null, this.paywallId = t.paywallId, this.apiOrigin = t.apiOrigin, this.remoteStorageAdapter = {
|
|
3182
3146
|
getItem: (n) => this.transport.request("storage.get", { key: n }),
|
|
@@ -3357,7 +3321,7 @@ class xr {
|
|
|
3357
3321
|
* read-modify-write. PaywallUI duck-types этот метод и предпочитает его
|
|
3358
3322
|
* локальной фабрике, если он есть. */
|
|
3359
3323
|
createTrialStore(e) {
|
|
3360
|
-
return new
|
|
3324
|
+
return new mr(this.transport, this.paywallId, e);
|
|
3361
3325
|
}
|
|
3362
3326
|
// === Identity ===
|
|
3363
3327
|
getIdentity() {
|
|
@@ -3390,10 +3354,10 @@ class xr {
|
|
|
3390
3354
|
* broadcast'ов от offscreen — чтобы host'овский onUserChange handler
|
|
3391
3355
|
* получил signal независимо от того, кто триггернул обновление. */
|
|
3392
3356
|
applyUser(e) {
|
|
3393
|
-
|
|
3357
|
+
xr(this.cachedUser, e) || (this.cachedUser = e, this.fireUserListeners(e));
|
|
3394
3358
|
}
|
|
3395
3359
|
applyBalances(e) {
|
|
3396
|
-
|
|
3360
|
+
br(this.cachedBalances, e) || (this.cachedBalances = e, this.fireBalanceListeners(e));
|
|
3397
3361
|
}
|
|
3398
3362
|
fireUserListeners(e) {
|
|
3399
3363
|
for (const t of [...this.userListeners])
|
|
@@ -3412,17 +3376,17 @@ class xr {
|
|
|
3412
3376
|
}
|
|
3413
3377
|
}
|
|
3414
3378
|
}
|
|
3415
|
-
function
|
|
3379
|
+
function xr(r, e) {
|
|
3416
3380
|
return r === e ? !0 : !r || !e ? !1 : r.has_active_subscription === e.has_active_subscription && (r.purchases?.length ?? 0) === (e.purchases?.length ?? 0);
|
|
3417
3381
|
}
|
|
3418
|
-
function
|
|
3382
|
+
function br(r, e) {
|
|
3419
3383
|
if (r === e) return !0;
|
|
3420
3384
|
if (!r || !e || r.length !== e.length) return !1;
|
|
3421
3385
|
for (let t = 0; t < r.length; t++)
|
|
3422
3386
|
if (r[t].type !== e[t].type || r[t].count !== e[t].count) return !1;
|
|
3423
3387
|
return !0;
|
|
3424
3388
|
}
|
|
3425
|
-
class
|
|
3389
|
+
class wr {
|
|
3426
3390
|
constructor(e, t) {
|
|
3427
3391
|
this.transport = e, this.session = null, this.listeners = /* @__PURE__ */ new Set(), this.unsubBroadcast = null, this.paywallId = t.paywallId, this.apiOrigin = t.apiOrigin, this.unsubBroadcast = this.transport.on("authChange", ({ event: n, session: i }) => {
|
|
3428
3392
|
this.applySession(n, i);
|
|
@@ -3533,14 +3497,14 @@ class kr {
|
|
|
3533
3497
|
*/
|
|
3534
3498
|
async signInWithOAuth(e) {
|
|
3535
3499
|
if (typeof window > "u")
|
|
3536
|
-
throw new
|
|
3500
|
+
throw new B("oauth_unavailable", "window is required for OAuth");
|
|
3537
3501
|
const t = `pw-oauth-pending-${Math.random().toString(36).slice(2, 10)}`, n = window.open("about:blank", t, "width=480,height=640,popup=yes");
|
|
3538
3502
|
if (!n)
|
|
3539
|
-
throw new
|
|
3503
|
+
throw new B(
|
|
3540
3504
|
"popup_blocked",
|
|
3541
3505
|
"browser blocked auth popup — call from a user gesture"
|
|
3542
3506
|
);
|
|
3543
|
-
|
|
3507
|
+
_r(n, e.provider);
|
|
3544
3508
|
try {
|
|
3545
3509
|
const { authorizeUrl: i, state: s } = await this.transport.request("auth.oauthStart", {
|
|
3546
3510
|
provider: e.provider,
|
|
@@ -3548,8 +3512,8 @@ class kr {
|
|
|
3548
3512
|
userMeta: e.userMeta
|
|
3549
3513
|
});
|
|
3550
3514
|
n.name = `pw-oauth-${s}`, n.location.replace(i), e.onPopupOpened?.();
|
|
3551
|
-
const a = await
|
|
3552
|
-
return this.applySession("SIGNED_IN",
|
|
3515
|
+
const a = await ze(n, s), c = await this.transport.request("auth.oauthExchange", { state: s, code: a });
|
|
3516
|
+
return this.applySession("SIGNED_IN", c), c;
|
|
3553
3517
|
} catch (i) {
|
|
3554
3518
|
try {
|
|
3555
3519
|
n.close();
|
|
@@ -3562,7 +3526,7 @@ class kr {
|
|
|
3562
3526
|
this.unsubBroadcast?.(), this.unsubBroadcast = null, this.listeners.clear(), this.session = null;
|
|
3563
3527
|
}
|
|
3564
3528
|
applySession(e, t) {
|
|
3565
|
-
if (!
|
|
3529
|
+
if (!kr(this.session, t)) {
|
|
3566
3530
|
this.session = t;
|
|
3567
3531
|
for (const n of [...this.listeners])
|
|
3568
3532
|
try {
|
|
@@ -3573,17 +3537,17 @@ class kr {
|
|
|
3573
3537
|
}
|
|
3574
3538
|
}
|
|
3575
3539
|
}
|
|
3576
|
-
function
|
|
3540
|
+
function kr(r, e) {
|
|
3577
3541
|
return r === e ? !0 : !r || !e ? !1 : r.access_token === e.access_token && r.refresh_token === e.refresh_token && r.expires_at === e.expires_at && r.user.id === e.user.id;
|
|
3578
3542
|
}
|
|
3579
|
-
const
|
|
3543
|
+
const vr = {
|
|
3580
3544
|
google: "Google",
|
|
3581
3545
|
apple: "Apple",
|
|
3582
3546
|
github: "GitHub",
|
|
3583
3547
|
facebook: "Facebook"
|
|
3584
3548
|
};
|
|
3585
|
-
function
|
|
3586
|
-
const t =
|
|
3549
|
+
function _r(r, e) {
|
|
3550
|
+
const t = vr[e] ?? e;
|
|
3587
3551
|
try {
|
|
3588
3552
|
const n = r.document;
|
|
3589
3553
|
n.title = `Sign in with ${t}`;
|
|
@@ -3593,12 +3557,12 @@ function Sr(r, e) {
|
|
|
3593
3557
|
s.className = "pw-oauth-wrap";
|
|
3594
3558
|
const a = n.createElement("div");
|
|
3595
3559
|
a.className = "pw-oauth-spinner";
|
|
3596
|
-
const
|
|
3597
|
-
|
|
3560
|
+
const c = n.createElement("div");
|
|
3561
|
+
c.className = "pw-oauth-label", c.textContent = `Connecting to ${t}…`, s.appendChild(a), s.appendChild(c), n.body.appendChild(s);
|
|
3598
3562
|
} catch {
|
|
3599
3563
|
}
|
|
3600
3564
|
}
|
|
3601
|
-
class
|
|
3565
|
+
class Sr {
|
|
3602
3566
|
constructor(e) {
|
|
3603
3567
|
this.transport = e;
|
|
3604
3568
|
}
|
|
@@ -3610,7 +3574,7 @@ class Cr {
|
|
|
3610
3574
|
});
|
|
3611
3575
|
}
|
|
3612
3576
|
}
|
|
3613
|
-
class
|
|
3577
|
+
class Cr {
|
|
3614
3578
|
constructor(e) {
|
|
3615
3579
|
this.factory = e, this.channel = null, this.channelDisposers = [], this.pending = /* @__PURE__ */ new Map(), this.listeners = /* @__PURE__ */ new Map(), this.destroyed = !1, this.nextId = 0, this.clientId = `c-${Math.random().toString(36).slice(2, 10)}`;
|
|
3616
3580
|
}
|
|
@@ -3638,7 +3602,7 @@ class Ir {
|
|
|
3638
3602
|
if (e.type === "response") {
|
|
3639
3603
|
const t = this.pending.get(e.id);
|
|
3640
3604
|
if (!t) return;
|
|
3641
|
-
this.pending.delete(e.id), t.signal?.removeEventListener("abort", t.abortListener), e.ok ? t.resolve(e.result) : t.reject(
|
|
3605
|
+
this.pending.delete(e.id), t.signal?.removeEventListener("abort", t.abortListener), e.ok ? t.resolve(e.result) : t.reject(De(e.error));
|
|
3642
3606
|
return;
|
|
3643
3607
|
}
|
|
3644
3608
|
if (e.type === "event") {
|
|
@@ -3659,7 +3623,7 @@ class Ir {
|
|
|
3659
3623
|
const e = Array.from(this.pending.values());
|
|
3660
3624
|
this.pending.clear();
|
|
3661
3625
|
for (const t of e)
|
|
3662
|
-
t.signal?.removeEventListener("abort", t.abortListener), t.reject(new
|
|
3626
|
+
t.signal?.removeEventListener("abort", t.abortListener), t.reject(new Ir());
|
|
3663
3627
|
}
|
|
3664
3628
|
request(e, t, n = {}) {
|
|
3665
3629
|
if (this.destroyed)
|
|
@@ -3667,31 +3631,31 @@ class Ir {
|
|
|
3667
3631
|
if (n.signal?.aborted)
|
|
3668
3632
|
return Promise.reject(new DOMException("Aborted", "AbortError"));
|
|
3669
3633
|
const i = this.ensureChannel(), s = `r${++this.nextId}`;
|
|
3670
|
-
return new Promise((a,
|
|
3671
|
-
const
|
|
3634
|
+
return new Promise((a, c) => {
|
|
3635
|
+
const l = {
|
|
3672
3636
|
resolve: a,
|
|
3673
|
-
reject:
|
|
3637
|
+
reject: c,
|
|
3674
3638
|
signal: n.signal
|
|
3675
3639
|
};
|
|
3676
|
-
n.signal && (
|
|
3640
|
+
n.signal && (l.abortListener = () => {
|
|
3677
3641
|
if (this.pending.delete(s)) {
|
|
3678
|
-
|
|
3642
|
+
c(new DOMException("Aborted", "AbortError"));
|
|
3679
3643
|
try {
|
|
3680
3644
|
i.send({ type: "cancel", id: s });
|
|
3681
3645
|
} catch {
|
|
3682
3646
|
}
|
|
3683
3647
|
}
|
|
3684
|
-
}, n.signal.addEventListener("abort",
|
|
3685
|
-
const
|
|
3648
|
+
}, n.signal.addEventListener("abort", l.abortListener)), this.pending.set(s, l);
|
|
3649
|
+
const f = {
|
|
3686
3650
|
type: "request",
|
|
3687
3651
|
id: s,
|
|
3688
3652
|
kind: e,
|
|
3689
3653
|
params: t
|
|
3690
3654
|
};
|
|
3691
3655
|
try {
|
|
3692
|
-
i.send(
|
|
3693
|
-
} catch (
|
|
3694
|
-
this.pending.delete(s), n.signal?.removeEventListener("abort",
|
|
3656
|
+
i.send(f);
|
|
3657
|
+
} catch (h) {
|
|
3658
|
+
this.pending.delete(s), n.signal?.removeEventListener("abort", l.abortListener), c(h);
|
|
3695
3659
|
}
|
|
3696
3660
|
});
|
|
3697
3661
|
}
|
|
@@ -3715,7 +3679,7 @@ class Ir {
|
|
|
3715
3679
|
this.channel?.close(), this.channel = null;
|
|
3716
3680
|
}
|
|
3717
3681
|
}
|
|
3718
|
-
class
|
|
3682
|
+
class Ir extends Error {
|
|
3719
3683
|
constructor() {
|
|
3720
3684
|
super("Transport channel disconnected mid-request"), this.code = "transport_disconnected", this.name = "TransportDisconnectedError";
|
|
3721
3685
|
}
|
|
@@ -3726,17 +3690,17 @@ function Ar(r) {
|
|
|
3726
3690
|
return e === "request" || e === "response" || e === "event";
|
|
3727
3691
|
}
|
|
3728
3692
|
let W = null;
|
|
3729
|
-
function
|
|
3730
|
-
return W || (W = new
|
|
3693
|
+
function Lr() {
|
|
3694
|
+
return W || (W = new Cr(() => qe(He)), W);
|
|
3731
3695
|
}
|
|
3732
|
-
class
|
|
3696
|
+
class jr extends cr {
|
|
3733
3697
|
constructor(e) {
|
|
3734
|
-
const t =
|
|
3698
|
+
const t = Lr(), n = new yr(t, {
|
|
3735
3699
|
paywallId: e.paywallId,
|
|
3736
3700
|
apiOrigin: e.apiOrigin
|
|
3737
3701
|
});
|
|
3738
3702
|
let i;
|
|
3739
|
-
e.auth === !0 ? i = new
|
|
3703
|
+
e.auth === !0 ? i = new wr(t, {
|
|
3740
3704
|
paywallId: e.paywallId,
|
|
3741
3705
|
apiOrigin: e.apiOrigin
|
|
3742
3706
|
}) : e.auth && console.warn(
|
|
@@ -3752,7 +3716,7 @@ class Rr extends ur {
|
|
|
3752
3716
|
// Внутренний EventTracker отключаем — единственный tracker живёт в
|
|
3753
3717
|
// offscreen'е. Манчиально подписываемся ниже.
|
|
3754
3718
|
analytics: !1
|
|
3755
|
-
}), this.remoteTracker = null, this.trackerUnsubs = [], e.analytics !== !1 && (this.remoteTracker = new
|
|
3719
|
+
}), this.remoteTracker = null, this.trackerUnsubs = [], e.analytics !== !1 && (this.remoteTracker = new Sr(t), this.bindAnalytics());
|
|
3756
3720
|
}
|
|
3757
3721
|
/** Зеркало sdk/PaywallUI.initTracker'овских биндингов, но с RemoteEventTracker.
|
|
3758
3722
|
* Когда @monetize.software/sdk экспоузнет публичный hook для inject'а tracker'а,
|
|
@@ -3811,10 +3775,10 @@ class Rr extends ur {
|
|
|
3811
3775
|
}
|
|
3812
3776
|
export {
|
|
3813
3777
|
K as PROTOCOL_VERSION,
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3778
|
+
jr as PaywallUI,
|
|
3779
|
+
wr as RemoteAuthClient,
|
|
3780
|
+
yr as RemoteBillingClient,
|
|
3781
|
+
Sr as RemoteEventTracker,
|
|
3782
|
+
Lr as getContentTransport
|
|
3819
3783
|
};
|
|
3820
3784
|
//# sourceMappingURL=content.js.map
|