@extenshi/pay 0.7.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -10
- package/dist/api/mock.d.ts +4 -0
- package/dist/api/mock.d.ts.map +1 -1
- package/dist/api/pay-api.d.ts +10 -3
- package/dist/api/pay-api.d.ts.map +1 -1
- package/dist/api/transport.d.ts.map +1 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/extenshi-pay.d.ts +21 -2
- package/dist/core/extenshi-pay.d.ts.map +1 -1
- package/dist/core/locale.d.ts +13 -0
- package/dist/core/locale.d.ts.map +1 -0
- package/dist/core.d.mts +219 -113
- package/dist/core.d.ts +219 -113
- package/dist/core.js +204 -14
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +204 -15
- package/dist/core.mjs.map +1 -1
- package/dist/extenshi-pay-lite.js +204 -14
- package/dist/extenshi-pay-lite.js.map +1 -1
- package/dist/extenshi-pay-lite.min.js +3 -2
- package/dist/extenshi-pay-lite.min.js.map +1 -1
- package/dist/extenshi-pay-lite.mjs +204 -15
- package/dist/extenshi-pay-lite.mjs.map +1 -1
- package/dist/extenshi-pay.cjs.js +1386 -191
- package/dist/extenshi-pay.cjs.js.map +1 -1
- package/dist/extenshi-pay.d.ts.map +1 -1
- package/dist/extenshi-pay.js +1386 -191
- package/dist/extenshi-pay.js.map +1 -1
- package/dist/extenshi-pay.min.js +3 -2
- package/dist/extenshi-pay.min.js.map +1 -1
- package/dist/extenshi-pay.min.mjs +3 -2
- package/dist/extenshi-pay.min.mjs.map +1 -1
- package/dist/extenshi-pay.mjs +1383 -192
- package/dist/extenshi-pay.mjs.map +1 -1
- package/dist/index.d.mts +287 -117
- package/dist/index.d.ts +287 -117
- package/dist/lite.d.mts +188 -83
- package/dist/lite.d.ts +188 -83
- package/dist/lite.d.ts.map +1 -1
- package/dist/payment/checkout.d.ts.map +1 -1
- package/dist/payment/recovery.d.ts +2 -0
- package/dist/payment/recovery.d.ts.map +1 -1
- package/dist/payment/withdrawal-waiver.d.ts +26 -0
- package/dist/payment/withdrawal-waiver.d.ts.map +1 -0
- package/dist/paywall/billing-profile-picker.d.ts +1 -1
- package/dist/paywall/billing-profile-picker.d.ts.map +1 -1
- package/dist/paywall/i18n.d.ts +94 -0
- package/dist/paywall/i18n.d.ts.map +1 -0
- package/dist/paywall/icon.d.ts +18 -0
- package/dist/paywall/icon.d.ts.map +1 -0
- package/dist/paywall/index.d.ts +2 -1
- package/dist/paywall/index.d.ts.map +1 -1
- package/dist/paywall/license-panel.d.ts +4 -1
- package/dist/paywall/license-panel.d.ts.map +1 -1
- package/dist/paywall/renderer.d.ts +24 -2
- package/dist/paywall/renderer.d.ts.map +1 -1
- package/dist/paywall/seller-details.d.ts +2 -1
- package/dist/paywall/seller-details.d.ts.map +1 -1
- package/dist/paywall/strings.d.ts +6 -4
- package/dist/paywall/strings.d.ts.map +1 -1
- package/dist/paywall.d.mts +113 -8
- package/dist/paywall.d.ts +113 -8
- package/dist/paywall.js +1068 -51
- package/dist/paywall.js.map +1 -1
- package/dist/paywall.mjs +1066 -52
- package/dist/paywall.mjs.map +1 -1
- package/dist/types/config.d.ts +6 -1
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/contract.d.ts +25 -0
- package/dist/types/contract.d.ts.map +1 -1
- package/dist/types/entitlement.d.ts +22 -0
- package/dist/types/entitlement.d.ts.map +1 -1
- package/dist/types/errors.d.ts +1 -0
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/paywall.d.ts +27 -3
- package/dist/types/paywall.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +2 -2
- package/dist/core.esm.js +0 -1681
- package/dist/core.esm.js.map +0 -1
- package/dist/extenshi-pay-lite.esm.js +0 -1664
- package/dist/extenshi-pay-lite.esm.js.map +0 -1
- package/dist/extenshi-pay.esm.js +0 -2496
- package/dist/extenshi-pay.esm.js.map +0 -1
- package/dist/extenshi-pay.esm.min.js +0 -7
- package/dist/extenshi-pay.esm.min.js.map +0 -1
- package/dist/paywall.esm.js +0 -442
- package/dist/paywall.esm.js.map +0 -1
package/dist/extenshi-pay.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ExtenshiPay SDK v0.
|
|
2
|
+
* ExtenshiPay SDK v0.9.0
|
|
3
3
|
* (c) 2026 Extenshi.io
|
|
4
4
|
* Released under the MIT License.
|
|
5
|
+
* commit bd166bf9b687f60e965d03acec7a648b42226652 · built by `rollup -c`
|
|
5
6
|
*/
|
|
6
7
|
/**
|
|
7
8
|
* Wire contract between the SDK and catalog-bff `pay.*`.
|
|
@@ -45,6 +46,13 @@ const PAY_SKU_RE = /^[a-z0-9][a-z0-9_-]{1,39}$/;
|
|
|
45
46
|
* none — never had it
|
|
46
47
|
*/
|
|
47
48
|
const PAY_ENTITLEMENT_STATUSES = ['active', 'grace', 'expired', 'none'];
|
|
49
|
+
/**
|
|
50
|
+
* Version of the buyer-facing withdrawal waiver text the paywall shows (EU/EEA
|
|
51
|
+
* digital content, Directive 2011/83/EU art. 16(m); UK CCR 2013 reg. 37). The
|
|
52
|
+
* text itself lives in the SDK dictionary under the same version; bump both
|
|
53
|
+
* together so a recorded consent always names the words the buyer saw.
|
|
54
|
+
*/
|
|
55
|
+
const PAY_WITHDRAWAL_WAIVER_VERSION = '2026-10-v1';
|
|
48
56
|
/**
|
|
49
57
|
* The `endUserRef` an SDK mints on first run and keeps in `chrome.storage`.
|
|
50
58
|
* Opaque, random, never derived from anything identifying.
|
|
@@ -61,6 +69,7 @@ const PAY_ERRORS = {
|
|
|
61
69
|
GATEWAY_UNAVAILABLE: 'PAY_GATEWAY_UNAVAILABLE',
|
|
62
70
|
RATE_LIMITED: 'PAY_RATE_LIMITED',
|
|
63
71
|
INVALID_KEY: 'PAY_INVALID_KEY',
|
|
72
|
+
WITHDRAWAL_WAIVER_REQUIRED: 'PAY_WITHDRAWAL_WAIVER_REQUIRED',
|
|
64
73
|
};
|
|
65
74
|
/**
|
|
66
75
|
* Canonical JSON for signing: keys sorted recursively, no whitespace. Both
|
|
@@ -92,6 +101,7 @@ const ERROR_CODES = {
|
|
|
92
101
|
GATEWAY_UNAVAILABLE: 'GATEWAY_UNAVAILABLE',
|
|
93
102
|
CHECKOUT_UNAVAILABLE: 'CHECKOUT_UNAVAILABLE',
|
|
94
103
|
PAYWALL_UNAVAILABLE: 'PAYWALL_UNAVAILABLE',
|
|
104
|
+
WITHDRAWAL_WAIVER_REQUIRED: 'WITHDRAWAL_WAIVER_REQUIRED',
|
|
95
105
|
UNKNOWN: 'UNKNOWN',
|
|
96
106
|
};
|
|
97
107
|
class ExtenshiPayError extends Error {
|
|
@@ -148,6 +158,13 @@ async function getOrCreateEndUserRef(storage) {
|
|
|
148
158
|
* mock checkout completes after `claimAfterPolls` polls and grants the SKU.
|
|
149
159
|
*/
|
|
150
160
|
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
161
|
+
/** Accepts the same optional `withdrawalWaiver` input as the BFF; anything else is no consent. */
|
|
162
|
+
function mockConsent(value) {
|
|
163
|
+
const consent = value;
|
|
164
|
+
return consent && typeof consent.version === 'string' && consent.accepted === true
|
|
165
|
+
? { version: consent.version, accepted: true }
|
|
166
|
+
: null;
|
|
167
|
+
}
|
|
151
168
|
class MockTransport {
|
|
152
169
|
constructor(data = {}) {
|
|
153
170
|
this.sessions = new Map();
|
|
@@ -156,13 +173,15 @@ class MockTransport {
|
|
|
156
173
|
this.projectName = data.projectName ?? 'Mock project';
|
|
157
174
|
this.checkoutEnabled = data.checkoutEnabled ?? true;
|
|
158
175
|
this.claimAfterPolls = data.claimAfterPolls ?? 1;
|
|
176
|
+
this.withdrawalWaiver =
|
|
177
|
+
data.withdrawalWaiver === undefined ? { version: PAY_WITHDRAWAL_WAIVER_VERSION } : data.withdrawalWaiver;
|
|
159
178
|
}
|
|
160
179
|
async call(procedure, _kind, input) {
|
|
161
180
|
switch (procedure) {
|
|
162
181
|
case 'pay.getOffer':
|
|
163
182
|
return this.offerResponse();
|
|
164
183
|
case 'pay.createCheckout':
|
|
165
|
-
return this.createCheckout(String(input.sku));
|
|
184
|
+
return this.createCheckout(String(input.sku), mockConsent(input.withdrawalWaiver));
|
|
166
185
|
case 'pay.claimSession':
|
|
167
186
|
return this.claim(String(input.sessionId), String(input.endUserRef), String(input.publishableKey));
|
|
168
187
|
case 'pay.getEntitlement':
|
|
@@ -195,9 +214,10 @@ class MockTransport {
|
|
|
195
214
|
checkoutEnabled: this.checkoutEnabled && this.offers.length > 0,
|
|
196
215
|
offers: [...this.offers],
|
|
197
216
|
entitlementPublicKey: null,
|
|
217
|
+
withdrawalWaiver: this.withdrawalWaiver ? { ...this.withdrawalWaiver } : null,
|
|
198
218
|
};
|
|
199
219
|
}
|
|
200
|
-
createCheckout(sku) {
|
|
220
|
+
createCheckout(sku, withdrawalWaiver) {
|
|
201
221
|
if (!this.checkoutEnabled) {
|
|
202
222
|
throw new ExtenshiPayError(ERROR_CODES.SELLER_NOT_ACTIVE, 'Mock seller cannot take payments');
|
|
203
223
|
}
|
|
@@ -205,7 +225,7 @@ class MockTransport {
|
|
|
205
225
|
throw new ExtenshiPayError(ERROR_CODES.OFFER_NOT_FOUND, `Unknown mock offer ${sku}`);
|
|
206
226
|
}
|
|
207
227
|
const sessionId = mintEndUserRef();
|
|
208
|
-
this.sessions.set(sessionId, { sku, polls: 0, state: 'open' });
|
|
228
|
+
this.sessions.set(sessionId, { sku, polls: 0, state: 'open', withdrawalWaiver });
|
|
209
229
|
return {
|
|
210
230
|
url: `https://mock.extenshi.io/checkout/${sessionId}`,
|
|
211
231
|
sessionId,
|
|
@@ -267,10 +287,12 @@ class PayApi {
|
|
|
267
287
|
this.transport = transport;
|
|
268
288
|
this.publishableKey = publishableKey;
|
|
269
289
|
}
|
|
270
|
-
|
|
290
|
+
/** `locale` opens the hosted recovery page (and its email) in the user's language. */
|
|
291
|
+
createRestoreSession(claimChallenge, locale) {
|
|
271
292
|
return this.transport.call('pay.createRestoreSession', 'mutation', {
|
|
272
293
|
publishableKey: this.publishableKey,
|
|
273
294
|
claimChallenge,
|
|
295
|
+
...(locale ? { locale } : {}),
|
|
274
296
|
});
|
|
275
297
|
}
|
|
276
298
|
claimRestoreSession(sessionId, claimSecret) {
|
|
@@ -286,12 +308,20 @@ class PayApi {
|
|
|
286
308
|
locale: locale ?? undefined,
|
|
287
309
|
});
|
|
288
310
|
}
|
|
289
|
-
|
|
311
|
+
/**
|
|
312
|
+
* `withdrawalWaiver` is sent only when given. Older BFFs parse the input with
|
|
313
|
+
* a non-strict zod object, which strips the unknown key, so it is safe there.
|
|
314
|
+
* Plain-JS callers passing anything but `accepted: true` send no consent.
|
|
315
|
+
*/
|
|
316
|
+
createCheckout(sku, endUserRef, locale, withdrawalWaiver) {
|
|
290
317
|
return this.transport.call('pay.createCheckout', 'mutation', {
|
|
291
318
|
publishableKey: this.publishableKey,
|
|
292
319
|
sku,
|
|
293
320
|
endUserRef,
|
|
294
321
|
locale: locale ?? undefined,
|
|
322
|
+
...(withdrawalWaiver?.accepted === true && typeof withdrawalWaiver.version === 'string'
|
|
323
|
+
? { withdrawalWaiver: { version: withdrawalWaiver.version, accepted: true } }
|
|
324
|
+
: {}),
|
|
295
325
|
});
|
|
296
326
|
}
|
|
297
327
|
claimSession(sessionId, endUserRef) {
|
|
@@ -307,11 +337,12 @@ class PayApi {
|
|
|
307
337
|
endUserRef,
|
|
308
338
|
});
|
|
309
339
|
}
|
|
310
|
-
getPortalUrl(endUserRef, customerId) {
|
|
340
|
+
getPortalUrl(endUserRef, customerId, locale) {
|
|
311
341
|
return this.transport.call('pay.getPortalUrl', 'mutation', {
|
|
312
342
|
publishableKey: this.publishableKey,
|
|
313
343
|
endUserRef,
|
|
314
344
|
...(customerId ? { customerId } : {}),
|
|
345
|
+
...(locale ? { locale } : {}),
|
|
315
346
|
});
|
|
316
347
|
}
|
|
317
348
|
}
|
|
@@ -377,6 +408,7 @@ const CAUSE_TO_CODE = {
|
|
|
377
408
|
[PAY_ERRORS.AGREEMENT_REQUIRED]: ERROR_CODES.SELLER_NOT_ACTIVE,
|
|
378
409
|
[PAY_ERRORS.OFFER_NOT_FOUND]: ERROR_CODES.OFFER_NOT_FOUND,
|
|
379
410
|
[PAY_ERRORS.GATEWAY_UNAVAILABLE]: ERROR_CODES.GATEWAY_UNAVAILABLE,
|
|
411
|
+
[PAY_ERRORS.WITHDRAWAL_WAIVER_REQUIRED]: ERROR_CODES.WITHDRAWAL_WAIVER_REQUIRED,
|
|
380
412
|
};
|
|
381
413
|
function parseRetryAfter(message) {
|
|
382
414
|
const match = /retry in (\d+)s/i.exec(message);
|
|
@@ -406,6 +438,8 @@ function trpcErrorToPayError(error, httpStatus) {
|
|
|
406
438
|
return new ExtenshiPayError(ERROR_CODES.CHECKOUT_UNAVAILABLE, message, options);
|
|
407
439
|
return new ExtenshiPayError(ERROR_CODES.OFFER_NOT_FOUND, message, options);
|
|
408
440
|
case 'PRECONDITION_FAILED':
|
|
441
|
+
if (/withdrawal/i.test(message))
|
|
442
|
+
return new ExtenshiPayError(ERROR_CODES.WITHDRAWAL_WAIVER_REQUIRED, message, options);
|
|
409
443
|
return new ExtenshiPayError(ERROR_CODES.SELLER_NOT_ACTIVE, message, options);
|
|
410
444
|
case 'BAD_REQUEST':
|
|
411
445
|
return new ExtenshiPayError(ERROR_CODES.INVALID_REQUEST, message, options);
|
|
@@ -588,7 +622,7 @@ class CheckoutManager {
|
|
|
588
622
|
throw new ExtenshiPayError(ERROR_CODES.CHECKOUT_UNAVAILABLE, 'A checkout is already in progress');
|
|
589
623
|
}
|
|
590
624
|
const endUserRef = await this.options.getEndUserRef();
|
|
591
|
-
const session = await this.options.api.createCheckout(sku, endUserRef, options.locale ?? this.options.locale);
|
|
625
|
+
const session = await this.options.api.createCheckout(sku, endUserRef, options.locale ?? this.options.locale, options.withdrawalWaiver);
|
|
592
626
|
this.active = session.sessionId;
|
|
593
627
|
try {
|
|
594
628
|
const pending = { sessionId: session.sessionId, sku, expiresAt: session.expiresAt };
|
|
@@ -1232,7 +1266,7 @@ class RecoveryManager {
|
|
|
1232
1266
|
const secret = Array.from(cryptoApi.getRandomValues(new Uint8Array(32)), (b) => b.toString(16).padStart(2, '0')).join('');
|
|
1233
1267
|
const hash = await cryptoApi.subtle.digest('SHA-256', new TextEncoder().encode(secret));
|
|
1234
1268
|
const challenge = Array.from(new Uint8Array(hash), (b) => b.toString(16).padStart(2, '0')).join('');
|
|
1235
|
-
const created = await this.options.api.createRestoreSession(challenge);
|
|
1269
|
+
const created = await this.options.api.createRestoreSession(challenge, this.options.locale);
|
|
1236
1270
|
if (!Number.isFinite(Date.parse(created.expiresAt)))
|
|
1237
1271
|
throw new ExtenshiPayError(ERROR_CODES.INVALID_RESPONSE, 'Invalid recovery expiry');
|
|
1238
1272
|
const pending = { sessionId: created.sessionId, expiresAt: created.expiresAt, claimSecret: secret };
|
|
@@ -1324,7 +1358,49 @@ const DEFAULT_CACHE_TTL_MS = 60 * 60 * 1000;
|
|
|
1324
1358
|
const MAX_CACHE_TTL_MS = 7 * 24 * 60 * 60 * 1000;
|
|
1325
1359
|
|
|
1326
1360
|
/** Kept in sync with package.json by tests/unit/version.test.ts. */
|
|
1327
|
-
const VERSION = '0.
|
|
1361
|
+
const VERSION = '0.9.0';
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* The user's language as the SDK sends it. Kept apart from the paywall
|
|
1365
|
+
* dictionary (../paywall/i18n.ts) so the Lite and core bundles, which never
|
|
1366
|
+
* render UI, do not carry the translations.
|
|
1367
|
+
*/
|
|
1368
|
+
/** What the backend (and older backends) accept as a locale: `de`, `pt-BR`, `zh-CN`. */
|
|
1369
|
+
const WIRE_LOCALE_RE = /^[a-z]{2}(-[A-Za-z]{2,4})?$/;
|
|
1370
|
+
/**
|
|
1371
|
+
* A browser tag as the SDK sends it: `pt_BR` → `pt-BR`, `es-419` → `es`,
|
|
1372
|
+
* `zh-Hant-TW` → `zh-TW`; null for anything that is not a language tag.
|
|
1373
|
+
*/
|
|
1374
|
+
function wireLocale(raw) {
|
|
1375
|
+
if (typeof raw !== 'string')
|
|
1376
|
+
return null;
|
|
1377
|
+
const parts = raw.trim().replace(/_/g, '-').split('-').filter(Boolean);
|
|
1378
|
+
const lang = parts[0]?.toLowerCase();
|
|
1379
|
+
if (!lang || !/^[a-z]{2}$/.test(lang))
|
|
1380
|
+
return null;
|
|
1381
|
+
const script = parts
|
|
1382
|
+
.slice(1)
|
|
1383
|
+
.find((p) => /^[A-Za-z]{4}$/.test(p))
|
|
1384
|
+
?.toLowerCase();
|
|
1385
|
+
// zh-Hant without a region is Traditional Chinese: keep that, never let it read as zh-CN.
|
|
1386
|
+
const region = parts.slice(1).find((p) => /^[A-Za-z]{2}$/.test(p)) ??
|
|
1387
|
+
(lang === 'zh' && script === 'hant' ? 'TW' : undefined);
|
|
1388
|
+
const tag = region ? `${lang}-${region.toUpperCase()}` : lang;
|
|
1389
|
+
return WIRE_LOCALE_RE.test(tag) ? tag : lang;
|
|
1390
|
+
}
|
|
1391
|
+
/** The browser UI language (`chrome.i18n.getUILanguage()`, else `navigator.language`), or null. */
|
|
1392
|
+
function browserLocale() {
|
|
1393
|
+
const g = globalThis;
|
|
1394
|
+
try {
|
|
1395
|
+
const ui = g.chrome?.i18n?.getUILanguage?.() ?? g.browser?.i18n?.getUILanguage?.();
|
|
1396
|
+
if (ui)
|
|
1397
|
+
return wireLocale(ui);
|
|
1398
|
+
}
|
|
1399
|
+
catch {
|
|
1400
|
+
/* Not an extension context. */
|
|
1401
|
+
}
|
|
1402
|
+
return wireLocale(g.navigator?.language);
|
|
1403
|
+
}
|
|
1328
1404
|
|
|
1329
1405
|
const ENVIRONMENTS = new Set(['production', 'sandbox', 'development']);
|
|
1330
1406
|
const LOG_LEVELS = new Set(['silent', 'error', 'warn', 'info', 'debug']);
|
|
@@ -1365,7 +1441,10 @@ function resolveConfig(input) {
|
|
|
1365
1441
|
if (!Number.isFinite(cacheTtlMs) || cacheTtlMs < 0 || cacheTtlMs > MAX_CACHE_TTL_MS) {
|
|
1366
1442
|
errors.push(`cacheTtlMs must be between 0 and ${MAX_CACHE_TTL_MS}`);
|
|
1367
1443
|
}
|
|
1368
|
-
|
|
1444
|
+
// Default: the browser UI language, as README promises (it. 13 T10 L2).
|
|
1445
|
+
// `null` still opts out explicitly: prices then use the runtime default
|
|
1446
|
+
// and the paywall reads English.
|
|
1447
|
+
const locale = input.locale === undefined ? browserLocale() : input.locale;
|
|
1369
1448
|
if (locale !== null && !LOCALE_RE.test(locale))
|
|
1370
1449
|
errors.push('locale must be a BCP-47 tag such as en or de-DE');
|
|
1371
1450
|
const theme = input.theme ?? {};
|
|
@@ -1436,6 +1515,821 @@ class EventEmitter {
|
|
|
1436
1515
|
}
|
|
1437
1516
|
}
|
|
1438
1517
|
|
|
1518
|
+
/**
|
|
1519
|
+
* Every string the SDK shows to the USER of an extension — paywall, license
|
|
1520
|
+
* dialog, billing-profile picker, seller details — in the end-user languages
|
|
1521
|
+
* (ROADMAP it. 13 T10, stage L2; closes it. 12 T9). Developer-facing error
|
|
1522
|
+
* messages stay English.
|
|
1523
|
+
*
|
|
1524
|
+
* Self-contained on purpose: the SDK ships inside third-party extensions with
|
|
1525
|
+
* no runtime dependencies and no remote code, so the dictionary is compiled
|
|
1526
|
+
* in. Placeholders are `{name}`, `{date}`, `{status}`. A missing
|
|
1527
|
+
* translation falls back to English, never to an empty string. The same
|
|
1528
|
+
* languages as the hosted pages (shared-types END_USER_LOCALES); keep the
|
|
1529
|
+
* lists in sync.
|
|
1530
|
+
*/
|
|
1531
|
+
const SDK_LOCALES = ['en', 'es', 'pt-BR', 'fr', 'de', 'it', 'ru', 'ja', 'ko', 'zh-CN', 'ar'];
|
|
1532
|
+
const SDK_STRINGS_EN = {
|
|
1533
|
+
title: 'Unlock premium features',
|
|
1534
|
+
description: 'Upgrade to get full access to this extension.',
|
|
1535
|
+
upgrade: 'Upgrade',
|
|
1536
|
+
cancel: 'Not now',
|
|
1537
|
+
dismiss: 'Dismiss',
|
|
1538
|
+
remindLater: 'Remind me later',
|
|
1539
|
+
continueFree: 'Continue with the free version',
|
|
1540
|
+
checkoutUnavailable: 'Purchases are temporarily unavailable',
|
|
1541
|
+
periodMonth: '/month',
|
|
1542
|
+
periodYear: '/year',
|
|
1543
|
+
periodOnce: 'one-time',
|
|
1544
|
+
footer: 'Secure checkout opens in a new tab.',
|
|
1545
|
+
restorePurchase: 'Restore purchase',
|
|
1546
|
+
featuresHeading: 'Premium Features',
|
|
1547
|
+
plansHeading: 'Choose Your Plan',
|
|
1548
|
+
freePlanName: 'Free',
|
|
1549
|
+
premiumPlanName: 'Premium',
|
|
1550
|
+
popularBadge: 'Most Popular',
|
|
1551
|
+
unlockHeading: 'Unlock Premium Features',
|
|
1552
|
+
simulatePurchase: 'Simulate purchase',
|
|
1553
|
+
mockNotice: 'Development preview: licenses and payments are simulated. No payment will be taken.',
|
|
1554
|
+
sellerProvidedBy: 'License provided by {name}',
|
|
1555
|
+
sellerUnavailable: 'License provider details are unavailable.',
|
|
1556
|
+
sellerSupport: 'Extension support',
|
|
1557
|
+
sellerTerms: 'License terms',
|
|
1558
|
+
sellerRefunds: 'Refund policy',
|
|
1559
|
+
sellerRole: 'The author handles extension functionality and license commitments. Extenshi provides payment and license recovery tools.',
|
|
1560
|
+
licenseTitle: 'Your license',
|
|
1561
|
+
licenseFallbackName: 'Extension license',
|
|
1562
|
+
licenseNone: 'No license found on this installation.',
|
|
1563
|
+
kindOneTime: 'One-time purchase',
|
|
1564
|
+
kindLifetime: 'Lifetime',
|
|
1565
|
+
kindSubscription: 'Subscription',
|
|
1566
|
+
kindLicense: 'License',
|
|
1567
|
+
statusLine: 'Status: {status}',
|
|
1568
|
+
statusActive: 'active',
|
|
1569
|
+
statusGrace: 'grace period',
|
|
1570
|
+
statusExpired: 'expired',
|
|
1571
|
+
statusNone: 'no access',
|
|
1572
|
+
accessEnded: 'Access ended {date}',
|
|
1573
|
+
accessUntil: 'Access until {date}',
|
|
1574
|
+
accessRecordedEnd: 'Recorded end date {date}',
|
|
1575
|
+
subscriptionLine: 'Subscription: {status}',
|
|
1576
|
+
renewalCanceled: 'Renewal canceled',
|
|
1577
|
+
periodEnds: 'Period ends {date}',
|
|
1578
|
+
subActive: 'active',
|
|
1579
|
+
subTrialing: 'trial',
|
|
1580
|
+
subPastDue: 'payment overdue',
|
|
1581
|
+
subCanceled: 'canceled',
|
|
1582
|
+
subUnpaid: 'unpaid',
|
|
1583
|
+
subIncomplete: 'incomplete',
|
|
1584
|
+
subIncompleteExpired: 'payment not completed',
|
|
1585
|
+
subPaused: 'paused',
|
|
1586
|
+
licenseOffline: 'Connect to the internet to verify your license. Paid features are paused after 48 hours without a successful check. Your purchase has not expired.',
|
|
1587
|
+
licenseCached: 'Showing saved license information.',
|
|
1588
|
+
licenseFresh: 'Subscription information reflects the latest processed payment update.',
|
|
1589
|
+
actionFailed: 'Unable to complete the request. Please try again or contact extension support.',
|
|
1590
|
+
manageBilling: 'Manage billing',
|
|
1591
|
+
noPortal: 'No billing portal opened. You can retry or contact extension support.',
|
|
1592
|
+
close: 'Close',
|
|
1593
|
+
pickerTitle: 'Choose a billing profile',
|
|
1594
|
+
pickerDescription: 'Separate purchases can have separate billing profiles. Choose one to manage its subscriptions and payment details.',
|
|
1595
|
+
pickerFirstRecorded: 'First recorded {date}',
|
|
1596
|
+
pickerCancel: 'Cancel',
|
|
1597
|
+
};
|
|
1598
|
+
// BEGIN GENERATED TRANSLATIONS
|
|
1599
|
+
const TRANSLATIONS = {
|
|
1600
|
+
es: {
|
|
1601
|
+
title: 'Desbloquea las funciones premium',
|
|
1602
|
+
description: 'Mejora tu plan para obtener acceso completo a esta extensión.',
|
|
1603
|
+
upgrade: 'Mejorar plan',
|
|
1604
|
+
cancel: 'Ahora no',
|
|
1605
|
+
dismiss: 'Descartar',
|
|
1606
|
+
remindLater: 'Recordármelo más tarde',
|
|
1607
|
+
continueFree: 'Seguir con la versión gratuita',
|
|
1608
|
+
checkoutUnavailable: 'Compras no disponibles temporalmente',
|
|
1609
|
+
periodMonth: '/mes',
|
|
1610
|
+
periodYear: '/año',
|
|
1611
|
+
periodOnce: 'pago único',
|
|
1612
|
+
footer: 'El pago seguro se abre en una pestaña nueva.',
|
|
1613
|
+
restorePurchase: 'Restaurar compra',
|
|
1614
|
+
featuresHeading: 'Funciones premium',
|
|
1615
|
+
plansHeading: 'Elige tu plan',
|
|
1616
|
+
freePlanName: 'Gratis',
|
|
1617
|
+
premiumPlanName: 'Premium',
|
|
1618
|
+
popularBadge: 'Más popular',
|
|
1619
|
+
unlockHeading: 'Desbloquea las funciones premium',
|
|
1620
|
+
simulatePurchase: 'Simular compra',
|
|
1621
|
+
mockNotice: 'Vista previa de desarrollo: las licencias y los pagos son simulados. No se realizará ningún cobro.',
|
|
1622
|
+
sellerProvidedBy: 'Licencia proporcionada por {name}',
|
|
1623
|
+
sellerUnavailable: 'Los datos del proveedor de la licencia no están disponibles.',
|
|
1624
|
+
sellerSupport: 'Asistencia de la extensión',
|
|
1625
|
+
sellerTerms: 'Condiciones de licencia',
|
|
1626
|
+
sellerRefunds: 'Política de reembolsos',
|
|
1627
|
+
sellerRole: 'El autor se encarga de las funciones de la extensión y de los compromisos de la licencia. Extenshi proporciona las herramientas de pago y de recuperación de licencias.',
|
|
1628
|
+
licenseTitle: 'Tu licencia',
|
|
1629
|
+
licenseFallbackName: 'Licencia de la extensión',
|
|
1630
|
+
licenseNone: 'No se ha encontrado ninguna licencia en esta instalación.',
|
|
1631
|
+
kindOneTime: 'Compra única',
|
|
1632
|
+
kindLifetime: 'Licencia vitalicia',
|
|
1633
|
+
kindSubscription: 'Suscripción',
|
|
1634
|
+
kindLicense: 'Licencia',
|
|
1635
|
+
statusLine: 'Estado: {status}',
|
|
1636
|
+
statusActive: 'activo',
|
|
1637
|
+
statusGrace: 'período de gracia',
|
|
1638
|
+
statusExpired: 'caducado',
|
|
1639
|
+
statusNone: 'sin acceso',
|
|
1640
|
+
accessEnded: 'Acceso finalizado el {date}',
|
|
1641
|
+
accessUntil: 'Acceso hasta el {date}',
|
|
1642
|
+
accessRecordedEnd: 'Fecha de finalización registrada: {date}',
|
|
1643
|
+
subscriptionLine: 'Suscripción: {status}',
|
|
1644
|
+
renewalCanceled: 'Renovación cancelada',
|
|
1645
|
+
periodEnds: 'El período finaliza el {date}',
|
|
1646
|
+
subActive: 'activa',
|
|
1647
|
+
subTrialing: 'en período de prueba',
|
|
1648
|
+
subPastDue: 'pago vencido',
|
|
1649
|
+
subCanceled: 'cancelada',
|
|
1650
|
+
subUnpaid: 'sin pagar',
|
|
1651
|
+
subIncomplete: 'incompleta',
|
|
1652
|
+
subIncompleteExpired: 'pago no completado',
|
|
1653
|
+
subPaused: 'en pausa',
|
|
1654
|
+
licenseOffline: 'Conéctate a internet para verificar tu licencia. Las funciones de pago se suspenden si pasan 48 horas sin una verificación correcta. Tu compra no ha caducado.',
|
|
1655
|
+
licenseCached: 'Se muestra la información de licencia guardada.',
|
|
1656
|
+
licenseFresh: 'La información de la suscripción refleja la última actualización de pago procesada.',
|
|
1657
|
+
actionFailed: 'No se pudo completar la solicitud. Inténtalo de nuevo o ponte en contacto con la asistencia de la extensión.',
|
|
1658
|
+
manageBilling: 'Gestionar facturación',
|
|
1659
|
+
noPortal: 'No se abrió ningún portal de facturación. Puedes volver a intentarlo o ponerte en contacto con la asistencia de la extensión.',
|
|
1660
|
+
close: 'Cerrar',
|
|
1661
|
+
pickerTitle: 'Elige un perfil de facturación',
|
|
1662
|
+
pickerDescription: 'Las compras independientes pueden tener perfiles de facturación distintos. Elige uno para gestionar sus suscripciones y datos de pago.',
|
|
1663
|
+
pickerFirstRecorded: 'Registrado por primera vez el {date}',
|
|
1664
|
+
pickerCancel: 'Cancelar',
|
|
1665
|
+
},
|
|
1666
|
+
'pt-BR': {
|
|
1667
|
+
title: 'Desbloqueie os recursos premium',
|
|
1668
|
+
description: 'Faça o upgrade para ter acesso completo a esta extensão.',
|
|
1669
|
+
upgrade: 'Fazer upgrade',
|
|
1670
|
+
cancel: 'Agora não',
|
|
1671
|
+
dismiss: 'Dispensar',
|
|
1672
|
+
remindLater: 'Lembrar mais tarde',
|
|
1673
|
+
continueFree: 'Continuar com a versão gratuita',
|
|
1674
|
+
checkoutUnavailable: 'Compras temporariamente indisponíveis',
|
|
1675
|
+
periodMonth: '/mês',
|
|
1676
|
+
periodYear: '/ano',
|
|
1677
|
+
periodOnce: 'pagamento único',
|
|
1678
|
+
footer: 'O checkout seguro abre em uma nova guia.',
|
|
1679
|
+
restorePurchase: 'Restaurar compra',
|
|
1680
|
+
featuresHeading: 'Recursos premium',
|
|
1681
|
+
plansHeading: 'Escolha seu plano',
|
|
1682
|
+
freePlanName: 'Gratuito',
|
|
1683
|
+
premiumPlanName: 'Premium',
|
|
1684
|
+
popularBadge: 'Mais popular',
|
|
1685
|
+
unlockHeading: 'Desbloqueie os recursos premium',
|
|
1686
|
+
simulatePurchase: 'Simular compra',
|
|
1687
|
+
mockNotice: 'Prévia de desenvolvimento: licenças e pagamentos são simulados. Nenhum valor será cobrado.',
|
|
1688
|
+
sellerProvidedBy: 'Licença fornecida por {name}',
|
|
1689
|
+
sellerUnavailable: 'Os dados do fornecedor da licença não estão disponíveis.',
|
|
1690
|
+
sellerSupport: 'Suporte da extensão',
|
|
1691
|
+
sellerTerms: 'Termos de licença',
|
|
1692
|
+
sellerRefunds: 'Política de reembolso',
|
|
1693
|
+
sellerRole: 'O autor é responsável pelo funcionamento da extensão e pelos compromissos da licença. A Extenshi fornece as ferramentas de pagamento e de recuperação de licenças.',
|
|
1694
|
+
licenseTitle: 'Sua licença',
|
|
1695
|
+
licenseFallbackName: 'Licença da extensão',
|
|
1696
|
+
licenseNone: 'Nenhuma licença encontrada nesta instalação.',
|
|
1697
|
+
kindOneTime: 'Compra única',
|
|
1698
|
+
kindLifetime: 'Licença vitalícia',
|
|
1699
|
+
kindSubscription: 'Assinatura',
|
|
1700
|
+
kindLicense: 'Licença',
|
|
1701
|
+
statusLine: 'Status: {status}',
|
|
1702
|
+
statusActive: 'ativo',
|
|
1703
|
+
statusGrace: 'período de carência',
|
|
1704
|
+
statusExpired: 'expirado',
|
|
1705
|
+
statusNone: 'sem acesso',
|
|
1706
|
+
accessEnded: 'Acesso encerrado em {date}',
|
|
1707
|
+
accessUntil: 'Acesso até {date}',
|
|
1708
|
+
accessRecordedEnd: 'Data de término registrada: {date}',
|
|
1709
|
+
subscriptionLine: 'Assinatura: {status}',
|
|
1710
|
+
renewalCanceled: 'Renovação cancelada',
|
|
1711
|
+
periodEnds: 'Período termina em {date}',
|
|
1712
|
+
subActive: 'ativa',
|
|
1713
|
+
subTrialing: 'em período de teste',
|
|
1714
|
+
subPastDue: 'pagamento em atraso',
|
|
1715
|
+
subCanceled: 'cancelada',
|
|
1716
|
+
subUnpaid: 'não paga',
|
|
1717
|
+
subIncomplete: 'incompleta',
|
|
1718
|
+
subIncompleteExpired: 'pagamento não concluído',
|
|
1719
|
+
subPaused: 'pausada',
|
|
1720
|
+
licenseOffline: 'Conecte-se à internet para verificar sua licença. Os recursos pagos são pausados após 48 horas sem uma verificação bem-sucedida. Sua compra não expirou.',
|
|
1721
|
+
licenseCached: 'Exibindo as informações de licença salvas.',
|
|
1722
|
+
licenseFresh: 'As informações da assinatura refletem a atualização de pagamento processada mais recente.',
|
|
1723
|
+
actionFailed: 'Não foi possível concluir a solicitação. Tente novamente ou entre em contato com o suporte da extensão.',
|
|
1724
|
+
manageBilling: 'Gerenciar cobrança',
|
|
1725
|
+
noPortal: 'O portal de cobrança não foi aberto. Você pode tentar novamente ou entrar em contato com o suporte da extensão.',
|
|
1726
|
+
close: 'Fechar',
|
|
1727
|
+
pickerTitle: 'Escolha um perfil de cobrança',
|
|
1728
|
+
pickerDescription: 'Compras diferentes podem ter perfis de cobrança diferentes. Escolha um perfil para gerenciar as assinaturas e os dados de pagamento vinculados a ele.',
|
|
1729
|
+
pickerFirstRecorded: 'Registrado pela primeira vez em {date}',
|
|
1730
|
+
pickerCancel: 'Cancelar',
|
|
1731
|
+
},
|
|
1732
|
+
fr: {
|
|
1733
|
+
title: 'Débloquez les fonctionnalités premium',
|
|
1734
|
+
description: 'Passez à la version supérieure pour obtenir un accès complet à cette extension.',
|
|
1735
|
+
upgrade: 'Mettre à niveau',
|
|
1736
|
+
cancel: 'Pas maintenant',
|
|
1737
|
+
dismiss: 'Ignorer',
|
|
1738
|
+
remindLater: 'Me le rappeler plus tard',
|
|
1739
|
+
continueFree: 'Continuer avec la version gratuite',
|
|
1740
|
+
checkoutUnavailable: 'Les achats sont temporairement indisponibles',
|
|
1741
|
+
periodMonth: '/mois',
|
|
1742
|
+
periodYear: '/an',
|
|
1743
|
+
periodOnce: 'paiement unique',
|
|
1744
|
+
footer: 'Le paiement sécurisé s’ouvre dans un nouvel onglet.',
|
|
1745
|
+
restorePurchase: 'Restaurer l’achat',
|
|
1746
|
+
featuresHeading: 'Fonctionnalités premium',
|
|
1747
|
+
plansHeading: 'Choisissez votre formule',
|
|
1748
|
+
freePlanName: 'Gratuit',
|
|
1749
|
+
premiumPlanName: 'Premium',
|
|
1750
|
+
popularBadge: 'Le plus populaire',
|
|
1751
|
+
unlockHeading: 'Débloquez les fonctionnalités premium',
|
|
1752
|
+
simulatePurchase: 'Simuler l’achat',
|
|
1753
|
+
mockNotice: 'Aperçu de développement : les licences et les paiements sont simulés. Aucun paiement ne sera prélevé.',
|
|
1754
|
+
sellerProvidedBy: 'Licence fournie par {name}',
|
|
1755
|
+
sellerUnavailable: 'Les informations sur le fournisseur de la licence ne sont pas disponibles.',
|
|
1756
|
+
sellerSupport: 'Assistance pour l’extension',
|
|
1757
|
+
sellerTerms: 'Conditions de licence',
|
|
1758
|
+
sellerRefunds: 'Politique de remboursement',
|
|
1759
|
+
sellerRole: 'L’auteur est responsable des fonctionnalités de l’extension et des engagements liés à la licence. Extenshi fournit les outils de paiement et de restauration des licences.',
|
|
1760
|
+
licenseTitle: 'Votre licence',
|
|
1761
|
+
licenseFallbackName: 'Licence de l’extension',
|
|
1762
|
+
licenseNone: 'Aucune licence n’a été trouvée pour cette installation.',
|
|
1763
|
+
kindOneTime: 'Achat unique',
|
|
1764
|
+
kindLifetime: 'Licence à vie',
|
|
1765
|
+
kindSubscription: 'Abonnement',
|
|
1766
|
+
kindLicense: 'Licence',
|
|
1767
|
+
statusLine: 'Statut : {status}',
|
|
1768
|
+
statusActive: 'actif',
|
|
1769
|
+
statusGrace: 'période de grâce',
|
|
1770
|
+
statusExpired: 'expiré',
|
|
1771
|
+
statusNone: 'aucun accès',
|
|
1772
|
+
accessEnded: 'Accès terminé le {date}',
|
|
1773
|
+
accessUntil: 'Accès jusqu’au {date}',
|
|
1774
|
+
accessRecordedEnd: 'Date de fin enregistrée : {date}',
|
|
1775
|
+
subscriptionLine: 'Abonnement : {status}',
|
|
1776
|
+
renewalCanceled: 'Renouvellement annulé',
|
|
1777
|
+
periodEnds: 'Fin de la période le {date}',
|
|
1778
|
+
subActive: 'actif',
|
|
1779
|
+
subTrialing: 'en période d’essai',
|
|
1780
|
+
subPastDue: 'paiement en retard',
|
|
1781
|
+
subCanceled: 'résilié',
|
|
1782
|
+
subUnpaid: 'impayé',
|
|
1783
|
+
subIncomplete: 'incomplet',
|
|
1784
|
+
subIncompleteExpired: 'paiement non finalisé',
|
|
1785
|
+
subPaused: 'en pause',
|
|
1786
|
+
licenseOffline: 'Connectez-vous à Internet pour vérifier votre licence. Les fonctionnalités payantes sont suspendues après 48 heures sans vérification réussie. Votre achat n’a pas expiré.',
|
|
1787
|
+
licenseCached: 'Affichage des informations de licence enregistrées.',
|
|
1788
|
+
licenseFresh: 'Les informations d’abonnement reflètent la dernière mise à jour de paiement traitée.',
|
|
1789
|
+
actionFailed: 'Impossible de traiter la demande. Veuillez réessayer ou contacter l’assistance de l’extension.',
|
|
1790
|
+
manageBilling: 'Gérer la facturation',
|
|
1791
|
+
noPortal: 'Le portail de facturation ne s’est pas ouvert. Vous pouvez réessayer ou contacter l’assistance de l’extension.',
|
|
1792
|
+
close: 'Fermer',
|
|
1793
|
+
pickerTitle: 'Choisissez un profil de facturation',
|
|
1794
|
+
pickerDescription: 'Des achats distincts peuvent avoir des profils de facturation distincts. Choisissez-en un pour gérer ses abonnements et ses informations de paiement.',
|
|
1795
|
+
pickerFirstRecorded: 'Enregistré pour la première fois le {date}',
|
|
1796
|
+
pickerCancel: 'Annuler',
|
|
1797
|
+
},
|
|
1798
|
+
de: {
|
|
1799
|
+
title: 'Premium-Funktionen freischalten',
|
|
1800
|
+
description: 'Hol dir mit einem Upgrade vollen Zugriff auf diese Erweiterung.',
|
|
1801
|
+
upgrade: 'Upgraden',
|
|
1802
|
+
cancel: 'Jetzt nicht',
|
|
1803
|
+
dismiss: 'Ausblenden',
|
|
1804
|
+
remindLater: 'Später erinnern',
|
|
1805
|
+
continueFree: 'Mit der kostenlosen Version fortfahren',
|
|
1806
|
+
checkoutUnavailable: 'Käufe sind vorübergehend nicht möglich',
|
|
1807
|
+
periodMonth: '/Monat',
|
|
1808
|
+
periodYear: '/Jahr',
|
|
1809
|
+
periodOnce: 'einmalig',
|
|
1810
|
+
footer: 'Der sichere Bezahlvorgang öffnet sich in einem neuen Tab.',
|
|
1811
|
+
restorePurchase: 'Kauf wiederherstellen',
|
|
1812
|
+
featuresHeading: 'Premium-Funktionen',
|
|
1813
|
+
plansHeading: 'Wähle deinen Tarif',
|
|
1814
|
+
freePlanName: 'Kostenlos',
|
|
1815
|
+
premiumPlanName: 'Premium',
|
|
1816
|
+
popularBadge: 'Am beliebtesten',
|
|
1817
|
+
unlockHeading: 'Premium-Funktionen freischalten',
|
|
1818
|
+
simulatePurchase: 'Kauf simulieren',
|
|
1819
|
+
mockNotice: 'Entwicklungsvorschau: Lizenzen und Zahlungen werden simuliert. Es wird keine Zahlung eingezogen.',
|
|
1820
|
+
sellerProvidedBy: 'Lizenz bereitgestellt von {name}',
|
|
1821
|
+
sellerUnavailable: 'Angaben zum Lizenzgeber sind nicht verfügbar.',
|
|
1822
|
+
sellerSupport: 'Support für die Erweiterung',
|
|
1823
|
+
sellerTerms: 'Lizenzbedingungen',
|
|
1824
|
+
sellerRefunds: 'Rückerstattungen',
|
|
1825
|
+
sellerRole: 'Der Autor ist für die Funktionen der Erweiterung und die Lizenzzusagen verantwortlich. Extenshi stellt die Werkzeuge für Zahlung und Lizenzwiederherstellung bereit.',
|
|
1826
|
+
licenseTitle: 'Deine Lizenz',
|
|
1827
|
+
licenseFallbackName: 'Erweiterungslizenz',
|
|
1828
|
+
licenseNone: 'Für diese Installation wurde keine Lizenz gefunden.',
|
|
1829
|
+
kindOneTime: 'Einmalkauf',
|
|
1830
|
+
kindLifetime: 'Lebenslange Lizenz',
|
|
1831
|
+
kindSubscription: 'Abonnement',
|
|
1832
|
+
kindLicense: 'Lizenz',
|
|
1833
|
+
statusLine: 'Status: {status}',
|
|
1834
|
+
statusActive: 'aktiv',
|
|
1835
|
+
statusGrace: 'Kulanzfrist',
|
|
1836
|
+
statusExpired: 'abgelaufen',
|
|
1837
|
+
statusNone: 'kein Zugriff',
|
|
1838
|
+
accessEnded: 'Zugriff endete am {date}',
|
|
1839
|
+
accessUntil: 'Zugriff bis {date}',
|
|
1840
|
+
accessRecordedEnd: 'Erfasstes Enddatum: {date}',
|
|
1841
|
+
subscriptionLine: 'Abonnement: {status}',
|
|
1842
|
+
renewalCanceled: 'Wird nicht verlängert',
|
|
1843
|
+
periodEnds: 'Zeitraum endet am {date}',
|
|
1844
|
+
subActive: 'aktiv',
|
|
1845
|
+
subTrialing: 'Testphase',
|
|
1846
|
+
subPastDue: 'Zahlung überfällig',
|
|
1847
|
+
subCanceled: 'gekündigt',
|
|
1848
|
+
subUnpaid: 'unbezahlt',
|
|
1849
|
+
subIncomplete: 'unvollständig',
|
|
1850
|
+
subIncompleteExpired: 'Zahlung nicht abgeschlossen',
|
|
1851
|
+
subPaused: 'pausiert',
|
|
1852
|
+
licenseOffline: 'Stelle eine Internetverbindung her, um deine Lizenz zu prüfen. Kostenpflichtige Funktionen werden nach 48 Stunden ohne erfolgreiche Prüfung pausiert. Dein Kauf ist nicht abgelaufen.',
|
|
1853
|
+
licenseCached: 'Gespeicherte Lizenzinformationen werden angezeigt.',
|
|
1854
|
+
licenseFresh: 'Die Abonnementangaben entsprechen dem zuletzt verarbeiteten Zahlungsstand.',
|
|
1855
|
+
actionFailed: 'Die Anfrage konnte nicht abgeschlossen werden. Bitte versuche es erneut oder wende dich an den Support für die Erweiterung.',
|
|
1856
|
+
manageBilling: 'Abrechnung verwalten',
|
|
1857
|
+
noPortal: 'Das Abrechnungsportal wurde nicht geöffnet. Du kannst es erneut versuchen oder dich an den Support für die Erweiterung wenden.',
|
|
1858
|
+
close: 'Schließen',
|
|
1859
|
+
pickerTitle: 'Abrechnungsprofil auswählen',
|
|
1860
|
+
pickerDescription: 'Verschiedene Käufe können eigene Abrechnungsprofile haben. Wähle eines aus, um seine Abonnements und Zahlungsdaten zu verwalten.',
|
|
1861
|
+
pickerFirstRecorded: 'Erstmals erfasst am {date}',
|
|
1862
|
+
pickerCancel: 'Abbrechen',
|
|
1863
|
+
},
|
|
1864
|
+
it: {
|
|
1865
|
+
title: 'Sblocca le funzionalità premium',
|
|
1866
|
+
description: 'Effettua l’upgrade per ottenere l’accesso completo a questa estensione.',
|
|
1867
|
+
upgrade: 'Effettua l’upgrade',
|
|
1868
|
+
cancel: 'Non ora',
|
|
1869
|
+
dismiss: 'Ignora',
|
|
1870
|
+
remindLater: 'Ricordamelo più tardi',
|
|
1871
|
+
continueFree: 'Continua con la versione gratuita',
|
|
1872
|
+
checkoutUnavailable: 'Gli acquisti sono temporaneamente non disponibili',
|
|
1873
|
+
periodMonth: '/mese',
|
|
1874
|
+
periodYear: '/anno',
|
|
1875
|
+
periodOnce: 'una tantum',
|
|
1876
|
+
footer: 'Il checkout sicuro si apre in una nuova scheda.',
|
|
1877
|
+
restorePurchase: 'Ripristina acquisto',
|
|
1878
|
+
featuresHeading: 'Funzionalità premium',
|
|
1879
|
+
plansHeading: 'Scegli il tuo piano',
|
|
1880
|
+
freePlanName: 'Gratuito',
|
|
1881
|
+
premiumPlanName: 'Premium',
|
|
1882
|
+
popularBadge: 'Il più scelto',
|
|
1883
|
+
unlockHeading: 'Sblocca le funzionalità premium',
|
|
1884
|
+
simulatePurchase: 'Simula acquisto',
|
|
1885
|
+
mockNotice: 'Anteprima di sviluppo: licenze e pagamenti sono simulati. Non verrà addebitato alcun pagamento.',
|
|
1886
|
+
sellerProvidedBy: 'Licenza fornita da {name}',
|
|
1887
|
+
sellerUnavailable: 'I dettagli del fornitore della licenza non sono disponibili.',
|
|
1888
|
+
sellerSupport: 'Assistenza per l’estensione',
|
|
1889
|
+
sellerTerms: 'Termini di licenza',
|
|
1890
|
+
sellerRefunds: 'Politica di rimborso',
|
|
1891
|
+
sellerRole: 'L’autore è responsabile delle funzionalità dell’estensione e degli impegni relativi alla licenza. Extenshi fornisce gli strumenti di pagamento e di recupero della licenza.',
|
|
1892
|
+
licenseTitle: 'La tua licenza',
|
|
1893
|
+
licenseFallbackName: 'Licenza dell’estensione',
|
|
1894
|
+
licenseNone: 'Nessuna licenza trovata in questa installazione.',
|
|
1895
|
+
kindOneTime: 'Acquisto una tantum',
|
|
1896
|
+
kindLifetime: 'Licenza a vita',
|
|
1897
|
+
kindSubscription: 'Abbonamento',
|
|
1898
|
+
kindLicense: 'Licenza',
|
|
1899
|
+
statusLine: 'Stato: {status}',
|
|
1900
|
+
statusActive: 'attivo',
|
|
1901
|
+
statusGrace: 'periodo di tolleranza',
|
|
1902
|
+
statusExpired: 'scaduto',
|
|
1903
|
+
statusNone: 'nessun accesso',
|
|
1904
|
+
accessEnded: 'Accesso terminato il {date}',
|
|
1905
|
+
accessUntil: 'Accesso fino al {date}',
|
|
1906
|
+
accessRecordedEnd: 'Data di fine registrata: {date}',
|
|
1907
|
+
subscriptionLine: 'Abbonamento: {status}',
|
|
1908
|
+
renewalCanceled: 'Rinnovo annullato',
|
|
1909
|
+
periodEnds: 'Il periodo termina il {date}',
|
|
1910
|
+
subActive: 'attivo',
|
|
1911
|
+
subTrialing: 'in prova',
|
|
1912
|
+
subPastDue: 'pagamento in ritardo',
|
|
1913
|
+
subCanceled: 'disdetto',
|
|
1914
|
+
subUnpaid: 'non pagato',
|
|
1915
|
+
subIncomplete: 'incompleto',
|
|
1916
|
+
subIncompleteExpired: 'pagamento non completato',
|
|
1917
|
+
subPaused: 'in pausa',
|
|
1918
|
+
licenseOffline: 'Connettiti a internet per verificare la tua licenza. Le funzionalità a pagamento vengono sospese dopo 48 ore senza una verifica riuscita. Il tuo acquisto non è scaduto.',
|
|
1919
|
+
licenseCached: 'Vengono mostrate le informazioni salvate sulla licenza.',
|
|
1920
|
+
licenseFresh: 'Le informazioni sull’abbonamento riflettono l’ultimo aggiornamento di pagamento elaborato.',
|
|
1921
|
+
actionFailed: 'Impossibile completare la richiesta. Riprova o contatta l’assistenza per l’estensione.',
|
|
1922
|
+
manageBilling: 'Gestisci fatturazione',
|
|
1923
|
+
noPortal: 'Il portale di fatturazione non è stato aperto. Puoi riprovare o contattare l’assistenza per l’estensione.',
|
|
1924
|
+
close: 'Chiudi',
|
|
1925
|
+
pickerTitle: 'Scegli un profilo di fatturazione',
|
|
1926
|
+
pickerDescription: 'Acquisti diversi possono avere profili di fatturazione diversi. Scegline uno per gestirne gli abbonamenti e i dati di pagamento.',
|
|
1927
|
+
pickerFirstRecorded: 'Registrato per la prima volta il {date}',
|
|
1928
|
+
pickerCancel: 'Annulla',
|
|
1929
|
+
},
|
|
1930
|
+
ru: {
|
|
1931
|
+
title: 'Откройте доступ к премиум-функциям',
|
|
1932
|
+
description: 'Перейдите на премиум, чтобы получить полный доступ к этому расширению.',
|
|
1933
|
+
upgrade: 'Перейти на премиум',
|
|
1934
|
+
cancel: 'Не сейчас',
|
|
1935
|
+
dismiss: 'Скрыть',
|
|
1936
|
+
remindLater: 'Напомнить позже',
|
|
1937
|
+
continueFree: 'Продолжить в бесплатной версии',
|
|
1938
|
+
checkoutUnavailable: 'Покупки временно недоступны',
|
|
1939
|
+
periodMonth: '/мес.',
|
|
1940
|
+
periodYear: '/год',
|
|
1941
|
+
periodOnce: 'разово',
|
|
1942
|
+
footer: 'Защищённая страница оплаты откроется в новой вкладке.',
|
|
1943
|
+
restorePurchase: 'Восстановить покупку',
|
|
1944
|
+
featuresHeading: 'Премиум-функции',
|
|
1945
|
+
plansHeading: 'Выберите тарифный план',
|
|
1946
|
+
freePlanName: 'Бесплатный',
|
|
1947
|
+
premiumPlanName: 'Премиум',
|
|
1948
|
+
popularBadge: 'Самый популярный',
|
|
1949
|
+
unlockHeading: 'Откройте доступ к премиум-функциям',
|
|
1950
|
+
simulatePurchase: 'Имитировать покупку',
|
|
1951
|
+
mockNotice: 'Режим разработки: лицензии и платежи имитируются. Деньги не будут списаны.',
|
|
1952
|
+
sellerProvidedBy: 'Лицензию предоставляет {name}',
|
|
1953
|
+
sellerUnavailable: 'Сведения о поставщике лицензии недоступны.',
|
|
1954
|
+
sellerSupport: 'Поддержка расширения',
|
|
1955
|
+
sellerTerms: 'Условия лицензии',
|
|
1956
|
+
sellerRefunds: 'Возврат средств',
|
|
1957
|
+
sellerRole: 'Автор отвечает за работу расширения и обязательства по лицензии. Extenshi предоставляет инструменты для оплаты и восстановления лицензий.',
|
|
1958
|
+
licenseTitle: 'Ваша лицензия',
|
|
1959
|
+
licenseFallbackName: 'Лицензия на расширение',
|
|
1960
|
+
licenseNone: 'Для этой установки лицензия не найдена.',
|
|
1961
|
+
kindOneTime: 'Разовая покупка',
|
|
1962
|
+
kindLifetime: 'Бессрочная лицензия',
|
|
1963
|
+
kindSubscription: 'Подписка',
|
|
1964
|
+
kindLicense: 'Лицензия',
|
|
1965
|
+
statusLine: 'Статус: {status}',
|
|
1966
|
+
statusActive: 'действует',
|
|
1967
|
+
statusGrace: 'льготный период',
|
|
1968
|
+
statusExpired: 'срок истёк',
|
|
1969
|
+
statusNone: 'нет доступа',
|
|
1970
|
+
accessEnded: 'Доступ закончился: {date}',
|
|
1971
|
+
accessUntil: 'Доступ до {date}',
|
|
1972
|
+
accessRecordedEnd: 'Зафиксированная дата окончания: {date}',
|
|
1973
|
+
subscriptionLine: 'Подписка: {status}',
|
|
1974
|
+
renewalCanceled: 'Продление отменено',
|
|
1975
|
+
periodEnds: 'Период заканчивается: {date}',
|
|
1976
|
+
subActive: 'активна',
|
|
1977
|
+
subTrialing: 'пробный период',
|
|
1978
|
+
subPastDue: 'платёж просрочен',
|
|
1979
|
+
subCanceled: 'отменена',
|
|
1980
|
+
subUnpaid: 'не оплачена',
|
|
1981
|
+
subIncomplete: 'ожидает первого платежа',
|
|
1982
|
+
subIncompleteExpired: 'платёж не завершён',
|
|
1983
|
+
subPaused: 'приостановлена',
|
|
1984
|
+
licenseOffline: 'Подключитесь к интернету, чтобы проверить лицензию. Если успешной проверки не было 48 часов, платные функции приостанавливаются. Срок действия вашей покупки не истёк.',
|
|
1985
|
+
licenseCached: 'Показаны сохранённые сведения о лицензии.',
|
|
1986
|
+
licenseFresh: 'Сведения о подписке соответствуют последнему обработанному обновлению платежа.',
|
|
1987
|
+
actionFailed: 'Не удалось выполнить запрос. Попробуйте ещё раз или обратитесь в поддержку расширения.',
|
|
1988
|
+
manageBilling: 'Управление оплатой',
|
|
1989
|
+
noPortal: 'Портал оплаты не открылся. Можно повторить попытку или обратиться в поддержку расширения.',
|
|
1990
|
+
close: 'Закрыть',
|
|
1991
|
+
pickerTitle: 'Выберите платёжный профиль',
|
|
1992
|
+
pickerDescription: 'У разных покупок могут быть разные платёжные профили. Выберите профиль, чтобы управлять его подписками и платёжными данными.',
|
|
1993
|
+
pickerFirstRecorded: 'Впервые зафиксирован: {date}',
|
|
1994
|
+
pickerCancel: 'Отмена',
|
|
1995
|
+
},
|
|
1996
|
+
ja: {
|
|
1997
|
+
title: 'プレミアム機能をアンロック',
|
|
1998
|
+
description: 'アップグレードすると、この拡張機能のすべての機能をご利用いただけます。',
|
|
1999
|
+
upgrade: 'アップグレード',
|
|
2000
|
+
cancel: '今はしない',
|
|
2001
|
+
dismiss: '非表示にする',
|
|
2002
|
+
remindLater: 'あとで通知する',
|
|
2003
|
+
continueFree: '無料版のまま使い続ける',
|
|
2004
|
+
checkoutUnavailable: '一時的に購入できません',
|
|
2005
|
+
periodMonth: '/月',
|
|
2006
|
+
periodYear: '/年',
|
|
2007
|
+
periodOnce: '買い切り',
|
|
2008
|
+
footer: '安全なチェックアウト画面が新しいタブで開きます。',
|
|
2009
|
+
restorePurchase: '購入を復元',
|
|
2010
|
+
featuresHeading: 'プレミアム機能',
|
|
2011
|
+
plansHeading: 'プランを選択',
|
|
2012
|
+
freePlanName: '無料',
|
|
2013
|
+
premiumPlanName: 'プレミアム',
|
|
2014
|
+
popularBadge: '一番人気',
|
|
2015
|
+
unlockHeading: 'プレミアム機能をアンロック',
|
|
2016
|
+
simulatePurchase: '購入をシミュレート',
|
|
2017
|
+
mockNotice: '開発用プレビュー:ライセンスと支払いはシミュレーションです。実際の請求は発生しません。',
|
|
2018
|
+
sellerProvidedBy: 'ライセンス提供者:{name}',
|
|
2019
|
+
sellerUnavailable: 'ライセンス提供者の情報を取得できません。',
|
|
2020
|
+
sellerSupport: '拡張機能のサポート',
|
|
2021
|
+
sellerTerms: 'ライセンス条件',
|
|
2022
|
+
sellerRefunds: '返金ポリシー',
|
|
2023
|
+
sellerRole: '拡張機能の機能とライセンス上の約束については、開発者が責任を負います。Extenshiは、お支払いとライセンス復元のためのツールを提供します。',
|
|
2024
|
+
licenseTitle: 'ご利用のライセンス',
|
|
2025
|
+
licenseFallbackName: '拡張機能のライセンス',
|
|
2026
|
+
licenseNone: 'このインストール環境ではライセンスが見つかりませんでした。',
|
|
2027
|
+
kindOneTime: '買い切り',
|
|
2028
|
+
kindLifetime: 'ライフタイムライセンス',
|
|
2029
|
+
kindSubscription: 'サブスクリプション',
|
|
2030
|
+
kindLicense: 'ライセンス',
|
|
2031
|
+
statusLine: 'ステータス:{status}',
|
|
2032
|
+
statusActive: '有効',
|
|
2033
|
+
statusGrace: '猶予期間中',
|
|
2034
|
+
statusExpired: '期限切れ',
|
|
2035
|
+
statusNone: '利用不可',
|
|
2036
|
+
accessEnded: '利用終了日時:{date}',
|
|
2037
|
+
accessUntil: '利用期限:{date}',
|
|
2038
|
+
accessRecordedEnd: '記録上の終了日時:{date}',
|
|
2039
|
+
subscriptionLine: 'サブスクリプション:{status}',
|
|
2040
|
+
renewalCanceled: '更新停止済み',
|
|
2041
|
+
periodEnds: '期間終了日:{date}',
|
|
2042
|
+
subActive: '有効',
|
|
2043
|
+
subTrialing: 'トライアル中',
|
|
2044
|
+
subPastDue: '支払い期限超過',
|
|
2045
|
+
subCanceled: '解約済み',
|
|
2046
|
+
subUnpaid: '未払い',
|
|
2047
|
+
subIncomplete: '手続き未完了',
|
|
2048
|
+
subIncompleteExpired: '支払い未完了',
|
|
2049
|
+
subPaused: '一時停止中',
|
|
2050
|
+
licenseOffline: 'ライセンスを確認するには、インターネットに接続してください。確認に成功しないまま48時間が経過すると、有料機能は一時停止されます。ご購入が失効したわけではありません。',
|
|
2051
|
+
licenseCached: '保存済みのライセンス情報を表示しています。',
|
|
2052
|
+
licenseFresh: 'サブスクリプション情報には、処理済みの最新の支払い情報が反映されています。',
|
|
2053
|
+
actionFailed: 'リクエストを完了できませんでした。もう一度お試しいただくか、拡張機能のサポートにお問い合わせください。',
|
|
2054
|
+
manageBilling: '請求情報を管理',
|
|
2055
|
+
noPortal: '請求ポータルを開けませんでした。再試行するか、拡張機能のサポートにお問い合わせください。',
|
|
2056
|
+
close: '閉じる',
|
|
2057
|
+
pickerTitle: '請求プロファイルを選択',
|
|
2058
|
+
pickerDescription: '購入ごとに別々の請求プロファイルがある場合があります。サブスクリプションと支払い情報を管理するプロファイルを1つ選択してください。',
|
|
2059
|
+
pickerFirstRecorded: '初回記録日:{date}',
|
|
2060
|
+
pickerCancel: 'キャンセル',
|
|
2061
|
+
},
|
|
2062
|
+
ko: {
|
|
2063
|
+
title: '프리미엄 기능 잠금 해제',
|
|
2064
|
+
description: '업그레이드하면 이 확장 프로그램의 모든 기능을 이용할 수 있습니다.',
|
|
2065
|
+
upgrade: '업그레이드',
|
|
2066
|
+
cancel: '나중에',
|
|
2067
|
+
dismiss: '닫기',
|
|
2068
|
+
remindLater: '나중에 다시 알림',
|
|
2069
|
+
continueFree: '무료 버전으로 계속하기',
|
|
2070
|
+
checkoutUnavailable: '일시적으로 구매할 수 없습니다',
|
|
2071
|
+
periodMonth: '/월',
|
|
2072
|
+
periodYear: '/년',
|
|
2073
|
+
periodOnce: '일회성',
|
|
2074
|
+
footer: '안전한 결제 페이지가 새 탭에서 열립니다.',
|
|
2075
|
+
restorePurchase: '구매 복원',
|
|
2076
|
+
featuresHeading: '프리미엄 기능',
|
|
2077
|
+
plansHeading: '요금제 선택',
|
|
2078
|
+
freePlanName: '무료',
|
|
2079
|
+
premiumPlanName: '프리미엄',
|
|
2080
|
+
popularBadge: '가장 인기',
|
|
2081
|
+
unlockHeading: '프리미엄 기능 잠금 해제',
|
|
2082
|
+
simulatePurchase: '구매 시뮬레이션',
|
|
2083
|
+
mockNotice: '개발용 미리보기: 라이선스와 결제는 시뮬레이션됩니다. 실제로 결제되지 않습니다.',
|
|
2084
|
+
sellerProvidedBy: '라이선스 제공자: {name}',
|
|
2085
|
+
sellerUnavailable: '라이선스 제공자 정보를 확인할 수 없습니다.',
|
|
2086
|
+
sellerSupport: '확장 프로그램 지원',
|
|
2087
|
+
sellerTerms: '라이선스 약관',
|
|
2088
|
+
sellerRefunds: '환불 정책',
|
|
2089
|
+
sellerRole: '확장 프로그램의 기능과 라이선스 관련 약속은 개발자가 책임집니다. Extenshi는 결제 및 라이선스 복구 도구를 제공합니다.',
|
|
2090
|
+
licenseTitle: '내 라이선스',
|
|
2091
|
+
licenseFallbackName: '확장 프로그램 라이선스',
|
|
2092
|
+
licenseNone: '이 설치 환경에서 라이선스를 찾지 못했습니다.',
|
|
2093
|
+
kindOneTime: '일회성 구매',
|
|
2094
|
+
kindLifetime: '평생 라이선스',
|
|
2095
|
+
kindSubscription: '구독',
|
|
2096
|
+
kindLicense: '라이선스',
|
|
2097
|
+
statusLine: '상태: {status}',
|
|
2098
|
+
statusActive: '활성',
|
|
2099
|
+
statusGrace: '유예 기간 중',
|
|
2100
|
+
statusExpired: '만료됨',
|
|
2101
|
+
statusNone: '이용 권한 없음',
|
|
2102
|
+
accessEnded: '이용 종료 일시: {date}',
|
|
2103
|
+
accessUntil: '이용 기한: {date}',
|
|
2104
|
+
accessRecordedEnd: '기록된 종료 일시: {date}',
|
|
2105
|
+
subscriptionLine: '구독: {status}',
|
|
2106
|
+
renewalCanceled: '갱신 취소됨',
|
|
2107
|
+
periodEnds: '기간 종료일: {date}',
|
|
2108
|
+
subActive: '활성',
|
|
2109
|
+
subTrialing: '체험 중',
|
|
2110
|
+
subPastDue: '결제 연체',
|
|
2111
|
+
subCanceled: '해지됨',
|
|
2112
|
+
subUnpaid: '미결제',
|
|
2113
|
+
subIncomplete: '미완료',
|
|
2114
|
+
subIncompleteExpired: '결제 미완료',
|
|
2115
|
+
subPaused: '일시 중지됨',
|
|
2116
|
+
licenseOffline: '라이선스를 확인하려면 인터넷에 연결해 주세요. 확인에 성공하지 못한 채 48시간이 지나면 유료 기능이 일시 중지됩니다. 구매가 만료된 것은 아닙니다.',
|
|
2117
|
+
licenseCached: '저장된 라이선스 정보를 표시하고 있습니다.',
|
|
2118
|
+
licenseFresh: '구독 정보에는 가장 최근에 처리된 결제 내역이 반영되어 있습니다.',
|
|
2119
|
+
actionFailed: '요청을 완료할 수 없습니다. 다시 시도하거나 확장 프로그램 지원 창구에 문의해 주세요.',
|
|
2120
|
+
manageBilling: '결제 관리',
|
|
2121
|
+
noPortal: '결제 포털이 열리지 않았습니다. 다시 시도하거나 확장 프로그램 지원 창구에 문의해 주세요.',
|
|
2122
|
+
close: '닫기',
|
|
2123
|
+
pickerTitle: '결제 프로필 선택',
|
|
2124
|
+
pickerDescription: '구매마다 결제 프로필이 다를 수 있습니다. 구독과 결제 정보를 관리할 프로필을 하나 선택해 주세요.',
|
|
2125
|
+
pickerFirstRecorded: '최초 기록일: {date}',
|
|
2126
|
+
pickerCancel: '취소',
|
|
2127
|
+
},
|
|
2128
|
+
'zh-CN': {
|
|
2129
|
+
title: '解锁高级功能',
|
|
2130
|
+
description: '升级即可完整使用此扩展程序。',
|
|
2131
|
+
upgrade: '升级',
|
|
2132
|
+
cancel: '以后再说',
|
|
2133
|
+
dismiss: '忽略',
|
|
2134
|
+
remindLater: '稍后提醒我',
|
|
2135
|
+
continueFree: '继续使用免费版',
|
|
2136
|
+
checkoutUnavailable: '暂时无法购买',
|
|
2137
|
+
periodMonth: '/月',
|
|
2138
|
+
periodYear: '/年',
|
|
2139
|
+
periodOnce: '一次性',
|
|
2140
|
+
footer: '安全结账页面将在新标签页中打开。',
|
|
2141
|
+
restorePurchase: '恢复购买',
|
|
2142
|
+
featuresHeading: '高级功能',
|
|
2143
|
+
plansHeading: '选择您的方案',
|
|
2144
|
+
freePlanName: '免费版',
|
|
2145
|
+
premiumPlanName: '高级版',
|
|
2146
|
+
popularBadge: '最受欢迎',
|
|
2147
|
+
unlockHeading: '解锁高级功能',
|
|
2148
|
+
simulatePurchase: '模拟购买',
|
|
2149
|
+
mockNotice: '开发预览:许可证和付款均为模拟,不会实际扣款。',
|
|
2150
|
+
sellerProvidedBy: '许可证由 {name} 提供',
|
|
2151
|
+
sellerUnavailable: '无法获取许可证提供方的详细信息。',
|
|
2152
|
+
sellerSupport: '扩展程序支持',
|
|
2153
|
+
sellerTerms: '许可条款',
|
|
2154
|
+
sellerRefunds: '退款政策',
|
|
2155
|
+
sellerRole: '作者负责扩展程序的功能及许可证相关承诺。Extenshi 提供支付及许可证恢复工具。',
|
|
2156
|
+
licenseTitle: '您的许可证',
|
|
2157
|
+
licenseFallbackName: '扩展程序许可证',
|
|
2158
|
+
licenseNone: '此安装中未找到许可证。',
|
|
2159
|
+
kindOneTime: '一次性购买',
|
|
2160
|
+
kindLifetime: '终身许可证',
|
|
2161
|
+
kindSubscription: '订阅',
|
|
2162
|
+
kindLicense: '许可证',
|
|
2163
|
+
statusLine: '状态:{status}',
|
|
2164
|
+
statusActive: '有效',
|
|
2165
|
+
statusGrace: '宽限期',
|
|
2166
|
+
statusExpired: '已过期',
|
|
2167
|
+
statusNone: '无使用权限',
|
|
2168
|
+
accessEnded: '使用权限已于 {date} 结束',
|
|
2169
|
+
accessUntil: '可使用至 {date}',
|
|
2170
|
+
accessRecordedEnd: '记录的结束日期:{date}',
|
|
2171
|
+
subscriptionLine: '订阅:{status}',
|
|
2172
|
+
renewalCanceled: '已取消续订',
|
|
2173
|
+
periodEnds: '当前计费周期于 {date} 结束',
|
|
2174
|
+
subActive: '有效',
|
|
2175
|
+
subTrialing: '试用中',
|
|
2176
|
+
subPastDue: '付款逾期',
|
|
2177
|
+
subCanceled: '已取消',
|
|
2178
|
+
subUnpaid: '未付款',
|
|
2179
|
+
subIncomplete: '未完成',
|
|
2180
|
+
subIncompleteExpired: '付款未完成',
|
|
2181
|
+
subPaused: '已暂停',
|
|
2182
|
+
licenseOffline: '请连接互联网以验证您的许可证。如果连续48小时未能成功验证,付费功能将暂停。您的购买仍然有效。',
|
|
2183
|
+
licenseCached: '正在显示已保存的许可证信息。',
|
|
2184
|
+
licenseFresh: '订阅信息反映的是最近一次已处理的付款更新。',
|
|
2185
|
+
actionFailed: '无法完成请求。请重试或联系扩展程序支持。',
|
|
2186
|
+
manageBilling: '管理账单',
|
|
2187
|
+
noPortal: '未能打开账单门户。您可以重试或联系扩展程序支持。',
|
|
2188
|
+
close: '关闭',
|
|
2189
|
+
pickerTitle: '选择账单资料',
|
|
2190
|
+
pickerDescription: '不同的购买可以有各自的账单资料。请选择一个,以管理其订阅和付款信息。',
|
|
2191
|
+
pickerFirstRecorded: '首次记录于 {date}',
|
|
2192
|
+
pickerCancel: '取消',
|
|
2193
|
+
},
|
|
2194
|
+
ar: {
|
|
2195
|
+
title: 'احصل على الميزات المميزة',
|
|
2196
|
+
description: 'قم بالترقية للوصول الكامل إلى هذه الإضافة.',
|
|
2197
|
+
upgrade: 'ترقية',
|
|
2198
|
+
cancel: 'ليس الآن',
|
|
2199
|
+
dismiss: 'تجاهل',
|
|
2200
|
+
remindLater: 'ذكّرني لاحقًا',
|
|
2201
|
+
continueFree: 'المتابعة بالإصدار المجاني',
|
|
2202
|
+
checkoutUnavailable: 'عمليات الشراء غير متاحة مؤقتًا',
|
|
2203
|
+
periodMonth: '/شهر',
|
|
2204
|
+
periodYear: '/سنة',
|
|
2205
|
+
periodOnce: 'لمرة واحدة',
|
|
2206
|
+
footer: 'تُفتح صفحة الدفع الآمن في علامة تبويب جديدة.',
|
|
2207
|
+
restorePurchase: 'استعادة الشراء',
|
|
2208
|
+
featuresHeading: 'الميزات المميزة',
|
|
2209
|
+
plansHeading: 'اختر خطتك',
|
|
2210
|
+
freePlanName: 'مجاني',
|
|
2211
|
+
premiumPlanName: 'مميز',
|
|
2212
|
+
popularBadge: 'الأكثر رواجًا',
|
|
2213
|
+
unlockHeading: 'احصل على الميزات المميزة',
|
|
2214
|
+
simulatePurchase: 'محاكاة الشراء',
|
|
2215
|
+
mockNotice: 'معاينة التطوير: تجري محاكاة التراخيص والمدفوعات، ولن يُحصَّل أي مبلغ.',
|
|
2216
|
+
sellerProvidedBy: 'الترخيص مقدَّم من البائع {name}',
|
|
2217
|
+
sellerUnavailable: 'بيانات مانح الترخيص غير متاحة.',
|
|
2218
|
+
sellerSupport: 'دعم الإضافة',
|
|
2219
|
+
sellerTerms: 'شروط الترخيص',
|
|
2220
|
+
sellerRefunds: 'سياسة استرداد المبالغ',
|
|
2221
|
+
sellerRole: 'يتحمّل مطوّر الإضافة المسؤولية عن وظائفها وعن التزامات الترخيص، وتوفّر Extenshi أدوات الدفع واستعادة التراخيص.',
|
|
2222
|
+
licenseTitle: 'ترخيصك',
|
|
2223
|
+
licenseFallbackName: 'ترخيص الإضافة',
|
|
2224
|
+
licenseNone: 'لم يُعثر على أي ترخيص في هذا التثبيت.',
|
|
2225
|
+
kindOneTime: 'شراء لمرة واحدة',
|
|
2226
|
+
kindLifetime: 'ترخيص مدى الحياة',
|
|
2227
|
+
kindSubscription: 'اشتراك',
|
|
2228
|
+
kindLicense: 'ترخيص',
|
|
2229
|
+
statusLine: 'الحالة: {status}',
|
|
2230
|
+
statusActive: 'نشطة',
|
|
2231
|
+
statusGrace: 'في فترة السماح',
|
|
2232
|
+
statusExpired: 'منتهية الصلاحية',
|
|
2233
|
+
statusNone: 'بلا وصول',
|
|
2234
|
+
accessEnded: 'انتهى الوصول في {date}',
|
|
2235
|
+
accessUntil: 'الوصول متاح حتى {date}',
|
|
2236
|
+
accessRecordedEnd: 'تاريخ الانتهاء المسجَّل: {date}',
|
|
2237
|
+
subscriptionLine: 'الاشتراك: {status}',
|
|
2238
|
+
renewalCanceled: 'أُلغي التجديد',
|
|
2239
|
+
periodEnds: 'تنتهي الفترة الحالية في {date}',
|
|
2240
|
+
subActive: 'نشط',
|
|
2241
|
+
subTrialing: 'فترة تجريبية',
|
|
2242
|
+
subPastDue: 'متأخر السداد',
|
|
2243
|
+
subCanceled: 'ملغى',
|
|
2244
|
+
subUnpaid: 'غير مدفوع',
|
|
2245
|
+
subIncomplete: 'غير مكتمل',
|
|
2246
|
+
subIncompleteExpired: 'لم يكتمل الدفع',
|
|
2247
|
+
subPaused: 'متوقف مؤقتًا',
|
|
2248
|
+
licenseOffline: 'اتصل بالإنترنت للتحقق من ترخيصك. تتوقف الميزات المدفوعة مؤقتًا إذا مرّت 48 ساعة دون تحقق ناجح. لم تنتهِ صلاحية عملية الشراء.',
|
|
2249
|
+
licenseCached: 'تُعرض معلومات الترخيص المحفوظة.',
|
|
2250
|
+
licenseFresh: 'تعكس معلومات الاشتراك آخر تحديث للدفع تمت معالجته.',
|
|
2251
|
+
actionFailed: 'تعذّر إكمال الطلب. يُرجى المحاولة مرة أخرى أو التواصل مع دعم الإضافة.',
|
|
2252
|
+
manageBilling: 'إدارة الفوترة',
|
|
2253
|
+
noPortal: 'لم تُفتح بوابة الفوترة. يمكنك المحاولة مرة أخرى أو التواصل مع دعم الإضافة.',
|
|
2254
|
+
close: 'إغلاق',
|
|
2255
|
+
pickerTitle: 'اختر ملف فوترة',
|
|
2256
|
+
pickerDescription: 'يمكن أن تكون لعمليات الشراء المنفصلة ملفات فوترة منفصلة. اختر ملفًا منها لإدارة اشتراكاته وتفاصيل الدفع الخاصة به.',
|
|
2257
|
+
pickerFirstRecorded: 'سُجِّل لأول مرة في {date}',
|
|
2258
|
+
pickerCancel: 'إلغاء',
|
|
2259
|
+
},
|
|
2260
|
+
};
|
|
2261
|
+
// END GENERATED TRANSLATIONS
|
|
2262
|
+
/** Our dictionary language for a tag: exact, then pt → pt-BR, zh(-CN/SG/Hans) → zh-CN, then the bare language. */
|
|
2263
|
+
function sdkLocale(locale) {
|
|
2264
|
+
const tag = wireLocale(locale);
|
|
2265
|
+
if (!tag)
|
|
2266
|
+
return 'en';
|
|
2267
|
+
const exact = SDK_LOCALES.find((l) => l.toLowerCase() === tag.toLowerCase());
|
|
2268
|
+
if (exact)
|
|
2269
|
+
return exact;
|
|
2270
|
+
const [lang, region] = tag.split('-');
|
|
2271
|
+
if (lang === 'pt')
|
|
2272
|
+
return 'pt-BR';
|
|
2273
|
+
// Traditional-script regions read English rather than Simplified characters.
|
|
2274
|
+
if (lang === 'zh')
|
|
2275
|
+
return region && ['TW', 'HK', 'MO'].includes(region) ? 'en' : 'zh-CN';
|
|
2276
|
+
return SDK_LOCALES.find((l) => l === lang) ?? 'en';
|
|
2277
|
+
}
|
|
2278
|
+
function sdkDir(locale) {
|
|
2279
|
+
const lang = wireLocale(locale)?.split('-')[0];
|
|
2280
|
+
return lang && ['ar', 'he', 'fa', 'ur'].includes(lang) ? 'rtl' : 'ltr';
|
|
2281
|
+
}
|
|
2282
|
+
/** English merged with the translation for `locale`. */
|
|
2283
|
+
function sdkStrings(locale) {
|
|
2284
|
+
const tag = sdkLocale(locale);
|
|
2285
|
+
return tag === 'en' ? SDK_STRINGS_EN : { ...SDK_STRINGS_EN, ...TRANSLATIONS[tag] };
|
|
2286
|
+
}
|
|
2287
|
+
/** Fill `{placeholders}` once; a value containing braces is inserted literally. */
|
|
2288
|
+
function fill(message, values) {
|
|
2289
|
+
return message.replace(/\{([a-z]+)\}/g, (whole, key) => values[key] ?? whole);
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
/**
|
|
2293
|
+
* Buyer-facing withdrawal-waiver text (EU/EEA digital content, Directive
|
|
2294
|
+
* 2011/83/EU art. 16(m); UK CCR 2013 reg. 37), per text version and SDK
|
|
2295
|
+
* language. Its own module, not part of the paywall dictionary, so Lite can
|
|
2296
|
+
* show it without bundling every paywall string.
|
|
2297
|
+
*
|
|
2298
|
+
* The recorded consent names the version, so a version's words never change:
|
|
2299
|
+
* new wording is a new version here and a new PAY_WITHDRAWAL_WAIVER_VERSION.
|
|
2300
|
+
*
|
|
2301
|
+
* MIRRORED in shared-types/pay-withdrawal-waiver.ts, which the purchase
|
|
2302
|
+
* confirmation email quotes; shared-types/pay-withdrawal-waiver.test.ts fails
|
|
2303
|
+
* unless both copies are byte-identical. Change them together.
|
|
2304
|
+
*/
|
|
2305
|
+
const WITHDRAWAL_WAIVER_TEXTS = {
|
|
2306
|
+
[PAY_WITHDRAWAL_WAIVER_VERSION]: {
|
|
2307
|
+
en: 'I agree that {seller} starts supplying the digital content immediately, and I acknowledge that I lose my right of withdrawal once supply has begun.',
|
|
2308
|
+
es: 'Acepto que {seller} comience a suministrar el contenido digital de inmediato y reconozco que pierdo mi derecho de desistimiento una vez iniciado el suministro.',
|
|
2309
|
+
'pt-BR': 'Concordo que {seller} comece a fornecer o conteúdo digital imediatamente e reconheço que perco meu direito de arrependimento assim que o fornecimento tiver início.',
|
|
2310
|
+
fr: 'J’accepte que {seller} commence immédiatement la fourniture du contenu numérique et je reconnais perdre mon droit de rétractation dès le début de la fourniture.',
|
|
2311
|
+
de: 'Ich stimme zu, dass {seller} sofort mit der Bereitstellung der digitalen Inhalte beginnt, und ich nehme zur Kenntnis, dass ich mit Beginn der Bereitstellung mein Widerrufsrecht verliere.',
|
|
2312
|
+
it: 'Accetto che {seller} inizi immediatamente la fornitura del contenuto digitale e riconosco di perdere il mio diritto di recesso una volta iniziata la fornitura.',
|
|
2313
|
+
ru: 'Я соглашаюсь с тем, что {seller} немедленно начнёт предоставление цифрового контента, и подтверждаю, что утрачиваю право на отказ от договора с момента начала предоставления.',
|
|
2314
|
+
ja: '{seller}がデジタルコンテンツの提供を直ちに開始することに同意し、提供の開始後は撤回権を失うことを了承します。',
|
|
2315
|
+
ko: '{seller}의 디지털 콘텐츠 제공이 즉시 시작되는 것에 동의하며, 제공이 시작되면 청약철회권을 상실한다는 점을 확인합니다.',
|
|
2316
|
+
'zh-CN': '我同意 {seller} 立即开始提供数字内容,并确认一旦开始提供,我将失去撤回权。',
|
|
2317
|
+
ar: 'أوافق على أن يبدأ {seller} فورًا في تقديم المحتوى الرقمي، وأُقرّ بأنني أفقد حقي في العدول عن العقد بمجرد بدء التقديم.',
|
|
2318
|
+
},
|
|
2319
|
+
};
|
|
2320
|
+
/**
|
|
2321
|
+
* The waiver text to show for `serverVersion`, and the version to send with
|
|
2322
|
+
* the consent. A version this SDK does not know (a newer server) shows this
|
|
2323
|
+
* SDK's current text and sends its version: the consent always names the words
|
|
2324
|
+
* actually shown.
|
|
2325
|
+
*/
|
|
2326
|
+
function withdrawalWaiverText(serverVersion, locale, seller) {
|
|
2327
|
+
// Own keys only: `toString` / `__proto__` from a server are just unknown versions.
|
|
2328
|
+
const known = Object.keys(WITHDRAWAL_WAIVER_TEXTS).includes(serverVersion);
|
|
2329
|
+
const version = known ? serverVersion : PAY_WITHDRAWAL_WAIVER_VERSION;
|
|
2330
|
+
return { version, text: fill(WITHDRAWAL_WAIVER_TEXTS[version][sdkLocale(locale)], { seller }) };
|
|
2331
|
+
}
|
|
2332
|
+
|
|
1439
2333
|
/**
|
|
1440
2334
|
* `ExtenshiPayLite` — entitlement, feature gating and hosted checkout, without
|
|
1441
2335
|
* the paywall UI. This is what the `lite` bundle exports; the full `ExtenshiPay`
|
|
@@ -1492,6 +2386,7 @@ class ExtenshiPayLite {
|
|
|
1492
2386
|
});
|
|
1493
2387
|
this.recovery = new RecoveryManager({
|
|
1494
2388
|
api: this.api,
|
|
2389
|
+
locale: this.config.locale,
|
|
1495
2390
|
publishableKey: this.config.publishableKey,
|
|
1496
2391
|
storage: deps.recoveryStorage ?? createRecoveryStorage(),
|
|
1497
2392
|
openUrl: deps.openUrl,
|
|
@@ -1614,12 +2509,44 @@ class ExtenshiPayLite {
|
|
|
1614
2509
|
async onFeatureLocked(_feature, _options) {
|
|
1615
2510
|
return false;
|
|
1616
2511
|
}
|
|
1617
|
-
/**
|
|
2512
|
+
/**
|
|
2513
|
+
* The withdrawal waiver this offer asks for, with the exact text to show
|
|
2514
|
+
* next to an unticked checkbox (buyer's language, seller's name filled in),
|
|
2515
|
+
* or null when the seller attested the extension is not distributed in the
|
|
2516
|
+
* EEA/UK. For UIs that call `openCheckout()` themselves — Lite, or a custom
|
|
2517
|
+
* paywall; the full SDK's paywall does this for you.
|
|
2518
|
+
*/
|
|
2519
|
+
async getWithdrawalWaiver() {
|
|
2520
|
+
await this.initialize();
|
|
2521
|
+
try {
|
|
2522
|
+
const offer = await this.fetchOffer();
|
|
2523
|
+
if (!offer.withdrawalWaiver)
|
|
2524
|
+
return null;
|
|
2525
|
+
const seller = offer.seller?.displayName?.trim() || offer.projectName;
|
|
2526
|
+
return withdrawalWaiverText(offer.withdrawalWaiver.version, this.config.locale, seller);
|
|
2527
|
+
}
|
|
2528
|
+
catch (error) {
|
|
2529
|
+
throw this.reportError(error);
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
/**
|
|
2533
|
+
* Opens hosted checkout for `sku` in a new tab and resolves when the session settles.
|
|
2534
|
+
*
|
|
2535
|
+
* Called directly (not from the paywall), this does NOT collect the EU/UK
|
|
2536
|
+
* withdrawal waiver. If `getWithdrawalWaiver()` returns one, your UI must
|
|
2537
|
+
* collect the buyer's consent and pass it as `options.withdrawalWaiver`;
|
|
2538
|
+
* without it this rejects with `WITHDRAWAL_WAIVER_REQUIRED` (the server
|
|
2539
|
+
* refuses such a checkout too).
|
|
2540
|
+
*/
|
|
1618
2541
|
async openCheckout(sku, options = {}) {
|
|
1619
2542
|
await this.initialize();
|
|
1620
2543
|
try {
|
|
1621
2544
|
if (this.recovery.isActive())
|
|
1622
2545
|
throw new ExtenshiPayError(ERROR_CODES.INVALID_REQUEST, 'Recovery is in progress');
|
|
2546
|
+
// A cold cache is filled here; if the offer cannot be read, the server decides.
|
|
2547
|
+
const offer = await this.fetchOffer().catch(() => null);
|
|
2548
|
+
if (offer?.withdrawalWaiver && options.withdrawalWaiver?.accepted !== true)
|
|
2549
|
+
throw new ExtenshiPayError(ERROR_CODES.WITHDRAWAL_WAIVER_REQUIRED, 'This offer needs the buyer to accept the withdrawal waiver; pass options.withdrawalWaiver');
|
|
1623
2550
|
return await this.checkout.open(sku, options);
|
|
1624
2551
|
}
|
|
1625
2552
|
catch (error) {
|
|
@@ -1660,7 +2587,7 @@ class ExtenshiPayLite {
|
|
|
1660
2587
|
await this.initialize();
|
|
1661
2588
|
try {
|
|
1662
2589
|
const endUserRef = await this.getEndUserRef();
|
|
1663
|
-
let result = await this.api.getPortalUrl(endUserRef);
|
|
2590
|
+
let result = await this.api.getPortalUrl(endUserRef, undefined, this.config.locale);
|
|
1664
2591
|
if (this.destroyed)
|
|
1665
2592
|
return null;
|
|
1666
2593
|
if (result.accounts?.length) {
|
|
@@ -1674,7 +2601,7 @@ class ExtenshiPayLite {
|
|
|
1674
2601
|
// Recovery may replace this installation while the selector is open.
|
|
1675
2602
|
if (endUserRef !== (await this.getEndUserRef()))
|
|
1676
2603
|
throw new ExtenshiPayError(ERROR_CODES.INVALID_REQUEST, 'Installation changed; open the portal again');
|
|
1677
|
-
result = await this.api.getPortalUrl(endUserRef, customerId);
|
|
2604
|
+
result = await this.api.getPortalUrl(endUserRef, customerId, this.config.locale);
|
|
1678
2605
|
}
|
|
1679
2606
|
if (this.destroyed)
|
|
1680
2607
|
return null;
|
|
@@ -1740,97 +2667,6 @@ class ExtenshiPayLite {
|
|
|
1740
2667
|
}
|
|
1741
2668
|
ExtenshiPayLite.version = VERSION;
|
|
1742
2669
|
|
|
1743
|
-
/** Bundled UI only. Native dialog provides modal focus containment and Escape. */
|
|
1744
|
-
class BillingProfilePicker {
|
|
1745
|
-
constructor() {
|
|
1746
|
-
this.dismiss = null;
|
|
1747
|
-
}
|
|
1748
|
-
hide() {
|
|
1749
|
-
this.dismiss?.();
|
|
1750
|
-
}
|
|
1751
|
-
show(accounts) {
|
|
1752
|
-
this.hide();
|
|
1753
|
-
if (typeof document === 'undefined')
|
|
1754
|
-
throw new ExtenshiPayError(ERROR_CODES.INVALID_REQUEST, 'Provide selectAccount outside an extension page');
|
|
1755
|
-
const host = document.createElement('div');
|
|
1756
|
-
host.className = 'extenshi-billing-profile-host';
|
|
1757
|
-
const root = host.attachShadow({ mode: 'open' });
|
|
1758
|
-
const style = document.createElement('style');
|
|
1759
|
-
style.textContent = `
|
|
1760
|
-
dialog{font:15px/1.5 system-ui,sans-serif;color:#172033;background:#fff;border:1px solid #dce1e8;border-radius:16px;padding:24px;width:min(440px,calc(100vw - 64px));max-height:80vh;box-shadow:0 20px 60px #0003}
|
|
1761
|
-
dialog::backdrop{background:#10182880}h2{margin:0 0 8px;font-size:22px}p{margin:0 0 16px;color:#526078}
|
|
1762
|
-
button{font:inherit;cursor:pointer;border:1px solid #dce1e8;border-radius:8px;background:#fff;color:inherit;padding:12px;text-align:left;width:100%;margin-top:10px}
|
|
1763
|
-
button:hover{background:#f3f6fa}button:focus-visible{outline:3px solid #0ea5e9;outline-offset:2px}strong,small{display:block}small{color:#526078;margin-top:4px}
|
|
1764
|
-
`;
|
|
1765
|
-
const dialog = document.createElement('dialog');
|
|
1766
|
-
dialog.setAttribute('aria-labelledby', 'billing-title');
|
|
1767
|
-
dialog.setAttribute('aria-describedby', 'billing-description');
|
|
1768
|
-
const title = document.createElement('h2');
|
|
1769
|
-
title.id = 'billing-title';
|
|
1770
|
-
title.textContent = 'Choose a billing profile';
|
|
1771
|
-
const description = document.createElement('p');
|
|
1772
|
-
description.id = 'billing-description';
|
|
1773
|
-
description.textContent =
|
|
1774
|
-
'Separate purchases can have separate billing profiles. Choose one to manage its subscriptions and payment details.';
|
|
1775
|
-
dialog.append(title, description);
|
|
1776
|
-
root.append(style, dialog);
|
|
1777
|
-
document.body.append(host);
|
|
1778
|
-
if (typeof dialog.showModal !== 'function') {
|
|
1779
|
-
host.remove();
|
|
1780
|
-
throw new ExtenshiPayError(ERROR_CODES.INVALID_REQUEST, 'This browser needs a custom selectAccount callback');
|
|
1781
|
-
}
|
|
1782
|
-
return new Promise((resolve, reject) => {
|
|
1783
|
-
const finish = (id) => {
|
|
1784
|
-
this.dismiss = null;
|
|
1785
|
-
dialog.close();
|
|
1786
|
-
host.remove();
|
|
1787
|
-
resolve(id);
|
|
1788
|
-
};
|
|
1789
|
-
this.dismiss = () => finish(null);
|
|
1790
|
-
dialog.addEventListener('cancel', (event) => {
|
|
1791
|
-
event.preventDefault();
|
|
1792
|
-
finish(null);
|
|
1793
|
-
});
|
|
1794
|
-
for (const account of accounts) {
|
|
1795
|
-
const button = document.createElement('button');
|
|
1796
|
-
button.type = 'button';
|
|
1797
|
-
const label = document.createElement('strong');
|
|
1798
|
-
label.textContent = account.label;
|
|
1799
|
-
const detail = document.createElement('small');
|
|
1800
|
-
const recorded = new Date(account.createdAt);
|
|
1801
|
-
detail.textContent = Number.isNaN(recorded.getTime())
|
|
1802
|
-
? ''
|
|
1803
|
-
: `First recorded ${recorded.toLocaleDateString()}`;
|
|
1804
|
-
button.append(label, detail);
|
|
1805
|
-
for (const subscription of account.subscriptions) {
|
|
1806
|
-
const line = document.createElement('small');
|
|
1807
|
-
const end = subscription.currentPeriodEnd ? new Date(subscription.currentPeriodEnd) : null;
|
|
1808
|
-
const cancellation = subscription.cancelAtPeriodEnd
|
|
1809
|
-
? ` · Renewal canceled${end && !Number.isNaN(end.getTime()) ? ` · Period ends ${end.toLocaleDateString()}` : ''}`
|
|
1810
|
-
: '';
|
|
1811
|
-
line.textContent = `${subscription.title} · ${subscription.status.replace(/_/g, ' ')}${cancellation}`;
|
|
1812
|
-
button.append(line);
|
|
1813
|
-
}
|
|
1814
|
-
button.addEventListener('click', () => finish(account.id));
|
|
1815
|
-
dialog.append(button);
|
|
1816
|
-
}
|
|
1817
|
-
const cancel = document.createElement('button');
|
|
1818
|
-
cancel.type = 'button';
|
|
1819
|
-
cancel.textContent = 'Cancel';
|
|
1820
|
-
cancel.addEventListener('click', () => finish(null));
|
|
1821
|
-
dialog.append(cancel);
|
|
1822
|
-
try {
|
|
1823
|
-
dialog.showModal();
|
|
1824
|
-
}
|
|
1825
|
-
catch (error) {
|
|
1826
|
-
this.dismiss = null;
|
|
1827
|
-
host.remove();
|
|
1828
|
-
reject(error);
|
|
1829
|
-
}
|
|
1830
|
-
});
|
|
1831
|
-
}
|
|
1832
|
-
}
|
|
1833
|
-
|
|
1834
2670
|
/** Treat even server-provided links as untrusted; never render executable protocols. */
|
|
1835
2671
|
function publicContactUrl(value) {
|
|
1836
2672
|
try {
|
|
@@ -1845,13 +2681,11 @@ function publicContactUrl(value) {
|
|
|
1845
2681
|
return `mailto:${encodeURIComponent(value)}`;
|
|
1846
2682
|
return null;
|
|
1847
2683
|
}
|
|
1848
|
-
function sellerDetails(seller) {
|
|
2684
|
+
function sellerDetails(seller, t = SDK_STRINGS_EN) {
|
|
1849
2685
|
const section = document.createElement('section');
|
|
1850
2686
|
section.className = 'extenshi-seller-details';
|
|
1851
2687
|
const name = document.createElement('p');
|
|
1852
|
-
name.textContent = seller
|
|
1853
|
-
? `License provided by ${seller.displayName}`
|
|
1854
|
-
: 'License provider details are unavailable.';
|
|
2688
|
+
name.textContent = seller ? fill(t.sellerProvidedBy, { name: seller.displayName }) : t.sellerUnavailable;
|
|
1855
2689
|
section.append(name);
|
|
1856
2690
|
const link = (label, value) => {
|
|
1857
2691
|
const href = value ? publicContactUrl(value) : null;
|
|
@@ -1862,43 +2696,44 @@ function sellerDetails(seller) {
|
|
|
1862
2696
|
a.href = href;
|
|
1863
2697
|
a.target = '_blank';
|
|
1864
2698
|
a.rel = 'noopener noreferrer';
|
|
1865
|
-
a.style.
|
|
2699
|
+
a.style.marginInlineEnd = '12px';
|
|
1866
2700
|
section.append(a);
|
|
1867
2701
|
};
|
|
1868
2702
|
if (seller) {
|
|
1869
|
-
link(
|
|
1870
|
-
link(
|
|
2703
|
+
link(t.sellerSupport, seller.supportUrl);
|
|
2704
|
+
link(t.sellerTerms, seller.termsUrl);
|
|
2705
|
+
link(t.sellerRefunds, seller.refundPolicyUrl ?? null);
|
|
1871
2706
|
}
|
|
1872
2707
|
const role = document.createElement('p');
|
|
1873
|
-
role.textContent =
|
|
1874
|
-
'The author handles extension functionality and license commitments. Extenshi provides payment and license recovery tools.';
|
|
2708
|
+
role.textContent = t.sellerRole;
|
|
1875
2709
|
section.append(role);
|
|
1876
2710
|
return section;
|
|
1877
2711
|
}
|
|
1878
2712
|
|
|
1879
|
-
/**
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
};
|
|
1901
|
-
|
|
2713
|
+
/** A status label in the language, or the raw value for one we do not know. */
|
|
2714
|
+
function statusLabel(t, status) {
|
|
2715
|
+
const map = {
|
|
2716
|
+
active: t.statusActive,
|
|
2717
|
+
grace: t.statusGrace,
|
|
2718
|
+
expired: t.statusExpired,
|
|
2719
|
+
none: t.statusNone,
|
|
2720
|
+
};
|
|
2721
|
+
return map[status] ?? status.replace(/_/g, ' ');
|
|
2722
|
+
}
|
|
2723
|
+
/** A provider subscription status (Stripe vocabulary) in the language. */
|
|
2724
|
+
function subscriptionStatusLabel(t, status) {
|
|
2725
|
+
const map = {
|
|
2726
|
+
active: t.subActive,
|
|
2727
|
+
trialing: t.subTrialing,
|
|
2728
|
+
past_due: t.subPastDue,
|
|
2729
|
+
canceled: t.subCanceled,
|
|
2730
|
+
unpaid: t.subUnpaid,
|
|
2731
|
+
incomplete: t.subIncomplete,
|
|
2732
|
+
incomplete_expired: t.subIncompleteExpired,
|
|
2733
|
+
paused: t.subPaused,
|
|
2734
|
+
};
|
|
2735
|
+
return map[status] ?? status.replace(/_/g, ' ');
|
|
2736
|
+
}
|
|
1902
2737
|
class LicensePanel {
|
|
1903
2738
|
constructor() {
|
|
1904
2739
|
this.dismiss = null;
|
|
@@ -1906,30 +2741,34 @@ class LicensePanel {
|
|
|
1906
2741
|
hide() {
|
|
1907
2742
|
this.dismiss?.();
|
|
1908
2743
|
}
|
|
1909
|
-
show(summary, actions) {
|
|
2744
|
+
show(summary, actions, locale = null) {
|
|
1910
2745
|
this.hide();
|
|
1911
2746
|
if (typeof document === 'undefined')
|
|
1912
2747
|
throw new ExtenshiPayError(ERROR_CODES.INVALID_REQUEST, 'Use getLicenseSummary outside an extension page');
|
|
2748
|
+
const t = sdkStrings(locale);
|
|
2749
|
+
const lang = sdkLocale(locale);
|
|
1913
2750
|
const host = document.createElement('div');
|
|
1914
2751
|
host.className = 'extenshi-license-host';
|
|
2752
|
+
host.setAttribute('lang', lang);
|
|
2753
|
+
host.setAttribute('dir', sdkDir(lang));
|
|
1915
2754
|
const root = host.attachShadow({ mode: 'open' });
|
|
1916
2755
|
const style = document.createElement('style');
|
|
1917
2756
|
style.textContent = `dialog{font:15px/1.5 system-ui,sans-serif;color:#172033;background:#fff;border:1px solid #dce1e8;border-radius:16px;padding:24px;width:min(460px,calc(100vw - 64px));max-height:80vh}dialog::backdrop{background:#10182880}h2{margin:0}h3{font-size:16px;margin:0}article{border-block-end:1px solid #ddd;padding:16px 0}p{margin:8px 0}button{font:inherit;padding:10px 14px;margin:12px 8px 0 0;border:1px solid #cbd5e1;border-radius:8px;cursor:pointer;background:#fff;color:inherit}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #0ea5e9}a{color:#0369a1}.extenshi-seller-details{font-size:13px;margin-top:20px}`;
|
|
1918
2757
|
const dialog = document.createElement('dialog');
|
|
1919
|
-
dialog.setAttribute('aria-label',
|
|
2758
|
+
dialog.setAttribute('aria-label', t.licenseTitle);
|
|
1920
2759
|
const title = document.createElement('h2');
|
|
1921
|
-
title.textContent =
|
|
2760
|
+
title.textContent = t.licenseTitle;
|
|
1922
2761
|
const content = document.createElement('div');
|
|
1923
2762
|
const feedback = document.createElement('p');
|
|
1924
2763
|
feedback.setAttribute('role', 'status');
|
|
1925
2764
|
const render = (state) => {
|
|
1926
2765
|
content.replaceChildren();
|
|
1927
2766
|
const note = document.createElement('p');
|
|
1928
|
-
note.textContent = state.projectName ??
|
|
2767
|
+
note.textContent = state.projectName ?? t.licenseFallbackName;
|
|
1929
2768
|
content.append(note);
|
|
1930
2769
|
if (!state.entitlement.items.length) {
|
|
1931
2770
|
const empty = document.createElement('p');
|
|
1932
|
-
empty.textContent =
|
|
2771
|
+
empty.textContent = t.licenseNone;
|
|
1933
2772
|
content.append(empty);
|
|
1934
2773
|
}
|
|
1935
2774
|
for (const item of state.entitlement.items) {
|
|
@@ -1939,37 +2778,42 @@ class LicensePanel {
|
|
|
1939
2778
|
const status = document.createElement('p');
|
|
1940
2779
|
const kind = item.kind === 'one_time'
|
|
1941
2780
|
? item.expiresAt
|
|
1942
|
-
?
|
|
1943
|
-
:
|
|
2781
|
+
? t.kindOneTime
|
|
2782
|
+
: t.kindLifetime
|
|
1944
2783
|
: item.kind === 'subscription'
|
|
1945
|
-
?
|
|
1946
|
-
:
|
|
1947
|
-
status.textContent = `${kind} · ${item.status}`;
|
|
2784
|
+
? t.kindSubscription
|
|
2785
|
+
: t.kindLicense;
|
|
2786
|
+
status.textContent = `${kind} · ${fill(t.statusLine, { status: statusLabel(t, item.status) })}`;
|
|
1948
2787
|
article.append(heading, status);
|
|
1949
2788
|
if (item.expiresAt) {
|
|
1950
2789
|
const date = new Date(item.expiresAt);
|
|
1951
2790
|
if (!Number.isNaN(date.getTime())) {
|
|
1952
2791
|
const expiry = document.createElement('p');
|
|
1953
|
-
|
|
2792
|
+
const when = date.toLocaleString(lang);
|
|
2793
|
+
expiry.textContent = fill(item.status === 'expired'
|
|
2794
|
+
? t.accessEnded
|
|
2795
|
+
: item.status === 'active' || item.status === 'grace'
|
|
2796
|
+
? t.accessUntil
|
|
2797
|
+
: t.accessRecordedEnd, { date: when });
|
|
1954
2798
|
article.append(expiry);
|
|
1955
2799
|
}
|
|
1956
2800
|
}
|
|
1957
2801
|
for (const sub of item.subscriptions ?? []) {
|
|
1958
2802
|
const row = document.createElement('p');
|
|
1959
|
-
row.textContent =
|
|
2803
|
+
row.textContent = `${fill(t.subscriptionLine, { status: subscriptionStatusLabel(t, sub.status) })}${sub.cancelAtPeriodEnd ? ` · ${t.renewalCanceled}` : ''}`;
|
|
1960
2804
|
article.append(row);
|
|
1961
2805
|
}
|
|
1962
2806
|
content.append(article);
|
|
1963
2807
|
}
|
|
1964
2808
|
const freshness = document.createElement('p');
|
|
1965
2809
|
freshness.textContent = state.entitlement.requiresOnlineCheck
|
|
1966
|
-
?
|
|
2810
|
+
? t.licenseOffline
|
|
1967
2811
|
: state.entitlement.source === 'mock'
|
|
1968
|
-
?
|
|
2812
|
+
? t.mockNotice
|
|
1969
2813
|
: state.entitlement.source === 'cache'
|
|
1970
|
-
?
|
|
1971
|
-
:
|
|
1972
|
-
content.append(freshness, sellerDetails(state.seller));
|
|
2814
|
+
? t.licenseCached
|
|
2815
|
+
: t.licenseFresh;
|
|
2816
|
+
content.append(freshness, sellerDetails(state.seller, t));
|
|
1973
2817
|
};
|
|
1974
2818
|
render(summary);
|
|
1975
2819
|
dialog.append(title, content, feedback);
|
|
@@ -2008,8 +2852,7 @@ class LicensePanel {
|
|
|
2008
2852
|
}
|
|
2009
2853
|
catch {
|
|
2010
2854
|
if (!closed)
|
|
2011
|
-
feedback.textContent =
|
|
2012
|
-
'Unable to complete the request. Please try again or contact extension support.';
|
|
2855
|
+
feedback.textContent = t.actionFailed;
|
|
2013
2856
|
}
|
|
2014
2857
|
finally {
|
|
2015
2858
|
if (!closed)
|
|
@@ -2022,20 +2865,20 @@ class LicensePanel {
|
|
|
2022
2865
|
dialog.append(button);
|
|
2023
2866
|
};
|
|
2024
2867
|
if (summary.recoveryEnabled)
|
|
2025
|
-
action(
|
|
2868
|
+
action(t.restorePurchase, async () => {
|
|
2026
2869
|
const updated = await actions.restore();
|
|
2027
2870
|
if (!closed)
|
|
2028
2871
|
render(updated);
|
|
2029
2872
|
});
|
|
2030
2873
|
if (summary.entitlement.source !== 'mock')
|
|
2031
|
-
action(
|
|
2874
|
+
action(t.manageBilling, async () => {
|
|
2032
2875
|
const url = await actions.manage();
|
|
2033
2876
|
if (!url && !closed)
|
|
2034
|
-
feedback.textContent =
|
|
2877
|
+
feedback.textContent = t.noPortal;
|
|
2035
2878
|
});
|
|
2036
2879
|
const done = document.createElement('button');
|
|
2037
2880
|
done.type = 'button';
|
|
2038
|
-
done.textContent =
|
|
2881
|
+
done.textContent = t.close;
|
|
2039
2882
|
done.addEventListener('click', close);
|
|
2040
2883
|
dialog.append(done);
|
|
2041
2884
|
try {
|
|
@@ -2050,6 +2893,172 @@ class LicensePanel {
|
|
|
2050
2893
|
}
|
|
2051
2894
|
}
|
|
2052
2895
|
|
|
2896
|
+
/** Bundled UI only. Native dialog provides modal focus containment and Escape. */
|
|
2897
|
+
class BillingProfilePicker {
|
|
2898
|
+
constructor() {
|
|
2899
|
+
this.dismiss = null;
|
|
2900
|
+
}
|
|
2901
|
+
hide() {
|
|
2902
|
+
this.dismiss?.();
|
|
2903
|
+
}
|
|
2904
|
+
show(accounts, locale = null) {
|
|
2905
|
+
this.hide();
|
|
2906
|
+
if (typeof document === 'undefined')
|
|
2907
|
+
throw new ExtenshiPayError(ERROR_CODES.INVALID_REQUEST, 'Provide selectAccount outside an extension page');
|
|
2908
|
+
const t = sdkStrings(locale);
|
|
2909
|
+
const lang = sdkLocale(locale);
|
|
2910
|
+
const host = document.createElement('div');
|
|
2911
|
+
host.className = 'extenshi-billing-profile-host';
|
|
2912
|
+
host.setAttribute('lang', lang);
|
|
2913
|
+
host.setAttribute('dir', sdkDir(lang));
|
|
2914
|
+
const root = host.attachShadow({ mode: 'open' });
|
|
2915
|
+
const style = document.createElement('style');
|
|
2916
|
+
style.textContent = `
|
|
2917
|
+
dialog{font:15px/1.5 system-ui,sans-serif;color:#172033;background:#fff;border:1px solid #dce1e8;border-radius:16px;padding:24px;width:min(440px,calc(100vw - 64px));max-height:80vh;box-shadow:0 20px 60px #0003}
|
|
2918
|
+
dialog::backdrop{background:#10182880}h2{margin:0 0 8px;font-size:22px}p{margin:0 0 16px;color:#526078}
|
|
2919
|
+
button{font:inherit;cursor:pointer;border:1px solid #dce1e8;border-radius:8px;background:#fff;color:inherit;padding:12px;text-align:left;width:100%;margin-top:10px}
|
|
2920
|
+
button:hover{background:#f3f6fa}button:focus-visible{outline:3px solid #0ea5e9;outline-offset:2px}strong,small{display:block}small{color:#526078;margin-top:4px}
|
|
2921
|
+
`;
|
|
2922
|
+
const dialog = document.createElement('dialog');
|
|
2923
|
+
dialog.setAttribute('aria-labelledby', 'billing-title');
|
|
2924
|
+
dialog.setAttribute('aria-describedby', 'billing-description');
|
|
2925
|
+
const title = document.createElement('h2');
|
|
2926
|
+
title.id = 'billing-title';
|
|
2927
|
+
title.textContent = t.pickerTitle;
|
|
2928
|
+
const description = document.createElement('p');
|
|
2929
|
+
description.id = 'billing-description';
|
|
2930
|
+
description.textContent = t.pickerDescription;
|
|
2931
|
+
dialog.append(title, description);
|
|
2932
|
+
root.append(style, dialog);
|
|
2933
|
+
document.body.append(host);
|
|
2934
|
+
if (typeof dialog.showModal !== 'function') {
|
|
2935
|
+
host.remove();
|
|
2936
|
+
throw new ExtenshiPayError(ERROR_CODES.INVALID_REQUEST, 'This browser needs a custom selectAccount callback');
|
|
2937
|
+
}
|
|
2938
|
+
return new Promise((resolve, reject) => {
|
|
2939
|
+
const finish = (id) => {
|
|
2940
|
+
this.dismiss = null;
|
|
2941
|
+
dialog.close();
|
|
2942
|
+
host.remove();
|
|
2943
|
+
resolve(id);
|
|
2944
|
+
};
|
|
2945
|
+
this.dismiss = () => finish(null);
|
|
2946
|
+
dialog.addEventListener('cancel', (event) => {
|
|
2947
|
+
event.preventDefault();
|
|
2948
|
+
finish(null);
|
|
2949
|
+
});
|
|
2950
|
+
for (const account of accounts) {
|
|
2951
|
+
const button = document.createElement('button');
|
|
2952
|
+
button.type = 'button';
|
|
2953
|
+
const label = document.createElement('strong');
|
|
2954
|
+
label.textContent = account.label;
|
|
2955
|
+
const detail = document.createElement('small');
|
|
2956
|
+
const recorded = new Date(account.createdAt);
|
|
2957
|
+
detail.textContent = Number.isNaN(recorded.getTime())
|
|
2958
|
+
? ''
|
|
2959
|
+
: fill(t.pickerFirstRecorded, { date: recorded.toLocaleDateString(lang) });
|
|
2960
|
+
button.append(label, detail);
|
|
2961
|
+
for (const subscription of account.subscriptions) {
|
|
2962
|
+
const line = document.createElement('small');
|
|
2963
|
+
const end = subscription.currentPeriodEnd ? new Date(subscription.currentPeriodEnd) : null;
|
|
2964
|
+
const cancellation = subscription.cancelAtPeriodEnd
|
|
2965
|
+
? ` · ${t.renewalCanceled}${end && !Number.isNaN(end.getTime()) ? ` · ${fill(t.periodEnds, { date: end.toLocaleDateString(lang) })}` : ''}`
|
|
2966
|
+
: '';
|
|
2967
|
+
line.textContent = `${subscription.title} · ${subscriptionStatusLabel(t, subscription.status)}${cancellation}`;
|
|
2968
|
+
button.append(line);
|
|
2969
|
+
}
|
|
2970
|
+
button.addEventListener('click', () => finish(account.id));
|
|
2971
|
+
dialog.append(button);
|
|
2972
|
+
}
|
|
2973
|
+
const cancel = document.createElement('button');
|
|
2974
|
+
cancel.type = 'button';
|
|
2975
|
+
cancel.textContent = t.pickerCancel;
|
|
2976
|
+
cancel.addEventListener('click', () => finish(null));
|
|
2977
|
+
dialog.append(cancel);
|
|
2978
|
+
try {
|
|
2979
|
+
dialog.showModal();
|
|
2980
|
+
}
|
|
2981
|
+
catch (error) {
|
|
2982
|
+
this.dismiss = null;
|
|
2983
|
+
host.remove();
|
|
2984
|
+
reject(error);
|
|
2985
|
+
}
|
|
2986
|
+
});
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
|
|
2990
|
+
/**
|
|
2991
|
+
* The paywall's header image: the extension's own icon in place of the
|
|
2992
|
+
* templates' generic glyph (lock, layers).
|
|
2993
|
+
*
|
|
2994
|
+
* Only images from the extension package or `data:image/` URLs: a remote
|
|
2995
|
+
* image would be a request to a third party on every paywall view. The
|
|
2996
|
+
* manifest icon is the default on the extension's own pages (popup, options)
|
|
2997
|
+
* only. A content script runs on the site's origin, where the package's files
|
|
2998
|
+
* load only when `web_accessible_resources` lists them, and the SDK never asks
|
|
2999
|
+
* for that.
|
|
3000
|
+
*/
|
|
3001
|
+
const DATA_IMAGE_RE = /^data:image\/[\w.+-]+[;,]/i;
|
|
3002
|
+
/** `chrome-extension://<id>/`, `moz-extension://<uuid>/`, `safari-web-extension://<id>/`. */
|
|
3003
|
+
const PACKAGE_BASE_RE = /^[a-z-]+-extension:\/\/[^/]+\/$/;
|
|
3004
|
+
function extensionRuntime() {
|
|
3005
|
+
const g = globalThis;
|
|
3006
|
+
return g.chrome?.runtime ?? g.browser?.runtime;
|
|
3007
|
+
}
|
|
3008
|
+
function packageBase(runtime) {
|
|
3009
|
+
try {
|
|
3010
|
+
const base = runtime?.getURL?.('');
|
|
3011
|
+
return typeof base === 'string' && PACKAGE_BASE_RE.test(base) ? base : null;
|
|
3012
|
+
}
|
|
3013
|
+
catch {
|
|
3014
|
+
return null;
|
|
3015
|
+
}
|
|
3016
|
+
}
|
|
3017
|
+
function onExtensionPage(base) {
|
|
3018
|
+
const href = globalThis.location?.href;
|
|
3019
|
+
return typeof href === 'string' && href.startsWith(base);
|
|
3020
|
+
}
|
|
3021
|
+
function largestIcon(runtime) {
|
|
3022
|
+
let best = null;
|
|
3023
|
+
try {
|
|
3024
|
+
for (const [size, path] of Object.entries(runtime?.getManifest?.().icons ?? {})) {
|
|
3025
|
+
const n = Number(size);
|
|
3026
|
+
if (typeof path === 'string' && path && Number.isFinite(n) && (!best || n > best[0]))
|
|
3027
|
+
best = [n, path];
|
|
3028
|
+
}
|
|
3029
|
+
}
|
|
3030
|
+
catch {
|
|
3031
|
+
/* No manifest to read. */
|
|
3032
|
+
}
|
|
3033
|
+
return best?.[1] ?? '';
|
|
3034
|
+
}
|
|
3035
|
+
/**
|
|
3036
|
+
* The header image for `PaywallOptions.icon`, or null to keep the template's
|
|
3037
|
+
* glyph: `false` opts out, a `data:image/` URL is used anywhere, a package path
|
|
3038
|
+
* (or the manifest's largest icon by default) only on the extension's pages.
|
|
3039
|
+
*/
|
|
3040
|
+
function paywallIconUrl(option) {
|
|
3041
|
+
if (option === false)
|
|
3042
|
+
return null;
|
|
3043
|
+
const explicit = typeof option === 'string' ? option.trim() : '';
|
|
3044
|
+
if (DATA_IMAGE_RE.test(explicit))
|
|
3045
|
+
return explicit;
|
|
3046
|
+
const runtime = extensionRuntime();
|
|
3047
|
+
const base = packageBase(runtime);
|
|
3048
|
+
if (!base || !onExtensionPage(base))
|
|
3049
|
+
return null;
|
|
3050
|
+
const path = explicit || largestIcon(runtime);
|
|
3051
|
+
if (!path)
|
|
3052
|
+
return null;
|
|
3053
|
+
try {
|
|
3054
|
+
const url = new URL(path, base).href;
|
|
3055
|
+
return url.startsWith(base) ? url : null;
|
|
3056
|
+
}
|
|
3057
|
+
catch {
|
|
3058
|
+
return null;
|
|
3059
|
+
}
|
|
3060
|
+
}
|
|
3061
|
+
|
|
2053
3062
|
function formatPrice(amountMinor, currency, locale) {
|
|
2054
3063
|
const value = amountMinor / 100;
|
|
2055
3064
|
const code = currency.toUpperCase();
|
|
@@ -2079,22 +3088,58 @@ function periodLabel(offer, strings) {
|
|
|
2079
3088
|
return offer.interval === 'year' ? strings.periodYear : strings.periodMonth;
|
|
2080
3089
|
}
|
|
2081
3090
|
|
|
2082
|
-
|
|
3091
|
+
/**
|
|
3092
|
+
* The paywall's strings in a locale, from the SDK dictionary (./i18n.ts).
|
|
3093
|
+
* Do not add promotional claims without marketing/legal review (see
|
|
3094
|
+
* .claude/modules/paywall-templates.md).
|
|
3095
|
+
*/
|
|
3096
|
+
function paywallStrings(t) {
|
|
3097
|
+
return {
|
|
3098
|
+
title: t.title,
|
|
3099
|
+
description: t.description,
|
|
3100
|
+
upgrade: t.upgrade,
|
|
3101
|
+
cancel: t.cancel,
|
|
3102
|
+
dismiss: t.dismiss,
|
|
3103
|
+
remindLater: t.remindLater,
|
|
3104
|
+
continueFree: t.continueFree,
|
|
3105
|
+
checkoutUnavailable: t.checkoutUnavailable,
|
|
3106
|
+
periodMonth: t.periodMonth,
|
|
3107
|
+
periodYear: t.periodYear,
|
|
3108
|
+
periodOnce: t.periodOnce,
|
|
3109
|
+
footer: t.footer,
|
|
3110
|
+
restorePurchase: t.restorePurchase,
|
|
3111
|
+
featuresHeading: t.featuresHeading,
|
|
3112
|
+
plansHeading: t.plansHeading,
|
|
3113
|
+
freePlanName: t.freePlanName,
|
|
3114
|
+
premiumPlanName: t.premiumPlanName,
|
|
3115
|
+
popularBadge: t.popularBadge,
|
|
3116
|
+
unlockHeading: t.unlockHeading,
|
|
3117
|
+
};
|
|
3118
|
+
}
|
|
3119
|
+
/** English (the default and the fallback). */
|
|
3120
|
+
const DEFAULT_STRINGS = paywallStrings(SDK_STRINGS_EN);
|
|
3121
|
+
SDK_STRINGS_EN.mockNotice;
|
|
3122
|
+
/** The paywall strings for `locale` (English when we have no translation). */
|
|
3123
|
+
function stringsFor(locale) {
|
|
3124
|
+
return paywallStrings(sdkStrings(locale));
|
|
3125
|
+
}
|
|
3126
|
+
|
|
3127
|
+
var sharedCss = ":host{--ep-primary-50:#f0f9ff;--ep-primary-100:#e0f2fe;--ep-primary-200:#bae6fd;--ep-primary-300:#7dd3fc;--ep-primary-400:#38bdf8;--ep-primary-500:#0ea5e9;--ep-primary-600:#0284c7;--ep-primary-700:#0369a1;--ep-primary-800:#075985;--ep-primary-900:#0c4a6e;--ep-gray-50:#f9fafb;--ep-gray-100:#f3f4f6;--ep-gray-200:#e5e7eb;--ep-gray-300:#d1d5db;--ep-gray-400:#9ca3af;--ep-gray-500:#6b7280;--ep-gray-600:#4b5563;--ep-gray-700:#374151;--ep-gray-800:#1f2937;--ep-gray-900:#111827;--ep-success-500:#10b981;--ep-success-600:#059669;--ep-error-500:#ef4444;--ep-error-600:#dc2626;--ep-warning-500:#f59e0b;--ep-warning-600:#d97706;--ep-bg-primary:var(--ep-gray-50);--ep-bg-secondary:#ffffff;--ep-bg-tertiary:var(--ep-gray-100);--ep-text-primary:var(--ep-gray-900);--ep-text-secondary:var(--ep-gray-600);--ep-text-tertiary:var(--ep-gray-400);--ep-border-primary:var(--ep-gray-200);--ep-border-secondary:var(--ep-gray-300);--ep-link:var(--ep-primary-700);--ep-link-hover:var(--ep-primary-800);--ep-shadow-sm:0 1px 2px 0 rgba(0,0,0,0.05);--ep-shadow-md:0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06);--ep-shadow-lg:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05);--ep-shadow-xl:0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04);--ep-font-family-sans:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;--ep-font-family-mono:\"SF Mono\",Monaco,\"Cascadia Code\",\"Roboto Mono\",Consolas,\"Courier New\",monospace;--ep-font-size-xs:0.75rem;--ep-font-size-sm:0.875rem;--ep-font-size-base:1rem;--ep-font-size-lg:1.125rem;--ep-font-size-xl:1.25rem;--ep-font-size-2xl:1.5rem;--ep-font-size-3xl:1.875rem;--ep-font-size-4xl:2.25rem;--ep-font-size-5xl:3rem;--ep-font-weight-normal:400;--ep-font-weight-medium:500;--ep-font-weight-semibold:600;--ep-font-weight-bold:700;--ep-line-height-tight:1.25;--ep-line-height-snug:1.375;--ep-line-height-normal:1.5;--ep-line-height-relaxed:1.625;--ep-space-1:0.25rem;--ep-space-2:0.5rem;--ep-space-3:0.75rem;--ep-space-4:1rem;--ep-space-5:1.25rem;--ep-space-6:1.5rem;--ep-space-8:2rem;--ep-space-10:2.5rem;--ep-space-12:3rem;--ep-space-16:4rem;--ep-space-20:5rem;--ep-space-24:6rem;--ep-radius-sm:0.125rem;--ep-radius-md:0.375rem;--ep-radius-lg:0.5rem;--ep-radius-xl:0.75rem;--ep-radius-2xl:1rem;--ep-radius-full:9999px;--ep-transition-fast:150ms ease-in-out;--ep-transition-normal:300ms ease-in-out;--ep-transition-slow:500ms ease-in-out;--ep-z-backdrop:1000;--ep-z-modal:1010;--ep-z-popover:1020;--ep-z-tooltip:1030}:host([data-theme=\"dark\"]){--ep-bg-primary:var(--ep-gray-900);--ep-bg-secondary:var(--ep-gray-800);--ep-bg-tertiary:var(--ep-gray-700);--ep-text-primary:var(--ep-gray-50);--ep-text-secondary:var(--ep-gray-300);--ep-text-tertiary:var(--ep-gray-400);--ep-border-primary:var(--ep-gray-700);--ep-border-secondary:var(--ep-gray-600);--ep-link:var(--ep-primary-300);--ep-link-hover:var(--ep-primary-200);--ep-shadow-sm:0 1px 2px 0 rgba(0,0,0,0.3);--ep-shadow-md:0 4px 6px -1px rgba(0,0,0,0.4),0 2px 4px -1px rgba(0,0,0,0.3);--ep-shadow-lg:0 10px 15px -3px rgba(0,0,0,0.4),0 4px 6px -2px rgba(0,0,0,0.3);--ep-shadow-xl:0 20px 25px -5px rgba(0,0,0,0.4),0 10px 10px -5px rgba(0,0,0,0.3)}@media (prefers-contrast:high){:host{--ep-border-primary:var(--ep-gray-400);--ep-border-secondary:var(--ep-gray-500)}:host([data-theme=\"dark\"]){--ep-border-primary:var(--ep-gray-500);--ep-border-secondary:var(--ep-gray-400)}}@media (prefers-reduced-motion:reduce){:host{--ep-transition-fast:0ms;--ep-transition-normal:0ms;--ep-transition-slow:0ms}}@media print{:host{--ep-bg-primary:white;--ep-bg-secondary:white;--ep-bg-tertiary:white;--ep-text-primary:black;--ep-text-secondary:black;--ep-text-tertiary:black;--ep-shadow-sm:none;--ep-shadow-md:none;--ep-shadow-lg:none;--ep-shadow-xl:none}}*{box-sizing:border-box;margin:0;padding:0}:host{font-family:var(--ep-font-family-sans);font-size:var(--ep-font-size-base);line-height:var(--ep-line-height-normal);color:var(--ep-text-primary);background-color:var(--ep-bg-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*:focus{outline:2px solid var(--ep-primary-500);outline-offset:2px}*:focus:not(:focus-visible){outline:none}a,a:visited{color:var(--ep-link);text-decoration:underline;text-underline-offset:2px}a:hover{color:var(--ep-link-hover)}.ep-container{max-width:1200px;margin:0 auto;padding:0 var(--ep-space-4)}.ep-card{background-color:var(--ep-bg-secondary);border:1px solid var(--ep-border-primary);border-radius:var(--ep-radius-lg);box-shadow:var(--ep-shadow-sm);padding:var(--ep-space-6)}.ep-card-header{margin-bottom:var(--ep-space-6)}.ep-card-body{margin-bottom:var(--ep-space-6)}.ep-card-footer{margin-top:var(--ep-space-6);padding-top:var(--ep-space-6);border-top:1px solid var(--ep-border-primary)}.ep-heading-1{font-size:var(--ep-font-size-3xl);font-weight:var(--ep-font-weight-bold);line-height:var(--ep-line-height-tight);color:var(--ep-text-primary);margin-bottom:var(--ep-space-4)}.ep-heading-2{font-size:var(--ep-font-size-2xl);font-weight:var(--ep-font-weight-semibold);line-height:var(--ep-line-height-tight);color:var(--ep-text-primary);margin-bottom:var(--ep-space-3)}.ep-heading-3{font-size:var(--ep-font-size-xl);font-weight:var(--ep-font-weight-semibold);line-height:var(--ep-line-height-snug);color:var(--ep-text-primary);margin-bottom:var(--ep-space-2)}.ep-text-body{font-size:var(--ep-font-size-base);line-height:var(--ep-line-height-relaxed);color:var(--ep-text-secondary);margin-bottom:var(--ep-space-4)}.ep-text-sm{font-size:var(--ep-font-size-sm);line-height:var(--ep-line-height-normal);color:var(--ep-text-tertiary)}.ep-text-center{text-align:center}.ep-text-left{text-align:left}.ep-text-right{text-align:right}.ep-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--ep-space-2);padding:var(--ep-space-3) var(--ep-space-6);border:1px solid transparent;border-radius:var(--ep-radius-md);font-family:var(--ep-font-family-sans);font-size:var(--ep-font-size-base);font-weight:var(--ep-font-weight-medium);line-height:var(--ep-line-height-tight);text-decoration:none;cursor:pointer;transition:all var(--ep-transition-fast);user-select:none;white-space:nowrap}.ep-btn:disabled{opacity:0.5;cursor:not-allowed}.ep-btn-primary{background-color:var(--ep-primary-600);color:white;border-color:var(--ep-primary-600)}.ep-btn-primary:hover:not(:disabled){background-color:var(--ep-primary-700);border-color:var(--ep-primary-700)}.ep-btn-primary:active:not(:disabled){background-color:var(--ep-primary-800);border-color:var(--ep-primary-800)}.ep-btn-secondary{background-color:var(--ep-bg-secondary);color:var(--ep-text-primary);border-color:var(--ep-border-secondary)}.ep-btn-secondary:hover:not(:disabled){background-color:var(--ep-bg-tertiary);border-color:var(--ep-border-secondary)}.ep-btn-ghost{background-color:transparent;color:var(--ep-text-secondary);border-color:transparent}.ep-btn-ghost:hover:not(:disabled){background-color:var(--ep-bg-tertiary);color:var(--ep-text-primary)}.ep-btn-sm{padding:var(--ep-space-2) var(--ep-space-4);font-size:var(--ep-font-size-sm)}.ep-btn-lg{padding:var(--ep-space-4) var(--ep-space-8);font-size:var(--ep-font-size-lg)}.ep-btn-full{width:100%}.ep-input{width:100%;padding:var(--ep-space-3);border:1px solid var(--ep-border-primary);border-radius:var(--ep-radius-md);font-family:var(--ep-font-family-sans);font-size:var(--ep-font-size-base);line-height:var(--ep-line-height-normal);color:var(--ep-text-primary);background-color:var(--ep-bg-secondary);transition:border-color var(--ep-transition-fast)}.ep-input:focus{border-color:var(--ep-primary-500);outline:none;box-shadow:0 0 0 3px rgba(14,165,233,0.1)}.ep-input::placeholder{color:var(--ep-text-tertiary)}.ep-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.ep-hidden{display:none}.ep-flex{display:flex}.ep-flex-col{flex-direction:column}.ep-items-center{align-items:center}.ep-justify-center{justify-content:center}.ep-justify-between{justify-content:space-between}.ep-gap-2{gap:var(--ep-space-2)}.ep-gap-4{gap:var(--ep-space-4)}.ep-gap-6{gap:var(--ep-space-6)}.ep-w-full{width:100%}.ep-h-full{height:100%}.ep-mb-4{margin-bottom:var(--ep-space-4)}.ep-mb-6{margin-bottom:var(--ep-space-6)}.ep-p-4{padding:var(--ep-space-4)}.ep-p-6{padding:var(--ep-space-6)}@media (max-width:768px){.ep-container{padding:0 var(--ep-space-3)}.ep-heading-1{font-size:var(--ep-font-size-2xl)}.ep-heading-2{font-size:var(--ep-font-size-xl)}.ep-card{padding:var(--ep-space-4)}.ep-btn{padding:var(--ep-space-4) var(--ep-space-6)}}@media (max-width:480px){.ep-container{padding:0 var(--ep-space-2)}.ep-heading-1{font-size:var(--ep-font-size-xl)}.ep-card{padding:var(--ep-space-3)}}";
|
|
2083
3128
|
|
|
2084
|
-
const html$4 = "<div class=\"ep-fullscreen-paywall\" id=\"fullscreenPaywall\" role=\"dialog\" aria-labelledby=\"fullscreen-title\"><div class=\"ep-fullscreen-background\"><div class=\"ep-background-pattern\"></div></div><div class=\"ep-fullscreen-header\"><div class=\"ep-fullscreen-logo\"><svg width=\"40\" height=\"40\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2L2 7l10 5 10-5-10-5z\"></path><path d=\"M2 17l10 5 10-5\"></path><path d=\"M2 12l10 5 10-5\"></path></svg><span class=\"ep-fullscreen-logo-text\">{{brandName}}</span></div><button class=\"ep-fullscreen-close\" aria-label=\"Close paywall\" data-ep-action=\"closeFullscreen\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg></button></div><div class=\"ep-fullscreen-content\"><div class=\"ep-fullscreen-container\"><div class=\"ep-fullscreen-hero\"><div class=\"ep-hero-icon\"><svg width=\"80\" height=\"80\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2L2 7l10 5 10-5-10-5z\"></path><path d=\"M2 17l10 5 10-5\"></path><path d=\"M2 12l10 5 10-5\"></path></svg></div><h1 class=\"ep-heading-1\" id=\"fullscreen-title\">{{title}}</h1><p class=\"ep-hero-description\">{{description}}</p></div><div class=\"ep-fullscreen-features\"><div class=\"ep-features-grid\"><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 12h-4l-3 9L9 3l-3 9H2\"></path></svg></div><h3 class=\"ep-feature-card-title\">{{feature1Title}}</h3><p class=\"ep-feature-card-description\">{{feature1Description}}</p></div><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"></path></svg></div><h3 class=\"ep-feature-card-title\">{{feature2Title}}</h3><p class=\"ep-feature-card-description\">{{feature2Description}}</p></div><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M13 2L3 14h9l-1 8 10-12h-9l1-8z\"></path></svg></div><h3 class=\"ep-feature-card-title\">{{feature3Title}}</h3><p class=\"ep-feature-card-description\">{{feature3Description}}</p></div><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z\"></path><polyline points=\"7.5,4.21 12,6.81 16.5,4.21\"></polyline><polyline points=\"7.5,19.79 7.5,14.6 3,12\"></polyline><polyline points=\"21,12 16.5,14.6 16.5,19.79\"></polyline></svg></div><h3 class=\"ep-feature-card-title\">{{feature4Title}}</h3><p class=\"ep-feature-card-description\">{{feature4Description}}</p></div></div></div><div class=\"ep-fullscreen-pricing\"><div class=\"ep-pricing-header\"><h2 class=\"ep-heading-2\">
|
|
3129
|
+
const html$4 = "<div class=\"ep-fullscreen-paywall\" id=\"fullscreenPaywall\" role=\"dialog\" aria-labelledby=\"fullscreen-title\"><div class=\"ep-fullscreen-background\"><div class=\"ep-background-pattern\"></div></div><div class=\"ep-fullscreen-header\"><div class=\"ep-fullscreen-logo\"><svg width=\"40\" height=\"40\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2L2 7l10 5 10-5-10-5z\"></path><path d=\"M2 17l10 5 10-5\"></path><path d=\"M2 12l10 5 10-5\"></path></svg><span class=\"ep-fullscreen-logo-text\">{{brandName}}</span></div><button class=\"ep-fullscreen-close\" aria-label=\"Close paywall\" data-ep-action=\"closeFullscreen\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg></button></div><div class=\"ep-fullscreen-content\"><div class=\"ep-fullscreen-container\"><div class=\"ep-fullscreen-hero\"><div class=\"ep-hero-icon\"><svg width=\"80\" height=\"80\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2L2 7l10 5 10-5-10-5z\"></path><path d=\"M2 17l10 5 10-5\"></path><path d=\"M2 12l10 5 10-5\"></path></svg></div><h1 class=\"ep-heading-1\" id=\"fullscreen-title\">{{title}}</h1><p class=\"ep-hero-description\">{{description}}</p></div><div class=\"ep-fullscreen-features\"><div class=\"ep-features-grid\"><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 12h-4l-3 9L9 3l-3 9H2\"></path></svg></div><h3 class=\"ep-feature-card-title\">{{feature1Title}}</h3><p class=\"ep-feature-card-description\">{{feature1Description}}</p></div><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"></path></svg></div><h3 class=\"ep-feature-card-title\">{{feature2Title}}</h3><p class=\"ep-feature-card-description\">{{feature2Description}}</p></div><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M13 2L3 14h9l-1 8 10-12h-9l1-8z\"></path></svg></div><h3 class=\"ep-feature-card-title\">{{feature3Title}}</h3><p class=\"ep-feature-card-description\">{{feature3Description}}</p></div><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z\"></path><polyline points=\"7.5,4.21 12,6.81 16.5,4.21\"></polyline><polyline points=\"7.5,19.79 7.5,14.6 3,12\"></polyline><polyline points=\"21,12 16.5,14.6 16.5,19.79\"></polyline></svg></div><h3 class=\"ep-feature-card-title\">{{feature4Title}}</h3><p class=\"ep-feature-card-description\">{{feature4Description}}</p></div></div></div><div class=\"ep-fullscreen-pricing\"><div class=\"ep-pricing-header\"><h2 class=\"ep-heading-2\">{{plansHeading}}</h2><p class=\"ep-pricing-subtitle\">{{pricingSubtitle}}</p></div><div class=\"ep-pricing-plans\"><div class=\"ep-pricing-plan\"><div class=\"ep-pricing-plan-header\"><h3 class=\"ep-pricing-plan-title\">{{freePlanName}}</h3><div class=\"ep-pricing-plan-price\"><span class=\"ep-pricing-currency\">{{currency}}</span><span class=\"ep-pricing-amount\">0</span></div><p class=\"ep-pricing-plan-description\">{{freeDescription}}</p></div><ul class=\"ep-pricing-plan-features\"><li class=\"ep-pricing-feature\"><svg class=\"ep-pricing-feature-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg> {{freeFeature1}} </li><li class=\"ep-pricing-feature\"><svg class=\"ep-pricing-feature-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg> {{freeFeature2}} </li><li class=\"ep-pricing-feature ep-pricing-feature-disabled\"><svg class=\"ep-pricing-feature-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg> {{freeFeature3}} </li></ul><button class=\"ep-btn ep-btn-secondary ep-btn-full\" data-ep-action=\"continueFree\"> {{continueButtonText}} </button></div><div class=\"ep-pricing-plan ep-pricing-plan-premium\"><div class=\"ep-pricing-plan-badge\">{{premiumBadge}}</div><div class=\"ep-pricing-plan-header\"><h3 class=\"ep-pricing-plan-title\">{{premiumPlanName}}</h3><div class=\"ep-pricing-plan-price\"><span class=\"ep-pricing-currency\">{{currency}}</span><span class=\"ep-pricing-amount\">{{price}}</span><span class=\"ep-pricing-period\">{{period}}</span></div><p class=\"ep-pricing-plan-description\">{{premiumDescription}}</p></div><ul class=\"ep-pricing-plan-features\"><li class=\"ep-pricing-feature\"><svg class=\"ep-pricing-feature-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg> {{premiumFeature1}} </li><li class=\"ep-pricing-feature\"><svg class=\"ep-pricing-feature-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg> {{premiumFeature2}} </li><li class=\"ep-pricing-feature\"><svg class=\"ep-pricing-feature-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg> {{premiumFeature3}} </li><li class=\"ep-pricing-feature\"><svg class=\"ep-pricing-feature-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg> {{premiumFeature4}} </li></ul><button class=\"ep-btn ep-btn-primary ep-btn-lg ep-btn-full\" data-ep-action=\"upgradeNow\"> {{upgradeButtonText}} </button></div></div></div><div class=\"ep-fullscreen-trial\"><div class=\"ep-trial-card\"><div class=\"ep-trial-icon\"><svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"></path><polyline points=\"22,4 12,14.01 9,11.01\"></polyline></svg></div><h3 class=\"ep-trial-title\">{{trialTitle}}</h3><p class=\"ep-trial-description\">{{trialDescription}}</p><button class=\"ep-btn ep-btn-secondary ep-btn-lg\" data-ep-action=\"startTrial\"> {{trialButtonText}} </button></div></div></div></div></div>";
|
|
2085
3130
|
const css$4 = ".ep-fullscreen-paywall{position:fixed;top:0;left:0;right:0;bottom:0;background-color:var(--ep-bg-primary);z-index:var(--ep-z-modal);display:flex;flex-direction:column;animation:ep-fullscreen-in var(--ep-transition-slow);overflow-y:auto}.ep-fullscreen-paywall.ep-fullscreen-closing{animation:ep-fullscreen-out var(--ep-transition-slow)}.ep-fullscreen-background{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;z-index:-1}.ep-background-pattern{position:absolute;top:-50%;left:-50%;width:200%;height:200%;background:linear-gradient(45deg,transparent 30%,rgba(14,165,233,0.03) 50%,transparent 70%);background-size:60px 60px;animation:ep-background-pattern var(--ep-transition-slow) infinite linear}:host([data-theme=\"dark\"]) .ep-background-pattern{background:linear-gradient(45deg,transparent 30%,rgba(14,165,233,0.05) 50%,transparent 70%)}.ep-fullscreen-header{display:flex;justify-content:space-between;align-items:center;padding:var(--ep-space-6) var(--ep-space-8);border-bottom:1px solid var(--ep-border-primary);background-color:var(--ep-bg-secondary);backdrop-filter:blur(10px);z-index:1}.ep-fullscreen-logo{display:flex;align-items:center;gap:var(--ep-space-3);color:var(--ep-primary-600)}.ep-fullscreen-logo-text{font-size:var(--ep-font-size-xl);font-weight:var(--ep-font-weight-bold);color:var(--ep-text-primary)}.ep-fullscreen-close{background:none;border:none;color:var(--ep-text-tertiary);cursor:pointer;padding:var(--ep-space-2);border-radius:var(--ep-radius-md);transition:all var(--ep-transition-fast)}.ep-fullscreen-close:hover{color:var(--ep-text-primary);background-color:var(--ep-bg-tertiary)}.ep-fullscreen-content{flex:1;padding:var(--ep-space-8);display:flex;align-items:center;justify-content:center}.ep-fullscreen-container{max-width:1200px;width:100%;margin:0 auto}.ep-fullscreen-hero{text-align:center;margin-bottom:var(--ep-space-16)}.ep-hero-icon{width:120px;height:120px;margin:0 auto var(--ep-space-6);background:linear-gradient(135deg,var(--ep-primary-500),var(--ep-primary-600));border-radius:var(--ep-radius-2xl);display:flex;align-items:center;justify-content:center;color:white;box-shadow:var(--ep-shadow-lg);animation:ep-hero-icon-in var(--ep-transition-slow) 0.2s both}.ep-fullscreen-hero .ep-heading-1{font-size:var(--ep-font-size-5xl);margin-bottom:var(--ep-space-6);background:linear-gradient(135deg,var(--ep-primary-600),var(--ep-primary-700));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;animation:ep-hero-title-in var(--ep-transition-slow) 0.3s both}.ep-hero-description{font-size:var(--ep-font-size-xl);color:var(--ep-text-secondary);max-width:600px;margin:0 auto;line-height:var(--ep-line-height-relaxed);animation:ep-hero-description-in var(--ep-transition-slow) 0.4s both}.ep-fullscreen-features{margin-bottom:var(--ep-space-16)}.ep-features-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:var(--ep-space-6)}.ep-feature-card{background-color:var(--ep-bg-secondary);border:1px solid var(--ep-border-primary);border-radius:var(--ep-radius-xl);padding:var(--ep-space-8);text-align:center;box-shadow:var(--ep-shadow-sm);transition:all var(--ep-transition-normal);opacity:0;transform:translateY(20px);animation:ep-feature-card-in var(--ep-transition-slow) both}.ep-feature-card:hover{transform:translateY(-4px);box-shadow:var(--ep-shadow-lg)}.ep-feature-card-icon{width:80px;height:80px;margin:0 auto var(--ep-space-4);background:linear-gradient(135deg,var(--ep-primary-500),var(--ep-primary-600));border-radius:var(--ep-radius-xl);display:flex;align-items:center;justify-content:center;color:white}.ep-feature-card-title{font-size:var(--ep-font-size-xl);font-weight:var(--ep-font-weight-semibold);color:var(--ep-text-primary);margin-bottom:var(--ep-space-3)}.ep-feature-card-description{color:var(--ep-text-secondary);line-height:var(--ep-line-height-relaxed);margin:0}.ep-fullscreen-pricing{margin-bottom:var(--ep-space-16)}.ep-pricing-header{text-align:center;margin-bottom:var(--ep-space-10)}.ep-pricing-header .ep-heading-2{font-size:var(--ep-font-size-4xl);margin-bottom:var(--ep-space-4)}.ep-pricing-subtitle{font-size:var(--ep-font-size-lg);color:var(--ep-text-secondary);margin:0}.ep-pricing-plans{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:var(--ep-space-8);max-width:800px;margin:0 auto}.ep-pricing-plan{position:relative;background-color:var(--ep-bg-secondary);border:1px solid var(--ep-border-primary);border-radius:var(--ep-radius-xl);padding:var(--ep-space-8);box-shadow:var(--ep-shadow-md);transition:all var(--ep-transition-normal);opacity:0;transform:translateY(20px);animation:ep-pricing-plan-in var(--ep-transition-slow) both}.ep-pricing-plan:hover{transform:translateY(-4px);box-shadow:var(--ep-shadow-lg)}.ep-pricing-plan-premium{border-color:var(--ep-primary-300);box-shadow:var(--ep-shadow-xl);transform:scale(1.05)}.ep-pricing-plan-premium:hover{transform:scale(1.05) translateY(-4px)}.ep-pricing-plan-badge{position:absolute;top:-16px;left:50%;transform:translateX(-50%);background:linear-gradient(135deg,var(--ep-primary-500),var(--ep-primary-600));color:white;padding:var(--ep-space-2) var(--ep-space-6);border-radius:var(--ep-radius-full);font-size:var(--ep-font-size-sm);font-weight:var(--ep-font-weight-semibold);white-space:nowrap}.ep-pricing-plan-header{text-align:center;margin-bottom:var(--ep-space-8)}.ep-pricing-plan-title{font-size:var(--ep-font-size-2xl);font-weight:var(--ep-font-weight-bold);color:var(--ep-text-primary);margin-bottom:var(--ep-space-4)}.ep-pricing-plan-price{display:flex;align-items:baseline;justify-content:center;gap:var(--ep-space-2);margin-bottom:var(--ep-space-3)}.ep-pricing-currency{font-size:var(--ep-font-size-xl);font-weight:var(--ep-font-weight-medium);color:var(--ep-text-secondary)}.ep-pricing-amount{font-size:var(--ep-font-size-5xl);font-weight:var(--ep-font-weight-bold);color:var(--ep-text-primary)}.ep-pricing-period{font-size:var(--ep-font-size-xl);color:var(--ep-text-secondary)}.ep-pricing-plan-description{color:var(--ep-text-secondary);margin:0}.ep-pricing-plan-features{list-style:none;padding:0;margin:0 0 var(--ep-space-8) 0}.ep-pricing-feature{display:flex;align-items:center;gap:var(--ep-space-3);padding:var(--ep-space-3) 0;color:var(--ep-text-primary);font-size:var(--ep-font-size-base)}.ep-pricing-feature-disabled{color:var(--ep-text-tertiary)}.ep-pricing-feature-icon{color:var(--ep-success-500);flex-shrink:0}.ep-pricing-feature-disabled .ep-pricing-feature-icon{color:var(--ep-text-tertiary)}.ep-fullscreen-trial{text-align:center}.ep-trial-card{background:linear-gradient(135deg,var(--ep-success-50),var(--ep-success-100));border:1px solid var(--ep-success-200);border-radius:var(--ep-radius-xl);padding:var(--ep-space-8);max-width:600px;margin:0 auto;box-shadow:var(--ep-shadow-md)}:host([data-theme=\"dark\"]) .ep-trial-card{background:linear-gradient(135deg,rgba(16,185,129,0.1),rgba(16,185,129,0.15));border-color:rgba(16,185,129,0.3)}.ep-trial-icon{width:80px;height:80px;margin:0 auto var(--ep-space-4);background:linear-gradient(135deg,var(--ep-success-500),var(--ep-success-600));border-radius:var(--ep-radius-xl);display:flex;align-items:center;justify-content:center;color:white}.ep-trial-title{font-size:var(--ep-font-size-2xl);font-weight:var(--ep-font-weight-bold);color:var(--ep-success-700);margin-bottom:var(--ep-space-3)}:host([data-theme=\"dark\"]) .ep-trial-title{color:var(--ep-success-400)}.ep-trial-description{color:var(--ep-success-600);font-size:var(--ep-font-size-lg);line-height:var(--ep-line-height-relaxed);margin-bottom:var(--ep-space-6)}:host([data-theme=\"dark\"]) .ep-trial-description{color:var(--ep-success-300)}.ep-theme-toggle{position:fixed;top:var(--ep-space-4);right:var(--ep-space-4);z-index:var(--ep-z-tooltip)}@keyframes ep-fullscreen-in{from{opacity:0;transform:scale(0.98)}to{opacity:1;transform:scale(1)}}@keyframes ep-fullscreen-out{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0.98)}}@keyframes ep-background-pattern{from{transform:translateX(0) translateY(0)}to{transform:translateX(-60px) translateY(-60px)}}@keyframes ep-hero-icon-in{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:scale(1)}}@keyframes ep-hero-title-in{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes ep-hero-description-in{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes ep-feature-card-in{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes ep-pricing-plan-in{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media (max-width:1024px){.ep-fullscreen-content{padding:var(--ep-space-6)}.ep-fullscreen-hero{margin-bottom:var(--ep-space-12)}.ep-fullscreen-features{margin-bottom:var(--ep-space-12)}.ep-fullscreen-pricing{margin-bottom:var(--ep-space-12)}.ep-features-grid{grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:var(--ep-space-4)}.ep-pricing-plans{gap:var(--ep-space-6)}}@media (max-width:768px){.ep-fullscreen-header{padding:var(--ep-space-4) var(--ep-space-6)}.ep-fullscreen-content{padding:var(--ep-space-4)}.ep-fullscreen-hero .ep-heading-1{font-size:var(--ep-font-size-3xl)}.ep-hero-description{font-size:var(--ep-font-size-lg)}.ep-hero-icon{width:80px;height:80px}.ep-features-grid{grid-template-columns:1fr}.ep-pricing-plans{grid-template-columns:1fr}.ep-pricing-plan-premium{transform:none}.ep-pricing-plan-premium:hover{transform:translateY(-4px)}.ep-feature-card{padding:var(--ep-space-6)}.ep-feature-card-icon{width:60px;height:60px}.ep-pricing-plan{padding:var(--ep-space-6)}.ep-pricing-amount{font-size:var(--ep-font-size-4xl)}}@media (max-width:480px){.ep-fullscreen-header{padding:var(--ep-space-3) var(--ep-space-4)}.ep-fullscreen-logo-text{font-size:var(--ep-font-size-lg)}.ep-fullscreen-content{padding:var(--ep-space-3)}.ep-fullscreen-hero .ep-heading-1{font-size:var(--ep-font-size-2xl)}.ep-hero-description{font-size:var(--ep-font-size-base)}.ep-hero-icon{width:60px;height:60px}.ep-pricing-header .ep-heading-2{font-size:var(--ep-font-size-2xl)}.ep-pricing-amount{font-size:var(--ep-font-size-3xl)}.ep-feature-card-icon{width:48px;height:48px}.ep-trial-icon{width:60px;height:60px}}@media (prefers-contrast:high){.ep-fullscreen-paywall{background-color:var(--ep-bg-primary)}.ep-feature-card{border:2px solid var(--ep-border-secondary)}.ep-pricing-plan{border:2px solid var(--ep-border-secondary)}.ep-pricing-plan-premium{border:2px solid var(--ep-primary-500)}.ep-trial-card{border:2px solid var(--ep-success-500)}}@media (prefers-reduced-motion:reduce){.ep-fullscreen-paywall{animation:none}.ep-background-pattern{animation:none}.ep-hero-icon{animation:none}.ep-fullscreen-hero .ep-heading-1{animation:none}.ep-hero-description{animation:none}.ep-feature-card{animation:none;opacity:1;transform:none}.ep-pricing-plan{animation:none;opacity:1;transform:none}.ep-pricing-plan-premium{transform:none}.ep-feature-card:hover{transform:none}.ep-pricing-plan:hover{transform:none}}";
|
|
2086
3131
|
|
|
2087
|
-
const html$3 = "<div class=\"ep-inline-paywall\" id=\"inlinePaywall\" role=\"region\" aria-labelledby=\"paywall-title\"><div class=\"ep-inline-header\"><div class=\"ep-inline-icon\"><svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 12l2 2 4-4\"></path><path d=\"M21 12c-1 0-3-1-3-3s2-3 3-3 3 1 3 3-2 3-3 3\"></path><path d=\"M3 12c1 0 3-1 3-3s-2-3-3-3-3 1-3 3 2 3 3 3\"></path></svg></div><div class=\"ep-inline-header-content\"><h3 class=\"ep-heading-3\" id=\"paywall-title\">{{title}}</h3><p class=\"ep-text-body\">{{description}}</p></div></div><div class=\"ep-inline-content\"><div class=\"ep-inline-features\"><div class=\"ep-feature-grid\"><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 12h-4l-3 9L9 3l-3 9H2\"></path></svg></div><h4 class=\"ep-feature-card-title\">{{feature1Title}}</h4><p class=\"ep-feature-card-description\">{{feature1Description}}</p></div><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"></path></svg></div><h4 class=\"ep-feature-card-title\">{{feature2Title}}</h4><p class=\"ep-feature-card-description\">{{feature2Description}}</p></div><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M13 2L3 14h9l-1 8 10-12h-9l1-8z\"></path></svg></div><h4 class=\"ep-feature-card-title\">{{feature3Title}}</h4><p class=\"ep-feature-card-description\">{{feature3Description}}</p></div></div></div><div class=\"ep-inline-pricing\"><div class=\"ep-pricing-comparison\"><div class=\"ep-pricing-plan\"><div class=\"ep-pricing-plan-header\"><h4 class=\"ep-pricing-plan-title\">
|
|
3132
|
+
const html$3 = "<div class=\"ep-inline-paywall\" id=\"inlinePaywall\" role=\"region\" aria-labelledby=\"paywall-title\"><div class=\"ep-inline-header\"><div class=\"ep-inline-icon\"><svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 12l2 2 4-4\"></path><path d=\"M21 12c-1 0-3-1-3-3s2-3 3-3 3 1 3 3-2 3-3 3\"></path><path d=\"M3 12c1 0 3-1 3-3s-2-3-3-3-3 1-3 3 2 3 3 3\"></path></svg></div><div class=\"ep-inline-header-content\"><h3 class=\"ep-heading-3\" id=\"paywall-title\">{{title}}</h3><p class=\"ep-text-body\">{{description}}</p></div></div><div class=\"ep-inline-content\"><div class=\"ep-inline-features\"><div class=\"ep-feature-grid\"><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 12h-4l-3 9L9 3l-3 9H2\"></path></svg></div><h4 class=\"ep-feature-card-title\">{{feature1Title}}</h4><p class=\"ep-feature-card-description\">{{feature1Description}}</p></div><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"></path></svg></div><h4 class=\"ep-feature-card-title\">{{feature2Title}}</h4><p class=\"ep-feature-card-description\">{{feature2Description}}</p></div><div class=\"ep-feature-card\"><div class=\"ep-feature-card-icon\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M13 2L3 14h9l-1 8 10-12h-9l1-8z\"></path></svg></div><h4 class=\"ep-feature-card-title\">{{feature3Title}}</h4><p class=\"ep-feature-card-description\">{{feature3Description}}</p></div></div></div><div class=\"ep-inline-pricing\"><div class=\"ep-pricing-comparison\"><div class=\"ep-pricing-plan\"><div class=\"ep-pricing-plan-header\"><h4 class=\"ep-pricing-plan-title\">{{freePlanName}}</h4><div class=\"ep-pricing-plan-price\"><span class=\"ep-pricing-currency\">{{currency}}</span><span class=\"ep-pricing-amount\">0</span></div></div><ul class=\"ep-pricing-plan-features\"><li class=\"ep-pricing-feature\"><svg class=\"ep-pricing-feature-icon\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg> {{freeFeature1}} </li><li class=\"ep-pricing-feature\"><svg class=\"ep-pricing-feature-icon\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg> {{freeFeature2}} </li><li class=\"ep-pricing-feature ep-pricing-feature-disabled\"><svg class=\"ep-pricing-feature-icon\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg> {{freeFeature3}} </li></ul></div><div class=\"ep-pricing-plan ep-pricing-plan-premium\"><div class=\"ep-pricing-plan-badge\">{{popularBadge}}</div><div class=\"ep-pricing-plan-header\"><h4 class=\"ep-pricing-plan-title\">{{premiumPlanName}}</h4><div class=\"ep-pricing-plan-price\"><span class=\"ep-pricing-currency\">{{currency}}</span><span class=\"ep-pricing-amount\">{{price}}</span><span class=\"ep-pricing-period\">{{period}}</span></div></div><ul class=\"ep-pricing-plan-features\"><li class=\"ep-pricing-feature\"><svg class=\"ep-pricing-feature-icon\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg> {{premiumFeature1}} </li><li class=\"ep-pricing-feature\"><svg class=\"ep-pricing-feature-icon\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg> {{premiumFeature2}} </li><li class=\"ep-pricing-feature\"><svg class=\"ep-pricing-feature-icon\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg> {{premiumFeature3}} </li></ul><button class=\"ep-btn ep-btn-primary ep-btn-full\" data-ep-action=\"upgradeNow\"> {{upgradeButtonText}} </button></div></div></div><div class=\"ep-inline-trial\"><div class=\"ep-trial-content\"><p class=\"ep-trial-text\">{{trialText}}</p><div class=\"ep-trial-actions\"><button class=\"ep-btn ep-btn-secondary\" data-ep-action=\"startTrial\"> {{trialButtonText}} </button><button class=\"ep-btn ep-btn-ghost ep-btn-sm\" data-ep-action=\"dismissPaywall\"> {{dismissButtonText}} </button></div></div></div></div></div>";
|
|
2088
3133
|
const css$3 = ".ep-inline-paywall{max-width:800px;margin:0 auto;background-color:var(--ep-bg-secondary);border:1px solid var(--ep-border-primary);border-radius:var(--ep-radius-lg);box-shadow:var(--ep-shadow-md);overflow:hidden;opacity:0;transform:translateY(20px);transition:all var(--ep-transition-slow)}.ep-inline-paywall.ep-inline-visible{opacity:1;transform:translateY(0)}.ep-inline-paywall.ep-inline-dismissing{opacity:0;transform:translateY(-20px);transition:all var(--ep-transition-normal)}.ep-inline-header{display:flex;align-items:center;gap:var(--ep-space-4);padding:var(--ep-space-6);background:linear-gradient(135deg,var(--ep-primary-50),var(--ep-primary-100));border-bottom:1px solid var(--ep-border-primary)}:host([data-theme=\"dark\"]) .ep-inline-header{background:linear-gradient(135deg,var(--ep-primary-900),var(--ep-primary-800))}.ep-inline-icon{width:64px;height:64px;background:linear-gradient(135deg,var(--ep-primary-500),var(--ep-primary-600));border-radius:var(--ep-radius-xl);display:flex;align-items:center;justify-content:center;color:white;flex-shrink:0}.ep-inline-header-content{flex:1;min-width:0}.ep-inline-header-content .ep-heading-3{margin-bottom:var(--ep-space-2);color:var(--ep-text-primary)}.ep-inline-header-content .ep-text-body{margin-bottom:0;color:var(--ep-text-secondary)}.ep-inline-content{padding:var(--ep-space-8)}.ep-inline-features{margin-bottom:var(--ep-space-8)}.ep-feature-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:var(--ep-space-4)}.ep-feature-card{background-color:var(--ep-bg-tertiary);border:1px solid var(--ep-border-primary);border-radius:var(--ep-radius-md);padding:var(--ep-space-4);text-align:center;transition:all var(--ep-transition-normal);opacity:0;transform:translateY(10px);animation:ep-feature-card-in var(--ep-transition-slow) forwards}.ep-feature-card:hover{transform:translateY(-2px);box-shadow:var(--ep-shadow-md)}.ep-feature-card-icon{width:48px;height:48px;margin:0 auto var(--ep-space-3);background:linear-gradient(135deg,var(--ep-primary-500),var(--ep-primary-600));border-radius:var(--ep-radius-lg);display:flex;align-items:center;justify-content:center;color:white}.ep-feature-card-title{font-size:var(--ep-font-size-lg);font-weight:var(--ep-font-weight-semibold);color:var(--ep-text-primary);margin-bottom:var(--ep-space-2)}.ep-feature-card-description{color:var(--ep-text-secondary);font-size:var(--ep-font-size-sm);line-height:var(--ep-line-height-relaxed);margin:0}.ep-inline-pricing{margin-bottom:var(--ep-space-8)}.ep-pricing-comparison{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:var(--ep-space-4);max-width:600px;margin:0 auto}.ep-pricing-plan{position:relative;background-color:var(--ep-bg-secondary);border:1px solid var(--ep-border-primary);border-radius:var(--ep-radius-lg);padding:var(--ep-space-6);transition:all var(--ep-transition-normal)}.ep-pricing-plan:hover{transform:translateY(-2px);box-shadow:var(--ep-shadow-md)}.ep-pricing-plan-premium{border-color:var(--ep-primary-300);box-shadow:var(--ep-shadow-lg)}.ep-pricing-plan-badge{position:absolute;top:-12px;left:50%;transform:translateX(-50%);background:linear-gradient(135deg,var(--ep-primary-500),var(--ep-primary-600));color:white;padding:var(--ep-space-1) var(--ep-space-4);border-radius:var(--ep-radius-full);font-size:var(--ep-font-size-sm);font-weight:var(--ep-font-weight-medium);white-space:nowrap}.ep-pricing-plan-header{text-align:center;margin-bottom:var(--ep-space-6)}.ep-pricing-plan-title{font-size:var(--ep-font-size-xl);font-weight:var(--ep-font-weight-semibold);color:var(--ep-text-primary);margin-bottom:var(--ep-space-3)}.ep-pricing-plan-price{display:flex;align-items:baseline;justify-content:center;gap:var(--ep-space-1)}.ep-pricing-currency{font-size:var(--ep-font-size-lg);font-weight:var(--ep-font-weight-medium);color:var(--ep-text-secondary)}.ep-pricing-amount{font-size:var(--ep-font-size-3xl);font-weight:var(--ep-font-weight-bold);color:var(--ep-text-primary)}.ep-pricing-period{font-size:var(--ep-font-size-lg);color:var(--ep-text-secondary)}.ep-pricing-plan-features{list-style:none;padding:0;margin:0 0 var(--ep-space-6) 0}.ep-pricing-feature{display:flex;align-items:center;gap:var(--ep-space-3);padding:var(--ep-space-2) 0;color:var(--ep-text-primary);font-size:var(--ep-font-size-sm)}.ep-pricing-feature-disabled{color:var(--ep-text-tertiary)}.ep-pricing-feature-icon{color:var(--ep-success-500);flex-shrink:0}.ep-pricing-feature-disabled .ep-pricing-feature-icon{color:var(--ep-text-tertiary)}.ep-inline-trial{background:linear-gradient(135deg,var(--ep-gray-50),var(--ep-gray-100));border:1px solid var(--ep-border-primary);border-radius:var(--ep-radius-md);padding:var(--ep-space-6);text-align:center}:host([data-theme=\"dark\"]) .ep-inline-trial{background:linear-gradient(135deg,var(--ep-gray-800),var(--ep-gray-700))}.ep-trial-content{max-width:400px;margin:0 auto}.ep-trial-text{color:var(--ep-text-primary);font-size:var(--ep-font-size-lg);font-weight:var(--ep-font-weight-medium);margin-bottom:var(--ep-space-6)}.ep-trial-actions{display:flex;flex-direction:column;gap:var(--ep-space-3);align-items:center}.ep-theme-toggle{position:fixed;top:var(--ep-space-4);right:var(--ep-space-4);z-index:var(--ep-z-tooltip)}@keyframes ep-feature-card-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@media (max-width:768px){.ep-inline-paywall{margin:var(--ep-space-4)}.ep-inline-header{flex-direction:column;text-align:center;gap:var(--ep-space-3)}.ep-inline-content{padding:var(--ep-space-6)}.ep-feature-grid{grid-template-columns:1fr}.ep-pricing-comparison{grid-template-columns:1fr}.ep-pricing-plan{padding:var(--ep-space-4)}.ep-trial-actions{flex-direction:column;width:100%}.ep-trial-actions .ep-btn{width:100%}}@media (max-width:640px){.ep-inline-paywall{margin:var(--ep-space-2);border-radius:var(--ep-radius-md)}.ep-inline-header{padding:var(--ep-space-4)}.ep-inline-content{padding:var(--ep-space-4)}.ep-inline-icon{width:48px;height:48px}.ep-feature-card-icon{width:40px;height:40px}.ep-pricing-plan{padding:var(--ep-space-3)}.ep-pricing-amount{font-size:var(--ep-font-size-2xl)}}@media (prefers-contrast:high){.ep-inline-paywall{border:2px solid var(--ep-border-secondary)}.ep-feature-card{border:2px solid var(--ep-border-secondary)}.ep-pricing-plan{border:2px solid var(--ep-border-secondary)}.ep-pricing-plan-premium{border:2px solid var(--ep-primary-500)}}@media (prefers-reduced-motion:reduce){.ep-inline-paywall{transition:none;opacity:1;transform:none}.ep-feature-card{transition:none;animation:none;opacity:1;transform:none}.ep-feature-card:hover{transform:none}.ep-pricing-plan:hover{transform:none}}";
|
|
2089
3134
|
|
|
2090
3135
|
const html$2 = "<div class=\"ep-minimal-paywall\" id=\"minimalPaywall\" role=\"dialog\" aria-labelledby=\"minimal-title\"><button class=\"ep-minimal-close\" aria-label=\"Close paywall\" data-ep-action=\"closeMinimal\"><svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg></button><div class=\"ep-minimal-content\"><div class=\"ep-minimal-header\"><div class=\"ep-minimal-icon\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 12l2 2 4-4\"></path><path d=\"M21 12c-1 0-3-1-3-3s2-3 3-3 3 1 3 3-2 3-3 3\"></path><path d=\"M3 12c1 0 3-1 3-3s-2-3-3-3-3 1-3 3 2 3 3 3\"></path></svg></div><h3 class=\"ep-minimal-title\" id=\"minimal-title\">{{title}}</h3><p class=\"ep-minimal-description\">{{description}}</p></div><div class=\"ep-minimal-pricing\"><div class=\"ep-minimal-price\"><span class=\"ep-minimal-currency\">{{currency}}</span><span class=\"ep-minimal-amount\">{{price}}</span><span class=\"ep-minimal-period\">{{period}}</span></div><p class=\"ep-minimal-price-description\">{{priceDescription}}</p></div><div class=\"ep-minimal-features\"><ul class=\"ep-minimal-feature-list\"><li class=\"ep-minimal-feature\"><svg class=\"ep-minimal-feature-icon\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg><span>{{feature1}}</span></li><li class=\"ep-minimal-feature\"><svg class=\"ep-minimal-feature-icon\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg><span>{{feature2}}</span></li><li class=\"ep-minimal-feature\"><svg class=\"ep-minimal-feature-icon\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg><span>{{feature3}}</span></li></ul></div><div class=\"ep-minimal-actions\"><button class=\"ep-btn ep-btn-primary ep-btn-full\" data-ep-action=\"upgradeNow\"> {{upgradeButtonText}} </button><button class=\"ep-btn ep-btn-ghost ep-btn-sm\" data-ep-action=\"closeMinimal\"> {{dismissButtonText}} </button></div><div class=\"ep-minimal-trial\"><p class=\"ep-minimal-trial-text\">{{trialText}}</p></div></div></div><div class=\"ep-minimal-backdrop\" id=\"minimalBackdrop\"></div>";
|
|
2091
3136
|
const css$2 = ".ep-minimal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.4);z-index:var(--ep-z-backdrop);opacity:0;visibility:hidden;transition:all var(--ep-transition-fast)}.ep-minimal-backdrop.ep-minimal-backdrop-visible{opacity:1;visibility:visible}.ep-minimal-paywall{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(0.95);background-color:var(--ep-bg-secondary);border:1px solid var(--ep-border-primary);border-radius:var(--ep-radius-lg);box-shadow:var(--ep-shadow-xl);z-index:var(--ep-z-modal);max-width:400px;width:90vw;max-height:90vh;overflow-y:auto;opacity:0;visibility:hidden;transition:all var(--ep-transition-fast)}.ep-minimal-paywall.ep-minimal-visible{opacity:1;visibility:visible;transform:translate(-50%,-50%) scale(1)}.ep-minimal-close{position:absolute;top:var(--ep-space-3);right:var(--ep-space-3);background:none;border:none;color:var(--ep-text-tertiary);cursor:pointer;padding:var(--ep-space-2);border-radius:var(--ep-radius-sm);transition:all var(--ep-transition-fast);z-index:1}.ep-minimal-close:hover{color:var(--ep-text-primary);background-color:var(--ep-bg-tertiary)}.ep-minimal-content{padding:var(--ep-space-6);padding-top:var(--ep-space-8)}.ep-minimal-header{text-align:center;margin-bottom:var(--ep-space-6)}.ep-minimal-icon{width:48px;height:48px;margin:0 auto var(--ep-space-3);background:linear-gradient(135deg,var(--ep-primary-500),var(--ep-primary-600));border-radius:var(--ep-radius-lg);display:flex;align-items:center;justify-content:center;color:white}.ep-minimal-title{font-size:var(--ep-font-size-xl);font-weight:var(--ep-font-weight-semibold);color:var(--ep-text-primary);margin-bottom:var(--ep-space-2)}.ep-minimal-description{color:var(--ep-text-secondary);font-size:var(--ep-font-size-sm);line-height:var(--ep-line-height-relaxed);margin:0}.ep-minimal-pricing{text-align:center;margin-bottom:var(--ep-space-6);padding:var(--ep-space-4);background:linear-gradient(135deg,var(--ep-primary-50),var(--ep-primary-100));border:1px solid var(--ep-primary-200);border-radius:var(--ep-radius-md)}:host([data-theme=\"dark\"]) .ep-minimal-pricing{background:linear-gradient(135deg,var(--ep-primary-900),var(--ep-primary-800));border-color:var(--ep-primary-700)}.ep-minimal-price{display:flex;align-items:baseline;justify-content:center;gap:var(--ep-space-1);margin-bottom:var(--ep-space-2)}.ep-minimal-currency{font-size:var(--ep-font-size-base);font-weight:var(--ep-font-weight-medium);color:var(--ep-text-secondary)}.ep-minimal-amount{font-size:var(--ep-font-size-2xl);font-weight:var(--ep-font-weight-bold);color:var(--ep-text-primary)}.ep-minimal-period{font-size:var(--ep-font-size-base);color:var(--ep-text-secondary)}.ep-minimal-price-description{color:var(--ep-text-secondary);font-size:var(--ep-font-size-xs);margin:0}.ep-minimal-features{margin-bottom:var(--ep-space-6)}.ep-minimal-feature-list{list-style:none;padding:0;margin:0}.ep-minimal-feature{display:flex;align-items:center;gap:var(--ep-space-2);padding:var(--ep-space-2) 0;color:var(--ep-text-primary);font-size:var(--ep-font-size-sm);border-bottom:1px solid var(--ep-border-primary)}.ep-minimal-feature:last-child{border-bottom:none}.ep-minimal-feature-icon{color:var(--ep-success-500);flex-shrink:0}.ep-minimal-feature span{font-weight:var(--ep-font-weight-medium)}.ep-minimal-actions{display:flex;flex-direction:column;gap:var(--ep-space-2);margin-bottom:var(--ep-space-4)}.ep-minimal-trial{text-align:center;padding-top:var(--ep-space-4);border-top:1px solid var(--ep-border-primary)}.ep-minimal-trial-text{color:var(--ep-text-tertiary);font-size:var(--ep-font-size-xs);margin:0}.ep-theme-toggle{position:fixed;top:var(--ep-space-4);left:var(--ep-space-4);z-index:var(--ep-z-tooltip);display:flex;flex-direction:column;gap:var(--ep-space-2)}@media (max-width:480px){.ep-minimal-paywall{width:95vw;max-width:none}.ep-minimal-content{padding:var(--ep-space-4);padding-top:var(--ep-space-6)}.ep-minimal-close{top:var(--ep-space-2);right:var(--ep-space-2)}.ep-minimal-icon{width:40px;height:40px}.ep-minimal-title{font-size:var(--ep-font-size-lg)}.ep-minimal-amount{font-size:var(--ep-font-size-xl)}.ep-minimal-pricing{padding:var(--ep-space-3)}}@media (prefers-contrast:high){.ep-minimal-paywall{border:2px solid var(--ep-border-secondary)}.ep-minimal-pricing{border:2px solid var(--ep-primary-500)}.ep-minimal-backdrop{background-color:rgba(0,0,0,0.8)}}@media (prefers-reduced-motion:reduce){.ep-minimal-backdrop{transition:none}.ep-minimal-paywall{transition:none;transform:translate(-50%,-50%)}.ep-minimal-paywall.ep-minimal-visible{transform:translate(-50%,-50%)}}@media print{.ep-minimal-backdrop{display:none}.ep-minimal-paywall{position:static;transform:none;box-shadow:none;border:1px solid black;opacity:1;visibility:visible}.ep-minimal-close{display:none}}.ep-minimal-paywall *:focus{outline:2px solid var(--ep-primary-500);outline-offset:2px}.ep-minimal-paywall *:focus:not(:focus-visible){outline:none}.ep-minimal-paywall{animation:ep-minimal-entrance var(--ep-transition-normal) ease-out}@keyframes ep-minimal-entrance{from{opacity:0;transform:translate(-50%,-50%) scale(0.9)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}.ep-minimal-feature:hover{background-color:var(--ep-bg-tertiary);border-radius:var(--ep-radius-sm);margin:0 calc(-1 * var(--ep-space-2));padding:var(--ep-space-2)}.ep-minimal-pricing:hover{background:linear-gradient(135deg,var(--ep-primary-100),var(--ep-primary-200));border-color:var(--ep-primary-300)}:host([data-theme=\"dark\"]) .ep-minimal-pricing:hover{background:linear-gradient(135deg,var(--ep-primary-800),var(--ep-primary-700));border-color:var(--ep-primary-600)}";
|
|
2092
3137
|
|
|
2093
|
-
const html$1 = "<div class=\"ep-modal-backdrop\" id=\"paywallModal\" role=\"dialog\" aria-labelledby=\"paywall-title\" aria-describedby=\"paywall-description\"><div class=\"ep-modal-container\"><button class=\"ep-modal-close\" aria-label=\"Close paywall\" data-ep-action=\"closePaywall\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg></button><div class=\"ep-modal-content\"><div class=\"ep-modal-header\"><div class=\"ep-modal-icon\"><svg width=\"48\" height=\"48\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\" ry=\"2\"></rect><path d=\"m7 11V7a5 5 0 0 1 10 0v4\"></path></svg></div><h2 class=\"ep-heading-2\" id=\"paywall-title\">{{title}}</h2><p class=\"ep-text-body\" id=\"paywall-description\">{{description}}</p></div><div class=\"ep-modal-features\"><h3 class=\"ep-heading-3\">
|
|
2094
|
-
const css$1 = ".ep-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.75);backdrop-filter:blur(4px);z-index:var(--ep-z-modal);display:flex;align-items:center;justify-content:center;padding:var(--ep-space-4);animation:ep-modal-backdrop-in var(--ep-transition-normal)}.ep-modal-backdrop.ep-modal-closing{animation:ep-modal-backdrop-out var(--ep-transition-normal)}.ep-modal-container{position:relative;background-color:var(--ep-bg-secondary);border-radius:var(--ep-radius-xl);box-shadow:var(--ep-shadow-xl);max-width:480px;width:100%;max-height:90vh;overflow-y:auto;animation:ep-modal-container-in var(--ep-transition-normal)}.ep-modal-backdrop.ep-modal-closing .ep-modal-container{animation:ep-modal-container-out var(--ep-transition-normal)}.ep-modal-close{position:absolute;top:var(--ep-space-4);right:var(--ep-space-4);background:none;border:none;color:var(--ep-text-tertiary);cursor:pointer;padding:var(--ep-space-2);border-radius:var(--ep-radius-md);transition:all var(--ep-transition-fast);z-index:1}.ep-modal-close:hover{color:var(--ep-text-primary);background-color:var(--ep-bg-tertiary)}.ep-modal-close:focus{outline:2px solid var(--ep-primary-500);outline-offset:2px}.ep-modal-content{padding:var(--ep-space-8);padding-top:var(--ep-space-12)}.ep-modal-header{text-align:center;margin-bottom:var(--ep-space-8)}.ep-modal-icon{width:80px;height:80px;margin:0 auto var(--ep-space-4);background:linear-gradient(135deg,var(--ep-primary-500),var(--ep-primary-600));border-radius:var(--ep-radius-2xl);display:flex;align-items:center;justify-content:center;color:white}.ep-modal-header .ep-heading-2{margin-bottom:var(--ep-space-3)}.ep-modal-header .ep-text-body{margin-bottom:0;font-size:var(--ep-font-size-lg)}.ep-modal-features{margin-bottom:var(--ep-space-8)}.ep-modal-features .ep-heading-3{margin-bottom:var(--ep-space-4);text-align:center}.ep-feature-list{list-style:none;padding:0;margin:0}.ep-feature-item{display:flex;align-items:center;gap:var(--ep-space-3);padding:var(--ep-space-3) 0;border-bottom:1px solid var(--ep-border-primary)}.ep-feature-item:last-child{border-bottom:none}.ep-feature-icon{color:var(--ep-success-500);flex-shrink:0}.ep-feature-item span{color:var(--ep-text-primary);font-weight:var(--ep-font-weight-medium)}.ep-modal-pricing{margin-bottom:var(--ep-space-8)}.ep-pricing-card{background:linear-gradient(135deg,var(--ep-primary-50),var(--ep-primary-100));border:1px solid var(--ep-primary-200);border-radius:var(--ep-radius-lg);padding:var(--ep-space-6);text-align:center}:host([data-theme=\"dark\"]) .ep-pricing-card{background:linear-gradient(135deg,var(--ep-primary-900),var(--ep-primary-800));border-color:var(--ep-primary-700)}.ep-pricing-header{margin-bottom:var(--ep-space-4)}.ep-pricing-price{display:flex;align-items:baseline;justify-content:center;gap:var(--ep-space-1);margin-bottom:var(--ep-space-2)}.ep-pricing-currency{font-size:var(--ep-font-size-lg);font-weight:var(--ep-font-weight-medium);color:var(--ep-text-secondary)}.ep-pricing-amount{font-size:var(--ep-font-size-4xl);font-weight:var(--ep-font-weight-bold);color:var(--ep-text-primary)}.ep-pricing-period{font-size:var(--ep-font-size-lg);color:var(--ep-text-secondary)}.ep-pricing-description{color:var(--ep-text-secondary);margin:0}.ep-trial-info{background-color:var(--ep-success-50);border:1px solid var(--ep-success-200);border-radius:var(--ep-radius-md);padding:var(--ep-space-3);margin-top:var(--ep-space-4)}:host([data-theme=\"dark\"]) .ep-trial-info{background-color:rgba(16,185,129,0.1);border-color:rgba(16,185,129,0.3)}.ep-trial-info .ep-text-sm{color:var(--ep-success-700);margin:0;font-weight:var(--ep-font-weight-medium)}:host([data-theme=\"dark\"]) .ep-trial-info .ep-text-sm{color:var(--ep-success-400)}.ep-modal-actions{display:flex;flex-direction:column;gap:var(--ep-space-3);margin-bottom:var(--ep-space-6)}.ep-modal-footer{text-align:center;padding-top:var(--ep-space-6);border-top:1px solid var(--ep-border-primary)}.ep-modal-footer .ep-text-sm{margin:0}.ep-theme-toggle{position:fixed;top:var(--ep-space-4);left:var(--ep-space-4);z-index:var(--ep-z-tooltip)}@keyframes ep-modal-backdrop-in{from{opacity:0}to{opacity:1}}@keyframes ep-modal-backdrop-out{from{opacity:1}to{opacity:0}}@keyframes ep-modal-container-in{from{opacity:0;transform:scale(0.95) translateY(-10px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes ep-modal-container-out{from{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(0.95) translateY(-10px)}}@media (max-width:640px){.ep-modal-backdrop{padding:var(--ep-space-2)}.ep-modal-container{max-width:100%;border-radius:var(--ep-radius-lg)}.ep-modal-content{padding:var(--ep-space-6);padding-top:var(--ep-space-10)}.ep-modal-icon{width:60px;height:60px}.ep-modal-header .ep-heading-2{font-size:var(--ep-font-size-xl)}.ep-pricing-amount{font-size:var(--ep-font-size-3xl)}}@media (max-width:480px){.ep-modal-content{padding:var(--ep-space-4);padding-top:var(--ep-space-8)}.ep-modal-close{top:var(--ep-space-3);right:var(--ep-space-3)}}@media (prefers-contrast:high){.ep-modal-backdrop{background-color:rgba(0,0,0,0.9);backdrop-filter:none}.ep-modal-container{border:2px solid var(--ep-border-secondary)}.ep-pricing-card{background:var(--ep-bg-secondary);border:2px solid var(--ep-primary-500)}}@media (prefers-reduced-motion:reduce){.ep-modal-backdrop{animation:none}.ep-modal-container{animation:none}.ep-modal-backdrop.ep-modal-closing{animation:none}.ep-modal-backdrop.ep-modal-closing .ep-modal-container{animation:none}}";
|
|
3138
|
+
const html$1 = "<div class=\"ep-modal-backdrop\" id=\"paywallModal\" role=\"dialog\" aria-labelledby=\"paywall-title\" aria-describedby=\"paywall-description\"><div class=\"ep-modal-container\"><button class=\"ep-modal-close\" aria-label=\"Close paywall\" data-ep-action=\"closePaywall\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg></button><div class=\"ep-modal-content\"><div class=\"ep-modal-header\"><div class=\"ep-modal-icon\"><svg width=\"48\" height=\"48\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\" ry=\"2\"></rect><path d=\"m7 11V7a5 5 0 0 1 10 0v4\"></path></svg></div><h2 class=\"ep-heading-2\" id=\"paywall-title\">{{title}}</h2><p class=\"ep-text-body\" id=\"paywall-description\">{{description}}</p></div><div class=\"ep-modal-features\"><h3 class=\"ep-heading-3\">{{featuresHeading}}</h3><ul class=\"ep-feature-list\"><li class=\"ep-feature-item\"><svg class=\"ep-feature-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg><span>{{feature1}}</span></li><li class=\"ep-feature-item\"><svg class=\"ep-feature-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg><span>{{feature2}}</span></li><li class=\"ep-feature-item\"><svg class=\"ep-feature-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg><span>{{feature3}}</span></li><li class=\"ep-feature-item\"><svg class=\"ep-feature-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg><span>{{feature4}}</span></li><li class=\"ep-feature-item\"><svg class=\"ep-feature-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg><span>{{feature5}}</span></li><li class=\"ep-feature-item\"><svg class=\"ep-feature-icon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20,6 9,17 4,12\"></polyline></svg><span>{{feature6}}</span></li></ul></div><div class=\"ep-modal-pricing\"><div class=\"ep-pricing-card\"><div class=\"ep-pricing-header\"><div class=\"ep-pricing-price\"><span class=\"ep-pricing-currency\">{{currency}}</span><span class=\"ep-pricing-amount\">{{price}}</span><span class=\"ep-pricing-period\">{{period}}</span></div><p class=\"ep-pricing-description\">{{pricingDescription}}</p></div><div class=\"ep-trial-info\"><p class=\"ep-text-sm\">{{trialInfo}}</p></div></div></div><div class=\"ep-modal-actions\"><button class=\"ep-btn ep-btn-primary ep-btn-lg ep-btn-full\" data-ep-action=\"upgradeNow\"> {{upgradeButtonText}} </button><button class=\"ep-btn ep-btn-ghost ep-btn-sm\" data-ep-action=\"closePaywall\"> {{cancelButtonText}} </button></div><div class=\"ep-modal-footer\"><p class=\"ep-text-sm\">{{footerText}}</p></div></div></div></div>";
|
|
3139
|
+
const css$1 = ".ep-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.75);backdrop-filter:blur(4px);z-index:var(--ep-z-modal);display:flex;align-items:center;justify-content:center;padding:var(--ep-space-4);animation:ep-modal-backdrop-in var(--ep-transition-normal)}.ep-modal-backdrop.ep-modal-closing{animation:ep-modal-backdrop-out var(--ep-transition-normal)}.ep-modal-container{position:relative;background-color:var(--ep-bg-secondary);border-radius:var(--ep-radius-xl);box-shadow:var(--ep-shadow-xl);max-width:480px;width:100%;max-height:90vh;overflow-y:auto;animation:ep-modal-container-in var(--ep-transition-normal)}.ep-modal-backdrop.ep-modal-closing .ep-modal-container{animation:ep-modal-container-out var(--ep-transition-normal)}.ep-modal-close{position:absolute;top:var(--ep-space-4);right:var(--ep-space-4);background:none;border:none;color:var(--ep-text-tertiary);cursor:pointer;padding:var(--ep-space-2);border-radius:var(--ep-radius-md);transition:all var(--ep-transition-fast);z-index:1}.ep-modal-close:hover{color:var(--ep-text-primary);background-color:var(--ep-bg-tertiary)}.ep-modal-close:focus{outline:2px solid var(--ep-primary-500);outline-offset:2px}.ep-modal-content{padding:var(--ep-space-8);padding-top:var(--ep-space-12)}.ep-modal-header{text-align:center;margin-bottom:var(--ep-space-8)}.ep-modal-icon{width:80px;height:80px;margin:0 auto var(--ep-space-4);background:linear-gradient(135deg,var(--ep-primary-500),var(--ep-primary-600));border-radius:var(--ep-radius-2xl);display:flex;align-items:center;justify-content:center;color:white}.ep-modal-header .ep-heading-2{margin-bottom:var(--ep-space-3)}.ep-modal-header .ep-text-body{margin-bottom:0;font-size:var(--ep-font-size-lg)}.ep-modal-features{margin-bottom:var(--ep-space-8)}.ep-modal-features .ep-heading-3{margin-bottom:var(--ep-space-4);text-align:center}.ep-feature-list{list-style:none;padding:0;margin:0}.ep-feature-item{display:flex;align-items:center;gap:var(--ep-space-3);padding:var(--ep-space-3) 0;border-bottom:1px solid var(--ep-border-primary)}.ep-feature-item:last-child{border-bottom:none}.ep-feature-icon{color:var(--ep-success-500);flex-shrink:0}.ep-feature-item span{color:var(--ep-text-primary);font-weight:var(--ep-font-weight-medium)}.ep-modal-pricing{margin-bottom:var(--ep-space-8)}.ep-pricing-card{background:linear-gradient(135deg,var(--ep-primary-50),var(--ep-primary-100));border:1px solid var(--ep-primary-200);border-radius:var(--ep-radius-lg);padding:var(--ep-space-6);text-align:center}:host([data-theme=\"dark\"]) .ep-pricing-card{background:linear-gradient(135deg,var(--ep-primary-900),var(--ep-primary-800));border-color:var(--ep-primary-700)}.ep-pricing-header{margin-bottom:var(--ep-space-4)}.ep-pricing-price{display:flex;align-items:baseline;justify-content:center;gap:var(--ep-space-1);margin-bottom:var(--ep-space-2)}.ep-pricing-currency{font-size:var(--ep-font-size-lg);font-weight:var(--ep-font-weight-medium);color:var(--ep-text-secondary)}.ep-pricing-amount{font-size:var(--ep-font-size-4xl);font-weight:var(--ep-font-weight-bold);color:var(--ep-text-primary)}.ep-pricing-period{font-size:var(--ep-font-size-lg);color:var(--ep-text-secondary)}.ep-pricing-description{color:var(--ep-text-secondary);margin:0}.ep-pricing-header:last-child,.ep-pricing-price:last-child{margin-bottom:0}.ep-trial-info{background-color:var(--ep-success-50);border:1px solid var(--ep-success-200);border-radius:var(--ep-radius-md);padding:var(--ep-space-3);margin-top:var(--ep-space-4)}:host([data-theme=\"dark\"]) .ep-trial-info{background-color:rgba(16,185,129,0.1);border-color:rgba(16,185,129,0.3)}.ep-trial-info .ep-text-sm{color:var(--ep-success-700);margin:0;font-weight:var(--ep-font-weight-medium)}:host([data-theme=\"dark\"]) .ep-trial-info .ep-text-sm{color:var(--ep-success-400)}.ep-modal-actions{display:flex;flex-direction:column;gap:var(--ep-space-3);margin-bottom:var(--ep-space-6)}.ep-modal-footer{text-align:center;padding-top:var(--ep-space-6);border-top:1px solid var(--ep-border-primary)}.ep-modal-footer .ep-text-sm{margin:0}.ep-theme-toggle{position:fixed;top:var(--ep-space-4);left:var(--ep-space-4);z-index:var(--ep-z-tooltip)}@keyframes ep-modal-backdrop-in{from{opacity:0}to{opacity:1}}@keyframes ep-modal-backdrop-out{from{opacity:1}to{opacity:0}}@keyframes ep-modal-container-in{from{opacity:0;transform:scale(0.95) translateY(-10px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes ep-modal-container-out{from{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(0.95) translateY(-10px)}}@media (max-width:640px){.ep-modal-backdrop{padding:var(--ep-space-2)}.ep-modal-container{max-width:100%;border-radius:var(--ep-radius-lg)}.ep-modal-content{padding:var(--ep-space-6);padding-top:var(--ep-space-10)}.ep-modal-icon{width:60px;height:60px}.ep-modal-header .ep-heading-2{font-size:var(--ep-font-size-xl)}.ep-pricing-amount{font-size:var(--ep-font-size-3xl)}}@media (max-width:480px){.ep-modal-content{padding:var(--ep-space-4);padding-top:var(--ep-space-8)}.ep-modal-close{top:var(--ep-space-3);right:var(--ep-space-3)}}@media (prefers-contrast:high){.ep-modal-backdrop{background-color:rgba(0,0,0,0.9);backdrop-filter:none}.ep-modal-container{border:2px solid var(--ep-border-secondary)}.ep-pricing-card{background:var(--ep-bg-secondary);border:2px solid var(--ep-primary-500)}}@media (prefers-reduced-motion:reduce){.ep-modal-backdrop{animation:none}.ep-modal-container{animation:none}.ep-modal-backdrop.ep-modal-closing{animation:none}.ep-modal-backdrop.ep-modal-closing .ep-modal-container{animation:none}}";
|
|
2095
3140
|
|
|
2096
|
-
const html = "<div class=\"ep-sidebar-backdrop\" id=\"sidebarBackdrop\"></div><div class=\"ep-sidebar-paywall\" id=\"sidebarPaywall\" role=\"dialog\" aria-labelledby=\"sidebar-title\" aria-describedby=\"sidebar-description\"><div class=\"ep-sidebar-header\"><button class=\"ep-sidebar-close\" aria-label=\"Close paywall\" data-ep-action=\"closeSidebar\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg></button><div class=\"ep-sidebar-logo\"><svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2L2 7l10 5 10-5-10-5z\"></path><path d=\"M2 17l10 5 10-5\"></path><path d=\"M2 12l10 5 10-5\"></path></svg><span class=\"ep-sidebar-logo-text\">{{brandName}}</span></div></div><div class=\"ep-sidebar-content\"><div class=\"ep-sidebar-title-section\"><h2 class=\"ep-heading-2\" id=\"sidebar-title\">{{title}}</h2><p class=\"ep-text-body\" id=\"sidebar-description\">{{description}}</p></div><div class=\"ep-sidebar-progress\"><div class=\"ep-progress-header\"><span class=\"ep-progress-label\">{{progressLabel}}</span><span class=\"ep-progress-value\">{{usageCount}}/{{usageLimit}}</span></div><div class=\"ep-progress-bar\"><div class=\"ep-progress-fill\" style=\"width: {{progressPercentage}}%\"></div></div><p class=\"ep-progress-text\">{{progressText}}</p></div><div class=\"ep-sidebar-features\"><h3 class=\"ep-heading-3\">
|
|
2097
|
-
const css = ".ep-sidebar-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.5);backdrop-filter:blur(2px);z-index:var(--ep-z-backdrop);opacity:0;visibility:hidden;transition:all var(--ep-transition-normal)}.ep-sidebar-backdrop.ep-sidebar-backdrop-visible{opacity:1;visibility:visible}.ep-sidebar-paywall{position:fixed;top:0;right:0;bottom:0;width:400px;max-width:90vw;background-color:var(--ep-bg-secondary);border-left:1px solid var(--ep-border-primary);box-shadow:var(--ep-shadow-xl);z-index:var(--ep-z-modal);display:flex;flex-direction:column;transform:translateX(100%);transition:transform var(--ep-transition-normal)}.ep-sidebar-paywall.ep-sidebar-visible{transform:translateX(0)}.ep-sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:var(--ep-space-4) var(--ep-space-6);border-bottom:1px solid var(--ep-border-primary);background:linear-gradient(135deg,var(--ep-primary-50),var(--ep-primary-100))}:host([data-theme=\"dark\"]) .ep-sidebar-header{background:linear-gradient(135deg,var(--ep-primary-900),var(--ep-primary-800))}.ep-sidebar-close{background:none;border:none;color:var(--ep-text-tertiary);cursor:pointer;padding:var(--ep-space-2);border-radius:var(--ep-radius-md);transition:all var(--ep-transition-fast)}.ep-sidebar-close:hover{color:var(--ep-text-primary);background-color:var(--ep-bg-tertiary)}.ep-sidebar-logo{display:flex;align-items:center;gap:var(--ep-space-2);color:var(--ep-primary-600)}.ep-sidebar-logo-text{font-size:var(--ep-font-size-lg);font-weight:var(--ep-font-weight-semibold);color:var(--ep-text-primary)}.ep-sidebar-content{flex:1;padding:var(--ep-space-6);overflow-y:auto;display:flex;flex-direction:column;gap:var(--ep-space-6)}.ep-sidebar-title-section{text-align:center}.ep-sidebar-title-section .ep-heading-2{margin-bottom:var(--ep-space-3);color:var(--ep-text-primary)}.ep-sidebar-title-section .ep-text-body{margin-bottom:0;color:var(--ep-text-secondary)}.ep-sidebar-progress{background-color:var(--ep-bg-tertiary);border:1px solid var(--ep-border-primary);border-radius:var(--ep-radius-md);padding:var(--ep-space-4)}.ep-progress-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--ep-space-3)}.ep-progress-label{font-size:var(--ep-font-size-sm);font-weight:var(--ep-font-weight-medium);color:var(--ep-text-primary)}.ep-progress-value{font-size:var(--ep-font-size-sm);font-weight:var(--ep-font-weight-semibold);color:var(--ep-primary-600)}.ep-progress-bar{height:8px;background-color:var(--ep-bg-primary);border-radius:var(--ep-radius-full);overflow:hidden;margin-bottom:var(--ep-space-2)}.ep-progress-fill{height:100%;background:linear-gradient(90deg,var(--ep-primary-500),var(--ep-primary-600));border-radius:var(--ep-radius-full);transition:width var(--ep-transition-normal)}.ep-progress-text{font-size:var(--ep-font-size-xs);color:var(--ep-text-tertiary);margin:0}.ep-sidebar-features .ep-heading-3{margin-bottom:var(--ep-space-4);text-align:center}.ep-feature-list{display:flex;flex-direction:column;gap:var(--ep-space-4)}.ep-feature-item{display:flex;align-items:flex-start;gap:var(--ep-space-3);padding:var(--ep-space-3);background-color:var(--ep-bg-tertiary);border:1px solid var(--ep-border-primary);border-radius:var(--ep-radius-md);opacity:0;transform:translateX(20px);transition:all var(--ep-transition-normal)}.ep-feature-item.ep-feature-item-visible{opacity:1;transform:translateX(0)}.ep-feature-icon{width:40px;height:40px;background:linear-gradient(135deg,var(--ep-primary-500),var(--ep-primary-600));border-radius:var(--ep-radius-lg);display:flex;align-items:center;justify-content:center;color:white;flex-shrink:0}.ep-feature-content{flex:1;min-width:0}.ep-feature-title{font-size:var(--ep-font-size-base);font-weight:var(--ep-font-weight-semibold);color:var(--ep-text-primary);margin-bottom:var(--ep-space-1)}.ep-feature-description{font-size:var(--ep-font-size-sm);color:var(--ep-text-secondary);line-height:var(--ep-line-height-relaxed);margin:0}.ep-sidebar-pricing{background:linear-gradient(135deg,var(--ep-primary-50),var(--ep-primary-100));border:1px solid var(--ep-primary-200);border-radius:var(--ep-radius-lg);padding:var(--ep-space-4)}:host([data-theme=\"dark\"]) .ep-sidebar-pricing{background:linear-gradient(135deg,var(--ep-primary-900),var(--ep-primary-800));border-color:var(--ep-primary-700)}.ep-pricing-card{text-align:center}.ep-pricing-header{margin-bottom:var(--ep-space-4)}.ep-pricing-badge{background:linear-gradient(135deg,var(--ep-primary-500),var(--ep-primary-600));color:white;padding:var(--ep-space-1) var(--ep-space-3);border-radius:var(--ep-radius-full);font-size:var(--ep-font-size-xs);font-weight:var(--ep-font-weight-medium);display:inline-block;margin-bottom:var(--ep-space-3)}.ep-pricing-price{display:flex;align-items:baseline;justify-content:center;gap:var(--ep-space-1);margin-bottom:var(--ep-space-2)}.ep-pricing-currency{font-size:var(--ep-font-size-base);font-weight:var(--ep-font-weight-medium);color:var(--ep-text-secondary)}.ep-pricing-amount{font-size:var(--ep-font-size-2xl);font-weight:var(--ep-font-weight-bold);color:var(--ep-text-primary)}.ep-pricing-period{font-size:var(--ep-font-size-base);color:var(--ep-text-secondary)}.ep-pricing-description{font-size:var(--ep-font-size-sm);color:var(--ep-text-secondary);margin:0}.ep-sidebar-trial{background-color:var(--ep-success-50);border:1px solid var(--ep-success-200);border-radius:var(--ep-radius-md);padding:var(--ep-space-4)}:host([data-theme=\"dark\"]) .ep-sidebar-trial{background-color:rgba(16,185,129,0.1);border-color:rgba(16,185,129,0.3)}.ep-trial-info{display:flex;align-items:flex-start;gap:var(--ep-space-3)}.ep-trial-icon{width:32px;height:32px;background:linear-gradient(135deg,var(--ep-success-500),var(--ep-success-600));border-radius:var(--ep-radius-lg);display:flex;align-items:center;justify-content:center;color:white;flex-shrink:0}.ep-trial-content{flex:1;min-width:0}.ep-trial-title{font-size:var(--ep-font-size-base);font-weight:var(--ep-font-weight-semibold);color:var(--ep-success-700);margin-bottom:var(--ep-space-1)}:host([data-theme=\"dark\"]) .ep-trial-title{color:var(--ep-success-400)}.ep-trial-description{font-size:var(--ep-font-size-sm);color:var(--ep-success-600);line-height:var(--ep-line-height-relaxed);margin:0}:host([data-theme=\"dark\"]) .ep-trial-description{color:var(--ep-success-300)}.ep-sidebar-footer{padding:var(--ep-space-6);border-top:1px solid var(--ep-border-primary);background-color:var(--ep-bg-tertiary);display:flex;flex-direction:column;gap:var(--ep-space-3)}.ep-theme-toggle{position:fixed;top:var(--ep-space-4);left:var(--ep-space-4);z-index:var(--ep-z-tooltip);display:flex;flex-direction:column;gap:var(--ep-space-2)}@media (max-width:768px){.ep-sidebar-paywall{width:100%;max-width:100%;border-left:none}.ep-sidebar-content{padding:var(--ep-space-4)}.ep-sidebar-footer{padding:var(--ep-space-4)}}@media (max-width:480px){.ep-sidebar-header{padding:var(--ep-space-3) var(--ep-space-4)}.ep-sidebar-content{padding:var(--ep-space-3);gap:var(--ep-space-4)}.ep-sidebar-footer{padding:var(--ep-space-3)}.ep-feature-item{padding:var(--ep-space-2)}.ep-feature-icon{width:32px;height:32px}.ep-pricing-amount{font-size:var(--ep-font-size-xl)}}@media (prefers-contrast:high){.ep-sidebar-paywall{border-left:2px solid var(--ep-border-secondary)}.ep-feature-item{border:2px solid var(--ep-border-secondary)}.ep-sidebar-pricing{border:2px solid var(--ep-primary-500)}.ep-sidebar-trial{border:2px solid var(--ep-success-500)}}@media (prefers-reduced-motion:reduce){.ep-sidebar-backdrop{transition:none}.ep-sidebar-paywall{transition:none}.ep-feature-item{transition:none;opacity:1;transform:none}.ep-progress-fill{transition:none}}";
|
|
3141
|
+
const html = "<div class=\"ep-sidebar-backdrop\" id=\"sidebarBackdrop\"></div><div class=\"ep-sidebar-paywall\" id=\"sidebarPaywall\" role=\"dialog\" aria-labelledby=\"sidebar-title\" aria-describedby=\"sidebar-description\"><div class=\"ep-sidebar-header\"><button class=\"ep-sidebar-close\" aria-label=\"Close paywall\" data-ep-action=\"closeSidebar\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg></button><div class=\"ep-sidebar-logo\"><svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2L2 7l10 5 10-5-10-5z\"></path><path d=\"M2 17l10 5 10-5\"></path><path d=\"M2 12l10 5 10-5\"></path></svg><span class=\"ep-sidebar-logo-text\">{{brandName}}</span></div></div><div class=\"ep-sidebar-content\"><div class=\"ep-sidebar-title-section\"><h2 class=\"ep-heading-2\" id=\"sidebar-title\">{{title}}</h2><p class=\"ep-text-body\" id=\"sidebar-description\">{{description}}</p></div><div class=\"ep-sidebar-progress\"><div class=\"ep-progress-header\"><span class=\"ep-progress-label\">{{progressLabel}}</span><span class=\"ep-progress-value\">{{usageCount}}/{{usageLimit}}</span></div><div class=\"ep-progress-bar\"><div class=\"ep-progress-fill\" style=\"width: {{progressPercentage}}%\"></div></div><p class=\"ep-progress-text\">{{progressText}}</p></div><div class=\"ep-sidebar-features\"><h3 class=\"ep-heading-3\">{{unlockHeading}}</h3><div class=\"ep-feature-list\"><div class=\"ep-feature-item\"><div class=\"ep-feature-icon\"><svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2L2 7l10 5 10-5-10-5z\"></path><path d=\"M2 17l10 5 10-5\"></path><path d=\"M2 12l10 5 10-5\"></path></svg></div><div class=\"ep-feature-content\"><h4 class=\"ep-feature-title\">{{feature1Title}}</h4><p class=\"ep-feature-description\">{{feature1Description}}</p></div></div><div class=\"ep-feature-item\"><div class=\"ep-feature-icon\"><svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 12h-4l-3 9L9 3l-3 9H2\"></path></svg></div><div class=\"ep-feature-content\"><h4 class=\"ep-feature-title\">{{feature2Title}}</h4><p class=\"ep-feature-description\">{{feature2Description}}</p></div></div><div class=\"ep-feature-item\"><div class=\"ep-feature-icon\"><svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"></path></svg></div><div class=\"ep-feature-content\"><h4 class=\"ep-feature-title\">{{feature3Title}}</h4><p class=\"ep-feature-description\">{{feature3Description}}</p></div></div></div></div><div class=\"ep-sidebar-pricing\"><div class=\"ep-pricing-card\"><div class=\"ep-pricing-header\"><div class=\"ep-pricing-badge\">{{pricingBadge}}</div><div class=\"ep-pricing-price\"><span class=\"ep-pricing-currency\">{{currency}}</span><span class=\"ep-pricing-amount\">{{price}}</span><span class=\"ep-pricing-period\">{{period}}</span></div><p class=\"ep-pricing-description\">{{pricingDescription}}</p></div></div></div><div class=\"ep-sidebar-trial\"><div class=\"ep-trial-info\"><div class=\"ep-trial-icon\"><svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"></path><polyline points=\"22,4 12,14.01 9,11.01\"></polyline></svg></div><div class=\"ep-trial-content\"><h4 class=\"ep-trial-title\">{{trialTitle}}</h4><p class=\"ep-trial-description\">{{trialDescription}}</p></div></div></div></div><div class=\"ep-sidebar-footer\"><button class=\"ep-btn ep-btn-primary ep-btn-lg ep-btn-full\" data-ep-action=\"startUpgrade\"> {{upgradeButtonText}} </button><button class=\"ep-btn ep-btn-secondary ep-btn-full\" data-ep-action=\"startTrial\"> {{trialButtonText}} </button><button class=\"ep-btn ep-btn-ghost ep-btn-sm\" data-ep-action=\"remindLater\"> {{remindLaterText}} </button></div></div>";
|
|
3142
|
+
const css = ".ep-sidebar-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.5);backdrop-filter:blur(2px);z-index:var(--ep-z-backdrop);opacity:0;visibility:hidden;transition:all var(--ep-transition-normal)}.ep-sidebar-backdrop.ep-sidebar-backdrop-visible{opacity:1;visibility:visible}.ep-sidebar-paywall{position:fixed;top:0;right:0;bottom:0;width:400px;max-width:90vw;background-color:var(--ep-bg-secondary);border-left:1px solid var(--ep-border-primary);box-shadow:var(--ep-shadow-xl);z-index:var(--ep-z-modal);display:flex;flex-direction:column;transform:translateX(100%);transition:transform var(--ep-transition-normal)}.ep-sidebar-paywall.ep-sidebar-visible{transform:translateX(0)}.ep-sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:var(--ep-space-4) var(--ep-space-6);border-bottom:1px solid var(--ep-border-primary);background:linear-gradient(135deg,var(--ep-primary-50),var(--ep-primary-100))}:host([data-theme=\"dark\"]) .ep-sidebar-header{background:linear-gradient(135deg,var(--ep-primary-900),var(--ep-primary-800))}.ep-sidebar-close{background:none;border:none;color:var(--ep-text-tertiary);cursor:pointer;padding:var(--ep-space-2);border-radius:var(--ep-radius-md);transition:all var(--ep-transition-fast)}.ep-sidebar-close:hover{color:var(--ep-text-primary);background-color:var(--ep-bg-tertiary)}.ep-sidebar-logo{display:flex;align-items:center;gap:var(--ep-space-2);color:var(--ep-primary-600)}.ep-sidebar-logo-text{font-size:var(--ep-font-size-lg);font-weight:var(--ep-font-weight-semibold);color:var(--ep-text-primary)}.ep-sidebar-content{flex:1;padding:var(--ep-space-6);overflow-y:auto;display:flex;flex-direction:column;gap:var(--ep-space-6)}.ep-sidebar-title-section{text-align:center}.ep-sidebar-title-section .ep-heading-2{margin-bottom:var(--ep-space-3);color:var(--ep-text-primary)}.ep-sidebar-title-section .ep-text-body{margin-bottom:0;color:var(--ep-text-secondary)}.ep-sidebar-progress{background-color:var(--ep-bg-tertiary);border:1px solid var(--ep-border-primary);border-radius:var(--ep-radius-md);padding:var(--ep-space-4)}.ep-progress-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--ep-space-3)}.ep-progress-label{font-size:var(--ep-font-size-sm);font-weight:var(--ep-font-weight-medium);color:var(--ep-text-primary)}.ep-progress-value{font-size:var(--ep-font-size-sm);font-weight:var(--ep-font-weight-semibold);color:var(--ep-primary-600)}.ep-progress-bar{height:8px;background-color:var(--ep-bg-primary);border-radius:var(--ep-radius-full);overflow:hidden;margin-bottom:var(--ep-space-2)}.ep-progress-fill{height:100%;background:linear-gradient(90deg,var(--ep-primary-500),var(--ep-primary-600));border-radius:var(--ep-radius-full);transition:width var(--ep-transition-normal)}.ep-progress-text{font-size:var(--ep-font-size-xs);color:var(--ep-text-tertiary);margin:0}.ep-sidebar-features .ep-heading-3{margin-bottom:var(--ep-space-4);text-align:center}.ep-feature-list{display:flex;flex-direction:column;gap:var(--ep-space-4)}.ep-feature-item{display:flex;align-items:flex-start;gap:var(--ep-space-3);padding:var(--ep-space-3);background-color:var(--ep-bg-tertiary);border:1px solid var(--ep-border-primary);border-radius:var(--ep-radius-md);opacity:0;transform:translateX(20px);transition:all var(--ep-transition-normal)}.ep-feature-item.ep-feature-item-visible{opacity:1;transform:translateX(0)}.ep-feature-icon{width:40px;height:40px;background:linear-gradient(135deg,var(--ep-primary-500),var(--ep-primary-600));border-radius:var(--ep-radius-lg);display:flex;align-items:center;justify-content:center;color:white;flex-shrink:0}.ep-feature-content{flex:1;min-width:0}.ep-feature-title{font-size:var(--ep-font-size-base);font-weight:var(--ep-font-weight-semibold);color:var(--ep-text-primary);margin-bottom:var(--ep-space-1)}.ep-feature-description{font-size:var(--ep-font-size-sm);color:var(--ep-text-secondary);line-height:var(--ep-line-height-relaxed);margin:0}.ep-sidebar-pricing{background:linear-gradient(135deg,var(--ep-primary-50),var(--ep-primary-100));border:1px solid var(--ep-primary-200);border-radius:var(--ep-radius-lg);padding:var(--ep-space-4)}:host([data-theme=\"dark\"]) .ep-sidebar-pricing{background:linear-gradient(135deg,var(--ep-primary-900),var(--ep-primary-800));border-color:var(--ep-primary-700)}.ep-pricing-card{text-align:center}.ep-pricing-header{margin-bottom:var(--ep-space-4)}.ep-pricing-badge{background:linear-gradient(135deg,var(--ep-primary-500),var(--ep-primary-600));color:white;padding:var(--ep-space-1) var(--ep-space-3);border-radius:var(--ep-radius-full);font-size:var(--ep-font-size-xs);font-weight:var(--ep-font-weight-medium);display:inline-block;margin-bottom:var(--ep-space-3)}.ep-pricing-price{display:flex;align-items:baseline;justify-content:center;gap:var(--ep-space-1);margin-bottom:var(--ep-space-2)}.ep-pricing-currency{font-size:var(--ep-font-size-base);font-weight:var(--ep-font-weight-medium);color:var(--ep-text-secondary)}.ep-pricing-amount{font-size:var(--ep-font-size-2xl);font-weight:var(--ep-font-weight-bold);color:var(--ep-text-primary)}.ep-pricing-period{font-size:var(--ep-font-size-base);color:var(--ep-text-secondary)}.ep-pricing-description{font-size:var(--ep-font-size-sm);color:var(--ep-text-secondary);margin:0}.ep-pricing-header:last-child,.ep-pricing-price:last-child{margin-bottom:0}.ep-sidebar-trial{background-color:var(--ep-success-50);border:1px solid var(--ep-success-200);border-radius:var(--ep-radius-md);padding:var(--ep-space-4)}:host([data-theme=\"dark\"]) .ep-sidebar-trial{background-color:rgba(16,185,129,0.1);border-color:rgba(16,185,129,0.3)}.ep-trial-info{display:flex;align-items:flex-start;gap:var(--ep-space-3)}.ep-trial-icon{width:32px;height:32px;background:linear-gradient(135deg,var(--ep-success-500),var(--ep-success-600));border-radius:var(--ep-radius-lg);display:flex;align-items:center;justify-content:center;color:white;flex-shrink:0}.ep-trial-content{flex:1;min-width:0}.ep-trial-title{font-size:var(--ep-font-size-base);font-weight:var(--ep-font-weight-semibold);color:var(--ep-success-700);margin-bottom:var(--ep-space-1)}:host([data-theme=\"dark\"]) .ep-trial-title{color:var(--ep-success-400)}.ep-trial-description{font-size:var(--ep-font-size-sm);color:var(--ep-success-600);line-height:var(--ep-line-height-relaxed);margin:0}:host([data-theme=\"dark\"]) .ep-trial-description{color:var(--ep-success-300)}.ep-sidebar-footer{padding:var(--ep-space-6);border-top:1px solid var(--ep-border-primary);background-color:var(--ep-bg-tertiary);display:flex;flex-direction:column;gap:var(--ep-space-3)}.ep-theme-toggle{position:fixed;top:var(--ep-space-4);left:var(--ep-space-4);z-index:var(--ep-z-tooltip);display:flex;flex-direction:column;gap:var(--ep-space-2)}@media (max-width:768px){.ep-sidebar-paywall{width:100%;max-width:100%;border-left:none}.ep-sidebar-content{padding:var(--ep-space-4)}.ep-sidebar-footer{padding:var(--ep-space-4)}}@media (max-width:480px){.ep-sidebar-header{padding:var(--ep-space-3) var(--ep-space-4)}.ep-sidebar-content{padding:var(--ep-space-3);gap:var(--ep-space-4)}.ep-sidebar-footer{padding:var(--ep-space-3)}.ep-feature-item{padding:var(--ep-space-2)}.ep-feature-icon{width:32px;height:32px}.ep-pricing-amount{font-size:var(--ep-font-size-xl)}}@media (prefers-contrast:high){.ep-sidebar-paywall{border-left:2px solid var(--ep-border-secondary)}.ep-feature-item{border:2px solid var(--ep-border-secondary)}.ep-sidebar-pricing{border:2px solid var(--ep-primary-500)}.ep-sidebar-trial{border:2px solid var(--ep-success-500)}}@media (prefers-reduced-motion:reduce){.ep-sidebar-backdrop{transition:none}.ep-sidebar-paywall{transition:none}.ep-feature-item{transition:none;opacity:1;transform:none}.ep-progress-fill{transition:none}}";
|
|
2098
3143
|
|
|
2099
3144
|
/**
|
|
2100
3145
|
* The five templates from `@extenshi/paywall-templates`, inlined at build
|
|
@@ -2122,6 +3167,8 @@ const PAYWALL_MODES = Object.keys(PAYWALL_TEMPLATES);
|
|
|
2122
3167
|
*/
|
|
2123
3168
|
const PAYWALL_HOST_CLASS = 'extenshi-paywall-host';
|
|
2124
3169
|
const UPGRADE_ACTIONS = new Set(['upgradeNow', 'startUpgrade']);
|
|
3170
|
+
const UPGRADE_SELECTOR = '[data-ep-action="upgradeNow"], [data-ep-action="startUpgrade"]';
|
|
3171
|
+
const WITHDRAWAL_WAIVER_CLASS = 'extenshi-withdrawal-waiver';
|
|
2125
3172
|
const CLOSE_ACTIONS = new Set([
|
|
2126
3173
|
'closePaywall',
|
|
2127
3174
|
'closeSidebar',
|
|
@@ -2156,6 +3203,9 @@ const VISIBLE_CLASSES = {
|
|
|
2156
3203
|
};
|
|
2157
3204
|
/** Template blocks the contract has no data for (trials, usage meters). */
|
|
2158
3205
|
const PRUNE_SELECTOR = '[class*="-trial"], .ep-sidebar-progress';
|
|
3206
|
+
/** Glyphs that stand for the product: on a gradient tile, or next to the brand name. */
|
|
3207
|
+
const ICON_TILE_SELECTOR = '.ep-modal-icon, .ep-inline-icon, .ep-minimal-icon, .ep-hero-icon';
|
|
3208
|
+
const ICON_LOGO_SELECTOR = '.ep-fullscreen-logo, .ep-sidebar-logo';
|
|
2159
3209
|
/**
|
|
2160
3210
|
* Templates stagger their feature rows in with this class from their demo
|
|
2161
3211
|
* script (sidebar, fullscreen); without it the rows sit at opacity 0.
|
|
@@ -2163,8 +3213,11 @@ const PRUNE_SELECTOR = '[class*="-trial"], .ep-sidebar-progress';
|
|
|
2163
3213
|
const FEATURE_ITEM_VISIBLE = ['.ep-feature-item', 'ep-feature-item-visible'];
|
|
2164
3214
|
/** Containers of a single feature slot; dropped when the slot's placeholder is empty. */
|
|
2165
3215
|
const FEATURE_SLOT_SELECTOR = 'li, .ep-feature-card, .ep-feature-item, .ep-pricing-feature, .ep-feature';
|
|
3216
|
+
/** Feature sections and lists (with their headings); dropped once no slot is left in them. */
|
|
3217
|
+
const FEATURE_BLOCK_SELECTOR = '[class*="-features"]';
|
|
2166
3218
|
const EMPTY_SLOT_MARK = 'data-ep-empty';
|
|
2167
|
-
|
|
3219
|
+
/** Placeholders whose element is dropped when empty: feature slots and the price card's copy. */
|
|
3220
|
+
const OPTIONAL_KEY_RE = /^(feature\d+(Title)?|premiumFeature\d+|freeFeature\d+|pricingDescription|priceDescription|premiumDescription)$/;
|
|
2168
3221
|
function escapeHtml(value) {
|
|
2169
3222
|
return value
|
|
2170
3223
|
.replace(/&/g, '&')
|
|
@@ -2176,7 +3229,7 @@ function escapeHtml(value) {
|
|
|
2176
3229
|
function substitute(html, content) {
|
|
2177
3230
|
return html.replace(/\{\{(\w+)\}\}/g, (_match, key) => {
|
|
2178
3231
|
const value = content[key] ?? '';
|
|
2179
|
-
if (value === '' &&
|
|
3232
|
+
if (value === '' && OPTIONAL_KEY_RE.test(key))
|
|
2180
3233
|
return `<i ${EMPTY_SLOT_MARK}></i>`;
|
|
2181
3234
|
return escapeHtml(value);
|
|
2182
3235
|
});
|
|
@@ -2184,6 +3237,10 @@ function substitute(html, content) {
|
|
|
2184
3237
|
function buildContent(view, strings) {
|
|
2185
3238
|
const offer = view.offer;
|
|
2186
3239
|
const price = offer ? formatPrice(offer.amountMinor, offer.currency, view.locale) : null;
|
|
3240
|
+
// Without a `description` option the header already shows the offer's
|
|
3241
|
+
// description (ExtenshiPay.showPaywall); the price card must not repeat it.
|
|
3242
|
+
const offerDescription = offer?.description?.trim() ?? '';
|
|
3243
|
+
const priceCopy = offerDescription === view.description.trim() ? '' : offerDescription;
|
|
2187
3244
|
const content = {
|
|
2188
3245
|
title: view.title,
|
|
2189
3246
|
description: view.description,
|
|
@@ -2191,15 +3248,21 @@ function buildContent(view, strings) {
|
|
|
2191
3248
|
currency: price?.currency ?? '',
|
|
2192
3249
|
price: price?.amount ?? '',
|
|
2193
3250
|
period: offer ? periodLabel(offer, strings) : '',
|
|
2194
|
-
pricingDescription:
|
|
2195
|
-
priceDescription:
|
|
2196
|
-
premiumDescription:
|
|
3251
|
+
pricingDescription: priceCopy,
|
|
3252
|
+
priceDescription: priceCopy,
|
|
3253
|
+
premiumDescription: priceCopy,
|
|
2197
3254
|
upgradeButtonText: view.checkoutEnabled && offer ? strings.upgrade : strings.checkoutUnavailable,
|
|
2198
3255
|
cancelButtonText: strings.cancel,
|
|
2199
3256
|
dismissButtonText: strings.dismiss,
|
|
2200
3257
|
remindLaterText: strings.remindLater,
|
|
2201
3258
|
continueButtonText: strings.continueFree,
|
|
2202
3259
|
footerText: strings.footer,
|
|
3260
|
+
featuresHeading: strings.featuresHeading,
|
|
3261
|
+
plansHeading: strings.plansHeading,
|
|
3262
|
+
freePlanName: strings.freePlanName,
|
|
3263
|
+
premiumPlanName: strings.premiumPlanName,
|
|
3264
|
+
popularBadge: strings.popularBadge,
|
|
3265
|
+
unlockHeading: strings.unlockHeading,
|
|
2203
3266
|
};
|
|
2204
3267
|
view.features.forEach((feature, index) => {
|
|
2205
3268
|
const n = index + 1;
|
|
@@ -2212,13 +3275,37 @@ function buildContent(view, strings) {
|
|
|
2212
3275
|
});
|
|
2213
3276
|
return content;
|
|
2214
3277
|
}
|
|
3278
|
+
/** Who supplies the content: the seller's public name, else the project/brand name. */
|
|
3279
|
+
function waiverSellerName(view) {
|
|
3280
|
+
return view.seller?.displayName?.trim() || view.brandName.trim() || view.title;
|
|
3281
|
+
}
|
|
2215
3282
|
const CSS_VALUE_UNSAFE = /[;{}<>]/g;
|
|
3283
|
+
/**
|
|
3284
|
+
* The rest of the primary scale, as the share of `primaryColor` mixed with
|
|
3285
|
+
* white (tints) or black (shades). Price cards and links use these steps; left
|
|
3286
|
+
* at the defaults they stay sky blue next to a button in the author's colour.
|
|
3287
|
+
*/
|
|
3288
|
+
const PRIMARY_TINTS = [
|
|
3289
|
+
[50, 8],
|
|
3290
|
+
[100, 16],
|
|
3291
|
+
[200, 32],
|
|
3292
|
+
[300, 52],
|
|
3293
|
+
[400, 76],
|
|
3294
|
+
];
|
|
3295
|
+
const PRIMARY_SHADES = [
|
|
3296
|
+
[800, 72],
|
|
3297
|
+
[900, 52],
|
|
3298
|
+
];
|
|
2216
3299
|
function themeCss(theme) {
|
|
2217
3300
|
const declarations = [];
|
|
2218
3301
|
const safe = (value) => value.replace(CSS_VALUE_UNSAFE, '');
|
|
2219
3302
|
if (theme.primaryColor) {
|
|
2220
3303
|
const color = safe(theme.primaryColor);
|
|
2221
3304
|
declarations.push(`--ep-primary-500:${color}`, `--ep-primary-600:${color}`, `--ep-primary-700:${color}`);
|
|
3305
|
+
for (const [step, percent] of PRIMARY_TINTS)
|
|
3306
|
+
declarations.push(`--ep-primary-${step}:color-mix(in srgb,${color} ${percent}%,white)`);
|
|
3307
|
+
for (const [step, percent] of PRIMARY_SHADES)
|
|
3308
|
+
declarations.push(`--ep-primary-${step}:color-mix(in srgb,${color} ${percent}%,black)`);
|
|
2222
3309
|
}
|
|
2223
3310
|
if (theme.fontFamily)
|
|
2224
3311
|
declarations.push(`--ep-font-family-sans:${safe(theme.fontFamily)}`);
|
|
@@ -2258,25 +3345,42 @@ class PaywallRenderer {
|
|
|
2258
3345
|
const template = PAYWALL_TEMPLATES[view.mode];
|
|
2259
3346
|
if (!template)
|
|
2260
3347
|
throw new ExtenshiPayError(ERROR_CODES.INVALID_REQUEST, `Unknown paywall mode "${view.mode}"`);
|
|
2261
|
-
const
|
|
3348
|
+
const t = sdkStrings(view.locale);
|
|
3349
|
+
const strings = { ...stringsFor(view.locale), ...view.strings };
|
|
2262
3350
|
if (view.mock) {
|
|
2263
|
-
strings.upgrade =
|
|
2264
|
-
strings.footer =
|
|
3351
|
+
strings.upgrade = t.simulatePurchase;
|
|
3352
|
+
strings.footer = t.mockNotice;
|
|
2265
3353
|
}
|
|
2266
3354
|
const host = doc.createElement('div');
|
|
2267
3355
|
host.className = PAYWALL_HOST_CLASS;
|
|
2268
3356
|
host.setAttribute('data-theme', resolveThemeMode(view.theme));
|
|
3357
|
+
// The shadow tree inherits the host's language: screen readers and
|
|
3358
|
+
// hyphenation read the strings in the language they are written in.
|
|
3359
|
+
host.setAttribute('lang', sdkLocale(view.locale));
|
|
3360
|
+
host.setAttribute('dir', sdkDir(sdkLocale(view.locale)));
|
|
2269
3361
|
const root = typeof host.attachShadow === 'function' ? host.attachShadow({ mode: 'open' }) : host;
|
|
2270
3362
|
root.innerHTML =
|
|
2271
3363
|
`<style>${PAYWALL_SHARED_CSS}${template.css}${themeCss(view.theme)}</style>` +
|
|
2272
3364
|
substitute(template.html, buildContent(view, strings));
|
|
2273
3365
|
this.prune(root);
|
|
2274
|
-
|
|
3366
|
+
if (view.icon)
|
|
3367
|
+
this.placeIcon(root, doc, view.icon);
|
|
3368
|
+
const waiver = view.offer && view.checkoutEnabled && view.withdrawalWaiver
|
|
3369
|
+
? withdrawalWaiverText(view.withdrawalWaiver.version, view.locale, waiverSellerName(view))
|
|
3370
|
+
: null;
|
|
3371
|
+
const waiverBox = waiver ? doc.createElement('input') : null;
|
|
3372
|
+
// undefined: no waiver asked → onUpgrade(sku) exactly as before; null: not ticked yet.
|
|
3373
|
+
const consent = () => {
|
|
3374
|
+
if (!waiver)
|
|
3375
|
+
return undefined;
|
|
3376
|
+
return waiverBox?.checked ? { withdrawalWaiver: { version: waiver.version, accepted: true } } : null;
|
|
3377
|
+
};
|
|
3378
|
+
this.bind(root, view, doc, consent);
|
|
2275
3379
|
const sellerMount = root.querySelector('[class*="-footer"], .ep-minimal-actions, .ep-inline-content, .ep-fullscreen-content');
|
|
2276
3380
|
if (sellerMount) {
|
|
2277
|
-
const details = sellerDetails(view.seller ?? null);
|
|
3381
|
+
const details = sellerDetails(view.seller ?? null, t);
|
|
2278
3382
|
details.style.cssText =
|
|
2279
|
-
'font-size:12px;line-height:1.5;margin-top:12px;text-align:
|
|
3383
|
+
'font-size:12px;line-height:1.5;margin-top:12px;text-align:start;white-space:normal;color:var(--ep-text-secondary)';
|
|
2280
3384
|
// In the modal, disclose the provider before the purchase action,
|
|
2281
3385
|
// instead of below it in the scrollable footer.
|
|
2282
3386
|
const modalActions = root.querySelector('.ep-modal-actions');
|
|
@@ -2286,15 +3390,17 @@ class PaywallRenderer {
|
|
|
2286
3390
|
sellerMount.append(details);
|
|
2287
3391
|
}
|
|
2288
3392
|
if (view.mock) {
|
|
2289
|
-
const upgrade = root.querySelector(
|
|
3393
|
+
const upgrade = root.querySelector(UPGRADE_SELECTOR);
|
|
2290
3394
|
if (upgrade) {
|
|
2291
3395
|
const notice = doc.createElement('p');
|
|
2292
3396
|
notice.className = 'extenshi-payment-preview';
|
|
2293
|
-
notice.textContent =
|
|
3397
|
+
notice.textContent = t.mockNotice;
|
|
2294
3398
|
notice.style.cssText = 'font-size:13px;line-height:1.5;margin:12px 0;white-space:normal';
|
|
2295
3399
|
upgrade.before(notice);
|
|
2296
3400
|
}
|
|
2297
3401
|
}
|
|
3402
|
+
if (waiver && waiverBox)
|
|
3403
|
+
this.mountWaiver(root, doc, waiver.text, waiverBox);
|
|
2298
3404
|
if (view.recoveryEnabled && this.callbacks.onRestore) {
|
|
2299
3405
|
const footer = root.querySelector('[class*="-footer"], .ep-minimal-actions, .ep-inline-content, .ep-fullscreen-content');
|
|
2300
3406
|
if (footer) {
|
|
@@ -2330,6 +3436,12 @@ class PaywallRenderer {
|
|
|
2330
3436
|
const slot = mark.parentElement?.closest(FEATURE_SLOT_SELECTOR) ?? mark.parentElement;
|
|
2331
3437
|
(slot ?? mark).remove();
|
|
2332
3438
|
}
|
|
3439
|
+
// Every slot empty (no `features` passed): drop the section with its
|
|
3440
|
+
// heading, so no "Premium Features" title sits over nothing.
|
|
3441
|
+
for (const block of root.querySelectorAll(FEATURE_BLOCK_SELECTOR)) {
|
|
3442
|
+
if (!block.querySelector(FEATURE_SLOT_SELECTOR))
|
|
3443
|
+
block.remove();
|
|
3444
|
+
}
|
|
2333
3445
|
// A button whose label placeholder the contract does not fill (trial
|
|
2334
3446
|
// CTAs on sidebar/fullscreen) would render as an empty pill; icon-only
|
|
2335
3447
|
// buttons (close) keep their SVG and stay.
|
|
@@ -2338,7 +3450,70 @@ class PaywallRenderer {
|
|
|
2338
3450
|
button.remove();
|
|
2339
3451
|
}
|
|
2340
3452
|
}
|
|
2341
|
-
|
|
3453
|
+
/**
|
|
3454
|
+
* Swaps the templates' product glyphs for the extension's icon. A tile's
|
|
3455
|
+
* gradient only backs the white glyph, so it goes too; an image that fails
|
|
3456
|
+
* to load puts the glyph (and the gradient) back.
|
|
3457
|
+
*/
|
|
3458
|
+
placeIcon(root, doc, url) {
|
|
3459
|
+
for (const slot of root.querySelectorAll(`${ICON_TILE_SELECTOR}, ${ICON_LOGO_SELECTOR}`)) {
|
|
3460
|
+
const glyph = Array.from(slot.children).find((child) => child.localName === 'svg');
|
|
3461
|
+
if (!glyph)
|
|
3462
|
+
continue;
|
|
3463
|
+
const tile = slot.matches(ICON_TILE_SELECTOR);
|
|
3464
|
+
const size = Number(glyph.getAttribute('width')) || 32;
|
|
3465
|
+
const img = doc.createElement('img');
|
|
3466
|
+
img.alt = '';
|
|
3467
|
+
img.style.cssText = tile
|
|
3468
|
+
? 'width:100%;height:100%;object-fit:contain'
|
|
3469
|
+
: `width:${size}px;height:${size}px;object-fit:contain`;
|
|
3470
|
+
img.addEventListener('error', () => {
|
|
3471
|
+
img.replaceWith(glyph);
|
|
3472
|
+
if (tile)
|
|
3473
|
+
slot.style.removeProperty('background');
|
|
3474
|
+
});
|
|
3475
|
+
img.src = url;
|
|
3476
|
+
if (tile)
|
|
3477
|
+
slot.style.background = 'none';
|
|
3478
|
+
glyph.replaceWith(img);
|
|
3479
|
+
}
|
|
3480
|
+
}
|
|
3481
|
+
/**
|
|
3482
|
+
* Inserts the unticked waiver checkbox right before the first upgrade
|
|
3483
|
+
* button and keeps every upgrade button disabled until it is ticked.
|
|
3484
|
+
*/
|
|
3485
|
+
mountWaiver(root, doc, text, input) {
|
|
3486
|
+
const buttons = Array.from(root.querySelectorAll(UPGRADE_SELECTOR));
|
|
3487
|
+
const first = buttons[0];
|
|
3488
|
+
if (!first)
|
|
3489
|
+
return;
|
|
3490
|
+
const label = doc.createElement('label');
|
|
3491
|
+
label.className = WITHDRAWAL_WAIVER_CLASS;
|
|
3492
|
+
label.style.cssText =
|
|
3493
|
+
'display:flex;align-items:flex-start;gap:8px;margin:12px 0;font-size:13px;line-height:1.5;text-align:start;white-space:normal;color:inherit;cursor:pointer';
|
|
3494
|
+
input.type = 'checkbox';
|
|
3495
|
+
input.checked = false;
|
|
3496
|
+
input.style.cssText = 'flex:none;width:16px;height:16px;margin:2px 0 0;cursor:pointer';
|
|
3497
|
+
const span = doc.createElement('span');
|
|
3498
|
+
span.textContent = text;
|
|
3499
|
+
label.append(input, span);
|
|
3500
|
+
first.before(label);
|
|
3501
|
+
const sync = () => {
|
|
3502
|
+
for (const button of buttons) {
|
|
3503
|
+
if (input.checked) {
|
|
3504
|
+
button.removeAttribute('disabled');
|
|
3505
|
+
button.removeAttribute('aria-disabled');
|
|
3506
|
+
}
|
|
3507
|
+
else {
|
|
3508
|
+
button.setAttribute('disabled', '');
|
|
3509
|
+
button.setAttribute('aria-disabled', 'true');
|
|
3510
|
+
}
|
|
3511
|
+
}
|
|
3512
|
+
};
|
|
3513
|
+
input.addEventListener('change', sync);
|
|
3514
|
+
sync();
|
|
3515
|
+
}
|
|
3516
|
+
bind(root, view, doc, consent) {
|
|
2342
3517
|
for (const element of root.querySelectorAll('[data-ep-action]')) {
|
|
2343
3518
|
const action = element.getAttribute('data-ep-action') ?? '';
|
|
2344
3519
|
if (UPGRADE_ACTIONS.has(action)) {
|
|
@@ -2346,7 +3521,15 @@ class PaywallRenderer {
|
|
|
2346
3521
|
const sku = view.offer.sku;
|
|
2347
3522
|
element.addEventListener('click', (event) => {
|
|
2348
3523
|
event.preventDefault();
|
|
2349
|
-
|
|
3524
|
+
const given = consent();
|
|
3525
|
+
// Waiver shown but not ticked: a disabled button cannot be
|
|
3526
|
+
// clicked, but never start checkout without consent anyway.
|
|
3527
|
+
if (given === null)
|
|
3528
|
+
return;
|
|
3529
|
+
if (given)
|
|
3530
|
+
this.callbacks.onUpgrade(sku, given);
|
|
3531
|
+
else
|
|
3532
|
+
this.callbacks.onUpgrade(sku);
|
|
2350
3533
|
});
|
|
2351
3534
|
}
|
|
2352
3535
|
else {
|
|
@@ -2413,7 +3596,7 @@ class ExtenshiPay extends ExtenshiPayLite {
|
|
|
2413
3596
|
async openCustomerPortal(options = {}) {
|
|
2414
3597
|
return super.openCustomerPortal({
|
|
2415
3598
|
...options,
|
|
2416
|
-
selectAccount: options.selectAccount ?? ((accounts) => this.billingProfiles.show(accounts)),
|
|
3599
|
+
selectAccount: options.selectAccount ?? ((accounts) => this.billingProfiles.show(accounts, this.config.locale)),
|
|
2417
3600
|
});
|
|
2418
3601
|
}
|
|
2419
3602
|
destroy() {
|
|
@@ -2435,7 +3618,7 @@ class ExtenshiPay extends ExtenshiPayLite {
|
|
|
2435
3618
|
return this.getLicenseSummary({ force: true });
|
|
2436
3619
|
},
|
|
2437
3620
|
manage: () => this.openCustomerPortal(),
|
|
2438
|
-
});
|
|
3621
|
+
}, this.config.locale);
|
|
2439
3622
|
}
|
|
2440
3623
|
async getOffer(options = {}) {
|
|
2441
3624
|
await this.initialize();
|
|
@@ -2461,18 +3644,23 @@ class ExtenshiPay extends ExtenshiPayLite {
|
|
|
2461
3644
|
this.reportError(error);
|
|
2462
3645
|
}
|
|
2463
3646
|
const selected = pickOffer(offer, options.sku);
|
|
3647
|
+
const defaults = stringsFor(this.config.locale);
|
|
2464
3648
|
const view = {
|
|
2465
3649
|
mode: options.mode ?? 'modal',
|
|
2466
|
-
title: options.title ?? selected?.title ??
|
|
2467
|
-
description: options.description ?? selected?.description ??
|
|
2468
|
-
|
|
3650
|
+
title: options.title ?? selected?.title ?? defaults.title,
|
|
3651
|
+
description: options.description ?? selected?.description ?? defaults.description,
|
|
3652
|
+
// The offer's `features` are entitlement keys ('full'), not display
|
|
3653
|
+
// text: bullets come from the caller only, or the block is dropped.
|
|
3654
|
+
features: options.features ?? [],
|
|
2469
3655
|
freeFeatures: options.freeFeatures ?? [],
|
|
3656
|
+
icon: paywallIconUrl(options.icon),
|
|
2470
3657
|
brandName: offer?.projectName ?? '',
|
|
2471
3658
|
offer: selected,
|
|
2472
3659
|
checkoutEnabled: offer?.checkoutEnabled === true && selected !== null && offer.seller !== null,
|
|
2473
3660
|
mock: this.config.mock,
|
|
2474
3661
|
recoveryEnabled: offer?.recoveryEnabled === true,
|
|
2475
3662
|
seller: offer?.seller ?? null,
|
|
3663
|
+
withdrawalWaiver: offer?.withdrawalWaiver ?? null,
|
|
2476
3664
|
locale: this.config.locale,
|
|
2477
3665
|
theme: { ...this.config.theme, ...options.theme },
|
|
2478
3666
|
strings: options.strings ?? {},
|
|
@@ -2510,7 +3698,7 @@ class ExtenshiPay extends ExtenshiPayLite {
|
|
|
2510
3698
|
renderer() {
|
|
2511
3699
|
if (!this.paywall) {
|
|
2512
3700
|
this.paywall = new PaywallRenderer({
|
|
2513
|
-
onUpgrade: (sku) => void this.handleUpgrade(sku),
|
|
3701
|
+
onUpgrade: (sku, consent) => void this.handleUpgrade(sku, consent),
|
|
2514
3702
|
onClose: () => this.settlePaywall(false),
|
|
2515
3703
|
onRestore: () => void this.handleRestore(),
|
|
2516
3704
|
});
|
|
@@ -2529,10 +3717,13 @@ class ExtenshiPay extends ExtenshiPayLite {
|
|
|
2529
3717
|
/* Reported through the error event; leave the paywall open for retry. */
|
|
2530
3718
|
}
|
|
2531
3719
|
}
|
|
2532
|
-
async handleUpgrade(sku) {
|
|
2533
|
-
|
|
3720
|
+
async handleUpgrade(sku, consent) {
|
|
3721
|
+
if (consent)
|
|
3722
|
+
this.paywallSession?.options.onUpgrade?.(sku, consent);
|
|
3723
|
+
else
|
|
3724
|
+
this.paywallSession?.options.onUpgrade?.(sku);
|
|
2534
3725
|
try {
|
|
2535
|
-
const result = await this.openCheckout(sku);
|
|
3726
|
+
const result = await this.openCheckout(sku, consent?.withdrawalWaiver ? { withdrawalWaiver: consent.withdrawalWaiver } : {});
|
|
2536
3727
|
if (result.state === 'complete') {
|
|
2537
3728
|
this.paywall?.hide();
|
|
2538
3729
|
this.settlePaywall(true);
|
|
@@ -2555,5 +3746,5 @@ class ExtenshiPay extends ExtenshiPayLite {
|
|
|
2555
3746
|
|
|
2556
3747
|
// Full SDK entry point: core + paywall UI.
|
|
2557
3748
|
|
|
2558
|
-
export { CHECKOUT_POLL_INTERVAL_MS, CHECKOUT_TIMEOUT_MS, CheckoutManager, DEFAULT_API_URL, DEFAULT_CACHE_TTL_MS, DEFAULT_STRINGS, EMPTY_ENTITLEMENT, END_USER_REF_STORAGE_KEY, ERROR_CODES, EntitlementManager, EventEmitter, ExtenshiPay, ExtenshiPayError, ExtenshiPayLite, ExtensionStorage, HttpTransport, LOCALE_RE, LocalStorageAdapter, Logger, MAX_CACHE_TTL_MS, MAX_REFRESH_BACKOFF_MS, MIN_REFRESH_INTERVAL_MS, MemoryStorage, MockTransport, PAYWALL_HOST_CLASS, PAYWALL_MODES, PAYWALL_SHARED_CSS, PAYWALL_TEMPLATES, PAY_CONTRACT_VERSION, PAY_CURRENCIES, PAY_END_USER_REF_RE, PAY_ENTITLEMENT_STATUSES, PAY_ERRORS, PAY_GATEWAYS, PAY_OFFER_INTERVALS, PAY_OFFER_KINDS, PAY_PUBLISHABLE_KEY_HEX_LENGTH, PAY_PUBLISHABLE_KEY_PREFIX, PAY_SKU_RE, PayApi, PaywallRenderer, RecoveryManager, TRPC_PATH, VERSION, applyLocalExpiry, base64ToBytes, buildContent, canonicalJson, checkFeatures, collectFeatures, createRecoveryStorage, createStorage, ExtenshiPay as default, escapeHtml, formatPrice, getOrCreateEndUserRef, hasFeature, isEntitled, isLive, isPayPublishableKey, logger, mintEndUserRef, openInNewTab, periodLabel, resolveConfig, resolveThemeMode, substitute, themeCss, trpcErrorToPayError, verifyEntitlementSignature };
|
|
3749
|
+
export { CHECKOUT_POLL_INTERVAL_MS, CHECKOUT_TIMEOUT_MS, CheckoutManager, DEFAULT_API_URL, DEFAULT_CACHE_TTL_MS, DEFAULT_STRINGS, EMPTY_ENTITLEMENT, END_USER_REF_STORAGE_KEY, ERROR_CODES, EntitlementManager, EventEmitter, ExtenshiPay, ExtenshiPayError, ExtenshiPayLite, ExtensionStorage, HttpTransport, LOCALE_RE, LocalStorageAdapter, Logger, MAX_CACHE_TTL_MS, MAX_REFRESH_BACKOFF_MS, MIN_REFRESH_INTERVAL_MS, MemoryStorage, MockTransport, PAYWALL_HOST_CLASS, PAYWALL_MODES, PAYWALL_SHARED_CSS, PAYWALL_TEMPLATES, PAY_CONTRACT_VERSION, PAY_CURRENCIES, PAY_END_USER_REF_RE, PAY_ENTITLEMENT_STATUSES, PAY_ERRORS, PAY_GATEWAYS, PAY_OFFER_INTERVALS, PAY_OFFER_KINDS, PAY_PUBLISHABLE_KEY_HEX_LENGTH, PAY_PUBLISHABLE_KEY_PREFIX, PAY_SKU_RE, PAY_WITHDRAWAL_WAIVER_VERSION, PayApi, PaywallRenderer, RecoveryManager, TRPC_PATH, VERSION, WITHDRAWAL_WAIVER_CLASS, WITHDRAWAL_WAIVER_TEXTS, applyLocalExpiry, base64ToBytes, buildContent, canonicalJson, checkFeatures, collectFeatures, createRecoveryStorage, createStorage, ExtenshiPay as default, escapeHtml, formatPrice, getOrCreateEndUserRef, hasFeature, isEntitled, isLive, isPayPublishableKey, logger, mintEndUserRef, openInNewTab, periodLabel, resolveConfig, resolveThemeMode, substitute, themeCss, trpcErrorToPayError, verifyEntitlementSignature, withdrawalWaiverText };
|
|
2559
3750
|
//# sourceMappingURL=extenshi-pay.mjs.map
|