Repository navigation
Expand file tree
/
Copy pathshop.js
More file actions
736 lines (680 loc) · 24.3 KB
/
Copy pathshop.js
File metadata and controls
736 lines (680 loc) · 24.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
/* ============================================================
FerNode shop — catalog, cart and checkout helpers
Vanilla JavaScript, no dependencies. Loaded after config.js.
============================================================ */
'use strict';
(function () {
var API = (window.FERNODE_PAYMENTS_API || '').replace(/\/+$/, '');
var CART_KEY = 'fernnode-cart-v1';
/* Pages inside /guides/ need ../ to reach shop files and artwork. The
custom 404 is served at any depth, so its generated links stay at root. */
var BASE = document.body && document.body.classList.contains('error-page')
? '/'
: /\/guides\//.test(window.location.pathname) ? '../' : '';
/* ---------------------------------------------------------- catalog
One entry per product. Licence prices come from the payments API at
runtime; `falls back to` is only the price already published on
pro.html, never an invented one. */
var CATALOG = [
{
slug: 'server-tool-pro-lifetime',
type: 'licence',
plan: 'pro_lifetime',
name: 'Server Tool Pro — Lifetime',
kind: 'One-time licence',
badge: 'ONE-TIME',
icon: 'i-shield',
accent: 'violet',
art: 'assets/shop/pro.webp?v=2.0.0',
fallbackSatang: 28900,
summary:
'Every Pro feature unlocked, unlimited servers, offline activation. Pay once and keep using the licence.',
highlights: [
'Unlimited server profiles and worlds',
'Purpur, Fabric and Bedrock support',
'Console commands, file editor and player tools',
'One-click Fabric mod installs',
'Scheduled backups, Discord alerts and auto-restart',
'Offline activation — the app never needs an account'
],
details: [
{
title: 'How delivery works',
body:
'After payment the shop issues a signed licence key immediately. Open the claim link, copy the key, then paste it into Server Tool → Settings → License. The key verifies offline, so the app keeps working without a network.'
},
{
title: 'What is included',
body:
'A perpetual licence for Server Tool Pro 1.x, including updates in that major version. It is one licence for the computers you own; sharing keys publicly is not allowed.'
},
{
title: 'Trial first',
body:
'The Pro build includes a 7-day trial. Install it, run a server, and only buy a key if the workflow fits you.'
}
],
notes: 'Windows 10/11 · offline activation · 1.x updates included'
},
{
slug: 'server-tool-pro-monthly',
type: 'licence',
plan: 'pro_monthly',
name: 'Server Tool Pro — Monthly',
kind: 'Subscription',
badge: 'PLANNED',
icon: 'i-clock',
accent: 'slate',
art: 'assets/gallery/mountain-lake.svg',
planned: true,
summary:
'Monthly access to every Pro feature, renewed by card. Not on sale yet: it switches on when a real recurring price exists.',
highlights: [
'Every Pro feature while the subscription is active',
'Cancel at the end of the billing period',
'Card payment and Customer Portal access',
'Switches on only when a recurring price is configured'
],
details: [
{
title: 'Why it is not on sale',
body:
'A monthly plan needs a real recurring price and stored card. Planning numbers shown on the Pro page are placeholders for tiers, not an offer. Credit cannot pay for a subscription because renewals need a card.'
}
],
notes: 'Planned · not on sale yet'
},
{
slug: 'plugin-ultratreefeller',
type: 'plugin',
name: 'UltraTreeFeller',
kind: 'Paper plugin',
badge: 'FREE',
version: 'v1.1.0',
icon: 'i-tree',
accent: 'green',
art: 'assets/gallery/cherry-grove.svg',
file: 'downloads/plugins/ultratreefeller-1.1.0.jar',
fileName: 'ultratreefeller-1.1.0.jar',
demo: 'assets/plugins/ultratreefeller.mp4',
tags: ['Paper', '1.21.x'],
summary:
'Fell entire trees with one SHIFT-activated swing, with a cooldown, progress display and protection for nearby trees.',
highlights: [
'SHIFT + hit fells the whole tree',
'Progress display and configurable cooldown',
'Protects nearby saplings and player builds',
'Drops behave like normal block breaks'
],
details: [
{
title: 'Install',
body:
'Drop the JAR into plugins/ and restart the server. Works on Paper 1.21.x. Full settings and permissions are in the plugin guide.'
}
],
notes: 'Free download · no account needed'
},
{
slug: 'plugin-ferkungstacker',
type: 'plugin',
name: 'FerKunG Stacker',
kind: 'Paper / Spigot plugin',
badge: 'FREE',
version: 'v1.3.0',
icon: 'i-layers',
accent: 'blue',
art: 'assets/gallery/village-night.svg',
file: 'downloads/plugins/ferkungstacker-1.3.0.jar',
fileName: 'ferkungstacker-1.3.0.jar',
demo: 'assets/plugins/ferkungstacker.mp4',
tags: ['Paper / Spigot', '1.20 - 1.21'],
summary:
'Group nearby drops into clean stacks with a visible count, while custom stacks fill every free inventory slot on pickup.',
highlights: [
'Nearby drops merge into readable stacks',
'Visible stack counts in the world',
'Custom stacks top up free inventory slots on pickup',
'Runs on Paper and Spigot 1.20 - 1.21'
],
details: [
{
title: 'Install',
body:
'Drop the JAR into plugins/ and restart. No dependencies. Stack limits and merge radius are configurable in config.yml.'
}
],
notes: 'Free download · no account needed'
},
{
slug: 'plugin-autorefill',
type: 'plugin',
name: 'AutoRefill',
kind: 'Paper plugin',
badge: 'FREE',
version: 'v1.1.0',
icon: 'i-refresh',
accent: 'amber',
art: 'assets/gallery/sunset-plains.svg',
file: 'downloads/plugins/autorefill-1.1.0.jar',
fileName: 'autorefill-1.1.0.jar',
demo: 'assets/plugins/autorefill.mp4',
tags: ['Paper', '1.21.x', '6.9 KB'],
summary:
'Refill the item in your hand after use, block breaks and tool breakage — with ignored items respected for custom gear.',
highlights: [
'Refills the held item from the inventory',
'Works after block breaks and tool breakage',
'Ignore list keeps custom gear untouched',
'Lightweight: a single JAR, no dependencies'
],
details: [
{
title: 'Install',
body:
'Drop the JAR into plugins/ and restart. Works on Paper 1.21.x. Add items to the ignore list if another plugin manages them.'
}
],
notes: 'Free download · no account needed'
},
{
slug: 'plugin-bundle',
type: 'plugin',
name: 'FerNode Plugin Bundle',
kind: 'All three plugins',
badge: 'FREE',
version: 'v1.0.0',
icon: 'i-box',
accent: 'slate',
art: 'assets/gallery/castle-dusk.svg',
file: 'downloads/plugins/FerNode-Plugins-1.0.0.zip',
fileName: 'FerNode-Plugins-1.0.0.zip',
tags: ['3 JARs', 'Install notes'],
summary:
'UltraTreeFeller, FerKunG Stacker and AutoRefill in one ZIP with install notes, for a fresh Paper server.',
highlights: [
'All three plugins at their current versions',
'Install notes for Paper and Spigot',
'Same files as the individual downloads'
],
details: [
{
title: 'Install',
body:
'Unzip into plugins/, delete any older copies of the same JARs, then restart the server. Read the included notes for commands and permissions.'
}
],
notes: 'Free download · no account needed'
}
];
var bySlug = {};
CATALOG.forEach(function (item) {
bySlug[item.slug] = item;
});
/* ------------------------------------------------------------ helpers */
function formatMoney(satang, currency) {
var amount = (Number(satang) || 0) / 100;
var code = (currency || 'thb').toUpperCase();
try {
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: code,
currencyDisplay: 'narrowSymbol',
maximumFractionDigits: amount % 1 === 0 ? 0 : 2
}).format(amount);
} catch (error) {
return code + ' ' + amount.toFixed(2);
}
}
function apiEnabled() {
return Boolean(API);
}
function request(path, options) {
var config = options || {};
var headers = { accept: 'application/json' };
if (config.body) headers['content-type'] = 'application/json';
if (config.headers) Object.assign(headers, config.headers);
return fetch(API + path, {
method: config.method || 'GET',
credentials: 'include',
headers: headers,
body: config.body ? JSON.stringify(config.body) : undefined
}).then(function (response) {
return response
.json()
.catch(function () {
return {};
})
.then(function (body) {
if (!response.ok) {
var error = new Error(
(body && body.error && body.error.message) || 'Request failed (' + response.status + ')'
);
error.status = response.status;
error.code = body && body.error && body.error.code;
error.details = body && body.error && body.error.details;
throw error;
}
return body;
});
});
}
function idempotencyKey() {
if (window.crypto && typeof window.crypto.randomUUID === 'function') return window.crypto.randomUUID();
return 'shop-' + Date.now() + '-' + Math.random().toString(16).slice(2) + Math.random().toString(16).slice(2);
}
/* ----------------------------------------------------------- cart */
function readCart() {
try {
var parsed = JSON.parse(window.localStorage.getItem(CART_KEY) || '[]');
if (!Array.isArray(parsed)) return [];
return parsed.filter(function (slug) {
return typeof slug === 'string' && bySlug[slug] && bySlug[slug].type === 'licence';
});
} catch (error) {
return [];
}
}
function writeCart(slugs) {
try {
window.localStorage.setItem(CART_KEY, JSON.stringify(slugs));
} catch (error) {
/* storage can be disabled; the cart simply stays empty */
}
updateCartBadges();
}
function addToCart(slug) {
var item = bySlug[slug];
if (!item || item.type !== 'licence') return { ok: false, reason: 'NOT_IN_CART' };
var current = readCart();
if (current.indexOf(slug) !== -1) return { ok: true, already: true };
// One licence per order: a second licence would need its own payment.
writeCart([slug]);
return { ok: true, replaced: current.length > 0 };
}
function removeFromCart(slug) {
writeCart(
readCart().filter(function (entry) {
return entry !== slug;
})
);
}
function clearCart() {
writeCart([]);
}
function cartEntries() {
return readCart().map(function (slug) {
return bySlug[slug];
});
}
function cartTotalSatang(plans) {
var entries = cartEntries();
if (!entries.length) return 0;
var plan = plans && plans[entries[0].plan];
return plan && typeof plan.amountSatang === 'number' ? plan.amountSatang : entries[0].fallbackSatang;
}
function updateCartBadges() {
var count = readCart().length;
var badges = document.querySelectorAll('[data-cart-count]');
Array.prototype.forEach.call(badges, function (badge) {
badge.textContent = String(count);
badge.hidden = count === 0;
});
}
/* ----------------------------------------------------------- plans */
var planCache = null;
var sessionPromise = null;
function loadPlans() {
if (planCache) return Promise.resolve(planCache);
if (!apiEnabled()) {
planCache = { offline: true, plans: {} };
return Promise.resolve(planCache);
}
return request('/api/plans')
.then(function (data) {
var indexed = {};
(data.plans || []).forEach(function (plan) {
indexed[plan.code] = plan;
});
planCache = { offline: false, plans: indexed };
return planCache;
})
.catch(function () {
planCache = { offline: true, plans: {} };
return planCache;
});
}
/** Live price, availability and reason for one catalog item. */
function planState(item, store) {
if (item.type !== 'licence') {
return { priceSatang: 0, purchasable: true, creditPurchasable: false, cardReady: false, reason: null };
}
var plan = store.plans[item.plan];
if (item.planned) {
return {
priceSatang: plan && plan.amountSatang ? plan.amountSatang : null,
purchasable: false,
creditPurchasable: false,
cardReady: false,
reason: 'Planned — not on sale yet'
};
}
if (!plan) {
return {
priceSatang: item.fallbackSatang,
purchasable: false,
creditPurchasable: false,
cardReady: false,
reason: 'Checkout opens when the payment service is live'
};
}
return {
priceSatang: typeof plan.amountSatang === 'number' ? plan.amountSatang : item.fallbackSatang,
purchasable: Boolean(plan.purchasable),
creditPurchasable: Boolean(plan.creditPurchasable),
cardReady: Boolean(plan.purchasable),
reason:
plan.purchasable || plan.creditPurchasable
? null
: plan.unavailableReason || plan.creditUnavailableReason || null
};
}
function currentSession() {
if (!apiEnabled()) return Promise.resolve(null);
if (!sessionPromise) {
sessionPromise = request('/api/auth/me')
.then(function (data) {
return data.account || null;
})
.catch(function () {
return null;
});
}
return sessionPromise;
}
function buyWithCredit(slug) {
var item = bySlug[slug];
if (!item) return Promise.reject(new Error('Unknown product'));
if (!apiEnabled()) return Promise.reject(new Error('Checkout is not open yet'));
return request('/api/account/purchase', {
method: 'POST',
headers: { 'idempotency-key': idempotencyKey() },
body: { plan: item.plan }
});
}
function startCardCheckout(slug, email, name) {
var item = bySlug[slug];
if (!item) return Promise.reject(new Error('Unknown product'));
if (!apiEnabled()) return Promise.reject(new Error('Checkout is not open yet'));
return request('/api/checkout', {
method: 'POST',
headers: { 'idempotency-key': idempotencyKey() },
body: { plan: item.plan, email: email, name: name }
});
}
/* ------------------------------------------------------- rendering */
function icon(id, className) {
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.setAttribute('class', 'icon' + (className ? ' ' + className : ''));
svg.setAttribute('aria-hidden', 'true');
svg.setAttribute('focusable', 'false');
var use = document.createElementNS('http://www.w3.org/2000/svg', 'use');
use.setAttribute('href', '#' + id);
svg.appendChild(use);
return svg;
}
function el(tag, className, text) {
var node = document.createElement(tag);
if (className) node.className = className;
if (text !== undefined && text !== null) node.textContent = text;
return node;
}
function priceFor(item, state) {
var price = el('div', 'shop-price');
if (item.type === 'licence' && state.priceSatang) {
price.appendChild(el('strong', null, formatMoney(state.priceSatang)));
} else if (item.type === 'licence') {
price.appendChild(el('strong', 'shop-price-planned', item.planned ? 'Planned' : 'Not priced'));
} else {
price.appendChild(el('strong', 'shop-price-free', 'Free'));
}
return price;
}
function productCard(item, store) {
var state = planState(item, store);
var href = BASE + 'product.html?p=' + encodeURIComponent(item.slug);
var card = el('article', 'shop-card');
card.setAttribute('data-product', item.slug);
var media = el('a', 'shop-card-media');
media.href = href;
media.setAttribute('aria-label', item.name);
if (item.art) {
var art = document.createElement('img');
art.className = 'shop-card-art';
art.src = BASE + item.art;
art.alt = '';
art.width = 600;
art.height = 600;
art.loading = 'lazy';
art.decoding = 'async';
media.appendChild(art);
} else {
media.appendChild(icon(item.icon, 'shop-card-icon'));
}
if (item.badge) {
var badge = el(
'span',
'shop-badge badge-' +
(item.badge === 'FREE' ? 'free' : item.badge === 'PLANNED' ? 'planned' : 'launch'),
item.badge
);
media.appendChild(badge);
}
var quick = el('span', 'shop-card-quick');
quick.appendChild(icon(item.type === 'plugin' ? 'i-download' : 'i-arrow'));
media.appendChild(quick);
card.appendChild(media);
var body = el('div', 'shop-card-body');
var meta = el('div', 'shop-card-meta');
meta.appendChild(el('span', 'shop-card-kind', item.kind));
if (item.version) meta.appendChild(el('span', 'shop-card-version', item.version));
body.appendChild(meta);
var title = el('h3', 'shop-card-title');
var link = el('a', null, item.name);
link.href = href;
title.appendChild(link);
body.appendChild(title);
body.appendChild(el('p', 'shop-card-summary', item.summary));
var foot = el('div', 'shop-card-foot');
foot.appendChild(priceFor(item, state));
var action = el('a', 'shop-card-action');
action.href = item.type === 'licence' ? href : BASE + item.file;
action.appendChild(icon(item.type === 'plugin' ? 'i-download' : 'i-arrow'));
action.appendChild(el('span', null, item.type === 'licence' ? 'View' : 'Get'));
if (item.type === 'plugin') action.setAttribute('download', item.fileName);
foot.appendChild(action);
body.appendChild(foot);
card.appendChild(body);
return card;
}
/* ------------------------------------------------------------ search */
function priceLabel(item) {
if (item.type === 'plugin') return 'Free';
if (item.planned) return 'Planned';
var plan = planCache && planCache.plans && planCache.plans[item.plan];
var satang =
plan && typeof plan.amountSatang === 'number' ? plan.amountSatang : item.fallbackSatang;
return satang ? formatMoney(satang) : '—';
}
function initSearch() {
var triggers = document.querySelectorAll('[data-search-open]');
if (!triggers.length) return;
var dialog = document.createElement('dialog');
dialog.className = 'shop-search-dialog';
dialog.setAttribute('aria-label', 'Search the shop');
var form = el('form', 'shop-search-form');
form.method = 'dialog';
form.appendChild(icon('i-search'));
var input = document.createElement('input');
input.type = 'search';
input.placeholder = 'Search products, plugins, licences';
input.setAttribute('aria-label', 'Search products');
input.autocomplete = 'off';
form.appendChild(input);
var close = el('button', 'shop-search-close');
close.type = 'submit';
close.setAttribute('aria-label', 'Close search');
close.appendChild(icon('i-x'));
form.appendChild(close);
var results = el('div', 'shop-search-results');
results.id = 'shop-search-results';
var foot = el('p', 'shop-search-foot', 'Instant search · Ctrl K from any page');
dialog.appendChild(form);
dialog.appendChild(results);
dialog.appendChild(foot);
document.body.appendChild(dialog);
function renderResults() {
var query = input.value.trim().toLowerCase();
var items = CATALOG.filter(function (item) {
if (!query) return true;
var haystack = (
item.name +
' ' +
item.kind +
' ' +
item.summary +
' ' +
(item.tags || []).join(' ')
).toLowerCase();
return haystack.indexOf(query) !== -1;
}).slice(0, 7);
results.replaceChildren();
if (!items.length) {
results.appendChild(
el('p', 'shop-search-empty', 'No products match “' + input.value.trim() + '”.')
);
return;
}
items.forEach(function (item) {
var row = el('a', 'shop-search-result');
row.href = BASE + 'product.html?p=' + encodeURIComponent(item.slug);
var thumb = el('span', 'shop-search-thumb');
if (item.art) {
var image = document.createElement('img');
image.src = BASE + item.art;
image.alt = '';
image.width = 44;
image.height = 44;
image.loading = 'lazy';
thumb.appendChild(image);
} else {
thumb.appendChild(icon(item.icon));
}
var copy = el('span', 'shop-search-copy');
copy.appendChild(el('strong', null, item.name));
copy.appendChild(
el('small', null, item.kind + (item.version ? ' · ' + item.version : ''))
);
row.appendChild(thumb);
row.appendChild(copy);
row.appendChild(el('span', 'shop-search-price', priceLabel(item)));
row.addEventListener('click', function () {
dialog.close();
});
results.appendChild(row);
});
}
function openSearch() {
if (typeof dialog.showModal !== 'function') {
window.location.href = BASE + 'products.html#catalog';
return;
}
if (!dialog.open) dialog.showModal();
input.value = '';
renderResults();
window.setTimeout(function () {
input.focus();
}, 0);
}
Array.prototype.forEach.call(triggers, function (trigger) {
trigger.addEventListener('click', function (event) {
event.preventDefault();
openSearch();
});
});
input.addEventListener('input', renderResults);
document.addEventListener('keydown', function (event) {
if ((event.ctrlKey || event.metaKey) && String(event.key).toLowerCase() === 'k') {
event.preventDefault();
openSearch();
}
});
dialog.addEventListener('click', function (event) {
if (event.target !== dialog) return;
var rect = dialog.getBoundingClientRect();
if (
event.clientX < rect.left ||
event.clientX > rect.right ||
event.clientY < rect.top ||
event.clientY > rect.bottom
) {
dialog.close();
}
});
}
function initAuthLink() {
var links = document.querySelectorAll('[data-auth-link]');
if (!links.length || !apiEnabled()) return;
currentSession().then(function (account) {
if (!account) return;
Array.prototype.forEach.call(links, function (link) {
link.textContent = 'My account';
link.classList.add('is-signed-in');
});
});
}
function updateCartLink(link) {
if (!link) return;
var count = readCart().length;
link.setAttribute('aria-label', count ? 'Cart, ' + count + ' item' + (count === 1 ? '' : 's') : 'Cart');
var label = link.querySelector('[data-cart-label]');
if (label) {
label.textContent = count ? 'Cart (' + count + ')' : 'Cart';
return;
}
link.textContent = count ? 'Cart (' + count + ')' : 'Cart';
}
/* ------------------------------------------------------------ boot */
document.addEventListener('DOMContentLoaded', function () {
updateCartBadges();
Array.prototype.forEach.call(document.querySelectorAll('[data-cart-link]'), updateCartLink);
initSearch();
initAuthLink();
});
window.FerShop = {
API: API,
CATALOG: CATALOG,
bySlug: bySlug,
apiEnabled: apiEnabled,
formatMoney: formatMoney,
request: request,
idempotencyKey: idempotencyKey,
loadPlans: loadPlans,
planState: planState,
currentSession: currentSession,
buyWithCredit: buyWithCredit,
startCardCheckout: startCardCheckout,
addToCart: addToCart,
removeFromCart: removeFromCart,
clearCart: clearCart,
cartEntries: cartEntries,
cartTotalSatang: cartTotalSatang,
updateCartBadges: updateCartBadges,
updateCartLink: updateCartLink,
productCard: productCard,
initSearch: initSearch,
initAuthLink: initAuthLink,
icon: icon,
el: el
};
})();