iobroker.shoppingroute 0.3.1 → 0.3.2
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 +18 -0
- package/README_DE.md +19 -0
- package/admin/jsonConfig.json +89 -21
- package/build/lib/buffered-sort.js +1 -0
- package/build/lib/compatibility.js +1 -1
- package/build/lib/config-tools.js +1 -1
- package/build/lib/market-plan.js +1 -1
- package/build/lib/metrics.js +1 -1
- package/build/lib/model.js +1 -1
- package/build/lib/parser.js +1 -1
- package/build/lib/sorter.js +1 -1
- package/build/lib/statistics.js +1 -1
- package/build/main.js +1 -1
- package/io-package.json +14 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,6 +39,24 @@ See `README_DE.md` for the detailed German documentation.
|
|
|
39
39
|
|
|
40
40
|
## Changelog
|
|
41
41
|
|
|
42
|
+
### 0.3.2 (2026-08-11)
|
|
43
|
+
|
|
44
|
+
- List stability guard: after every Alexa2 list change, ShoppingRoute waits for at least 30 seconds with no further list change before sorting writes start. If a new active ID appears during a buffered sort, the confirmed sort path is rolled back while the new ID itself remains untouched. The `updatedDateTime` visible-order finalizer also aborts immediately on new IDs and replans only after another quiet window.
|
|
45
|
+
|
|
46
|
+
- Alexa visible order is now finalized from `updatedDateTime` after the buffered content permutation. Only the minimum necessary items are touched again with their unchanged text; normal shopping items are still neither deleted nor recreated. This keeps the anti-duplication buffer protection while restoring the ShoppingRoute order in Alexa App “oldest to newest” view.
|
|
47
|
+
|
|
48
|
+
- Sorting target texts are now trimmed at their edges just like existing Alexa list values. This prevents invisible trailing whitespace (for example `Camembert `) from falsely failing the buffered permutation safety check.
|
|
49
|
+
|
|
50
|
+
- Replaced direct sequential value redistribution with a buffered Euler-cycle transaction. A sort now uses one temporary buffer value per disconnected value circuit, so normal list items are not deleted/recreated and Amazon write traffic stays close to the number of actually changed slots.
|
|
51
|
+
- Added a persistent local sort transaction journal (`info.sortTransaction`). Every confirmed step is recorded locally and interrupted transactions are reversed step-by-step after restart instead of treating an intermediate Alexa list as the new source of truth.
|
|
52
|
+
- Added per-step Alexa2 confirmation and a safety stop for ambiguous remote write states. If new active items appear during a running transaction, the current buffered sort is aborted safely and replanned only after another 30-second quiet synchronization window.
|
|
53
|
+
- Fixed Admin configuration handling for independent market routes, newly added markets/product groups, alternative-market multi-selection in Products and Review, and the Review action “Accept all”.
|
|
54
|
+
- Documented that ShoppingRoute can only process the list state currently supplied by Alexa2; a stale Alexa2 list synchronization can therefore delay newly added app items until Alexa2 has synchronized them.
|
|
55
|
+
|
|
56
|
+
### 0.3.1 (2026-08-10)
|
|
57
|
+
|
|
58
|
+
- Fixed a restart loop in Review learning: repeated identical observations no longer rewrite `reviewItems` solely to refresh `lastSeen`.
|
|
59
|
+
|
|
42
60
|
### 0.3.0 (2026-08-10)
|
|
43
61
|
|
|
44
62
|
- Added optional `---- MARKET ----` headings.
|
package/README_DE.md
CHANGED
|
@@ -57,6 +57,7 @@ Anschließend kann 0.3.0 flexible Artikel marktübergreifend zusammenlegen, wenn
|
|
|
57
57
|
- `info.reviewQueue` – unbekannte Artikel
|
|
58
58
|
- `info.statistics` – lokale Einkaufsstatistik
|
|
59
59
|
- `info.traffic` – API-/Schreibzähler
|
|
60
|
+
- `info.sortTransaction` – lokales Wiederherstellungsjournal einer laufenden Sortierung; im Normalzustand `{}`
|
|
60
61
|
- `info.configExport` – komplette Konfigurationssicherung
|
|
61
62
|
- `info.marketProfiles` – teilbare Marktprofile
|
|
62
63
|
- `info.versionInstalled`, `info.versionBeta`, `info.updateAvailable` – Versionsstatus
|
|
@@ -75,6 +76,24 @@ ShoppingRoute wird ab dieser Version unter der **MIT-Lizenz** veröffentlicht. F
|
|
|
75
76
|
|
|
76
77
|
## Changelog
|
|
77
78
|
|
|
79
|
+
### 0.3.2 (2026-08-11)
|
|
80
|
+
|
|
81
|
+
- List-Stability-Guard: Nach jeder Alexa2-Listenänderung wartet ShoppingRoute mindestens 30 Sekunden ohne weitere Listenänderung, bevor Sortierschreibzugriffe beginnen. Taucht während einer gepufferten Sortierung eine neue aktive ID auf, wird der bestätigte Sortierpfad rückwärts zurückgesetzt; die neue ID selbst bleibt unangetastet. Auch die `updatedDateTime`-Finalisierung bricht bei neuen IDs sofort ab und plant erst nach erneuter Synchronisationsruhe neu.
|
|
82
|
+
|
|
83
|
+
- Die sichtbare Alexa-Reihenfolge wird nach der gepufferten Inhalts-Permutation jetzt anhand von `updatedDateTime` finalisiert. Dafür werden nur die minimal notwendigen Einträge mit ihrem unveränderten Text erneut bestätigt; normale Einkaufsartikel werden weiterhin weder gelöscht noch neu angelegt. Dadurch bleibt der Puffer-Schutz gegen Artikelvervielfältigung erhalten, während „Älteste bis neueste“ in der Alexa-App wieder dem ShoppingRoute-Sortierplan entspricht.
|
|
84
|
+
|
|
85
|
+
- Zieltexte der Sortierplanung werden jetzt genauso wie die vorhandenen Alexa-Listentexte an den Rändern bereinigt. Dadurch kann ein unsichtbares nachgestelltes Leerzeichen (z. B. `Camembert `) die gepufferte Permutationsprüfung nicht mehr fälschlich blockieren.
|
|
86
|
+
|
|
87
|
+
- Die direkte, schrittweise Textumverteilung wurde durch eine gepufferte Euler-Kreis-Transaktion ersetzt. Pro getrenntem Wertekreis wird genau ein temporärer Pufferwert verwendet; normale Einkaufsartikel werden weder gelöscht noch neu angelegt und der Amazon-Schreibverkehr bleibt nahe an der Zahl der tatsächlich geänderten Listenplätze.
|
|
88
|
+
- Ein dauerhaftes lokales Sortierjournal (`info.sortTransaction`) wurde ergänzt. Jeder bestätigte Schritt wird lokal festgehalten; nach einem Neustart wird eine unterbrochene Transaktion Schritt für Schritt rückwärts aufgelöst, statt einen Zwischenstand der Alexa-Liste als neue Wahrheit zu übernehmen.
|
|
89
|
+
- Jeder Sortierschritt wird von Alexa2 bestätigt. Bei einem nicht eindeutig auflösbaren Schreibstatus greift ein Sicherheitsstopp. Tauchen während einer laufenden Transaktion neue aktive Artikel auf, wird die gepufferte Sortierung sicher abgebrochen und erst nach einer erneuten 30-sekündigen Synchronisationsruhe neu geplant.
|
|
90
|
+
- Admin-Korrekturen für voneinander unabhängige Marktlaufwege, neu angelegte Märkte/Produktgruppen, die Mehrfachauswahl alternativer Märkte in Artikel- und Prüfliste sowie „Alle übernehmen“ dokumentiert und abgesichert.
|
|
91
|
+
- Dokumentiert, dass ShoppingRoute ausschließlich den von Alexa2 aktuell gelieferten Listenstand verarbeiten kann. Bei einer festhängenden Alexa2-Listensynchronisierung erscheinen neue App-Einträge deshalb erst nach der erneuten Alexa2-Synchronisierung in ShoppingRoute.
|
|
92
|
+
|
|
93
|
+
### 0.3.1 (2026-08-10)
|
|
94
|
+
|
|
95
|
+
- Neustartschleife im Prüflisten-Lernmodus korrigiert: identische Wiederholungsbeobachtungen schreiben `reviewItems` nicht mehr allein wegen eines neuen `lastSeen`-Zeitpunkts zurück.
|
|
96
|
+
|
|
78
97
|
### 0.3.0 (2026-08-10)
|
|
79
98
|
|
|
80
99
|
- Optionale Marktüberschriften im Format `---- MARKT ----` ergänzt.
|
package/admin/jsonConfig.json
CHANGED
|
@@ -104,7 +104,11 @@
|
|
|
104
104
|
"sm": 12,
|
|
105
105
|
"md": 6,
|
|
106
106
|
"lg": 4,
|
|
107
|
-
"xl": 3
|
|
107
|
+
"xl": 3,
|
|
108
|
+
"alsoDependsOn": [
|
|
109
|
+
"markets"
|
|
110
|
+
],
|
|
111
|
+
"jsonData": "{\"markets\":${JSON.stringify(data.markets || [])}}"
|
|
108
112
|
},
|
|
109
113
|
"priorityMarket": {
|
|
110
114
|
"type": "selectSendTo",
|
|
@@ -117,7 +121,11 @@
|
|
|
117
121
|
"md": 6,
|
|
118
122
|
"lg": 4,
|
|
119
123
|
"xl": 3,
|
|
120
|
-
"help": "ui.items.general.items.prioritymarket.help"
|
|
124
|
+
"help": "ui.items.general.items.prioritymarket.help",
|
|
125
|
+
"alsoDependsOn": [
|
|
126
|
+
"markets"
|
|
127
|
+
],
|
|
128
|
+
"jsonData": "{\"markets\":${JSON.stringify(data.markets || [])}}"
|
|
121
129
|
},
|
|
122
130
|
"temporaryMarketHelp": {
|
|
123
131
|
"type": "staticText",
|
|
@@ -308,7 +316,11 @@
|
|
|
308
316
|
"noTranslation": true,
|
|
309
317
|
"title": "ui.items.liststab.items.lists.items.2.title",
|
|
310
318
|
"width": "45%",
|
|
311
|
-
"sort": true
|
|
319
|
+
"sort": true,
|
|
320
|
+
"alsoDependsOn": [
|
|
321
|
+
"markets"
|
|
322
|
+
],
|
|
323
|
+
"jsonData": "{\"markets\":${JSON.stringify(globalData.markets || [])}}"
|
|
312
324
|
}
|
|
313
325
|
],
|
|
314
326
|
"xs": 12,
|
|
@@ -433,7 +445,11 @@
|
|
|
433
445
|
"sm": 12,
|
|
434
446
|
"md": 6,
|
|
435
447
|
"lg": 4,
|
|
436
|
-
"xl": 3
|
|
448
|
+
"xl": 3,
|
|
449
|
+
"alsoDependsOn": [
|
|
450
|
+
"markets"
|
|
451
|
+
],
|
|
452
|
+
"jsonData": "{\"markets\":${JSON.stringify(data.markets || [])}}"
|
|
437
453
|
},
|
|
438
454
|
"routesHelp": {
|
|
439
455
|
"type": "staticText",
|
|
@@ -457,7 +473,11 @@
|
|
|
457
473
|
"default": "Sonstiges",
|
|
458
474
|
"title": "ui.items.productgroupstab.items.productgroups.items.0.title",
|
|
459
475
|
"width": "75%",
|
|
460
|
-
"sort": false
|
|
476
|
+
"sort": false,
|
|
477
|
+
"alsoDependsOn": [
|
|
478
|
+
"_groupRevision"
|
|
479
|
+
],
|
|
480
|
+
"jsonData": "{\"productGroups\":${JSON.stringify(globalData.productGroups || [])}}"
|
|
461
481
|
},
|
|
462
482
|
{
|
|
463
483
|
"type": "number",
|
|
@@ -479,9 +499,10 @@
|
|
|
479
499
|
"onChange": {
|
|
480
500
|
"alsoDependsOn": [
|
|
481
501
|
"routes",
|
|
482
|
-
"routeMarketFilter"
|
|
502
|
+
"routeMarketFilter",
|
|
503
|
+
"productGroups"
|
|
483
504
|
],
|
|
484
|
-
"calculateFunc": "(data.routes || []).filter(r => String(r.market || '') === String(data.routeMarketFilter || '')).sort((a,
|
|
505
|
+
"calculateFunc": "String(data.routeMarketFilter || '') ? [...(data.routes || []).filter(r => String(r.market || '') === String(data.routeMarketFilter || '')).sort((a,b)=>(Number(a.order)||9999)-(Number(b.order)||9999)).map(r => String(r.category || '').trim()),...(data.productGroups || []).map(g => String((g && g.name) || '').trim())].filter((category,index,all) => category && all.findIndex(x => String(x).toLocaleLowerCase('de') === String(category).toLocaleLowerCase('de')) === index).map((category,i) => ({_market: String(data.routeMarketFilter || ''),_groupRevision: JSON.stringify((data.productGroups || []).map(g => String((g && g.name) || '').trim()).filter(Boolean)),category,order:(i+1)*10})) : []",
|
|
485
506
|
"ignoreOwnChanges": true
|
|
486
507
|
}
|
|
487
508
|
},
|
|
@@ -517,7 +538,7 @@
|
|
|
517
538
|
"alsoDependsOn": [
|
|
518
539
|
"_routeEditorRows"
|
|
519
540
|
],
|
|
520
|
-
"calculateFunc": "(()
|
|
541
|
+
"calculateFunc": "(String(data.routeMarketFilter || '') && (data._routeEditorRows || []).every(r => String((r && r._market) || '') === String(data.routeMarketFilter || ''))) ? (data.routes || []).filter(r => String(r.market || '') !== String(data.routeMarketFilter || '')).concat((data._routeEditorRows || []).filter(r => String((r && r.category) || '').trim()).map((r,i) => ({market:String(data.routeMarketFilter || ''),category:String(r.category).trim(),order:(i+1)*10}))) : (data.routes || [])",
|
|
521
542
|
"ignoreOwnChanges": true
|
|
522
543
|
}
|
|
523
544
|
}
|
|
@@ -562,7 +583,8 @@
|
|
|
562
583
|
"default": "Sonstiges",
|
|
563
584
|
"title": "ui.items.productgroupstab.items.productgroups.items.0.title",
|
|
564
585
|
"width": "20%",
|
|
565
|
-
"sort": true
|
|
586
|
+
"sort": true,
|
|
587
|
+
"jsonData": "{\"productGroups\":${JSON.stringify(globalData.productGroups || [])}}"
|
|
566
588
|
},
|
|
567
589
|
{
|
|
568
590
|
"type": "selectSendTo",
|
|
@@ -572,11 +594,19 @@
|
|
|
572
594
|
"noTranslation": true,
|
|
573
595
|
"title": "ui.items.productstab.items.products.items.3.title",
|
|
574
596
|
"width": "18%",
|
|
575
|
-
"sort": true
|
|
597
|
+
"sort": true,
|
|
598
|
+
"jsonData": "{\"markets\":${JSON.stringify(globalData.markets || [])}}"
|
|
576
599
|
},
|
|
577
600
|
{
|
|
578
|
-
"type": "
|
|
601
|
+
"type": "selectSendTo",
|
|
579
602
|
"attr": "availableMarkets",
|
|
603
|
+
"command": "getActiveMarkets",
|
|
604
|
+
"defaultSendTo": "normalizeMarketSelection",
|
|
605
|
+
"manual": false,
|
|
606
|
+
"multiple": true,
|
|
607
|
+
"showAllValues": true,
|
|
608
|
+
"noTranslation": true,
|
|
609
|
+
"jsonData": "{\"markets\":${JSON.stringify(globalData.markets || [])},\"value\":${JSON.stringify(data.availableMarkets == null ? '' : data.availableMarkets)}}",
|
|
580
610
|
"title": "ui.items.productstab.items.products.items.4.title",
|
|
581
611
|
"width": "22%"
|
|
582
612
|
}
|
|
@@ -585,7 +615,10 @@
|
|
|
585
615
|
"sm": 12,
|
|
586
616
|
"md": 12,
|
|
587
617
|
"lg": 12,
|
|
588
|
-
"xl": 12
|
|
618
|
+
"xl": 12,
|
|
619
|
+
"onChange": {
|
|
620
|
+
"calculateFunc": "(data.products || []).map(row => ({...row,availableMarkets:Array.isArray(row.availableMarkets)?row.availableMarkets.map(v=>typeof v==='string'?v.trim():'').filter(Boolean).join(','):String(row.availableMarkets || '')}))"
|
|
621
|
+
}
|
|
589
622
|
}
|
|
590
623
|
}
|
|
591
624
|
},
|
|
@@ -602,6 +635,23 @@
|
|
|
602
635
|
"lg": 12,
|
|
603
636
|
"xl": 12
|
|
604
637
|
},
|
|
638
|
+
"reviewAcceptAll": {
|
|
639
|
+
"type": "sendTo",
|
|
640
|
+
"command": "markAllReviewItemsAccept",
|
|
641
|
+
"label": {
|
|
642
|
+
"en": "Set all to accept",
|
|
643
|
+
"de": "Alle auf Übernehmen stellen"
|
|
644
|
+
},
|
|
645
|
+
"variant": "contained",
|
|
646
|
+
"showProcess": true,
|
|
647
|
+
"newLine": true,
|
|
648
|
+
"xs": 12,
|
|
649
|
+
"sm": 12,
|
|
650
|
+
"md": 6,
|
|
651
|
+
"lg": 4,
|
|
652
|
+
"xl": 3,
|
|
653
|
+
"jsonData": "{\"native\":${JSON.stringify(data)}}"
|
|
654
|
+
},
|
|
605
655
|
"reviewItems": {
|
|
606
656
|
"type": "table",
|
|
607
657
|
"label": "ui.items.reviewtab.items.reviewitems.label",
|
|
@@ -610,14 +660,14 @@
|
|
|
610
660
|
"type": "text",
|
|
611
661
|
"attr": "product",
|
|
612
662
|
"title": "ui.items.productstab.items.products.items.0.title",
|
|
613
|
-
"width": "
|
|
663
|
+
"width": "15%",
|
|
614
664
|
"sort": true
|
|
615
665
|
},
|
|
616
666
|
{
|
|
617
667
|
"type": "text",
|
|
618
668
|
"attr": "text",
|
|
619
669
|
"title": "ui.items.reviewtab.items.reviewitems.items.1.title",
|
|
620
|
-
"width": "
|
|
670
|
+
"width": "17%"
|
|
621
671
|
},
|
|
622
672
|
{
|
|
623
673
|
"type": "selectSendTo",
|
|
@@ -626,8 +676,9 @@
|
|
|
626
676
|
"manual": false,
|
|
627
677
|
"noTranslation": true,
|
|
628
678
|
"title": "ui.items.productgroupstab.items.productgroups.items.0.title",
|
|
629
|
-
"width": "
|
|
630
|
-
"sort": true
|
|
679
|
+
"width": "15%",
|
|
680
|
+
"sort": true,
|
|
681
|
+
"jsonData": "{\"productGroups\":${JSON.stringify(globalData.productGroups || [])}}"
|
|
631
682
|
},
|
|
632
683
|
{
|
|
633
684
|
"type": "selectSendTo",
|
|
@@ -636,20 +687,34 @@
|
|
|
636
687
|
"manual": false,
|
|
637
688
|
"noTranslation": true,
|
|
638
689
|
"title": "ui.items.productstab.items.products.items.3.title",
|
|
639
|
-
"width": "
|
|
640
|
-
"sort": true
|
|
690
|
+
"width": "14%",
|
|
691
|
+
"sort": true,
|
|
692
|
+
"jsonData": "{\"markets\":${JSON.stringify(globalData.markets || [])}}"
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
"type": "selectSendTo",
|
|
696
|
+
"attr": "availableMarkets",
|
|
697
|
+
"command": "getActiveMarkets",
|
|
698
|
+
"defaultSendTo": "normalizeMarketSelection",
|
|
699
|
+
"manual": false,
|
|
700
|
+
"multiple": true,
|
|
701
|
+
"showAllValues": true,
|
|
702
|
+
"noTranslation": true,
|
|
703
|
+
"jsonData": "{\"markets\":${JSON.stringify(globalData.markets || [])},\"value\":${JSON.stringify(data.availableMarkets == null ? '' : data.availableMarkets)}}",
|
|
704
|
+
"title": "ui.items.productstab.items.products.items.4.title",
|
|
705
|
+
"width": "17%"
|
|
641
706
|
},
|
|
642
707
|
{
|
|
643
708
|
"type": "text",
|
|
644
709
|
"attr": "aliases",
|
|
645
710
|
"title": "ui.items.marketstab.items.markets.items.3.title",
|
|
646
|
-
"width": "
|
|
711
|
+
"width": "12%"
|
|
647
712
|
},
|
|
648
713
|
{
|
|
649
714
|
"type": "select",
|
|
650
715
|
"attr": "action",
|
|
651
716
|
"title": "ui.items.reviewtab.items.reviewitems.items.5.title",
|
|
652
|
-
"width": "
|
|
717
|
+
"width": "10%",
|
|
653
718
|
"options": [
|
|
654
719
|
{
|
|
655
720
|
"value": "pending",
|
|
@@ -670,7 +735,10 @@
|
|
|
670
735
|
"sm": 12,
|
|
671
736
|
"md": 12,
|
|
672
737
|
"lg": 12,
|
|
673
|
-
"xl": 12
|
|
738
|
+
"xl": 12,
|
|
739
|
+
"onChange": {
|
|
740
|
+
"calculateFunc": "(data.reviewItems || []).map(row => ({...row,availableMarkets:Array.isArray(row.availableMarkets)?row.availableMarkets.map(v=>typeof v==='string'?v.trim():'').filter(Boolean).join(','):String(row.availableMarkets || '')}))"
|
|
741
|
+
}
|
|
674
742
|
}
|
|
675
743
|
}
|
|
676
744
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const _0x13cb7e=_0x1508;(function(_0x26c7c1,_0x100c53){const _0x3831f6=_0x1508,_0x209ae2=_0x26c7c1();while(!![]){try{const _0x2af1f3=parseInt(_0x3831f6(0x108))/0x1*(-parseInt(_0x3831f6(0x107))/0x2)+parseInt(_0x3831f6(0xfc))/0x3*(-parseInt(_0x3831f6(0xf4))/0x4)+parseInt(_0x3831f6(0x110))/0x5+-parseInt(_0x3831f6(0x10f))/0x6*(-parseInt(_0x3831f6(0x113))/0x7)+parseInt(_0x3831f6(0xfa))/0x8+-parseInt(_0x3831f6(0x10b))/0x9+-parseInt(_0x3831f6(0x106))/0xa*(parseInt(_0x3831f6(0xfd))/0xb);if(_0x2af1f3===_0x100c53)break;else _0x209ae2['push'](_0x209ae2['shift']());}catch(_0xc808d8){_0x209ae2['push'](_0x209ae2['shift']());}}}(_0x31d7,0x93255));Object[_0x13cb7e(0x117)](exports,_0x13cb7e(0x116),{'value':!![]}),exports[_0x13cb7e(0x104)]=createBufferedSortProgram,exports[_0x13cb7e(0x11b)]=sortIdsByAlexaUpdatedTime,exports[_0x13cb7e(0x101)]=createVisibleOrderRefreshPlan;function countValues(_0xa88506){const _0x524582=_0x13cb7e,_0x498189=new Map();for(const _0x5723ca of _0xa88506)_0x498189[_0x524582(0x11f)](_0x5723ca,(_0x498189[_0x524582(0xf6)](_0x5723ca)||0x0)+0x1);return _0x498189;}function sameValueCounts(_0x37a5a8,_0x15549b){const _0x17f3e5=_0x13cb7e;if(_0x37a5a8['size']!==_0x15549b[_0x17f3e5(0x105)])return![];for(const [_0x599ff4,_0x4aa2bb]of _0x37a5a8){if(_0x15549b[_0x17f3e5(0xf6)](_0x599ff4)!==_0x4aa2bb)return![];}return!![];}function createBufferedSortProgram(_0x548fad,_0x5b3048){const _0x27be96=_0x13cb7e,_0x503c05=String(_0x5b3048||'')[_0x27be96(0x109)]();if(!_0x503c05)throw new Error(_0x27be96(0x103));const _0xcd7fe1=_0x548fad['map'](_0x4bb27c=>String(_0x4bb27c[_0x27be96(0xf5)])),_0x409739=_0x548fad['map'](_0x17d5f6=>String(_0x17d5f6['to']));if(_0xcd7fe1['includes'](_0x503c05)||_0x409739['includes'](_0x503c05))throw new Error(_0x27be96(0xf8));if(!sameValueCounts(countValues(_0xcd7fe1),countValues(_0x409739)))throw new Error('Sortierplan\x20ist\x20keine\x20reine\x20Permutation\x20der\x20vorhandenen\x20Listentexte.');const _0x58b0d8=_0x548fad['map']((_0x1e0853,_0x5f2305)=>({'index':_0x5f2305,'id':String(_0x1e0853['id']),'from':String(_0x1e0853['from']),'to':String(_0x1e0853['to']),'position':Number(_0x1e0853[_0x27be96(0x115)])||_0x5f2305+0x1}))[_0x27be96(0xf9)](_0x389844=>_0x389844[_0x27be96(0xf5)]!==_0x389844['to']);if(_0x58b0d8[_0x27be96(0xfe)]===0x0)return{'marker':_0x503c05,'changedSlots':0x0,'circuits':0x0,'amazonWrites':0x0,'steps':[]};const _0x123c87=new Map(),_0x39779=new Map(),_0x37a6d7=new Map();for(let _0x392ab1=0x0;_0x392ab1<_0x58b0d8['length'];_0x392ab1++){const _0x201f2c=_0x58b0d8[_0x392ab1],_0x1e1ced=_0x123c87[_0x27be96(0xf6)](_0x201f2c['from'])||[];_0x1e1ced[_0x27be96(0x102)](_0x392ab1),_0x123c87[_0x27be96(0x11f)](_0x201f2c['from'],_0x1e1ced),_0x37a6d7[_0x27be96(0x11f)](_0x201f2c[_0x27be96(0xf5)],(_0x37a6d7['get'](_0x201f2c['from'])||0x0)+0x1),_0x39779['set'](_0x201f2c['to'],(_0x39779[_0x27be96(0xf6)](_0x201f2c['to'])||0x0)+0x1);}const _0x508f53=new Set([..._0x39779[_0x27be96(0xff)](),..._0x37a6d7[_0x27be96(0xff)]()]);for(const _0x5b0cde of _0x508f53){if((_0x39779[_0x27be96(0xf6)](_0x5b0cde)||0x0)!==(_0x37a6d7[_0x27be96(0xf6)](_0x5b0cde)||0x0))throw new Error('Sortierplan\x20ist\x20bei\x20„'+_0x5b0cde+_0x27be96(0xf7));}for(const _0x5e3678 of _0x123c87['values']()){_0x5e3678['sort']((_0x32c25d,_0x4523b2)=>_0x58b0d8[_0x4523b2]['position']-_0x58b0d8[_0x32c25d]['position']||_0x4523b2-_0x32c25d);}const _0x5c3810=new Set(_0x58b0d8['map']((_0x4261a8,_0x5ae863)=>_0x5ae863)),_0xe6d1df=[],_0x40a06b=_0x28d215=>{const _0x2a53e9=_0x27be96,_0x3df72a=_0x123c87['get'](_0x28d215)||[];while(_0x3df72a[_0x2a53e9(0xfe)]>0x0&&!_0x5c3810[_0x2a53e9(0x100)](_0x3df72a[_0x3df72a['length']-0x1]))_0x3df72a[_0x2a53e9(0x10c)]();if(_0x3df72a[_0x2a53e9(0xfe)]===0x0)return undefined;const _0x490939=_0x3df72a[_0x2a53e9(0x10c)]();if(_0x490939===undefined)return undefined;return _0x5c3810[_0x2a53e9(0x11a)](_0x490939),_0x490939;};while(_0x5c3810['size']>0x0){let _0x1f99a2;for(const _0x4e23ae of _0x5c3810){if(_0x1f99a2===undefined||_0x58b0d8[_0x4e23ae][_0x27be96(0x115)]<_0x58b0d8[_0x1f99a2][_0x27be96(0x115)]||_0x58b0d8[_0x4e23ae][_0x27be96(0x115)]===_0x58b0d8[_0x1f99a2][_0x27be96(0x115)]&&_0x4e23ae<_0x1f99a2)_0x1f99a2=_0x4e23ae;}if(_0x1f99a2===undefined)break;const _0x265361=[_0x58b0d8[_0x1f99a2][_0x27be96(0xf5)]],_0x47e220=[],_0x45ebf0=[];while(_0x265361[_0x27be96(0xfe)]>0x0){const _0x442cd4=_0x265361[_0x265361[_0x27be96(0xfe)]-0x1],_0x556335=_0x40a06b(_0x442cd4);if(_0x556335!==undefined)_0x47e220['push'](_0x556335),_0x265361['push'](_0x58b0d8[_0x556335]['to']);else{_0x265361[_0x27be96(0x10c)]();if(_0x47e220['length']>0x0){const _0x2be7b8=_0x47e220['pop']();if(_0x2be7b8!==undefined)_0x45ebf0['push'](_0x2be7b8);}}}const _0x277203=_0x45ebf0['reverse']();if(_0x277203[_0x27be96(0xfe)]<0x2)throw new Error(_0x27be96(0x10e));for(let _0x1bc7b0=0x0;_0x1bc7b0<_0x277203['length'];_0x1bc7b0++){const _0x13c453=_0x58b0d8[_0x277203[_0x1bc7b0]],_0x3fdd9d=_0x58b0d8[_0x277203[(_0x1bc7b0+0x1)%_0x277203['length']]];if(_0x13c453['to']!==_0x3fdd9d['from'])throw new Error(_0x27be96(0x11d));}_0xe6d1df['push'](_0x277203);}const _0x53f917=[];return _0xe6d1df[_0x27be96(0x118)]((_0x21d0d9,_0x58b0f1)=>{const _0x515a63=_0x27be96,_0x5a28ed=_0x58b0d8[_0x21d0d9[0x0]];_0x53f917[_0x515a63(0x102)]({'id':_0x5a28ed['id'],'from':_0x5a28ed[_0x515a63(0xf5)],'to':_0x503c05,'kind':_0x515a63(0x112),'circuit':_0x58b0f1+0x1});for(let _0x2a4580=_0x21d0d9[_0x515a63(0xfe)]-0x1;_0x2a4580>=0x1;_0x2a4580--){const _0x7dd7c4=_0x58b0d8[_0x21d0d9[_0x2a4580]];_0x53f917['push']({'id':_0x7dd7c4['id'],'from':_0x7dd7c4['from'],'to':_0x7dd7c4['to'],'kind':_0x515a63(0x119),'circuit':_0x58b0f1+0x1});}_0x53f917[_0x515a63(0x102)]({'id':_0x5a28ed['id'],'from':_0x503c05,'to':_0x5a28ed['to'],'kind':'final','circuit':_0x58b0f1+0x1});}),{'marker':_0x503c05,'changedSlots':_0x58b0d8['length'],'circuits':_0xe6d1df['length'],'amazonWrites':_0x53f917[_0x27be96(0xfe)],'steps':_0x53f917};}function visibleOrderTimestamp(_0x1ae13e){const _0xa9978a=_0x13cb7e;if(typeof _0x1ae13e==='number'&&Number[_0xa9978a(0x10d)](_0x1ae13e))return _0x1ae13e;if(typeof _0x1ae13e===_0xa9978a(0x114)&&_0x1ae13e['trim']()){const _0xfe0129=Number(_0x1ae13e);if(Number[_0xa9978a(0x10d)](_0xfe0129))return _0xfe0129;const _0x5a04cd=Date[_0xa9978a(0x11e)](_0x1ae13e);if(Number['isFinite'](_0x5a04cd))return _0x5a04cd;}return 0x0;}function _0x1508(_0x446aee,_0x3ee9b3){_0x446aee=_0x446aee-0xf4;const _0x31d7df=_0x31d7();let _0x150899=_0x31d7df[_0x446aee];return _0x150899;}function sortIdsByAlexaUpdatedTime(_0x51b9c7){return[..._0x51b9c7]['sort']((_0xca747f,_0x299225)=>{const _0x352520=_0x1508,_0x14c022=visibleOrderTimestamp(_0xca747f['updatedDateTime'])||visibleOrderTimestamp(_0xca747f['createdDateTime']),_0x22f4aa=visibleOrderTimestamp(_0x299225['updatedDateTime'])||visibleOrderTimestamp(_0x299225[_0x352520(0x11c)]);if(_0x14c022!==_0x22f4aa)return _0x14c022-_0x22f4aa;const _0x126689=visibleOrderTimestamp(_0xca747f['createdDateTime']),_0x361707=visibleOrderTimestamp(_0x299225['createdDateTime']);if(_0x126689!==_0x361707)return _0x126689-_0x361707;return String(_0xca747f['id'])[_0x352520(0x111)](String(_0x299225['id']));})['map'](_0x13ab0c=>String(_0x13ab0c['id']));}function createVisibleOrderRefreshPlan(_0x28d47b,_0x58e5c9){const _0x4be5c4=_0x13cb7e,_0x4e3551=_0x28d47b[_0x4be5c4(0x10a)](String),_0x5877a3=_0x58e5c9[_0x4be5c4(0x10a)](String);if(new Set(_0x4e3551)[_0x4be5c4(0x105)]!==_0x4e3551['length']||new Set(_0x5877a3)[_0x4be5c4(0x105)]!==_0x5877a3[_0x4be5c4(0xfe)])throw new Error('Sichtbare\x20Sortierreihenfolge\x20enthält\x20doppelte\x20IDs.');if(_0x4e3551[_0x4be5c4(0xfe)]!==_0x5877a3[_0x4be5c4(0xfe)])throw new Error(_0x4be5c4(0xfb));const _0x373fab=new Set(_0x4e3551);if(_0x5877a3['some'](_0x12cef6=>!_0x373fab['has'](_0x12cef6)))throw new Error('Sichtbare\x20Sortierreihenfolge\x20enthält\x20nicht\x20dieselben\x20IDs\x20wie\x20der\x20Sortierplan.');let _0x530254=0x0,_0x5e4a94=0x0;for(;_0x5e4a94<_0x5877a3[_0x4be5c4(0xfe)];_0x5e4a94++){const _0x192c19=_0x5877a3[_0x5e4a94];let _0x104ba6=-0x1;for(let _0x11e5bf=_0x530254;_0x11e5bf<_0x4e3551[_0x4be5c4(0xfe)];_0x11e5bf++){if(_0x4e3551[_0x11e5bf]===_0x192c19){_0x104ba6=_0x11e5bf;break;}}if(_0x104ba6<0x0)break;_0x530254=_0x104ba6+0x1;}return _0x5877a3['slice'](_0x5e4a94);}function _0x31d7(){const _0x33b284=['map','1025154IevXiX','pop','isFinite','Ungültiger\x20Sortierkreis\x20mit\x20weniger\x20als\x20zwei\x20Änderungen.','36OmyaTb','5783720TwMYKr','localeCompare','buffer','949165zAMesu','string','position','__esModule','defineProperty','forEach','rotate','delete','sortIdsByAlexaUpdatedTime','createdDateTime','Sortierkreis\x20ist\x20intern\x20nicht\x20geschlossen.','parse','set','33124rnMtzx','from','get','“\x20nicht\x20ausgeglichen.','Sortierpuffer\x20kollidiert\x20mit\x20einem\x20vorhandenen\x20Listentext.','filter','7279504FXVNLE','Sichtbare\x20Sortierreihenfolge\x20enthält\x20nicht\x20dieselben\x20IDs\x20wie\x20der\x20Sortierplan.','177IbrvVY','77pzPFGc','length','keys','has','createVisibleOrderRefreshPlan','push','Sortierpuffer\x20darf\x20nicht\x20leer\x20sein.','createBufferedSortProgram','size','2304470QPdsrJ','41286Arzwzu','3trTROD','trim'];_0x31d7=function(){return _0x33b284;};return _0x31d7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const _0x1460e5=_0x3d9e;(function(_0x469810,_0x23edaa){const _0x4df9c2=_0x3d9e,_0x105b5a=_0x469810();while(!![]){try{const _0x2f7ebd=-parseInt(_0x4df9c2(0x149))/0x1*(-parseInt(_0x4df9c2(0x153))/0x2)+-parseInt(_0x4df9c2(0x14f))/0x3*(parseInt(_0x4df9c2(0x154))/0x4)+parseInt(_0x4df9c2(0x14a))/0x5*(parseInt(_0x4df9c2(0x151))/0x6)+-parseInt(_0x4df9c2(0x150))/0x7+-parseInt(_0x4df9c2(0x146))/0x8*(parseInt(_0x4df9c2(0x147))/0x9)+parseInt(_0x4df9c2(0x155))/0xa*(parseInt(_0x4df9c2(0x145))/0xb)+parseInt(_0x4df9c2(0x14b))/0xc*(parseInt(_0x4df9c2(0x14c))/0xd);if(_0x2f7ebd===_0x23edaa)break;else _0x105b5a['push'](_0x105b5a['shift']());}catch(_0x4754d9){_0x105b5a['push'](_0x105b5a['shift']());}}}(_0x1cc2,0xa7992));function _0x3d9e(_0x2003ab,_0x2cb40b){_0x2003ab=_0x2003ab-0x13f;const _0x1cc255=_0x1cc2();let _0x3d9e93=_0x1cc255[_0x2003ab];return _0x3d9e93;}function _0x1cc2(){const _0x15aa84=['test','Die\x20bekannte\x20fehlerhafte\x20version-Query\x20wurde\x20in\x20der\x20installierten\x20alexa-remote2-Quelle\x20nicht\x20gefunden;\x20die\x20korrigierte\x20Schreibweise\x20ist\x20vorhanden.','__esModule','known-bug','1435049FdDRFf','17152fGNtJk','4617elaCzG','live-ok','795nmMuIQ','4531620FvygPu','1475208vBkxCx','78jYlBcW','Bekannter\x20updateListItem-Fehler\x20gefunden:\x20Leerzeichen\x20vor\x20dem\x20Gleichheitszeichen\x20in\x20der\x20version-Query.','Die\x20installierte\x20alexa-remote2-Quelle\x20konnte\x20nicht\x20eindeutig\x20als\x20kompatibel\x20oder\x20als\x20bekannte\x20fehlerhafte\x20Variante\x20erkannt\x20werden.','2373312DNkKaM','7337141bmKkDk','6Ekylww','source-ok','2688kgHmAO','4znGRLm','70sySQoq','defineProperty','canWriteAlexa'];_0x1cc2=function(){return _0x15aa84;};return _0x1cc2();}Object[_0x1460e5(0x13f)](exports,_0x1460e5(0x143),{'value':!![]}),exports['inspectAlexaRemoteSource']=inspectAlexaRemoteSource,exports[_0x1460e5(0x140)]=canWriteAlexa;function inspectAlexaRemoteSource(_0x1e559e){const _0x366e39=_0x1460e5,_0xd7c543=String(_0x1e559e||'');if(/\?version\s+=\$\{options\.version\}/[_0x366e39(0x141)](_0xd7c543))return{'status':_0x366e39(0x144),'detail':_0x366e39(0x14d)};if(/\?version=\$\{options\.version\}/[_0x366e39(0x141)](_0xd7c543))return{'status':'source-ok','detail':_0x366e39(0x142)};return{'status':'unknown','detail':_0x366e39(0x14e)};}function canWriteAlexa(_0x9d49ca){const _0x28b6ac=_0x1460e5;return _0x9d49ca===_0x28b6ac(0x152)||_0x9d49ca===_0x28b6ac(0x148);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x550f6d=_0x4121;(function(_0x5a7e1b,_0x10779a){const _0x522fb4=_0x4121,_0x4bf71d=_0x5a7e1b();while(!![]){try{const _0x3c37af=-parseInt(_0x522fb4(0xeb))/0x1+-parseInt(_0x522fb4(0xfa))/0x2+-parseInt(_0x522fb4(0x106))/0x3+parseInt(_0x522fb4(0xe1))/0x4+parseInt(_0x522fb4(0xe8))/0x5*(parseInt(_0x522fb4(0x109))/0x6)+parseInt(_0x522fb4(0x10f))/0x7+parseInt(_0x522fb4(0x113))/0x8;if(_0x3c37af===_0x10779a)break;else _0x4bf71d['push'](_0x4bf71d['shift']());}catch(_0x533f66){_0x4bf71d['push'](_0x4bf71d['shift']());}}}(_0x15be,0x609a6));Object['defineProperty'](exports,_0x550f6d(0x10b),{'value':!![]}),exports['exportConfig']=exportConfig,exports[_0x550f6d(0xe9)]=parseConfigImport,exports[_0x550f6d(0xf8)]=buildMarketProfiles,exports[_0x550f6d(0xdc)]=importMarketProfile,exports['groupRoutesByMarket']=groupRoutesByMarket,exports['ensureMarketRoutes']=ensureMarketRoutes,exports[_0x550f6d(0xf7)]=reindexRoutes,exports[_0x550f6d(0xf1)]=normalizeRoutesForAdmin;const EXPORT_KEYS=[_0x550f6d(0xef),_0x550f6d(0xde),_0x550f6d(0x102),_0x550f6d(0x108),_0x550f6d(0x103),_0x550f6d(0xf5),'autoAliasSuggestions',_0x550f6d(0xe5),_0x550f6d(0xf6),_0x550f6d(0xe4),_0x550f6d(0xea),_0x550f6d(0xe7),_0x550f6d(0x105),_0x550f6d(0xf0),'retryBaseMs',_0x550f6d(0xe0),_0x550f6d(0x100),'temporaryPriorityMarket',_0x550f6d(0xfe),_0x550f6d(0xee),_0x550f6d(0xf4),'products',_0x550f6d(0x111)];function exportConfig(_0x3cf1ef,_0x560435,_0xed632b=new Date()){const _0x388554=_0x550f6d,_0x849218={};for(const _0x4c1b33 of EXPORT_KEYS){const _0x105a43=_0x3cf1ef[_0x4c1b33];if(_0x105a43!==undefined)_0x849218[_0x4c1b33]=structuredClone(_0x105a43);}return{'format':_0x388554(0xfd),'exportedAt':_0xed632b[_0x388554(0x10d)](),'version':_0x560435,'config':_0x849218};}function _0x15be(){const _0x32f191=['slice','routes','learningMode','writePauseMs','reindexRoutes','buildMarketProfiles','base','481174EInyRN','filter','route','shoppingroute-config-v1','productGroups','shoppingroute-market-profile-v1','priorityMarket','parse','lists','autoLearnProducts','set','batchPauseMs','2020149EHgXXQ','Konfigurationsimport\x20enthält\x20kein\x20Objekt.','dryRun','1669224nWuGEw','name','__esModule','trim','toISOString','isArray','131866eXYQkO','format','reviewItems','localeCompare','2925056dHXIhM','importMarketProfile','order','listName','map','fallbackMarket','2786672xHckdG','Ungültiges\x20ShoppingRoute-Marktprofil.','toLocaleLowerCase','apiSafeMode','debounceMs','market','batchSize','10iHXbbV','parseConfigImport','maxWritesPerMinute','327890XOuPJK','get','push','markets','alexaInstance','maxWriteRetries','normalizeRoutesForAdmin','sort'];_0x15be=function(){return _0x32f191;};return _0x15be();}function parseConfigImport(_0x1b68e7){const _0x59d3ba=_0x550f6d,_0x54716c=JSON[_0x59d3ba(0x101)](String(_0x1b68e7||'')),_0x474015=_0x54716c[_0x59d3ba(0x110)]===_0x59d3ba(0xfd)?_0x54716c['config']:_0x54716c;if(!_0x474015||typeof _0x474015!=='object'||Array[_0x59d3ba(0x10e)](_0x474015))throw new Error(_0x59d3ba(0x107));const _0x891128={};for(const _0x2c4adb of EXPORT_KEYS){_0x474015[_0x2c4adb]!==undefined&&(_0x891128[_0x2c4adb]=structuredClone(_0x474015[_0x2c4adb]));}return _0x891128;}function buildMarketProfiles(_0x40a853,_0x30dac5){const _0x333b36=_0x550f6d;return _0x40a853[_0x333b36(0xfb)](_0x1bb8f4=>_0x1bb8f4['name'])[_0x333b36(0xf2)]((_0x3f0dec,_0x54ddd0)=>(Number(_0x3f0dec['order'])||0x270f)-(Number(_0x54ddd0[_0x333b36(0xdd)])||0x270f))['map'](_0x39d6ea=>({'format':'shoppingroute-market-profile-v1','market':{..._0x39d6ea},'route':_0x30dac5['filter'](_0x12062f=>_0x12062f[_0x333b36(0xe6)][_0x333b36(0xe3)]('de')===_0x39d6ea[_0x333b36(0x10a)]['toLocaleLowerCase']('de'))[_0x333b36(0xdf)]((_0x20e492,_0x1b071a)=>({..._0x20e492,'order':(_0x1b071a+0x1)*0xa}))}));}function importMarketProfile(_0x497988,_0xfee69f,_0x4da93a){const _0x527de8=_0x550f6d,_0x1fcf29=JSON[_0x527de8(0x101)](String(_0x497988||''));if(_0x1fcf29[_0x527de8(0x110)]!==_0x527de8(0xff)||!_0x1fcf29['market']?.[_0x527de8(0x10a)]||!Array['isArray'](_0x1fcf29[_0x527de8(0xfc)]))throw new Error(_0x527de8(0xe2));const _0xd5895f=_0x1fcf29[_0x527de8(0xe6)]['name'][_0x527de8(0x10c)](),_0x417ce2=_0xfee69f['filter'](_0x182cfa=>_0x182cfa[_0x527de8(0x10a)][_0x527de8(0xe3)]('de')!==_0xd5895f[_0x527de8(0xe3)]('de'));_0x417ce2[_0x527de8(0xed)]({..._0x1fcf29[_0x527de8(0xe6)],'name':_0xd5895f}),_0x417ce2[_0x527de8(0xf2)]((_0xc8875a,_0x5725a5)=>(Number(_0xc8875a[_0x527de8(0xdd)])||0x270f)-(Number(_0x5725a5[_0x527de8(0xdd)])||0x270f));const _0x406f56=_0x4da93a[_0x527de8(0xfb)](_0x3efe43=>_0x3efe43[_0x527de8(0xe6)]['toLocaleLowerCase']('de')!==_0xd5895f[_0x527de8(0xe3)]('de'));return _0x1fcf29['route']['forEach']((_0x12e43a,_0x478b74)=>_0x406f56[_0x527de8(0xed)]({'market':_0xd5895f,'category':_0x12e43a['category'],'order':(_0x478b74+0x1)*0xa})),{'markets':_0x417ce2,'routes':_0x406f56,'market':_0xd5895f};}function _0x4121(_0x44671e,_0x319ee9){_0x44671e=_0x44671e-0xdc;const _0x15be3b=_0x15be();let _0x41214e=_0x15be3b[_0x44671e];return _0x41214e;}function groupRoutesByMarket(_0x20e3cc){const _0x5216a8=_0x550f6d;return _0x20e3cc[_0x5216a8(0xdf)]((_0x25f0b4,_0x5dd1d8)=>({'route':{..._0x25f0b4},'index':_0x5dd1d8}))['sort']((_0x5d0a5e,_0x3669bd)=>{const _0x5f279d=_0x5216a8,_0x5c447a=String(_0x5d0a5e[_0x5f279d(0xfc)][_0x5f279d(0xe6)]||'')[_0x5f279d(0x112)](String(_0x3669bd['route']['market']||''),'de',{'sensitivity':_0x5f279d(0xf9)});return _0x5c447a||_0x5d0a5e['index']-_0x3669bd['index'];})[_0x5216a8(0xdf)](_0x465ccb=>_0x465ccb['route']);}function ensureMarketRoutes(_0x35e2fc,_0x57c622,_0x21d434){const _0x2056e5=_0x550f6d,_0xea767b=_0x21d434['filter'](Boolean)['map'](_0x5cf4e3=>({..._0x5cf4e3})),_0x7836c6=new Set(_0xea767b[_0x2056e5(0xdf)](_0x448e20=>String(_0x448e20[_0x2056e5(0xe6)]||'')[_0x2056e5(0x10c)]()['toLocaleLowerCase']('de')+'\x00'+String(_0x448e20['category']||'')[_0x2056e5(0x10c)]()['toLocaleLowerCase']('de')));let _0x506d03=0x0;const _0x3a0c04=_0x35e2fc[_0x2056e5(0xfb)](_0x507fff=>_0x507fff&&_0x507fff['name']&&_0x507fff['enabled']!==![])[_0x2056e5(0xf3)]()[_0x2056e5(0xf2)]((_0x128eac,_0x2fa118)=>String(_0x128eac[_0x2056e5(0x10a)])[_0x2056e5(0x112)](String(_0x2fa118['name']),'de',{'sensitivity':'base'})),_0x4bef37=_0x57c622[_0x2056e5(0xfb)](_0x64f2db=>_0x64f2db&&_0x64f2db[_0x2056e5(0x10a)])[_0x2056e5(0xdf)](_0x4247ef=>String(_0x4247ef[_0x2056e5(0x10a)])[_0x2056e5(0x10c)]())[_0x2056e5(0xfb)](Boolean);for(const _0x1ea438 of _0x3a0c04){const _0x354475=String(_0x1ea438[_0x2056e5(0x10a)])[_0x2056e5(0x10c)](),_0x5f20e8=_0x354475['toLocaleLowerCase']('de');for(const _0xc5f6b2 of _0x4bef37){const _0x16e28c=_0x5f20e8+'\x00'+_0xc5f6b2[_0x2056e5(0xe3)]('de');if(_0x7836c6['has'](_0x16e28c))continue;_0xea767b[_0x2056e5(0xed)]({'market':_0x354475,'category':_0xc5f6b2,'order':0x0}),_0x7836c6['add'](_0x16e28c),_0x506d03+=0x1;}}return{'routes':reindexRoutes(groupRoutesByMarket(_0xea767b)),'added':_0x506d03};}function reindexRoutes(_0x11ec0e){const _0x51a3cc=_0x550f6d,_0x2d3e18=new Map();return _0x11ec0e[_0x51a3cc(0xdf)](_0x11de9e=>{const _0x544bf5=_0x51a3cc,_0x5a24a0=String(_0x11de9e['market']||'')[_0x544bf5(0xe3)]('de'),_0x21f48e=(_0x2d3e18[_0x544bf5(0xec)](_0x5a24a0)||0x0)+0x1;return _0x2d3e18[_0x544bf5(0x104)](_0x5a24a0,_0x21f48e),{..._0x11de9e,'order':_0x21f48e*0xa};});}function normalizeRoutesForAdmin(_0x2c9771){const _0x311a3b=_0x550f6d;return reindexRoutes(groupRoutesByMarket(_0x2c9771[_0x311a3b(0xfb)](Boolean)));}
|
package/build/lib/market-plan.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x1d9192=_0x132d;(function(_0x533528,_0x2af718){const _0x3e27a3=_0x132d,_0x36faa0=_0x533528();while(!![]){try{const _0x1a43b7=-parseInt(_0x3e27a3(0x174))/0x1+-parseInt(_0x3e27a3(0x1a0))/0x2+parseInt(_0x3e27a3(0x19e))/0x3+parseInt(_0x3e27a3(0x186))/0x4*(parseInt(_0x3e27a3(0x17e))/0x5)+-parseInt(_0x3e27a3(0x1a2))/0x6*(-parseInt(_0x3e27a3(0x179))/0x7)+parseInt(_0x3e27a3(0x18b))/0x8+-parseInt(_0x3e27a3(0x198))/0x9;if(_0x1a43b7===_0x2af718)break;else _0x36faa0['push'](_0x36faa0['shift']());}catch(_0x4955cb){_0x36faa0['push'](_0x36faa0['shift']());}}}(_0x2f8d,0x913da));function _0x132d(_0x13ee7c,_0x2ca1db){_0x13ee7c=_0x13ee7c-0x173;const _0x2f8dcd=_0x2f8d();let _0x132dd7=_0x2f8dcd[_0x13ee7c];return _0x132dd7;}Object[_0x1d9192(0x175)](exports,'__esModule',{'value':!![]}),exports[_0x1d9192(0x176)]=formatMarketHeader,exports[_0x1d9192(0x180)]=marketFromHeader,exports['isMarketHeader']=isMarketHeader,exports['realActiveItems']=realActiveItems,exports['optimizeMarketAssignments']=optimizeMarketAssignments,exports[_0x1d9192(0x182)]=requiredMarkets,exports['planMarketHeaderAction']=planMarketHeaderAction;const parser_1=require('./parser'),HEADER_PATTERN=/^----\s+(.+?)\s+----$/;function formatMarketHeader(_0x5cd50b){const _0x50ca6c=_0x1d9192;return'----\x20'+String(_0x5cd50b||'')[_0x50ca6c(0x18c)]()[_0x50ca6c(0x181)](_0x50ca6c(0x18a))+_0x50ca6c(0x178);}function marketFromHeader(_0x8ffb53,_0x4afcaf){const _0x1b6675=_0x1d9192,_0x1dd55e=String(_0x8ffb53||'')[_0x1b6675(0x18c)]()['match'](HEADER_PATTERN);if(!_0x1dd55e?.[0x1])return undefined;const _0x37de7d=(0x0,parser_1[_0x1b6675(0x184)])(_0x1dd55e[0x1]);return _0x4afcaf[_0x1b6675(0x183)](_0x41e522=>_0x41e522['enabled']!==![]&&(0x0,parser_1[_0x1b6675(0x184)])(_0x41e522['name'])===_0x37de7d)?.[_0x1b6675(0x18e)];}function isMarketHeader(_0xb23b9b,_0x3f304f){const _0x1dba57=_0x1d9192;return HEADER_PATTERN['test'](String(_0xb23b9b||'')[_0x1dba57(0x18c)]());}function realActiveItems(_0x4a0e1c,_0x35c3e1){const _0x17afce=_0x1d9192;return _0x4a0e1c[_0x17afce(0x19d)](_0x2d9fbd=>_0x2d9fbd&&_0x2d9fbd[_0x17afce(0x173)]===![]&&Boolean(_0x2d9fbd['id'])&&Boolean(String(_0x2d9fbd[_0x17afce(0x193)]||'')['trim']())&&!isMarketHeader(String(_0x2d9fbd[_0x17afce(0x193)]),_0x35c3e1));}function marketOrderMap(_0xcbb458){const _0x5f12e7=_0x1d9192;return new Map(_0xcbb458[_0x5f12e7(0x18f)](_0x1e7279=>[_0x1e7279[_0x5f12e7(0x18e)],Number['isFinite'](Number(_0x1e7279[_0x5f12e7(0x17d)]))?Number(_0x1e7279[_0x5f12e7(0x17d)]):0x270f]));}function rankedMarkets(_0x35914c,_0x1a6080,_0x552084){return[...new Set(_0x35914c)]['sort']((_0x34970f,_0xf83224)=>{const _0x3a75d7=_0x132d,_0x162598=(_0x1a6080[_0x3a75d7(0x17a)](_0xf83224)||0x0)-(_0x1a6080[_0x3a75d7(0x17a)](_0x34970f)||0x0);if(_0x162598!==0x0)return _0x162598;const _0x5602de=(_0x552084[_0x3a75d7(0x17a)](_0x34970f)||0x270f)-(_0x552084[_0x3a75d7(0x17a)](_0xf83224)||0x270f);if(_0x5602de!==0x0)return _0x5602de;return _0x34970f[_0x3a75d7(0x188)](_0xf83224,'de',{'sensitivity':_0x3a75d7(0x19a)});});}function allowedMarketsForItem(_0x4fcaea,_0x12700c,_0x2326d5){const _0x3c2adc=_0x1d9192;if(_0x4fcaea[_0x3c2adc(0x17c)][_0x3c2adc(0x199)])return[_0x4fcaea['parsed'][_0x3c2adc(0x1a4)]];const _0x1c7f50=(0x0,parser_1[_0x3c2adc(0x194)])(_0x4fcaea[_0x3c2adc(0x17c)][_0x3c2adc(0x177)],_0x2326d5);if(!_0x1c7f50)return[_0x4fcaea['parsed'][_0x3c2adc(0x1a4)]];const _0x2fb2d0=(0x0,parser_1[_0x3c2adc(0x17f)])(_0x1c7f50['availableMarkets'],_0x12700c);if(!_0x2fb2d0['length'])return[_0x4fcaea[_0x3c2adc(0x17c)]['market']];return[...new Set([_0x4fcaea['parsed'][_0x3c2adc(0x1a4)],..._0x2fb2d0])];}function optimizeMarketAssignments(_0x4efb44,_0x8c9cfe,_0xfca381,_0xf42ce,_0x32932e='',_0x22c5b3=0x1){const _0x69833f=_0x1d9192,_0x2928ae=_0x4efb44[_0x69833f(0x18f)](_0x1250ec=>({'source':_0x1250ec,'parsed':(0x0,parser_1[_0x69833f(0x1a3)])(String(_0x1250ec['value']),_0x8c9cfe,_0xfca381,_0xf42ce,_0x32932e)})),_0x44220c=Math[_0x69833f(0x191)](0x1,Math[_0x69833f(0x197)](Number(_0x22c5b3)||0x1));if(_0x44220c<=0x1||_0x2928ae[_0x69833f(0x19f)]<=0x1)return _0x2928ae;const _0xbf332d=marketOrderMap(_0x8c9cfe),_0x213f3=new Map(),_0x18d48f=new Map(),_0x3a0b69=new Map(),_0x296611=new Set();for(const _0x21e802 of _0x2928ae){const _0x4ee34a=_0x21e802['parsed'][_0x69833f(0x1a4)];_0x213f3[_0x69833f(0x19b)](_0x4ee34a,(_0x213f3[_0x69833f(0x17a)](_0x4ee34a)||0x0)+0x1);const _0x591796=_0x3a0b69['get'](_0x4ee34a)||[];_0x591796['push'](_0x21e802),_0x3a0b69[_0x69833f(0x19b)](_0x4ee34a,_0x591796);const _0x476e7e=allowedMarketsForItem(_0x21e802,_0x8c9cfe,_0xfca381);_0x18d48f[_0x69833f(0x19b)](String(_0x21e802['source']['id']),_0x476e7e);if(_0x21e802['parsed'][_0x69833f(0x199)]||_0x476e7e[_0x69833f(0x19f)]<=0x1)_0x296611[_0x69833f(0x19c)](_0x4ee34a);}for(const [_0xc0888b,_0x5eee46]of _0x213f3){if(_0x5eee46>=_0x44220c)_0x296611[_0x69833f(0x19c)](_0xc0888b);}if(!_0x296611[_0x69833f(0x18d)]&&_0x213f3['size']){const _0x3e657b=rankedMarkets(_0x213f3['keys'](),_0x213f3,_0xbf332d)[0x0];if(_0x3e657b)_0x296611[_0x69833f(0x19c)](_0x3e657b);}const _0x4eebb8=new Map();for(const _0x13c3b0 of _0x2928ae)_0x4eebb8['set'](String(_0x13c3b0['source']['id']),_0x13c3b0[_0x69833f(0x17c)]['market']);const _0x4bd31c=[..._0x3a0b69[_0x69833f(0x190)]()][_0x69833f(0x19d)](([_0x8a6833])=>!_0x296611[_0x69833f(0x195)](_0x8a6833))[_0x69833f(0x17b)]((_0x22f8f2,_0x26f01c)=>{const _0x76d464=_0x69833f,_0x5a0bcb=_0x22f8f2[0x1][_0x76d464(0x19f)]-_0x26f01c[0x1][_0x76d464(0x19f)];if(_0x5a0bcb!==0x0)return _0x5a0bcb;return(_0xbf332d['get'](_0x22f8f2[0x0])||0x270f)-(_0xbf332d[_0x76d464(0x17a)](_0x26f01c[0x0])||0x270f);});for(const [_0x959eaf,_0x4f8a8b]of _0x4bd31c){const _0x28fcde=new Map();let _0x3fa9e5=!![];for(const _0x3d7acb of _0x4f8a8b){const _0x821568=(_0x18d48f[_0x69833f(0x17a)](String(_0x3d7acb[_0x69833f(0x192)]['id']))||[_0x959eaf])[_0x69833f(0x19d)](_0x1a3cf6=>_0x296611[_0x69833f(0x195)](_0x1a3cf6)),_0x31a839=rankedMarkets(_0x821568,_0x213f3,_0xbf332d)[0x0];if(!_0x31a839){_0x3fa9e5=![];break;}_0x28fcde[_0x69833f(0x19b)](String(_0x3d7acb[_0x69833f(0x192)]['id']),_0x31a839);}if(!_0x3fa9e5){_0x296611[_0x69833f(0x19c)](_0x959eaf);continue;}for(const _0x160fda of _0x4f8a8b){const _0x42d216=String(_0x160fda['source']['id']),_0x2941fc=_0x28fcde[_0x69833f(0x17a)](_0x42d216);if(!_0x2941fc||_0x2941fc===_0x959eaf)continue;_0x4eebb8['set'](_0x42d216,_0x2941fc),_0x213f3['set'](_0x959eaf,Math[_0x69833f(0x191)](0x0,(_0x213f3[_0x69833f(0x17a)](_0x959eaf)||0x0)-0x1)),_0x213f3[_0x69833f(0x19b)](_0x2941fc,(_0x213f3['get'](_0x2941fc)||0x0)+0x1);}}return _0x2928ae[_0x69833f(0x18f)](_0x2bba9e=>{const _0x460518=_0x69833f,_0x570460=_0x4eebb8[_0x460518(0x17a)](String(_0x2bba9e[_0x460518(0x192)]['id']))||_0x2bba9e[_0x460518(0x17c)][_0x460518(0x1a4)];return _0x570460===_0x2bba9e[_0x460518(0x17c)][_0x460518(0x1a4)]?_0x2bba9e:{'source':_0x2bba9e['source'],'parsed':{..._0x2bba9e['parsed'],'market':_0x570460}};});}function _0x2f8d(){const _0x52bff1=['find','normalize','push','68uBczIp','delete','localeCompare','active','de-DE','1241720ZotyjZ','trim','size','name','map','entries','max','source','value','findProduct','has','create','floor','6269805jcbLVk','explicitMarket','base','set','add','filter','73356BAtbbu','length','902608ikcRGn','item','294KFMVNV','parseItem','market','completed','233626gPvgmF','defineProperty','formatMarketHeader','productText','\x20----','96691yuBDcT','get','sort','parsed','order','329405jxRsFJ','parseMarketList','marketFromHeader','toLocaleUpperCase','requiredMarkets'];_0x2f8d=function(){return _0x52bff1;};return _0x2f8d();}function requiredMarkets(_0x14a05e,_0x17aa4f,_0x26e150,_0x54b555,_0x56b7e3='',_0x29db69=0x1){const _0x4e9116=_0x1d9192,_0x54ab8f=marketOrderMap(_0x17aa4f),_0x1d727a=optimizeMarketAssignments(_0x14a05e,_0x17aa4f,_0x26e150,_0x54b555,_0x56b7e3,_0x29db69),_0x33b097=new Set(_0x1d727a[_0x4e9116(0x18f)](_0x3fcf28=>_0x3fcf28[_0x4e9116(0x17c)][_0x4e9116(0x1a4)])[_0x4e9116(0x19d)](_0x117e8f=>(0x0,parser_1[_0x4e9116(0x184)])(_0x117e8f)!==(0x0,parser_1[_0x4e9116(0x184)])(_0x54b555)));return[..._0x33b097]['sort']((_0x58bbfa,_0x3e6935)=>{const _0x143083=_0x4e9116,_0x1fb449=(_0x54ab8f['get'](_0x58bbfa)||0x270f)-(_0x54ab8f[_0x143083(0x17a)](_0x3e6935)||0x270f);if(_0x1fb449!==0x0)return _0x1fb449;return _0x58bbfa['localeCompare'](_0x3e6935,'de',{'sensitivity':_0x143083(0x19a)});});}function planMarketHeaderAction(_0x2df97a,_0x58c632,_0x2d2837,_0x34e0fd,_0x52c4ae){const _0x26497f=_0x1d9192,_0x45c6c8=new Set(_0x58c632[_0x26497f(0x18f)](parser_1[_0x26497f(0x184)])),_0x56ab74=new Map(),_0xa79604=[];for(const _0x371bad of _0x2df97a){const _0x1c1d99=String(_0x371bad?.['value']||'')['trim'](),_0x327f6b=_0x1c1d99['match'](HEADER_PATTERN);if(!_0x327f6b?.[0x1])continue;const _0x529816=marketFromHeader(_0x1c1d99,_0x2d2837);if(!_0x529816||(0x0,parser_1[_0x26497f(0x184)])(_0x529816)===(0x0,parser_1[_0x26497f(0x184)])(_0x34e0fd)){_0xa79604['push']({'market':_0x327f6b[0x1][_0x26497f(0x18c)](),'item':_0x371bad});continue;}const _0x2c2c25=(0x0,parser_1[_0x26497f(0x184)])(_0x529816),_0x292372=_0x56ab74[_0x26497f(0x17a)](_0x2c2c25)||{'market':_0x529816,'active':[],'completed':[]};if(_0x371bad['completed']===![])_0x292372[_0x26497f(0x189)][_0x26497f(0x185)](_0x371bad);else _0x292372['completed'][_0x26497f(0x185)](_0x371bad);_0x56ab74[_0x26497f(0x19b)](_0x2c2c25,_0x292372);}if(_0xa79604[_0x26497f(0x19f)]){const _0xc25d3a=_0xa79604[0x0];return{'type':_0x26497f(0x187),'market':_0xc25d3a[_0x26497f(0x1a4)],'id':String(_0xc25d3a[_0x26497f(0x1a1)]['id'])};}if(!_0x52c4ae){for(const _0x21582d of _0x2d2837){const _0xac0a90=_0x56ab74[_0x26497f(0x17a)]((0x0,parser_1['normalize'])(_0x21582d[_0x26497f(0x18e)])),_0x541283=_0xac0a90?.[_0x26497f(0x189)][0x0]||_0xac0a90?.['completed'][0x0];if(_0x541283)return{'type':_0x26497f(0x187),'market':_0xac0a90?.[_0x26497f(0x1a4)]||_0x21582d['name'],'id':String(_0x541283['id'])};}return null;}for(const _0x24f8e7 of _0x58c632){const _0x299503=(0x0,parser_1[_0x26497f(0x184)])(_0x24f8e7),_0x46285a=_0x56ab74['get'](_0x299503);if(_0x46285a?.['active']['length']){if(_0x46285a[_0x26497f(0x173)][_0x26497f(0x19f)])return{'type':'delete','market':_0x24f8e7,'id':String(_0x46285a[_0x26497f(0x173)][0x0]['id'])};if(_0x46285a[_0x26497f(0x189)][_0x26497f(0x19f)]>0x1)return{'type':_0x26497f(0x187),'market':_0x24f8e7,'id':String(_0x46285a[_0x26497f(0x189)][0x1]['id'])};continue;}if(_0x46285a?.[_0x26497f(0x173)][_0x26497f(0x19f)])return{'type':_0x26497f(0x187),'market':_0x24f8e7,'id':String(_0x46285a[_0x26497f(0x173)][0x0]['id'])};return{'type':_0x26497f(0x196),'market':_0x24f8e7,'value':formatMarketHeader(_0x24f8e7)};}for(const _0x1e5984 of _0x2d2837){const _0x227444=(0x0,parser_1[_0x26497f(0x184)])(_0x1e5984[_0x26497f(0x18e)]);if((0x0,parser_1['normalize'])(_0x1e5984[_0x26497f(0x18e)])===(0x0,parser_1[_0x26497f(0x184)])(_0x34e0fd)||_0x45c6c8[_0x26497f(0x195)](_0x227444))continue;const _0x12918d=_0x56ab74[_0x26497f(0x17a)](_0x227444),_0x5613ce=_0x12918d?.[_0x26497f(0x189)][0x0]||_0x12918d?.['completed'][0x0];if(_0x5613ce)return{'type':_0x26497f(0x187),'market':_0x1e5984['name'],'id':String(_0x5613ce['id'])};}return null;}
|
|
1
|
+
'use strict';const _0x302bd9=_0x5a1b;(function(_0x224a14,_0x4be49c){const _0x56c835=_0x5a1b,_0x391d6c=_0x224a14();while(!![]){try{const _0x4b851f=parseInt(_0x56c835(0x8c))/0x1+parseInt(_0x56c835(0x83))/0x2*(parseInt(_0x56c835(0x9e))/0x3)+parseInt(_0x56c835(0x9c))/0x4*(parseInt(_0x56c835(0x7a))/0x5)+parseInt(_0x56c835(0x8f))/0x6+parseInt(_0x56c835(0x92))/0x7*(parseInt(_0x56c835(0x82))/0x8)+parseInt(_0x56c835(0x9a))/0x9*(parseInt(_0x56c835(0x80))/0xa)+-parseInt(_0x56c835(0x94))/0xb;if(_0x4b851f===_0x4be49c)break;else _0x391d6c['push'](_0x391d6c['shift']());}catch(_0x5e51ee){_0x391d6c['push'](_0x391d6c['shift']());}}}(_0x2677,0xe8d3e));function _0x2677(){const _0x21b273=['sort','availableMarkets','parseMarketList','formatMarketHeader','name','value','defineProperty','872038PNSPpd','marketFromHeader','get','3105054wfcgLg','trim','map','539GhULXF','optimizeMarketAssignments','55721787cKkVzK','match','order','filter','active','__esModule','12866859tKHgPf','toLocaleUpperCase','4ZNofZz','\x20----','102IxNLoD','normalize','parsed','isMarketHeader','floor','de-DE','create','enabled','explicitMarket','delete','productText','length','keys','entries','max','market','add','push','4293035kqSGjS','size','test','source','completed','find','10sbawZH','set','113360BhsamP','73552OcOcXY','base'];_0x2677=function(){return _0x21b273;};return _0x2677();}Object[_0x302bd9(0x8b)](exports,_0x302bd9(0x99),{'value':!![]}),exports[_0x302bd9(0x88)]=formatMarketHeader,exports[_0x302bd9(0x8d)]=marketFromHeader,exports[_0x302bd9(0xa1)]=isMarketHeader,exports['realActiveItems']=realActiveItems,exports[_0x302bd9(0x93)]=optimizeMarketAssignments,exports['requiredMarkets']=requiredMarkets,exports['planMarketHeaderAction']=planMarketHeaderAction;const parser_1=require('./parser'),HEADER_PATTERN=/^----\s+(.+?)\s+----$/;function formatMarketHeader(_0x5c826c){const _0x902df1=_0x302bd9;return'----\x20'+String(_0x5c826c||'')[_0x902df1(0x90)]()[_0x902df1(0x9b)](_0x902df1(0xa3))+_0x902df1(0x9d);}function marketFromHeader(_0x425fdd,_0x2921bf){const _0x1f037b=_0x302bd9,_0x5394ab=String(_0x425fdd||'')['trim']()[_0x1f037b(0x95)](HEADER_PATTERN);if(!_0x5394ab?.[0x1])return undefined;const _0xfa5500=(0x0,parser_1[_0x1f037b(0x9f)])(_0x5394ab[0x1]);return _0x2921bf[_0x1f037b(0x7f)](_0x20108a=>_0x20108a[_0x1f037b(0xa5)]!==![]&&(0x0,parser_1[_0x1f037b(0x9f)])(_0x20108a[_0x1f037b(0x89)])===_0xfa5500)?.[_0x1f037b(0x89)];}function isMarketHeader(_0x31c5a7,_0x240020){const _0x1d39d9=_0x302bd9;return HEADER_PATTERN[_0x1d39d9(0x7c)](String(_0x31c5a7||'')[_0x1d39d9(0x90)]());}function _0x5a1b(_0x4b9ad7,_0x1b0548){_0x4b9ad7=_0x4b9ad7-0x76;const _0x26772b=_0x2677();let _0x5a1b0b=_0x26772b[_0x4b9ad7];return _0x5a1b0b;}function realActiveItems(_0x3ff729,_0x267d9d){const _0xd5fce6=_0x302bd9;return _0x3ff729['filter'](_0x2ec38c=>_0x2ec38c&&_0x2ec38c[_0xd5fce6(0x7e)]===![]&&Boolean(_0x2ec38c['id'])&&Boolean(String(_0x2ec38c[_0xd5fce6(0x8a)]||'')[_0xd5fce6(0x90)]())&&!isMarketHeader(String(_0x2ec38c[_0xd5fce6(0x8a)]),_0x267d9d));}function marketOrderMap(_0x3a1438){const _0x2c30aa=_0x302bd9;return new Map(_0x3a1438[_0x2c30aa(0x91)](_0x1e99a1=>[_0x1e99a1[_0x2c30aa(0x89)],Number['isFinite'](Number(_0x1e99a1['order']))?Number(_0x1e99a1[_0x2c30aa(0x96)]):0x270f]));}function rankedMarkets(_0x581d23,_0x1d848b,_0xfcdc21){const _0x2d8cc1=_0x302bd9;return[...new Set(_0x581d23)][_0x2d8cc1(0x85)]((_0x57a062,_0x1c823e)=>{const _0x1e3911=_0x2d8cc1,_0x5d3773=(_0x1d848b['get'](_0x1c823e)||0x0)-(_0x1d848b[_0x1e3911(0x8e)](_0x57a062)||0x0);if(_0x5d3773!==0x0)return _0x5d3773;const _0x506cf7=(_0xfcdc21[_0x1e3911(0x8e)](_0x57a062)||0x270f)-(_0xfcdc21[_0x1e3911(0x8e)](_0x1c823e)||0x270f);if(_0x506cf7!==0x0)return _0x506cf7;return _0x57a062['localeCompare'](_0x1c823e,'de',{'sensitivity':_0x1e3911(0x84)});});}function allowedMarketsForItem(_0x287d68,_0x3aaba2,_0x172e6e){const _0x10fb09=_0x302bd9;if(_0x287d68['parsed'][_0x10fb09(0xa6)])return[_0x287d68[_0x10fb09(0xa0)]['market']];const _0x44de00=(0x0,parser_1['findProduct'])(_0x287d68[_0x10fb09(0xa0)][_0x10fb09(0xa8)],_0x172e6e);if(!_0x44de00)return[_0x287d68['parsed']['market']];const _0x5869f2=(0x0,parser_1[_0x10fb09(0x87)])(_0x44de00[_0x10fb09(0x86)],_0x3aaba2);if(!_0x5869f2[_0x10fb09(0xa9)])return[_0x287d68[_0x10fb09(0xa0)][_0x10fb09(0x77)]];return[...new Set([_0x287d68['parsed']['market'],..._0x5869f2])];}function optimizeMarketAssignments(_0xc0a739,_0x58c66b,_0x23c84a,_0x45b2ad,_0x57c11b='',_0x348241=0x1){const _0x2f72af=_0x302bd9,_0x46852e=_0xc0a739[_0x2f72af(0x91)](_0x54342e=>({'source':_0x54342e,'parsed':(0x0,parser_1['parseItem'])(String(_0x54342e['value']),_0x58c66b,_0x23c84a,_0x45b2ad,_0x57c11b)})),_0x573d32=Math[_0x2f72af(0x76)](0x1,Math[_0x2f72af(0xa2)](Number(_0x348241)||0x1));if(_0x573d32<=0x1||_0x46852e['length']<=0x1)return _0x46852e;const _0x4875ea=marketOrderMap(_0x58c66b),_0x3a1053=new Map(),_0x15995b=new Map(),_0x5e6881=new Map(),_0x44d00d=new Set();for(const _0x9211c of _0x46852e){const _0x522c9e=_0x9211c['parsed'][_0x2f72af(0x77)];_0x3a1053[_0x2f72af(0x81)](_0x522c9e,(_0x3a1053[_0x2f72af(0x8e)](_0x522c9e)||0x0)+0x1);const _0x43edca=_0x5e6881[_0x2f72af(0x8e)](_0x522c9e)||[];_0x43edca[_0x2f72af(0x79)](_0x9211c),_0x5e6881['set'](_0x522c9e,_0x43edca);const _0x5db26f=allowedMarketsForItem(_0x9211c,_0x58c66b,_0x23c84a);_0x15995b[_0x2f72af(0x81)](String(_0x9211c['source']['id']),_0x5db26f);if(_0x9211c[_0x2f72af(0xa0)][_0x2f72af(0xa6)]||_0x5db26f[_0x2f72af(0xa9)]<=0x1)_0x44d00d[_0x2f72af(0x78)](_0x522c9e);}for(const [_0x50f342,_0x3295d5]of _0x3a1053){if(_0x3295d5>=_0x573d32)_0x44d00d['add'](_0x50f342);}if(!_0x44d00d[_0x2f72af(0x7b)]&&_0x3a1053[_0x2f72af(0x7b)]){const _0x4931fc=rankedMarkets(_0x3a1053[_0x2f72af(0xaa)](),_0x3a1053,_0x4875ea)[0x0];if(_0x4931fc)_0x44d00d[_0x2f72af(0x78)](_0x4931fc);}const _0x38e408=new Map();for(const _0x13be54 of _0x46852e)_0x38e408[_0x2f72af(0x81)](String(_0x13be54['source']['id']),_0x13be54[_0x2f72af(0xa0)][_0x2f72af(0x77)]);const _0x43cec2=[..._0x5e6881[_0x2f72af(0xab)]()][_0x2f72af(0x97)](([_0x423ba1])=>!_0x44d00d['has'](_0x423ba1))[_0x2f72af(0x85)]((_0x5809f0,_0x5b7ea7)=>{const _0x112a1e=_0x2f72af,_0x2496ad=_0x5809f0[0x1][_0x112a1e(0xa9)]-_0x5b7ea7[0x1]['length'];if(_0x2496ad!==0x0)return _0x2496ad;return(_0x4875ea[_0x112a1e(0x8e)](_0x5809f0[0x0])||0x270f)-(_0x4875ea[_0x112a1e(0x8e)](_0x5b7ea7[0x0])||0x270f);});for(const [_0x17b1de,_0x1adac6]of _0x43cec2){const _0x22bc3a=new Map();let _0x5b0c67=!![];for(const _0x3f70b8 of _0x1adac6){const _0x2c8434=(_0x15995b[_0x2f72af(0x8e)](String(_0x3f70b8[_0x2f72af(0x7d)]['id']))||[_0x17b1de])[_0x2f72af(0x97)](_0x2914a=>_0x44d00d['has'](_0x2914a)),_0x3f006f=rankedMarkets(_0x2c8434,_0x3a1053,_0x4875ea)[0x0];if(!_0x3f006f){_0x5b0c67=![];break;}_0x22bc3a[_0x2f72af(0x81)](String(_0x3f70b8[_0x2f72af(0x7d)]['id']),_0x3f006f);}if(!_0x5b0c67){_0x44d00d['add'](_0x17b1de);continue;}for(const _0x357581 of _0x1adac6){const _0x2c6e95=String(_0x357581['source']['id']),_0x15042b=_0x22bc3a[_0x2f72af(0x8e)](_0x2c6e95);if(!_0x15042b||_0x15042b===_0x17b1de)continue;_0x38e408[_0x2f72af(0x81)](_0x2c6e95,_0x15042b),_0x3a1053[_0x2f72af(0x81)](_0x17b1de,Math['max'](0x0,(_0x3a1053[_0x2f72af(0x8e)](_0x17b1de)||0x0)-0x1)),_0x3a1053[_0x2f72af(0x81)](_0x15042b,(_0x3a1053[_0x2f72af(0x8e)](_0x15042b)||0x0)+0x1);}}return _0x46852e[_0x2f72af(0x91)](_0x16bc45=>{const _0x875a75=_0x2f72af,_0x4f3038=_0x38e408[_0x875a75(0x8e)](String(_0x16bc45['source']['id']))||_0x16bc45[_0x875a75(0xa0)][_0x875a75(0x77)];return _0x4f3038===_0x16bc45[_0x875a75(0xa0)]['market']?_0x16bc45:{'source':_0x16bc45[_0x875a75(0x7d)],'parsed':{..._0x16bc45[_0x875a75(0xa0)],'market':_0x4f3038}};});}function requiredMarkets(_0x34a259,_0x338eda,_0x4ce49a,_0x59a614,_0x58ffb4='',_0x412746=0x1){const _0x3024df=_0x302bd9,_0x25dc74=marketOrderMap(_0x338eda),_0x22565d=optimizeMarketAssignments(_0x34a259,_0x338eda,_0x4ce49a,_0x59a614,_0x58ffb4,_0x412746),_0x321e70=new Set(_0x22565d['map'](_0x4d4cfd=>_0x4d4cfd[_0x3024df(0xa0)][_0x3024df(0x77)])[_0x3024df(0x97)](_0x887f9e=>(0x0,parser_1[_0x3024df(0x9f)])(_0x887f9e)!==(0x0,parser_1[_0x3024df(0x9f)])(_0x59a614)));return[..._0x321e70]['sort']((_0x56203d,_0x90fa56)=>{const _0xadf982=_0x3024df,_0x4cdbbe=(_0x25dc74[_0xadf982(0x8e)](_0x56203d)||0x270f)-(_0x25dc74[_0xadf982(0x8e)](_0x90fa56)||0x270f);if(_0x4cdbbe!==0x0)return _0x4cdbbe;return _0x56203d['localeCompare'](_0x90fa56,'de',{'sensitivity':_0xadf982(0x84)});});}function planMarketHeaderAction(_0x4d517f,_0x9cd2fe,_0x1f181c,_0x5d8099,_0x136ae7){const _0x4bc1a8=_0x302bd9,_0x5af56e=new Set(_0x9cd2fe[_0x4bc1a8(0x91)](parser_1['normalize'])),_0xd84efa=new Map(),_0x3d0151=[];for(const _0x172bc8 of _0x4d517f){const _0x419245=String(_0x172bc8?.['value']||'')[_0x4bc1a8(0x90)](),_0x14bc4e=_0x419245[_0x4bc1a8(0x95)](HEADER_PATTERN);if(!_0x14bc4e?.[0x1])continue;const _0x432668=marketFromHeader(_0x419245,_0x1f181c);if(!_0x432668||(0x0,parser_1[_0x4bc1a8(0x9f)])(_0x432668)===(0x0,parser_1[_0x4bc1a8(0x9f)])(_0x5d8099)){_0x3d0151[_0x4bc1a8(0x79)]({'market':_0x14bc4e[0x1]['trim'](),'item':_0x172bc8});continue;}const _0x18fed9=(0x0,parser_1['normalize'])(_0x432668),_0xd2f2c=_0xd84efa[_0x4bc1a8(0x8e)](_0x18fed9)||{'market':_0x432668,'active':[],'completed':[]};if(_0x172bc8['completed']===![])_0xd2f2c['active']['push'](_0x172bc8);else _0xd2f2c['completed']['push'](_0x172bc8);_0xd84efa[_0x4bc1a8(0x81)](_0x18fed9,_0xd2f2c);}if(_0x3d0151[_0x4bc1a8(0xa9)]){const _0x51e7fc=_0x3d0151[0x0];return{'type':_0x4bc1a8(0xa7),'market':_0x51e7fc[_0x4bc1a8(0x77)],'id':String(_0x51e7fc['item']['id'])};}if(!_0x136ae7){for(const _0x426b56 of _0x1f181c){const _0x368fc2=_0xd84efa[_0x4bc1a8(0x8e)]((0x0,parser_1[_0x4bc1a8(0x9f)])(_0x426b56[_0x4bc1a8(0x89)])),_0x44f442=_0x368fc2?.[_0x4bc1a8(0x98)][0x0]||_0x368fc2?.[_0x4bc1a8(0x7e)][0x0];if(_0x44f442)return{'type':_0x4bc1a8(0xa7),'market':_0x368fc2?.['market']||_0x426b56[_0x4bc1a8(0x89)],'id':String(_0x44f442['id'])};}return null;}for(const _0x9223cd of _0x9cd2fe){const _0x29b8b3=(0x0,parser_1['normalize'])(_0x9223cd),_0x52cb88=_0xd84efa['get'](_0x29b8b3);if(_0x52cb88?.[_0x4bc1a8(0x98)][_0x4bc1a8(0xa9)]){if(_0x52cb88['completed'][_0x4bc1a8(0xa9)])return{'type':'delete','market':_0x9223cd,'id':String(_0x52cb88[_0x4bc1a8(0x7e)][0x0]['id'])};if(_0x52cb88['active'][_0x4bc1a8(0xa9)]>0x1)return{'type':'delete','market':_0x9223cd,'id':String(_0x52cb88[_0x4bc1a8(0x98)][0x1]['id'])};continue;}if(_0x52cb88?.['completed']['length'])return{'type':_0x4bc1a8(0xa7),'market':_0x9223cd,'id':String(_0x52cb88[_0x4bc1a8(0x7e)][0x0]['id'])};return{'type':_0x4bc1a8(0xa4),'market':_0x9223cd,'value':formatMarketHeader(_0x9223cd)};}for(const _0x1c212e of _0x1f181c){const _0x50fccc=(0x0,parser_1['normalize'])(_0x1c212e['name']);if((0x0,parser_1['normalize'])(_0x1c212e[_0x4bc1a8(0x89)])===(0x0,parser_1[_0x4bc1a8(0x9f)])(_0x5d8099)||_0x5af56e['has'](_0x50fccc))continue;const _0x4d0263=_0xd84efa['get'](_0x50fccc),_0x2f93e3=_0x4d0263?.[_0x4bc1a8(0x98)][0x0]||_0x4d0263?.[_0x4bc1a8(0x7e)][0x0];if(_0x2f93e3)return{'type':_0x4bc1a8(0xa7),'market':_0x1c212e[_0x4bc1a8(0x89)],'id':String(_0x2f93e3['id'])};}return null;}
|
package/build/lib/metrics.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function _0x1ba1(_0x2fcc09,_0x3c5828){_0x2fcc09=_0x2fcc09-0x92;const _0x4f567f=_0x4f56();let _0x1ba1c6=_0x4f567f[_0x2fcc09];return _0x1ba1c6;}const _0x575ff4=_0x1ba1;(function(_0x1be100,_0x530267){const _0x36d270=_0x1ba1,_0x3d633b=_0x1be100();while(!![]){try{const _0x56846e=-parseInt(_0x36d270(0xa8))/0x1*(-parseInt(_0x36d270(0x92))/0x2)+parseInt(_0x36d270(0x95))/0x3*(parseInt(_0x36d270(0x99))/0x4)+parseInt(_0x36d270(0xa9))/0x5+parseInt(_0x36d270(0xa0))/0x6*(parseInt(_0x36d270(0xa1))/0x7)+parseInt(_0x36d270(0xab))/0x8+-parseInt(_0x36d270(0x9d))/0x9+-parseInt(_0x36d270(0x9e))/0xa;if(_0x56846e===_0x530267)break;else _0x3d633b['push'](_0x3d633b['shift']());}catch(_0x492acd){_0x3d633b['push'](_0x3d633b['shift']());}}}(_0x4f56,0x66c00));Object[_0x575ff4(0x97)](exports,_0x575ff4(0x96),{'value':!![]}),exports[_0x575ff4(0xa7)]=metricDate,exports[_0x575ff4(0x93)]=emptyTrafficMetrics,exports['normalizeTrafficMetrics']=normalizeTrafficMetrics;function metricDate(_0x542d37=new Date()){const _0x3d5202=_0x575ff4,_0x32a150=_0x542d37[_0x3d5202(0x9c)](),_0x291f68=String(_0x542d37[_0x3d5202(0x9f)]()+0x1)['padStart'](0x2,'0'),_0x5d8997=String(_0x542d37['getDate']())[_0x3d5202(0xa6)](0x2,'0');return _0x32a150+'-'+_0x291f68+'-'+_0x5d8997;}function _0x4f56(){const _0x1f3b66=['lastSortRun','alexaWrites','padStart','metricDate','1iQeOfe','2917340eheANi','sortRuns','2887616PQRuoP','227362Utinkd','emptyTrafficMetrics','date','5334YySPNA','__esModule','defineProperty','compatibilityWrites','208HbWTCZ','plannedChanges','max','getFullYear','6341346evYZJI','6257540kkoRjX','getMonth','22110TSEvkg','1141hbAKDq','localChecks','lastAlexaWrite'];_0x4f56=function(){return _0x1f3b66;};return _0x4f56();}function emptyTrafficMetrics(_0x4437dd=new Date()){return{'date':metricDate(_0x4437dd),'localChecks':0x0,'plannedChanges':0x0,'sortRuns':0x0,'alexaWrites':0x0,'compatibilityWrites':0x0,'abortedRuns':0x0,'lastAlexaWrite':'','lastSortRun':''};}function normalizeTrafficMetrics(_0x350bfe,_0x20965a=new Date()){const _0x3986fb=_0x575ff4,_0x47829e=emptyTrafficMetrics(_0x20965a);if(!_0x350bfe||typeof _0x350bfe!=='object')return _0x47829e;const _0x22c77b=_0x350bfe;if(String(_0x22c77b[_0x3986fb(0x94)]||'')!==_0x47829e['date'])return _0x47829e;return{'date':_0x47829e['date'],'localChecks':Math[_0x3986fb(0x9b)](0x0,Number(_0x22c77b[_0x3986fb(0xa2)])||0x0),'plannedChanges':Math['max'](0x0,Number(_0x22c77b[_0x3986fb(0x9a)])||0x0),'sortRuns':Math['max'](0x0,Number(_0x22c77b[_0x3986fb(0xaa)])||0x0),'alexaWrites':Math[_0x3986fb(0x9b)](0x0,Number(_0x22c77b[_0x3986fb(0xa5)])||0x0),'compatibilityWrites':Math['max'](0x0,Number(_0x22c77b[_0x3986fb(0x98)])||0x0),'abortedRuns':Math[_0x3986fb(0x9b)](0x0,Number(_0x22c77b['abortedRuns'])||0x0),'lastAlexaWrite':String(_0x22c77b[_0x3986fb(0xa3)]||''),'lastSortRun':String(_0x22c77b[_0x3986fb(0xa4)]||'')};}
|
package/build/lib/model.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function _0xce8a(_0xe17ef5,_0x222287){_0xe17ef5=_0xe17ef5-0x16a;var _0x4fb81e=_0x4fb8();var _0xce8a59=_0x4fb81e[_0xe17ef5];return _0xce8a59;}function _0x4fb8(){var _0x41c149=['1511209sVNWUV','defineProperty','11178871wxNGUi','10ucPcBW','6658736eVnFRW','16wBKsdx','35iWxMkr','4777668YJdnfr','946446fdXmWS','62943CibZFG','70WQujvl','1270665rPADMT'];_0x4fb8=function(){return _0x41c149;};return _0x4fb8();}var _0x58abf9=_0xce8a;(function(_0x144237,_0x1f39b6){var _0x55af36=_0xce8a,_0x77ed8=_0x144237();while(!![]){try{var _0x4d64ae=parseInt(_0x55af36(0x171))/0x1+parseInt(_0x55af36(0x170))/0x2*(-parseInt(_0x55af36(0x16f))/0x3)+-parseInt(_0x55af36(0x16a))/0x4+parseInt(_0x55af36(0x16c))/0x5*(parseInt(_0x55af36(0x16e))/0x6)+-parseInt(_0x55af36(0x172))/0x7*(-parseInt(_0x55af36(0x16b))/0x8)+-parseInt(_0x55af36(0x16d))/0x9+parseInt(_0x55af36(0x175))/0xa*(parseInt(_0x55af36(0x174))/0xb);if(_0x4d64ae===_0x1f39b6)break;else _0x77ed8['push'](_0x77ed8['shift']());}catch(_0x412750){_0x77ed8['push'](_0x77ed8['shift']());}}}(_0x4fb8,0xda058));Object[_0x58abf9(0x173)](exports,'__esModule',{'value':!![]});
|
package/build/lib/parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x3ba275=_0x3dd8;function _0x3dd8(_0x39571e,_0x26700b){_0x39571e=_0x39571e-0xe0;const _0x17478c=_0x1747();let _0x3dd81a=_0x17478c[_0x39571e];return _0x3dd81a;}(function(_0x4370fb,_0x4d0680){const _0x1ef489=_0x3dd8,_0x9bff2e=_0x4370fb();while(!![]){try{const _0x5a44d3=parseInt(_0x1ef489(0x136))/0x1*(parseInt(_0x1ef489(0x155))/0x2)+-parseInt(_0x1ef489(0x197))/0x3+-parseInt(_0x1ef489(0x16a))/0x4*(parseInt(_0x1ef489(0x18c))/0x5)+-parseInt(_0x1ef489(0x137))/0x6*(parseInt(_0x1ef489(0xfa))/0x7)+parseInt(_0x1ef489(0x17c))/0x8*(-parseInt(_0x1ef489(0x168))/0x9)+parseInt(_0x1ef489(0x17a))/0xa*(-parseInt(_0x1ef489(0x11e))/0xb)+parseInt(_0x1ef489(0x1b3))/0xc*(parseInt(_0x1ef489(0x133))/0xd);if(_0x5a44d3===_0x4d0680)break;else _0x9bff2e['push'](_0x9bff2e['shift']());}catch(_0xaeff8d){_0x9bff2e['push'](_0x9bff2e['shift']());}}}(_0x1747,0xdaf94));Object['defineProperty'](exports,_0x3ba275(0x1b1),{'value':!![]}),exports[_0x3ba275(0x1a8)]=normalize,exports[_0x3ba275(0x182)]=normalizeLoose,exports['splitAliases']=splitAliases,exports[_0x3ba275(0x130)]=marketAliases,exports[_0x3ba275(0x126)]=resolveMarket,exports['stripQuantityDetailed']=stripQuantityDetailed,exports[_0x3ba275(0x13c)]=stripQuantity,exports[_0x3ba275(0xfd)]=canonicalProductKey,exports[_0x3ba275(0x143)]=findProduct,exports[_0x3ba275(0x11a)]=guessCategory,exports[_0x3ba275(0x1c6)]=guessCategorySmart,exports[_0x3ba275(0x125)]=parseMarketList,exports['parseItem']=parseItem,exports[_0x3ba275(0x12f)]=suggestAliases;const CATEGORY_RULES=[{'category':'TK-Produkte','terms':[_0x3ba275(0xfe),'tiefkuehl',_0x3ba275(0x15b),_0x3ba275(0x1c9),'fischstäb',_0x3ba275(0x16e),_0x3ba275(0x14a),_0x3ba275(0x1bf)]},{'category':_0x3ba275(0x1c8),'terms':[_0x3ba275(0x120),'dosen',_0x3ba275(0xfc),'cornedbeef','corned\x20beef',_0x3ba275(0x158),_0x3ba275(0x1a0),_0x3ba275(0x132),_0x3ba275(0x16f),'aioli']},{'category':'H-Milch/Nudeln','terms':[_0x3ba275(0x10c),_0x3ba275(0x15a),'nudel',_0x3ba275(0x188),_0x3ba275(0xea),_0x3ba275(0x1af),_0x3ba275(0x169),_0x3ba275(0x18e),'speisestaerke','öl','oel']},{'category':_0x3ba275(0x194),'terms':[_0x3ba275(0x13a),'küchenrolle','kuechenrolle',_0x3ba275(0x174),_0x3ba275(0x1b5),'muellbeutel','spülmittel',_0x3ba275(0x1a4),_0x3ba275(0x110),'reiniger',_0x3ba275(0x159),'putztuch']},{'category':'Kosmetikartikel','terms':[_0x3ba275(0x145),_0x3ba275(0x15c),'zahnpasta',_0x3ba275(0x15e),'zahnbuerste','deo',_0x3ba275(0x180),_0x3ba275(0x160),_0x3ba275(0x142),_0x3ba275(0x18f)]},{'category':_0x3ba275(0x19b),'terms':['pinsel',_0x3ba275(0x1b6),_0x3ba275(0x18b),_0x3ba275(0x1bc),'katzenfutter',_0x3ba275(0x12e),_0x3ba275(0x192),_0x3ba275(0x139)]},{'category':_0x3ba275(0x16b),'terms':[_0x3ba275(0x1c3),_0x3ba275(0xeb),'pepsi',_0x3ba275(0x1c0),'limonade','sprite',_0x3ba275(0x122),_0x3ba275(0x14f),'getränk',_0x3ba275(0x19f)]},{'category':_0x3ba275(0x187),'terms':['tee','kaffee',_0x3ba275(0x179),_0x3ba275(0x167)]},{'category':_0x3ba275(0x199),'terms':[_0x3ba275(0x184),_0x3ba275(0x191),_0x3ba275(0x1b7),_0x3ba275(0x121),_0x3ba275(0x19c),_0x3ba275(0x116),'torte',_0x3ba275(0xf7),'apfeltasche']},{'category':_0x3ba275(0x100),'terms':['schokolade','gummi',_0x3ba275(0x162),_0x3ba275(0x111),_0x3ba275(0x119),'bonbon',_0x3ba275(0x127),_0x3ba275(0xe2),_0x3ba275(0x106),_0x3ba275(0xf0),_0x3ba275(0x12d),_0x3ba275(0x1b0)]},{'category':_0x3ba275(0xf3),'terms':[_0x3ba275(0x140),'schinken',_0x3ba275(0xe6),'leberwurst',_0x3ba275(0xfb),_0x3ba275(0x173),_0x3ba275(0x12a),_0x3ba275(0x1bb),'frikadelle',_0x3ba275(0x181),_0x3ba275(0x17d),'kartoffelsalat',_0x3ba275(0xf1),_0x3ba275(0x1a1),_0x3ba275(0x18a),_0x3ba275(0xee),_0x3ba275(0x1c4),_0x3ba275(0x141),_0x3ba275(0xf6)]},{'category':_0x3ba275(0xe7),'terms':['milch','joghurt',_0x3ba275(0x10e),_0x3ba275(0x11d),_0x3ba275(0x147),_0x3ba275(0xf5),_0x3ba275(0x149),_0x3ba275(0x156),_0x3ba275(0x170),_0x3ba275(0x129),_0x3ba275(0x163),_0x3ba275(0x144),_0x3ba275(0x102),'brunch','ei',_0x3ba275(0x108)]},{'category':_0x3ba275(0x101),'terms':[_0x3ba275(0x118),'hack',_0x3ba275(0x1ca),_0x3ba275(0x146),_0x3ba275(0x113),_0x3ba275(0x150),_0x3ba275(0x157),_0x3ba275(0x10d),'lachs',_0x3ba275(0x15f),_0x3ba275(0x1ad)]},{'category':_0x3ba275(0x15d),'terms':['apfel','äpfel',_0x3ba275(0x123),_0x3ba275(0xef),_0x3ba275(0x18d),_0x3ba275(0x109),'nektarine',_0x3ba275(0xe3),_0x3ba275(0x183),_0x3ba275(0x17b),_0x3ba275(0x189),_0x3ba275(0x112),'gurke',_0x3ba275(0x117),'paprika',_0x3ba275(0x166),_0x3ba275(0x134),_0x3ba275(0x1a5),'kartoffel',_0x3ba275(0x195),_0x3ba275(0x1c1),'zitrone',_0x3ba275(0x1c2),_0x3ba275(0x165),_0x3ba275(0x193),'gemuese','dill',_0x3ba275(0x19a)]}],QUANTITY_UNITS=[_0x3ba275(0x151),_0x3ba275(0x186),_0x3ba275(0x1a7),'packungen',_0x3ba275(0x185),_0x3ba275(0x1c5),_0x3ba275(0x14b),'flaschen',_0x3ba275(0x120),_0x3ba275(0xe5),_0x3ba275(0x138),'glas',_0x3ba275(0x13b),_0x3ba275(0xe0),'kg',_0x3ba275(0x1ba),_0x3ba275(0x11f),'g',_0x3ba275(0xf8),'l','liter','ml','milliliter',_0x3ba275(0x103),'netz','schachtel',_0x3ba275(0x190),_0x3ba275(0x131),_0x3ba275(0x1c7),_0x3ba275(0x1b9),'kisten',_0x3ba275(0x11c),'kartons',_0x3ba275(0xf4),'tuete','tüten',_0x3ba275(0x178),_0x3ba275(0x196),_0x3ba275(0xe8),_0x3ba275(0x152)],NUMBER_WORDS=[_0x3ba275(0x17e),'eine',_0x3ba275(0x12b),_0x3ba275(0x115),_0x3ba275(0x107),_0x3ba275(0x177),'zwei','drei',_0x3ba275(0x154),'fünf','fuenf',_0x3ba275(0x175),_0x3ba275(0xf9),'acht',_0x3ba275(0x1b2),_0x3ba275(0xe4),'elf','zwölf',_0x3ba275(0x19d),'dreizehn',_0x3ba275(0x1b8),_0x3ba275(0x1ae),_0x3ba275(0x14c),_0x3ba275(0x13d),_0x3ba275(0x17f),'achtzehn','neunzehn',_0x3ba275(0x153)];function normalize(_0x58bc40){const _0x2b6db9=_0x3ba275;return String(_0x58bc40||'')[_0x2b6db9(0xf2)]()[_0x2b6db9(0x104)](/\s+/g,'\x20')['toLocaleLowerCase'](_0x2b6db9(0xe1));}function normalizeLoose(_0x5978c2){const _0x1e26ab=_0x3ba275;return normalize(_0x5978c2)['normalize'](_0x1e26ab(0x1a2))[_0x1e26ab(0x104)](/[\u0300-\u036f]/g,'')[_0x1e26ab(0x104)](/ß/g,'ss')[_0x1e26ab(0x104)](/[^a-z0-9]+/g,'\x20')['trim']();}function splitAliases(_0x560e78){const _0x14de8d=_0x3ba275;return String(_0x560e78||'')[_0x14de8d(0x16d)](/[;,]/)['map'](_0x1490be=>normalize(_0x1490be))[_0x14de8d(0x10a)](Boolean);}function unique(_0x5176de){const _0x6a90b=_0x3ba275;return[...new Set(_0x5176de[_0x6a90b(0x10a)](Boolean))];}function defaultAliasesForMarket(_0x2a202f){const _0x581d6b=_0x3ba275,_0x44eaaf=normalizeLoose(_0x2a202f);if(_0x44eaaf==='aldi')return['aldi','aldi\x20nord','aldi\x20süd',_0x581d6b(0x1b4)];if(_0x44eaaf==='lidl')return[_0x581d6b(0x14e)];if(_0x44eaaf==='rewe')return['rewe',_0x581d6b(0xff),'rewe\x20center'];if(_0x44eaaf===_0x581d6b(0x19e))return[_0x581d6b(0x19e),_0x581d6b(0x1a6)];return[];}function marketAliases(_0x1060e2){const _0x3d2cd3=_0x3ba275,_0x42e442=[];for(const _0x4ea88a of _0x1060e2){if(_0x4ea88a[_0x3d2cd3(0x1aa)]===![]||!_0x4ea88a[_0x3d2cd3(0x11b)])continue;const _0x43e655=unique([normalize(_0x4ea88a['name']),...splitAliases(_0x4ea88a[_0x3d2cd3(0x10b)]),...defaultAliasesForMarket(_0x4ea88a['name'])['map'](normalize)]);for(const _0x4f35d2 of _0x43e655)_0x42e442['push']({'market':_0x4ea88a[_0x3d2cd3(0x11b)],'alias':_0x4f35d2});}return _0x42e442['sort']((_0x6eabf3,_0x380813)=>_0x380813['alias'][_0x3d2cd3(0x128)]-_0x6eabf3['alias'][_0x3d2cd3(0x128)]);}function resolveMarket(_0x3766f4,_0x27cb61){const _0x45bf4e=_0x3ba275,_0x27f6c8=normalize(_0x3766f4||'');if(!_0x27f6c8)return undefined;for(const _0x2349b1 of marketAliases(_0x27cb61)){if(_0x2349b1['alias']===_0x27f6c8)return _0x2349b1[_0x45bf4e(0x1a3)];}return undefined;}function extractMarket(_0x4bccf3,_0x5273cd){const _0xd99736=_0x3ba275,_0x1d0e7d=normalize(_0x4bccf3);for(const _0x160807 of marketAliases(_0x5273cd)){const _0x140f82=[_0xd99736(0xec)+_0x160807['alias'],_0xd99736(0x176)+_0x160807['alias']];for(const _0x2e3bc4 of _0x140f82){if(_0x1d0e7d['endsWith'](_0x2e3bc4))return{'productText':_0x4bccf3[_0xd99736(0x14d)](0x0,_0x4bccf3['length']-_0x2e3bc4[_0xd99736(0x128)])['trim'](),'market':_0x160807[_0xd99736(0x1a3)],'explicit':!![]};}}const _0x41616c=_0x4bccf3['match'](/\s+(?:von|bei)\s+(.+?)\s*$/i);return{'productText':_0x4bccf3[_0xd99736(0xf2)](),'explicit':![],'ambiguousMarketSuffix':_0x41616c?.[0x1]?.[_0xd99736(0xf2)]()};}function stripQuantityDetailed(_0x13c084){const _0x18a984=_0x3ba275,_0x4da71b=String(_0x13c084||'')[_0x18a984(0xf2)]();if(!_0x4da71b)return{'productText':'','prefix':''};if(/^\d+\s*\/\s*\d+\s+/[_0x18a984(0x1a9)](_0x4da71b))return{'productText':_0x4da71b,'prefix':''};const _0x2db798=QUANTITY_UNITS[_0x18a984(0x12c)]('|'),_0x18cc1a=NUMBER_WORDS['join']('|'),_0x3fa953=[new RegExp('^(?:ein\x5cs+)?(?:halbes|halbe|halb)\x5cs+(?:'+_0x2db798+')\x5cs+','i'),new RegExp('^(?:'+_0x18cc1a+_0x18a984(0x10f)+_0x2db798+_0x18a984(0x171),'i'),new RegExp(_0x18a984(0xe9)+_0x18cc1a+')\x5cs+','i'),new RegExp('^\x5cd+(?:[.,]\x5cd+)?\x5cs*[xX]\x5cs*(?:\x5cd+(?:[.,]\x5cd+)?\x5cs*(?:'+_0x2db798+_0x18a984(0x1bd),'i'),new RegExp('^\x5cd+(?:[.,]\x5cd+)?\x5cs*(?:'+_0x2db798+_0x18a984(0x171),'i'),/^\d+(?:[.,]\d+)?\s+/i];for(const _0x2c6c38 of _0x3fa953){const _0x4aa19d=_0x4da71b[_0x18a984(0x13f)](_0x2c6c38);if(_0x4aa19d&&_0x4aa19d[0x0]&&_0x4aa19d[0x0][_0x18a984(0x128)]<_0x4da71b[_0x18a984(0x128)])return{'productText':_0x4da71b[_0x18a984(0x14d)](_0x4aa19d[0x0][_0x18a984(0x128)])['trim'](),'prefix':_0x4aa19d[0x0]['trim']()};}return{'productText':_0x4da71b,'prefix':''};}function stripQuantity(_0x490e37){return stripQuantityDetailed(_0x490e37)['productText'];}function stemKey(_0x1b2f05){const _0x360827=_0x3ba275;let _0x4626e9=normalizeLoose(_0x1b2f05)[_0x360827(0x104)](/\s+/g,'');if(_0x4626e9['length']>0x6&&_0x4626e9[_0x360827(0x1ac)]('en'))_0x4626e9=_0x4626e9['slice'](0x0,-0x1);else{if(_0x4626e9[_0x360827(0x128)]>0x6&&_0x4626e9[_0x360827(0x1ac)]('n'))_0x4626e9=_0x4626e9['slice'](0x0,-0x1);}return _0x4626e9;}function canonicalProductKey(_0x3109db){return stemKey(stripQuantity(_0x3109db));}function productCandidates(_0x431914){const _0x55bf63=_0x3ba275,_0x1ba6c2=stripQuantityDetailed(_0x431914);return unique([normalize(_0x431914),normalize(_0x1ba6c2['productText']),canonicalProductKey(_0x431914),canonicalProductKey(_0x1ba6c2[_0x55bf63(0x1ab)])]);}function findProduct(_0x299bf6,_0xf79f7e){const _0x296364=_0x3ba275,_0x53c0b3=productCandidates(_0x299bf6);for(const _0x3aefd5 of _0xf79f7e){const _0x3b3893=[_0x3aefd5['name'],...splitAliases(_0x3aefd5['aliases'])][_0x296364(0x198)](_0x271b73=>[normalize(_0x271b73),canonicalProductKey(_0x271b73)])[_0x296364(0x10a)](Boolean);if(_0x53c0b3[_0x296364(0x124)](_0x220421=>_0x3b3893['includes'](_0x220421)))return _0x3aefd5;}return undefined;}function guessCategory(_0x2b0863){const _0x45455b=_0x3ba275,_0x2cfd47=normalize(stripQuantity(_0x2b0863));for(const _0x190e03 of CATEGORY_RULES){if(_0x190e03['terms'][_0x45455b(0x124)](_0x54a91=>_0x2cfd47[_0x45455b(0x161)](_0x54a91)))return _0x190e03[_0x45455b(0x1be)];}return _0x45455b(0x105);}function significantTokens(_0x4d2f0e){const _0x2523cc=_0x3ba275;return normalizeLoose(_0x4d2f0e)['split']('\x20')[_0x2523cc(0x10a)](_0x19f13e=>_0x19f13e[_0x2523cc(0x128)]>=0x4)[_0x2523cc(0x172)](_0x5dd002=>_0x5dd002[_0x2523cc(0x1ac)]('en')&&_0x5dd002[_0x2523cc(0x128)]>0x6?_0x5dd002['slice'](0x0,-0x1):_0x5dd002);}function guessCategorySmart(_0x15aff2,_0x1e0ea1){const _0x41a378=_0x3ba275,_0x2d41b9=guessCategory(_0x15aff2);if(_0x2d41b9!==_0x41a378(0x105))return _0x2d41b9;const _0x11ff73=significantTokens(stripQuantity(_0x15aff2));if(!_0x11ff73[_0x41a378(0x128)])return _0x2d41b9;const _0x24b29c=new Map();for(const _0x208a24 of _0x1e0ea1){const _0x46c3a4=significantTokens([_0x208a24[_0x41a378(0x11b)],_0x208a24[_0x41a378(0x10b)]||''][_0x41a378(0x12c)]('\x20')),_0x21b4a1=_0x11ff73[_0x41a378(0x10a)](_0x2c48e8=>_0x46c3a4[_0x41a378(0x161)](_0x2c48e8))[_0x41a378(0x128)];if(_0x21b4a1>0x0)_0x24b29c['set'](_0x208a24[_0x41a378(0x1be)],(_0x24b29c[_0x41a378(0x135)](_0x208a24[_0x41a378(0x1be)])||0x0)+_0x21b4a1);}const _0x36343f=[..._0x24b29c[_0x41a378(0x114)]()]['sort']((_0x4cf476,_0x452742)=>_0x452742[0x1]-_0x4cf476[0x1]);return _0x36343f[0x0]?.[0x0]||_0x2d41b9;}function parseMarketList(_0x297471,_0x308d89){const _0x1c5902=_0x3ba275,_0x1debbe=String(_0x297471||'')[_0x1c5902(0x16d)](/[;,]/)[_0x1c5902(0x172)](_0x27e6e6=>resolveMarket(_0x27e6e6[_0x1c5902(0xf2)](),_0x308d89))['filter'](_0x40aa09=>Boolean(_0x40aa09));return unique(_0x1debbe);}function resolveProductMarket(_0x7bc075,_0x5bce8a,_0x30e1b2,_0x3cb475){const _0x210863=_0x3ba275,_0x5ae4b7=resolveMarket(_0x7bc075?.[_0x210863(0x13e)],_0x5bce8a);if(_0x5ae4b7)return _0x5ae4b7;const _0x13c962=parseMarketList(_0x7bc075?.[_0x210863(0xed)],_0x5bce8a),_0x280816=resolveMarket(_0x3cb475,_0x5bce8a);if(_0x280816&&(!_0x13c962[_0x210863(0x128)]||_0x13c962[_0x210863(0x161)](_0x280816)))return _0x280816;if(_0x13c962['length']){const _0x11699c=new Map(_0x5bce8a['map'](_0x1f129f=>[_0x1f129f[_0x210863(0x11b)],Number(_0x1f129f['order'])||0x270f]));return[..._0x13c962]['sort']((_0x282812,_0x16734f)=>(_0x11699c[_0x210863(0x135)](_0x282812)||0x270f)-(_0x11699c['get'](_0x16734f)||0x270f))[0x0];}return resolveMarket(_0x30e1b2,_0x5bce8a)||_0x30e1b2;}function _0x1747(){const _0x4deb8f=['fuenfzehn','slice','lidl','bier','hähnchen','stück','saecke','zwanzig','vier','1182414qlKtmX','feta','haehnchen','gewürzgurke','schwamm','h.\x20milch','gefroren','shampoo','Obst/Gemüse','zahnbürste','fisch','creme','includes','haribo','gouda','prefix','obst','zucchini','cappuccino','9VzqlQJ','haferflock','1496100WsVtqz','Getränke','explicit','split','fischstaeb','mais','ricotta',')\x5cs+','map','wuerst','taschentuch','sechs','\x20bei\x20','eins','tueten','espresso','10wZEBaV','karotte','10829432FAHrWQ','eiersalat','ein','siebzehn','seife','fleischsalat','normalizeLoose','avocado','brot','paket','stueck','Tee/Kaffee','spaghetti','möhre','blätterteig','fussmatte','20BOSWwf','mango','speisestärke','kosmetik','schachteln','brötchen','batterie','gemüse','Haushalt/Hygiene','zwiebel','sack','759591FHBwyx','flatMap','Brot/Gebäck','petersilie','Nonfood','toast','zwoelf','penny','getraenk','gewuerzgurke','gefluegelsalat','NFD','market','spuelmittel','rosenkohl','penny\x20markt','packung','normalize','test','enabled','productText','endsWith','sushi','fünfzehn','reis','kokosraspel','__esModule','neun','8184yjGPMn','aldi\x20sued','müllbeutel','verbandtasche','broetchen','vierzehn','kiste','kilo','speck','fußmatte',')\x5cs*)?','category','eis','wasser','knoblauch','orange','saft','pizzateig','pakete','guessCategorySmart','rollen','Konserven','gefrohren','steak','glaeser','de-DE','nuss','beere','zehn','dosen','salami','Milchprodukte','säcke','^(?:','penne','cola','\x20von\x20','availableMarkets','blaetterteig','banane','nuesse','geflügelsalat','trim','Wurst/Salate/Teigwaren','tüte','camembert','doener','croissant','gramm','sieben','2493876jaOjuU','würst','konserve','canonicalProductKey','tiefkühl','rewe\x20markt','Schokolade/Naschen','Fleisch/Fisch','butter','bund','replace','Sonstiges','nüsse','einer','eier','melone','filter','aliases','h-milch','kassler','quark',')\x5cs+(?:','waschmittel','chips','moehre','roulade','entries','einem','kuchen','tomate','fleisch','keks','guessCategory','name','karton','käse','4435827pmRlvi','kilogramm','dose','baguette','fanta','aepfel','some','parseMarketList','resolveMarket','mandel','length','parmesan','bacon','einen','join','sonnenblumenkern','katzenstreu','suggestAliases','marketAliases','rolle','pesto','56914JYiIkt','salat','get','3kerper','6KsWfwz','becher','lampe','toilettenpapier','gläser','stripQuantity','sechzehn','defaultMarket','match','aufschnitt','döner','rasierer','findProduct','sahne','duschgel','gulasch','kaese','ambiguousMarketSuffix','camenbert','pommes','flasche'];_0x1747=function(){return _0x4deb8f;};return _0x1747();}function parseItem(_0xeeb427,_0x36fd82,_0xb6e558,_0x1e2246,_0x2027f3=''){const _0x14f02b=_0x3ba275,_0x370b51=extractMarket(_0xeeb427,_0x36fd82),_0x2b264a=stripQuantityDetailed(_0x370b51[_0x14f02b(0x1ab)]),_0x34f6ae=findProduct(_0x370b51['productText'],_0xb6e558),_0x519d99=_0x2b264a[_0x14f02b(0x1ab)],_0x29a7de=!_0x370b51['market']&&!_0x34f6ae&&Boolean(_0x370b51[_0x14f02b(0x148)]);return{'originalText':_0xeeb427,'productText':_0x519d99,'productName':_0x34f6ae?.['name']||_0x519d99||_0x370b51[_0x14f02b(0x1ab)],'market':_0x370b51[_0x14f02b(0x1a3)]||(!_0x29a7de?resolveProductMarket(_0x34f6ae,_0x36fd82,_0x1e2246,_0x2027f3):resolveMarket(_0x1e2246,_0x36fd82)||_0x1e2246),'category':_0x34f6ae?.[_0x14f02b(0x1be)]||guessCategorySmart(_0x370b51[_0x14f02b(0x1ab)],_0xb6e558),'knownProduct':Boolean(_0x34f6ae),'explicitMarket':_0x370b51[_0x14f02b(0x16c)],'quantityPrefix':_0x2b264a[_0x14f02b(0x164)],'ambiguousMarketSuffix':_0x29a7de?_0x370b51[_0x14f02b(0x148)]:undefined};}function suggestAliases(_0x2a77fa,_0x1df1c8){const _0x17a404=_0x3ba275,_0x340086=stripQuantity(_0x2a77fa)['trim']();if(!_0x340086)return[];const _0x2c9d9f=[_0x1df1c8[_0x17a404(0x11b)],...splitAliases(_0x1df1c8[_0x17a404(0x10b)])][_0x17a404(0x172)](normalize);if(_0x2c9d9f['includes'](normalize(_0x340086)))return[];if(canonicalProductKey(_0x340086)===canonicalProductKey(_0x1df1c8[_0x17a404(0x11b)]))return[_0x340086];return[];}
|
|
1
|
+
'use strict';const _0x29896f=_0x138d;(function(_0x1d8138,_0x25bbd0){const _0x32ba3d=_0x138d,_0x30bd92=_0x1d8138();while(!![]){try{const _0x5b801a=-parseInt(_0x32ba3d(0x23e))/0x1+parseInt(_0x32ba3d(0x22e))/0x2+-parseInt(_0x32ba3d(0x184))/0x3*(-parseInt(_0x32ba3d(0x216))/0x4)+-parseInt(_0x32ba3d(0x173))/0x5*(parseInt(_0x32ba3d(0x223))/0x6)+parseInt(_0x32ba3d(0x200))/0x7+parseInt(_0x32ba3d(0x23c))/0x8+-parseInt(_0x32ba3d(0x1f7))/0x9;if(_0x5b801a===_0x25bbd0)break;else _0x30bd92['push'](_0x30bd92['shift']());}catch(_0x1072c5){_0x30bd92['push'](_0x30bd92['shift']());}}}(_0x4b9d,0x1f7d3));Object[_0x29896f(0x189)](exports,'__esModule',{'value':!![]}),exports['normalize']=normalize,exports[_0x29896f(0x1a2)]=normalizeLoose,exports[_0x29896f(0x19b)]=splitAliases,exports[_0x29896f(0x170)]=marketAliases,exports[_0x29896f(0x198)]=resolveMarket,exports['stripQuantityDetailed']=stripQuantityDetailed,exports[_0x29896f(0x1e5)]=stripQuantity,exports[_0x29896f(0x237)]=canonicalProductKey,exports[_0x29896f(0x1f2)]=findProduct,exports[_0x29896f(0x212)]=guessCategory,exports['guessCategorySmart']=guessCategorySmart,exports['parseMarketList']=parseMarketList,exports['parseItem']=parseItem,exports[_0x29896f(0x20d)]=suggestAliases;const CATEGORY_RULES=[{'category':_0x29896f(0x177),'terms':[_0x29896f(0x229),_0x29896f(0x1c8),'gefroren',_0x29896f(0x1fc),_0x29896f(0x1c2),'fischstaeb','pommes','eis']},{'category':_0x29896f(0x191),'terms':[_0x29896f(0x172),_0x29896f(0x17d),'konserve',_0x29896f(0x219),_0x29896f(0x1e3),_0x29896f(0x1b6),_0x29896f(0x220),'pesto',_0x29896f(0x1aa),_0x29896f(0x1ff)]},{'category':'H-Milch/Nudeln','terms':[_0x29896f(0x1e8),'h.\x20milch','nudel',_0x29896f(0x1f6),_0x29896f(0x22a),'reis',_0x29896f(0x233),'speisestärke',_0x29896f(0x1d0),'öl',_0x29896f(0x1b2)]},{'category':_0x29896f(0x1cb),'terms':['toilettenpapier','küchenrolle',_0x29896f(0x208),'taschentuch',_0x29896f(0x221),_0x29896f(0x207),'spülmittel',_0x29896f(0x238),_0x29896f(0x1ea),_0x29896f(0x242),'schwamm','putztuch']},{'category':_0x29896f(0x196),'terms':[_0x29896f(0x20b),'shampoo','zahnpasta',_0x29896f(0x178),'zahnbuerste',_0x29896f(0x17e),_0x29896f(0x211),_0x29896f(0x18b),_0x29896f(0x186),'kosmetik']},{'category':_0x29896f(0x18a),'terms':['pinsel',_0x29896f(0x197),_0x29896f(0x205),_0x29896f(0x1c6),_0x29896f(0x1dd),_0x29896f(0x194),'batterie',_0x29896f(0x23a)]},{'category':'Getränke','terms':['saft',_0x29896f(0x1d9),'pepsi','wasser',_0x29896f(0x214),_0x29896f(0x1e2),_0x29896f(0x1f1),'bier',_0x29896f(0x19f),_0x29896f(0x17b)]},{'category':'Tee/Kaffee','terms':[_0x29896f(0x1b1),'kaffee','espresso','cappuccino']},{'category':_0x29896f(0x222),'terms':[_0x29896f(0x1a8),'brötchen','broetchen','baguette','toast',_0x29896f(0x1da),_0x29896f(0x1d6),'croissant',_0x29896f(0x23d)]},{'category':_0x29896f(0x1ca),'terms':[_0x29896f(0x1b7),'gummi',_0x29896f(0x195),_0x29896f(0x23b),'keks',_0x29896f(0x16c),_0x29896f(0x1a7),_0x29896f(0x243),_0x29896f(0x203),_0x29896f(0x21e),_0x29896f(0x21a),'kokosraspel']},{'category':'Wurst/Salate/Teigwaren','terms':['aufschnitt','schinken',_0x29896f(0x19d),_0x29896f(0x232),_0x29896f(0x1b4),'wuerst','bacon',_0x29896f(0x18f),'frikadelle',_0x29896f(0x18e),'eiersalat',_0x29896f(0x182),_0x29896f(0x1bd),'gefluegelsalat',_0x29896f(0x22b),_0x29896f(0x1b8),'pizzateig',_0x29896f(0x1e0),_0x29896f(0x1a1)]},{'category':_0x29896f(0x22f),'terms':['milch','joghurt',_0x29896f(0x1f9),_0x29896f(0x180),_0x29896f(0x1c4),'camembert',_0x29896f(0x209),_0x29896f(0x206),_0x29896f(0x23f),_0x29896f(0x226),_0x29896f(0x1fb),_0x29896f(0x179),_0x29896f(0x190),_0x29896f(0x210),'ei','eier']},{'category':'Fleisch/Fisch','terms':[_0x29896f(0x16d),_0x29896f(0x202),'steak',_0x29896f(0x19a),_0x29896f(0x1ba),'hähnchen',_0x29896f(0x1be),'kassler',_0x29896f(0x1c1),_0x29896f(0x1e1),'sushi']},{'category':_0x29896f(0x19e),'terms':[_0x29896f(0x235),_0x29896f(0x1b5),_0x29896f(0x18d),'banane',_0x29896f(0x183),_0x29896f(0x1d5),_0x29896f(0x1a6),_0x29896f(0x1cf),'avocado','karotte',_0x29896f(0x185),_0x29896f(0x1ad),'gurke',_0x29896f(0x1ab),_0x29896f(0x1a4),_0x29896f(0x188),_0x29896f(0x1df),_0x29896f(0x241),_0x29896f(0x1b9),'zwiebel','knoblauch',_0x29896f(0x199),_0x29896f(0x1e7),_0x29896f(0x174),_0x29896f(0x1b3),_0x29896f(0x1ec),'dill',_0x29896f(0x1f3)]}],QUANTITY_UNITS=[_0x29896f(0x244),_0x29896f(0x1c5),_0x29896f(0x213),_0x29896f(0x201),_0x29896f(0x1e9),_0x29896f(0x217),'flasche',_0x29896f(0x175),'dose','dosen','becher',_0x29896f(0x239),_0x29896f(0x1ed),'glaeser','kg',_0x29896f(0x17c),_0x29896f(0x193),'g','gramm','l','liter','ml',_0x29896f(0x1bf),_0x29896f(0x225),'netz',_0x29896f(0x192),_0x29896f(0x21c),_0x29896f(0x1b0),_0x29896f(0x1dc),_0x29896f(0x21f),_0x29896f(0x1a5),_0x29896f(0x17a),_0x29896f(0x17f),_0x29896f(0x1fe),_0x29896f(0x16e),_0x29896f(0x1ee),'tueten',_0x29896f(0x20f),_0x29896f(0x1d4),'saecke'],NUMBER_WORDS=[_0x29896f(0x1bc),'eine',_0x29896f(0x204),'einem',_0x29896f(0x236),'eins','zwei',_0x29896f(0x1e4),'vier','fünf',_0x29896f(0x20a),_0x29896f(0x240),_0x29896f(0x1a9),'acht','neun','zehn',_0x29896f(0x1d7),_0x29896f(0x1ae),'zwoelf',_0x29896f(0x21b),_0x29896f(0x16f),'fünfzehn','fuenfzehn',_0x29896f(0x1ac),'siebzehn','achtzehn','neunzehn',_0x29896f(0x1c0)];function normalize(_0x106218){const _0x50af34=_0x29896f;return String(_0x106218||'')[_0x50af34(0x181)]()['replace'](/\s+/g,'\x20')[_0x50af34(0x1f4)](_0x50af34(0x176));}function normalizeLoose(_0x49432c){const _0x2db281=_0x29896f;return normalize(_0x49432c)[_0x2db281(0x234)](_0x2db281(0x1cd))['replace'](/[\u0300-\u036f]/g,'')[_0x2db281(0x231)](/ß/g,'ss')['replace'](/[^a-z0-9]+/g,'\x20')['trim']();}function splitAliases(_0x244f72){const _0x250703=_0x29896f;return String(_0x244f72||'')[_0x250703(0x1de)](/[;,]/)[_0x250703(0x1ef)](_0x4e7648=>normalize(_0x4e7648))[_0x250703(0x1c9)](Boolean);}function unique(_0x140578){return[...new Set(_0x140578['filter'](Boolean))];}function defaultAliasesForMarket(_0x2706f1){const _0x3fc2de=_0x29896f,_0x3f0c60=normalizeLoose(_0x2706f1);if(_0x3f0c60==='aldi')return['aldi','aldi\x20nord',_0x3fc2de(0x1fa),'aldi\x20sued'];if(_0x3f0c60===_0x3fc2de(0x21d))return[_0x3fc2de(0x21d)];if(_0x3f0c60===_0x3fc2de(0x245))return['rewe',_0x3fc2de(0x1f5),_0x3fc2de(0x20e)];if(_0x3f0c60===_0x3fc2de(0x1d2))return[_0x3fc2de(0x1d2),_0x3fc2de(0x1a0)];return[];}function marketAliases(_0x3ef2f6){const _0xe4180e=_0x29896f,_0x197949=[];for(const _0x20171e of _0x3ef2f6){if(_0x20171e['enabled']===![]||!_0x20171e['name'])continue;const _0x162841=unique([normalize(_0x20171e['name']),...splitAliases(_0x20171e[_0xe4180e(0x1d3)]),...defaultAliasesForMarket(_0x20171e[_0xe4180e(0x228)])[_0xe4180e(0x1ef)](normalize)]);for(const _0x3d0b7f of _0x162841)_0x197949['push']({'market':_0x20171e[_0xe4180e(0x228)],'alias':_0x3d0b7f});}return _0x197949['sort']((_0x14c532,_0x5ee71f)=>_0x5ee71f['alias']['length']-_0x14c532[_0xe4180e(0x18c)]['length']);}function resolveMarket(_0x3f0478,_0x3d52bf){const _0x105ab1=_0x29896f,_0x3dfe00=normalize(_0x3f0478||'');if(!_0x3dfe00)return undefined;for(const _0x30c9ec of marketAliases(_0x3d52bf)){if(_0x30c9ec['alias']===_0x3dfe00)return _0x30c9ec[_0x105ab1(0x22c)];}return undefined;}function extractMarket(_0xb7c73f,_0x1fe35c){const _0x547003=_0x29896f,_0xb70af=normalize(_0xb7c73f);for(const _0x327348 of marketAliases(_0x1fe35c)){const _0x374729=[_0x547003(0x1f0)+_0x327348[_0x547003(0x18c)],'\x20bei\x20'+_0x327348['alias']];for(const _0x583998 of _0x374729){if(_0xb70af[_0x547003(0x1d1)](_0x583998))return{'productText':_0xb7c73f[_0x547003(0x19c)](0x0,_0xb7c73f[_0x547003(0x1a3)]-_0x583998[_0x547003(0x1a3)])[_0x547003(0x181)](),'market':_0x327348[_0x547003(0x22c)],'explicit':!![]};}}const _0x1c1a2b=_0xb7c73f[_0x547003(0x1af)](/\s+(?:von|bei)\s+(.+?)\s*$/i);return{'productText':_0xb7c73f[_0x547003(0x181)](),'explicit':![],'ambiguousMarketSuffix':_0x1c1a2b?.[0x1]?.[_0x547003(0x181)]()};}function stripQuantityDetailed(_0x28604b){const _0x35e411=_0x29896f,_0x323563=String(_0x28604b||'')['trim']();if(!_0x323563)return{'productText':'','prefix':''};if(/^\d+\s*\/\s*\d+\s+/[_0x35e411(0x171)](_0x323563))return{'productText':_0x323563,'prefix':''};const _0x46b16d=QUANTITY_UNITS[_0x35e411(0x187)]('|'),_0x5ad0b2=NUMBER_WORDS[_0x35e411(0x187)]('|'),_0x272fbb=[new RegExp(_0x35e411(0x1ce)+_0x46b16d+')\x5cs+','i'),new RegExp(_0x35e411(0x1e6)+_0x5ad0b2+')\x5cs+(?:'+_0x46b16d+')\x5cs+','i'),new RegExp('^(?:'+_0x5ad0b2+_0x35e411(0x22d),'i'),new RegExp(_0x35e411(0x1eb)+_0x46b16d+')\x5cs*)?','i'),new RegExp(_0x35e411(0x1bb)+_0x46b16d+')\x5cs+','i'),/^\d+(?:[.,]\d+)?\s+/i];for(const _0x5c9bfb of _0x272fbb){const _0x260159=_0x323563[_0x35e411(0x1af)](_0x5c9bfb);if(_0x260159&&_0x260159[0x0]&&_0x260159[0x0][_0x35e411(0x1a3)]<_0x323563[_0x35e411(0x1a3)])return{'productText':_0x323563[_0x35e411(0x19c)](_0x260159[0x0][_0x35e411(0x1a3)])[_0x35e411(0x181)](),'prefix':_0x260159[0x0][_0x35e411(0x181)]()};}return{'productText':_0x323563,'prefix':''};}function stripQuantity(_0x2afd68){return stripQuantityDetailed(_0x2afd68)['productText'];}function stemKey(_0x367ec0){const _0x14f272=_0x29896f;let _0x169dea=normalizeLoose(_0x367ec0)[_0x14f272(0x231)](/\s+/g,'');if(_0x169dea[_0x14f272(0x1a3)]>0x6&&_0x169dea[_0x14f272(0x1d1)]('en'))_0x169dea=_0x169dea[_0x14f272(0x19c)](0x0,-0x1);else{if(_0x169dea['length']>0x6&&_0x169dea[_0x14f272(0x1d1)]('n'))_0x169dea=_0x169dea[_0x14f272(0x19c)](0x0,-0x1);}return _0x169dea;}function canonicalProductKey(_0x3c54e0){return stemKey(stripQuantity(_0x3c54e0));}function productCandidates(_0x4174be){const _0x299b6e=stripQuantityDetailed(_0x4174be);return unique([normalize(_0x4174be),normalize(_0x299b6e['productText']),canonicalProductKey(_0x4174be),canonicalProductKey(_0x299b6e['productText'])]);}function findProduct(_0x4b3fbc,_0x35ee5e){const _0x40d8b1=_0x29896f,_0x4535df=productCandidates(_0x4b3fbc);for(const _0x3f9a2f of _0x35ee5e){const _0x219f55=[_0x3f9a2f[_0x40d8b1(0x228)],...splitAliases(_0x3f9a2f[_0x40d8b1(0x1d3)])]['flatMap'](_0x3f3117=>[normalize(_0x3f3117),canonicalProductKey(_0x3f3117)])['filter'](Boolean);if(_0x4535df[_0x40d8b1(0x1cc)](_0x308474=>_0x219f55['includes'](_0x308474)))return _0x3f9a2f;}return undefined;}function guessCategory(_0x3a1efe){const _0x235345=_0x29896f,_0x542807=normalize(stripQuantity(_0x3a1efe));for(const _0x14db65 of CATEGORY_RULES){if(_0x14db65[_0x235345(0x20c)][_0x235345(0x1cc)](_0x15c639=>_0x542807[_0x235345(0x227)](_0x15c639)))return _0x14db65['category'];}return'Sonstiges';}function significantTokens(_0xe4add5){const _0xb0d064=_0x29896f;return normalizeLoose(_0xe4add5)[_0xb0d064(0x1de)]('\x20')[_0xb0d064(0x1c9)](_0x387d26=>_0x387d26[_0xb0d064(0x1a3)]>=0x4)['map'](_0x3cc575=>_0x3cc575['endsWith']('en')&&_0x3cc575[_0xb0d064(0x1a3)]>0x6?_0x3cc575[_0xb0d064(0x19c)](0x0,-0x1):_0x3cc575);}function _0x138d(_0x318859,_0x4a8379){_0x318859=_0x318859-0x16c;const _0x4b9dbb=_0x4b9d();let _0x138d41=_0x4b9dbb[_0x318859];return _0x138d41;}function guessCategorySmart(_0x1f67d5,_0x157767){const _0x175b2f=_0x29896f,_0x5abeec=guessCategory(_0x1f67d5);if(_0x5abeec!==_0x175b2f(0x224))return _0x5abeec;const _0x92637c=significantTokens(stripQuantity(_0x1f67d5));if(!_0x92637c[_0x175b2f(0x1a3)])return _0x5abeec;const _0x3d86a8=new Map();for(const _0x4925cb of _0x157767){const _0x16a49a=significantTokens([_0x4925cb[_0x175b2f(0x228)],_0x4925cb[_0x175b2f(0x1d3)]||'']['join']('\x20')),_0x208b13=_0x92637c[_0x175b2f(0x1c9)](_0x5c74d8=>_0x16a49a['includes'](_0x5c74d8))[_0x175b2f(0x1a3)];if(_0x208b13>0x0)_0x3d86a8['set'](_0x4925cb['category'],(_0x3d86a8['get'](_0x4925cb[_0x175b2f(0x1d8)])||0x0)+_0x208b13);}const _0x2402c5=[..._0x3d86a8['entries']()][_0x175b2f(0x1fd)]((_0x1d1d44,_0x4647b0)=>_0x4647b0[0x1]-_0x1d1d44[0x1]);return _0x2402c5[0x0]?.[0x0]||_0x5abeec;}function _0x4b9d(){const _0x4e68ae=['nuesse','kiste','gewuerzgurke','müllbeutel','Brot/Gebäck','23832njOkBE','Sonstiges','bund','parmesan','includes','name','tiefkühl','penne','blätterteig','market',')\x5cs+','365438XFzgFe','Milchprodukte','prefix','replace','leberwurst','haferflock','normalize','apfel','einer','canonicalProductKey','spuelmittel','glas','lampe','chips','827024TLYTZC','apfeltasche','3290KInfxk','ricotta','sechs','rosenkohl','reiniger','nuss','stück','rewe','bonbon','fleisch','tuete','vierzehn','marketAliases','test','dose','95VzGOKn','obst','flaschen','de-DE','TK-Produkte','zahnbürste','sahne','karton','getraenk','kilo','dosen','deo','kartons','käse','trim','kartoffelsalat','mango','6FcZTea','möhre','rasierer','join','zucchini','defineProperty','Nonfood','creme','alias','aepfel','fleischsalat','speck','butter','Konserven','schachtel','kilogramm','katzenstreu','haribo','Kosmetikartikel','verbandtasche','resolveMarket','zitrone','gulasch','splitAliases','slice','salami','Obst/Gemüse','getränk','penny\x20markt','doener','normalizeLoose','length','paprika','kisten','nektarine','mandel','brot','sieben','mais','tomate','sechzehn','moehre','zwölf','match','rolle','tee','oel','gemüse','würst','äpfel','gewürzgurke','schokolade','blaetterteig','kartoffel','roulade','^\x5cd+(?:[.,]\x5cd+)?\x5cs*(?:','ein','geflügelsalat','haehnchen','milliliter','zwanzig','lachs','fischstäb','get','kaese','stueck','fußmatte','availableMarkets','tiefkuehl','filter','Schokolade/Naschen','Haushalt/Hygiene','some','NFD','^(?:ein\x5cs+)?(?:halbes|halbe|halb)\x5cs+(?:','beere','speisestaerke','endsWith','penny','aliases','säcke','melone','torte','elf','category','cola','kuchen','defaultMarket','rollen','katzenfutter','split','salat','döner','fisch','sprite','corned\x20beef','drei','stripQuantity','^(?:','orange','h-milch','paket','waschmittel','^\x5cd+(?:[.,]\x5cd+)?\x5cs*[xX]\x5cs*(?:\x5cd+(?:[.,]\x5cd+)?\x5cs*(?:','gemuese','gläser','tüten','map','\x20von\x20','fanta','findProduct','petersilie','toLocaleLowerCase','rewe\x20markt','spaghetti','3488229cGvwhu','productText','quark','aldi\x20süd','gouda','gefrohren','sort','tüte','aioli','1500373nqkeuM','packungen','hack','nüsse','einen','fussmatte','feta','muellbeutel','kuechenrolle','camenbert','fuenf','duschgel','terms','suggestAliases','rewe\x20center','sack','brunch','seife','guessCategory','packung','limonade','explicit','189764chAHFg','pakete','isArray','cornedbeef','sonnenblumenkern','dreizehn','schachteln','lidl'];_0x4b9d=function(){return _0x4e68ae;};return _0x4b9d();}function parseMarketList(_0xbb09a6,_0x53ec56){const _0x9cddec=_0x29896f,_0x4f890a=Array[_0x9cddec(0x218)](_0xbb09a6)?_0xbb09a6['flatMap'](_0x4dec72=>String(_0x4dec72||'')[_0x9cddec(0x1de)](/[;,]/)):String(_0xbb09a6||'')[_0x9cddec(0x1de)](/[;,]/),_0x2cf887=_0x4f890a[_0x9cddec(0x1ef)](_0x6f5dc=>resolveMarket(String(_0x6f5dc||'')[_0x9cddec(0x181)](),_0x53ec56))[_0x9cddec(0x1c9)](_0x216106=>Boolean(_0x216106));return unique(_0x2cf887);}function resolveProductMarket(_0x24b975,_0x51dce0,_0x2271e6,_0x5b8bf6){const _0x5b41ac=_0x29896f,_0x4ea6f8=resolveMarket(_0x24b975?.[_0x5b41ac(0x1db)],_0x51dce0);if(_0x4ea6f8)return _0x4ea6f8;const _0x1f8bbe=parseMarketList(_0x24b975?.[_0x5b41ac(0x1c7)],_0x51dce0),_0x5bd72e=resolveMarket(_0x5b8bf6,_0x51dce0);if(_0x5bd72e&&(!_0x1f8bbe[_0x5b41ac(0x1a3)]||_0x1f8bbe['includes'](_0x5bd72e)))return _0x5bd72e;if(_0x1f8bbe[_0x5b41ac(0x1a3)]){const _0xdbdd66=new Map(_0x51dce0[_0x5b41ac(0x1ef)](_0xc406c2=>[_0xc406c2[_0x5b41ac(0x228)],Number(_0xc406c2['order'])||0x270f]));return[..._0x1f8bbe][_0x5b41ac(0x1fd)]((_0x358c08,_0x5814dc)=>(_0xdbdd66[_0x5b41ac(0x1c3)](_0x358c08)||0x270f)-(_0xdbdd66['get'](_0x5814dc)||0x270f))[0x0];}return resolveMarket(_0x2271e6,_0x51dce0)||_0x2271e6;}function parseItem(_0x2d6b61,_0x301eb9,_0x25f716,_0x4ae3a8,_0x4f405f=''){const _0x173630=_0x29896f,_0x3ced70=extractMarket(_0x2d6b61,_0x301eb9),_0x466a3c=stripQuantityDetailed(_0x3ced70[_0x173630(0x1f8)]),_0x4b92ff=findProduct(_0x3ced70[_0x173630(0x1f8)],_0x25f716),_0x4f5b99=_0x466a3c[_0x173630(0x1f8)],_0x3b1230=!_0x3ced70[_0x173630(0x22c)]&&!_0x4b92ff&&Boolean(_0x3ced70['ambiguousMarketSuffix']);return{'originalText':_0x2d6b61,'productText':_0x4f5b99,'productName':_0x4b92ff?.[_0x173630(0x228)]||_0x4f5b99||_0x3ced70['productText'],'market':_0x3ced70['market']||(!_0x3b1230?resolveProductMarket(_0x4b92ff,_0x301eb9,_0x4ae3a8,_0x4f405f):resolveMarket(_0x4ae3a8,_0x301eb9)||_0x4ae3a8),'category':_0x4b92ff?.[_0x173630(0x1d8)]||guessCategorySmart(_0x3ced70[_0x173630(0x1f8)],_0x25f716),'knownProduct':Boolean(_0x4b92ff),'explicitMarket':_0x3ced70[_0x173630(0x215)],'quantityPrefix':_0x466a3c[_0x173630(0x230)],'ambiguousMarketSuffix':_0x3b1230?_0x3ced70['ambiguousMarketSuffix']:undefined};}function suggestAliases(_0x51f9dc,_0x2f08f3){const _0x3fe039=_0x29896f,_0x4ce2c7=stripQuantity(_0x51f9dc)['trim']();if(!_0x4ce2c7)return[];const _0x229ea1=[_0x2f08f3[_0x3fe039(0x228)],...splitAliases(_0x2f08f3['aliases'])]['map'](normalize);if(_0x229ea1[_0x3fe039(0x227)](normalize(_0x4ce2c7)))return[];if(canonicalProductKey(_0x4ce2c7)===canonicalProductKey(_0x2f08f3['name']))return[_0x4ce2c7];return[];}
|
package/build/lib/sorter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x5624b6=_0x1af6;(function(_0x4c28fd,_0x525cce){const _0x2df460=_0x1af6,_0x32a46e=_0x4c28fd();while(!![]){try{const _0xf97e4d=-parseInt(_0x2df460(0x165))/0x1*(-parseInt(_0x2df460(0x161))/0x2)+parseInt(_0x2df460(0x14a))/0x3+parseInt(_0x2df460(0x135))/0x4+parseInt(_0x2df460(0x151))/0x5+-parseInt(_0x2df460(0x142))/0x6*(-parseInt(_0x2df460(0x12e))/0x7)+parseInt(_0x2df460(0x154))/0x8*(parseInt(_0x2df460(0x134))/0x9)+-parseInt(_0x2df460(0x16d))/0xa;if(_0xf97e4d===_0x525cce)break;else _0x32a46e['push'](_0x32a46e['shift']());}catch(_0x77f119){_0x32a46e['push'](_0x32a46e['shift']());}}}(_0x37f6,0xa6a43));Object[_0x5624b6(0x144)](exports,_0x5624b6(0x13a),{'value':!![]}),exports[_0x5624b6(0x157)]=toTimestamp,exports[_0x5624b6(0x139)]=activeItems,exports['activeIdSignature']=activeIdSignature,exports[_0x5624b6(0x14e)]=sortSlotsOldestFirst,exports[_0x5624b6(0x172)]=buildDesiredItems,exports['createSortPlan']=createSortPlan,exports['collectUnknownItems']=collectUnknownItems,exports[_0x5624b6(0x12d)]=mergeUnknownProducts,exports[_0x5624b6(0x163)]=mergeReviewQueue,exports[_0x5624b6(0x169)]=applyReviewActions,exports['makePreviewText']=makePreviewText;const parser_1=require(_0x5624b6(0x155)),market_plan_1=require('./market-plan');function toTimestamp(_0xd541c){const _0x51e445=_0x5624b6;if(typeof _0xd541c===_0x51e445(0x152)&&Number['isFinite'](_0xd541c))return _0xd541c;if(typeof _0xd541c===_0x51e445(0x12c)&&_0xd541c[_0x51e445(0x13c)]()){const _0x251d0e=Number(_0xd541c);if(Number[_0x51e445(0x15a)](_0x251d0e))return _0x251d0e;const _0x4a6728=Date['parse'](_0xd541c);if(Number[_0x51e445(0x15a)](_0x4a6728))return _0x4a6728;}return 0x0;}function marketOrder(_0x1d9833,_0x3d7c85){const _0x2cc447=_0x5624b6,_0x14875a=_0x1d9833['find'](_0x21da88=>(0x0,parser_1[_0x2cc447(0x149)])(_0x21da88[_0x2cc447(0x147)])===(0x0,parser_1['normalize'])(_0x3d7c85));return Number[_0x2cc447(0x15a)](Number(_0x14875a?.[_0x2cc447(0x168)]))?Number(_0x14875a?.['order']):0x270f;}function categoryOrder(_0x1c4bc3,_0x4f62f6,_0x3bd96a){const _0x314c55=_0x5624b6,_0x5ae2c2=_0x1c4bc3[_0x314c55(0x14b)](_0x1f7467=>(0x0,parser_1[_0x314c55(0x149)])(_0x1f7467[_0x314c55(0x146)])===(0x0,parser_1['normalize'])(_0x4f62f6)),_0x4a172b=_0x5ae2c2[_0x314c55(0x16c)](_0xb66caa=>(0x0,parser_1[_0x314c55(0x149)])(_0xb66caa[_0x314c55(0x13e)])===(0x0,parser_1['normalize'])(_0x3bd96a));if(_0x4a172b>=0x0)return(_0x4a172b+0x1)*0xa;const _0x51536b=_0x1c4bc3[_0x314c55(0x131)](_0x515c02=>(0x0,parser_1[_0x314c55(0x149)])(_0x515c02[_0x314c55(0x146)])===(0x0,parser_1['normalize'])(_0x4f62f6)&&(0x0,parser_1['normalize'])(_0x515c02['category'])===(0x0,parser_1[_0x314c55(0x149)])(_0x3bd96a));return Number[_0x314c55(0x15a)](Number(_0x51536b?.['order']))?Number(_0x51536b?.[_0x314c55(0x168)]):0x270f;}function activeItems(_0x5601dc){const _0x513e75=_0x5624b6;return _0x5601dc['filter'](_0x237635=>_0x237635&&_0x237635[_0x513e75(0x15f)]===![]&&Boolean(_0x237635['id'])&&Boolean(String(_0x237635[_0x513e75(0x159)]||'')[_0x513e75(0x13c)]()));}function activeIdSignature(_0xdaa14a){const _0x5459d1=_0x5624b6;return activeItems(_0xdaa14a)[_0x5459d1(0x14f)](_0x2fe450=>String(_0x2fe450['id']))[_0x5459d1(0x141)]()['join']('|');}function sortSlotsOldestFirst(_0xd8e299){return[..._0xd8e299]['sort']((_0x3e5e60,_0x4ef01b)=>{const _0x243b16=_0x1af6,_0x1c92b5=toTimestamp(_0x3e5e60['createdDateTime']),_0xf707f3=toTimestamp(_0x4ef01b[_0x243b16(0x171)]);if(_0x1c92b5!==_0xf707f3)return _0x1c92b5-_0xf707f3;return String(_0x3e5e60['id'])['localeCompare'](String(_0x4ef01b['id']));});}function buildDesiredItems(_0x59396b,_0xb308aa,_0x5c798c,_0x263a6d,_0xb9a704,_0x5175ae='',_0x5ed395=0x1){const _0x14d2a4=_0x5624b6;return(0x0,market_plan_1['optimizeMarketAssignments'])(_0x59396b,_0xb308aa,_0x263a6d,_0xb9a704,_0x5175ae,_0x5ed395)[_0x14d2a4(0x14f)](({source:_0x4d689e,parsed:_0x510065})=>{const _0x1c1c90=_0x14d2a4;return{'source':_0x4d689e,'parsed':_0x510065,'marketOrder':marketOrder(_0xb308aa,_0x510065[_0x1c1c90(0x146)]),'categoryOrder':categoryOrder(_0x5c798c,_0x510065['market'],_0x510065['category'])};})[_0x14d2a4(0x141)]((_0x1a481a,_0x1c2538)=>{const _0x5d49b1=_0x14d2a4;if(_0x1a481a[_0x5d49b1(0x15b)]!==_0x1c2538['marketOrder'])return _0x1a481a[_0x5d49b1(0x15b)]-_0x1c2538['marketOrder'];if(_0x1a481a[_0x5d49b1(0x166)]!==_0x1c2538[_0x5d49b1(0x166)])return _0x1a481a[_0x5d49b1(0x166)]-_0x1c2538[_0x5d49b1(0x166)];const _0x43362f=_0x1a481a[_0x5d49b1(0x175)][_0x5d49b1(0x13e)]['localeCompare'](_0x1c2538[_0x5d49b1(0x175)][_0x5d49b1(0x13e)],'de',{'sensitivity':_0x5d49b1(0x14d)});if(_0x43362f!==0x0&&_0x1a481a['categoryOrder']===0x270f&&_0x1c2538[_0x5d49b1(0x166)]===0x270f)return _0x43362f;return _0x1a481a[_0x5d49b1(0x175)][_0x5d49b1(0x130)][_0x5d49b1(0x148)](_0x1c2538[_0x5d49b1(0x175)][_0x5d49b1(0x130)],'de',{'sensitivity':'base'});});}function createSortPlan(_0x21e4ff,_0x43c704,_0x4c0f01,_0x215e90,_0x477b4d,_0x209a3e='',_0x3585d6=0x1,_0x4c3b5c=![]){const _0x3c7f8b=_0x5624b6,_0x182465=activeItems(_0x21e4ff),_0x569228=_0x182465[_0x3c7f8b(0x14b)](_0x24f886=>!(0x0,market_plan_1['isMarketHeader'])(String(_0x24f886[_0x3c7f8b(0x159)]),_0x43c704)),_0x2af32c=sortSlotsOldestFirst(_0x182465),_0x1f1c3e=buildDesiredItems(_0x569228,_0x43c704,_0x4c0f01,_0x215e90,_0x477b4d,_0x209a3e,_0x3585d6),_0x176386=[];let _0x4d2c15='';for(const _0x5ed169 of _0x1f1c3e){const _0x4b2087=_0x5ed169[_0x3c7f8b(0x175)][_0x3c7f8b(0x146)];if(_0x4c3b5c&&(0x0,parser_1['normalize'])(_0x4b2087)!==(0x0,parser_1[_0x3c7f8b(0x149)])(_0x477b4d)&&(0x0,parser_1[_0x3c7f8b(0x149)])(_0x4b2087)!==(0x0,parser_1[_0x3c7f8b(0x149)])(_0x4d2c15)){const _0x219a4e=(0x0,market_plan_1[_0x3c7f8b(0x160)])(_0x4b2087);_0x176386[_0x3c7f8b(0x137)]({'text':_0x219a4e,'market':_0x4b2087,'category':'','product':_0x219a4e});}_0x176386[_0x3c7f8b(0x137)]({'text':_0x5ed169[_0x3c7f8b(0x175)]['originalText'],'market':_0x4b2087,'category':_0x5ed169['parsed']['category'],'product':_0x5ed169[_0x3c7f8b(0x175)]['productName']}),_0x4d2c15=_0x4b2087;}if(_0x176386[_0x3c7f8b(0x145)]!==_0x2af32c['length'])return _0x2af32c[_0x3c7f8b(0x14f)]((_0x5e32ef,_0x2bef33)=>{const _0x470af3=String(_0x5e32ef['value'])['trim']();return{'position':_0x2bef33+0x1,'id':String(_0x5e32ef['id']),'createdDateTime':toTimestamp(_0x5e32ef['createdDateTime']),'from':_0x470af3,'to':_0x470af3,'market':_0x477b4d,'category':'','product':_0x470af3,'changed':![]};});return _0x2af32c['map']((_0x277a23,_0x20ef74)=>{const _0x7ca099=_0x3c7f8b,_0x7561b6=_0x176386[_0x20ef74],_0x509d84=String(_0x277a23['value'])[_0x7ca099(0x13c)](),_0x259aba=_0x7561b6?.[_0x7ca099(0x143)]||_0x509d84;return{'position':_0x20ef74+0x1,'id':String(_0x277a23['id']),'createdDateTime':toTimestamp(_0x277a23['createdDateTime']),'from':_0x509d84,'to':_0x259aba,'market':_0x7561b6?.['market']||_0x477b4d,'category':_0x7561b6?.['category']||'','product':_0x7561b6?.[_0x7ca099(0x173)]||_0x259aba,'changed':_0x509d84!==_0x259aba};});}function collectUnknownItems(_0x45d26e,_0x2c7bc9,_0x533ff0,_0x36792e,_0xee34ac=''){const _0xeee07b=_0x5624b6,_0x268e49=new Set(),_0x1656a0=[];for(const _0x240b29 of activeItems(_0x45d26e)){if((0x0,market_plan_1['isMarketHeader'])(String(_0x240b29[_0xeee07b(0x159)]),_0x2c7bc9))continue;const _0x3bef2b=(0x0,parser_1['parseItem'])(String(_0x240b29['value']),_0x2c7bc9,_0x533ff0,_0x36792e,_0xee34ac);if(_0x3bef2b[_0xeee07b(0x174)])continue;const _0x58cf68=(0x0,parser_1[_0xeee07b(0x164)])(_0x3bef2b[_0xeee07b(0x130)])||(0x0,parser_1['normalize'])(_0x3bef2b[_0xeee07b(0x130)]);if(!_0x58cf68||_0x268e49[_0xeee07b(0x16b)](_0x58cf68))continue;_0x268e49[_0xeee07b(0x156)](_0x58cf68),_0x1656a0[_0xeee07b(0x137)]({'key':_0x58cf68,'text':_0x3bef2b[_0xeee07b(0x167)],'product':_0x3bef2b[_0xeee07b(0x130)],'market':_0x3bef2b[_0xeee07b(0x146)],'guessedCategory':_0x3bef2b[_0xeee07b(0x13e)],'ambiguousMarketSuffix':_0x3bef2b[_0xeee07b(0x162)]});}return _0x1656a0;}function mergeUnknownProducts(_0x61aa1,_0x207a39,_0x2fda93,_0x12e29d,_0x55fa60=''){const _0x1232bd=_0x5624b6,_0x3ce63c=_0x2fda93[_0x1232bd(0x14f)](_0x3c50fd=>({..._0x3c50fd})),_0x1a6c8b=[],_0x5c2259=new Set(_0x3ce63c[_0x1232bd(0x13b)](_0x1d8957=>[_0x1d8957[_0x1232bd(0x147)],...String(_0x1d8957[_0x1232bd(0x13f)]||'')[_0x1232bd(0x158)](/[;,]/)])['map'](parser_1['canonicalProductKey'])[_0x1232bd(0x14b)](Boolean)),_0x5ccf12=collectUnknownItems(_0x61aa1,_0x207a39,_0x3ce63c,_0x12e29d,_0x55fa60);for(const _0x332884 of _0x5ccf12){const _0x35374a=String(_0x332884[_0x1232bd(0x173)]||'')['trim'](),_0x28c671=(0x0,parser_1['canonicalProductKey'])(_0x35374a);if(!_0x28c671||_0x5c2259[_0x1232bd(0x16b)](_0x28c671))continue;if(_0x332884['ambiguousMarketSuffix'])continue;const _0x28da19=(0x0,parser_1[_0x1232bd(0x16e)])(_0x35374a,_0x3ce63c);if(_0x28da19)continue;const _0x1f574b={'name':_0x35374a,'aliases':'','category':_0x332884['guessedCategory']||_0x1232bd(0x16a),'defaultMarket':'','availableMarkets':''};_0x3ce63c['push'](_0x1f574b),_0x1a6c8b['push'](_0x1f574b),_0x5c2259['add'](_0x28c671);}return{'products':_0x3ce63c,'learned':_0x1a6c8b};}function mergeReviewQueue(_0x5131bc,_0xc212ab,_0x1f2805=new Date()[_0x5624b6(0x12f)]()){const _0x9aae99=_0x5624b6,_0xc834d7=new Map(_0x5131bc[_0x9aae99(0x14f)](_0xd04145=>[_0xd04145['key'],{..._0xd04145}]));for(const _0x1495f4 of _0xc212ab){const _0x3ce110=_0xc834d7[_0x9aae99(0x15d)](_0x1495f4[_0x9aae99(0x15c)]);if(_0x3ce110?.['action']===_0x9aae99(0x153)){_0xc834d7[_0x9aae99(0x136)](_0x1495f4['key'],_0x3ce110);continue;}const _0x25b18e={'key':_0x1495f4[_0x9aae99(0x15c)],'text':_0x1495f4['text'],'product':_0x3ce110?.['product']||_0x1495f4['product'],'guessedCategory':_0x1495f4['guessedCategory'],'market':_0x1495f4[_0x9aae99(0x146)],'category':_0x3ce110?.[_0x9aae99(0x13e)]||_0x1495f4[_0x9aae99(0x15e)],'defaultMarket':_0x3ce110?.[_0x9aae99(0x16f)]||'','aliases':_0x3ce110?.['aliases']||'','action':_0x3ce110?.['action']||'pending','firstSeen':_0x3ce110?.['firstSeen']||_0x1f2805,'lastSeen':_0x1f2805},_0x31f99c=Boolean(_0x3ce110)&&_0x3ce110[_0x9aae99(0x143)]===_0x25b18e[_0x9aae99(0x143)]&&_0x3ce110['product']===_0x25b18e[_0x9aae99(0x173)]&&_0x3ce110[_0x9aae99(0x15e)]===_0x25b18e[_0x9aae99(0x15e)]&&_0x3ce110['market']===_0x25b18e['market']&&_0x3ce110[_0x9aae99(0x13e)]===_0x25b18e[_0x9aae99(0x13e)]&&_0x3ce110[_0x9aae99(0x16f)]===_0x25b18e[_0x9aae99(0x16f)]&&_0x3ce110[_0x9aae99(0x13f)]===_0x25b18e[_0x9aae99(0x13f)]&&_0x3ce110[_0x9aae99(0x170)]===_0x25b18e['action']&&_0x3ce110[_0x9aae99(0x14c)]===_0x25b18e[_0x9aae99(0x14c)];_0xc834d7['set'](_0x1495f4['key'],_0x31f99c?_0x3ce110:_0x25b18e);}return[..._0xc834d7['values']()]['sort']((_0x54622b,_0x2dc2e8)=>_0x54622b[_0x9aae99(0x173)]['localeCompare'](_0x2dc2e8['product'],'de',{'sensitivity':'base'}));}function applyReviewActions(_0x1debc6,_0x5d460a){const _0xad7eae=_0x5624b6,_0x5222f3=_0x1debc6['map'](_0x1422ff=>({..._0x1422ff})),_0x287888=[],_0x339975=[];for(const _0x941040 of _0x5d460a){if(_0x941040[_0xad7eae(0x170)]!==_0xad7eae(0x140)){_0x339975['push']({..._0x941040});continue;}const _0x158c4c=String(_0x941040[_0xad7eae(0x173)]||'')[_0xad7eae(0x13c)]();if(!_0x158c4c)continue;const _0x33fc09=(0x0,parser_1[_0xad7eae(0x16e)])(_0x158c4c,_0x5222f3);if(_0x33fc09){if(_0x941040[_0xad7eae(0x13e)])_0x33fc09['category']=_0x941040['category'];if(_0x941040['defaultMarket']!==undefined)_0x33fc09['defaultMarket']=_0x941040[_0xad7eae(0x16f)];if(_0x941040[_0xad7eae(0x13f)]){const _0x3fd1ec=new Set(String(_0x33fc09['aliases']||'')[_0xad7eae(0x158)](/[;,]/)[_0xad7eae(0x14f)](_0x266106=>_0x266106['trim']())[_0xad7eae(0x14b)](Boolean));for(const _0x19104c of _0x941040[_0xad7eae(0x13f)][_0xad7eae(0x158)](/[;,]/)[_0xad7eae(0x14f)](_0x463389=>_0x463389[_0xad7eae(0x13c)]())[_0xad7eae(0x14b)](Boolean))_0x3fd1ec['add'](_0x19104c);_0x33fc09[_0xad7eae(0x13f)]=[..._0x3fd1ec][_0xad7eae(0x132)](',');}_0x287888['push']({..._0x33fc09});continue;}const _0x2fedd2={'name':_0x158c4c,'aliases':String(_0x941040[_0xad7eae(0x13f)]||''),'category':String(_0x941040['category']||_0x941040[_0xad7eae(0x15e)]||'Sonstiges'),'defaultMarket':String(_0x941040[_0xad7eae(0x16f)]||''),'availableMarkets':''};_0x5222f3[_0xad7eae(0x137)](_0x2fedd2),_0x287888[_0xad7eae(0x137)](_0x2fedd2);}return{'products':_0x5222f3[_0xad7eae(0x141)]((_0x2cf29f,_0x97f782)=>_0x2cf29f[_0xad7eae(0x147)]['localeCompare'](_0x97f782[_0xad7eae(0x147)],'de',{'sensitivity':_0xad7eae(0x14d)})),'remainingReviews':_0x339975,'accepted':_0x287888};}function _0x37f6(){const _0x4274e9=['push','from','activeItems','__esModule','flatMap','trim','\x20/\x20','category','aliases','accept','sort','4823358GwsEio','text','defineProperty','length','market','name','localeCompare','normalize','3187590EXgQrH','filter','firstSeen','base','sortSlotsOldestFirst','map','Änderungen:\x20','705190sRbRrn','number','ignore','16tdRByc','./parser','add','toTimestamp','split','value','isFinite','marketOrder','key','get','guessedCategory','completed','formatMarketHeader','7388vXZNCw','ambiguousMarketSuffix','mergeReviewQueue','canonicalProductKey','176dUSerW','categoryOrder','originalText','order','applyReviewActions','Sonstiges','has','findIndex','43989690aIsSOY','findProduct','defaultMarket','action','createdDateTime','buildDesiredItems','product','knownProduct','parsed','string','mergeUnknownProducts','7HViwbk','toISOString','productName','find','join','Aktive\x20Plätze:\x20','5426262bfTulZ','4872364aEjnsP','set'];_0x37f6=function(){return _0x4274e9;};return _0x37f6();}function _0x1af6(_0x35a2fd,_0x32c3ee){_0x35a2fd=_0x35a2fd-0x12c;const _0x37f6ac=_0x37f6();let _0x1af627=_0x37f6ac[_0x35a2fd];return _0x1af627;}function makePreviewText(_0x5bdd0d,_0x51e418){const _0x6c1156=_0x5624b6,_0x3b4ced=['Liste:\x20'+_0x5bdd0d,_0x6c1156(0x133)+_0x51e418[_0x6c1156(0x145)],_0x6c1156(0x150)+_0x51e418[_0x6c1156(0x14b)](_0x579bc0=>_0x579bc0['changed'])['length']];for(const _0x5e0695 of _0x51e418){const _0x3ce62e=_0x5e0695['changed']?'→':'=';_0x3b4ced['push'](String(_0x5e0695['position'])['padStart'](0x2,'0')+'.\x20'+_0x5e0695[_0x6c1156(0x138)]+'\x20'+_0x3ce62e+'\x20'+_0x5e0695['to']+'\x20['+_0x5e0695[_0x6c1156(0x146)]+_0x6c1156(0x13d)+_0x5e0695[_0x6c1156(0x13e)]+']');}return _0x3b4ced[_0x6c1156(0x132)]('\x0a');}
|
|
1
|
+
'use strict';const _0x17758f=_0x40f6;(function(_0x4968f7,_0x4fc061){const _0x37f260=_0x40f6,_0x33a460=_0x4968f7();while(!![]){try{const _0x28ba72=-parseInt(_0x37f260(0x1e4))/0x1*(parseInt(_0x37f260(0x1e9))/0x2)+-parseInt(_0x37f260(0x1ed))/0x3*(-parseInt(_0x37f260(0x1f7))/0x4)+-parseInt(_0x37f260(0x1bf))/0x5*(parseInt(_0x37f260(0x1be))/0x6)+parseInt(_0x37f260(0x1da))/0x7+-parseInt(_0x37f260(0x1ec))/0x8+parseInt(_0x37f260(0x1d4))/0x9*(-parseInt(_0x37f260(0x1c9))/0xa)+parseInt(_0x37f260(0x1cd))/0xb;if(_0x28ba72===_0x4fc061)break;else _0x33a460['push'](_0x33a460['shift']());}catch(_0x2e4756){_0x33a460['push'](_0x33a460['shift']());}}}(_0x4c10,0x47388));Object[_0x17758f(0x1e1)](exports,'__esModule',{'value':!![]}),exports[_0x17758f(0x1f0)]=toTimestamp,exports[_0x17758f(0x204)]=activeItems,exports['activeIdSignature']=activeIdSignature,exports['compareActiveSnapshot']=compareActiveSnapshot,exports['activeSnapshotHasConflict']=activeSnapshotHasConflict,exports[_0x17758f(0x1d5)]=sortSlotsOldestFirst,exports[_0x17758f(0x1cf)]=buildDesiredItems,exports['createSortPlan']=createSortPlan,exports[_0x17758f(0x1f4)]=collectUnknownItems,exports[_0x17758f(0x1d0)]=mergeUnknownProducts,exports[_0x17758f(0x1de)]=mergeReviewQueue,exports['applyReviewActions']=applyReviewActions,exports[_0x17758f(0x1df)]=makePreviewText;const parser_1=require(_0x17758f(0x1c7)),market_plan_1=require('./market-plan');function toTimestamp(_0x856832){const _0x1e50d2=_0x17758f;if(typeof _0x856832===_0x1e50d2(0x1bd)&&Number[_0x1e50d2(0x1e6)](_0x856832))return _0x856832;if(typeof _0x856832===_0x1e50d2(0x1cb)&&_0x856832['trim']()){const _0x8b0316=Number(_0x856832);if(Number[_0x1e50d2(0x1e6)](_0x8b0316))return _0x8b0316;const _0x562f12=Date[_0x1e50d2(0x1db)](_0x856832);if(Number[_0x1e50d2(0x1e6)](_0x562f12))return _0x562f12;}return 0x0;}function marketOrder(_0x51381c,_0x45aa3d){const _0x5a5eb2=_0x17758f,_0x355ef1=_0x51381c['find'](_0x1e4813=>(0x0,parser_1[_0x5a5eb2(0x209)])(_0x1e4813[_0x5a5eb2(0x1c6)])===(0x0,parser_1['normalize'])(_0x45aa3d));return Number[_0x5a5eb2(0x1e6)](Number(_0x355ef1?.['order']))?Number(_0x355ef1?.[_0x5a5eb2(0x1f6)]):0x270f;}function categoryOrder(_0x254e56,_0x35b10f,_0x231d57){const _0x5a7fb2=_0x17758f,_0x5ed0fb=_0x254e56['filter'](_0x5ec43a=>(0x0,parser_1['normalize'])(_0x5ec43a[_0x5a7fb2(0x1f8)])===(0x0,parser_1[_0x5a7fb2(0x209)])(_0x35b10f)),_0x29a03e=_0x5ed0fb['findIndex'](_0x19dc61=>(0x0,parser_1[_0x5a7fb2(0x209)])(_0x19dc61['category'])===(0x0,parser_1[_0x5a7fb2(0x209)])(_0x231d57));if(_0x29a03e>=0x0)return(_0x29a03e+0x1)*0xa;const _0x1337ff=_0x254e56['find'](_0x15d426=>(0x0,parser_1[_0x5a7fb2(0x209)])(_0x15d426[_0x5a7fb2(0x1f8)])===(0x0,parser_1[_0x5a7fb2(0x209)])(_0x35b10f)&&(0x0,parser_1[_0x5a7fb2(0x209)])(_0x15d426[_0x5a7fb2(0x1ce)])===(0x0,parser_1['normalize'])(_0x231d57));return Number['isFinite'](Number(_0x1337ff?.['order']))?Number(_0x1337ff?.[_0x5a7fb2(0x1f6)]):0x270f;}function activeItems(_0x47cf94){const _0x200949=_0x17758f;return _0x47cf94[_0x200949(0x206)](_0x4b0817=>_0x4b0817&&_0x4b0817[_0x200949(0x1c3)]===![]&&Boolean(_0x4b0817['id'])&&Boolean(String(_0x4b0817['value']||'')[_0x200949(0x1e7)]()));}function activeIdSignature(_0xe63cf6){const _0x5f24da=_0x17758f;return activeItems(_0xe63cf6)['map'](_0x3eb28e=>String(_0x3eb28e['id']))['sort']()[_0x5f24da(0x1f9)]('|');}function compareActiveSnapshot(_0x2e2b7a,_0x5cb97e,_0x20ed1b){const _0x2de844=_0x17758f,_0x50274b=activeItems(_0x2e2b7a),_0x1ac9bd=activeItems(_0x5cb97e),_0x274cf2=new Set(_0x50274b['map'](_0x2bbe6f=>String(_0x2bbe6f['id']))),_0xeb6ce5=new Map(_0x1ac9bd['map'](_0x4c041f=>[String(_0x4c041f['id']),_0x4c041f])),_0x3b0362=_0x1ac9bd['map'](_0x3cde51=>String(_0x3cde51['id']))[_0x2de844(0x206)](_0x203710=>!_0x274cf2[_0x2de844(0x1e8)](_0x203710)),_0x2b0cd4=[],_0x484404=[];for(const _0x54f79e of _0x50274b){const _0x4dc218=String(_0x54f79e['id']),_0x558f26=_0xeb6ce5['get'](_0x4dc218);if(!_0x558f26){_0x2b0cd4[_0x2de844(0x208)](_0x4dc218);continue;}const _0x5ceec6=_0x20ed1b[_0x2de844(0x1fe)](_0x4dc218);_0x5ceec6!==undefined&&String(_0x558f26[_0x2de844(0x1d8)]||'')[_0x2de844(0x1e7)]()!==_0x5ceec6&&_0x484404[_0x2de844(0x208)](_0x4dc218);}return{'addedIds':_0x3b0362,'missingIds':_0x2b0cd4,'changedIds':_0x484404};}function _0x40f6(_0x3c5800,_0x4bdb87){_0x3c5800=_0x3c5800-0x1bc;const _0x4c109b=_0x4c10();let _0x40f62e=_0x4c109b[_0x3c5800];return _0x40f62e;}function activeSnapshotHasConflict(_0x4c1cd8){const _0x60211=_0x17758f;return _0x4c1cd8[_0x60211(0x1cc)]['length']>0x0||_0x4c1cd8[_0x60211(0x1d2)][_0x60211(0x1c1)]>0x0||_0x4c1cd8[_0x60211(0x1c0)][_0x60211(0x1c1)]>0x0;}function sortSlotsOldestFirst(_0x84732){const _0x18bd73=_0x17758f;return[..._0x84732][_0x18bd73(0x207)]((_0x444f57,_0x44c7a2)=>{const _0x5a4a57=_0x18bd73,_0x2d0cb6=toTimestamp(_0x444f57['createdDateTime']),_0x544506=toTimestamp(_0x44c7a2[_0x5a4a57(0x1ee)]);if(_0x2d0cb6!==_0x544506)return _0x2d0cb6-_0x544506;return String(_0x444f57['id'])[_0x5a4a57(0x1f5)](String(_0x44c7a2['id']));});}function buildDesiredItems(_0x2fd63d,_0x2bf96c,_0x1c7109,_0x379066,_0xfe984b,_0x3908d7='',_0x3c3c48=0x1){const _0x4f36f9=_0x17758f;return(0x0,market_plan_1[_0x4f36f9(0x1ea)])(_0x2fd63d,_0x2bf96c,_0x379066,_0xfe984b,_0x3908d7,_0x3c3c48)[_0x4f36f9(0x1d6)](({source:_0x1f11e1,parsed:_0x329f08})=>{return{'source':_0x1f11e1,'parsed':_0x329f08,'marketOrder':marketOrder(_0x2bf96c,_0x329f08['market']),'categoryOrder':categoryOrder(_0x1c7109,_0x329f08['market'],_0x329f08['category'])};})['sort']((_0x3ee67f,_0x49d465)=>{const _0x52f9dd=_0x4f36f9;if(_0x3ee67f['marketOrder']!==_0x49d465[_0x52f9dd(0x1f1)])return _0x3ee67f[_0x52f9dd(0x1f1)]-_0x49d465['marketOrder'];if(_0x3ee67f[_0x52f9dd(0x201)]!==_0x49d465[_0x52f9dd(0x201)])return _0x3ee67f['categoryOrder']-_0x49d465['categoryOrder'];const _0x370f72=_0x3ee67f[_0x52f9dd(0x1e2)][_0x52f9dd(0x1ce)][_0x52f9dd(0x1f5)](_0x49d465[_0x52f9dd(0x1e2)]['category'],'de',{'sensitivity':_0x52f9dd(0x1d9)});if(_0x370f72!==0x0&&_0x3ee67f[_0x52f9dd(0x201)]===0x270f&&_0x49d465[_0x52f9dd(0x201)]===0x270f)return _0x370f72;return _0x3ee67f[_0x52f9dd(0x1e2)][_0x52f9dd(0x1c4)]['localeCompare'](_0x49d465['parsed'][_0x52f9dd(0x1c4)],'de',{'sensitivity':_0x52f9dd(0x1d9)});});}function createSortPlan(_0x4baa6b,_0x20bc8a,_0x234fbb,_0x37191d,_0x4e6832,_0x4e0897='',_0x1a1902=0x1,_0x4011bb=![]){const _0x1ec025=_0x17758f,_0x50bbfa=activeItems(_0x4baa6b),_0x52d69e=_0x50bbfa['filter'](_0xa9714=>!(0x0,market_plan_1[_0x1ec025(0x1f3)])(String(_0xa9714['value']),_0x20bc8a)),_0x5c5ebd=sortSlotsOldestFirst(_0x50bbfa),_0x11795e=buildDesiredItems(_0x52d69e,_0x20bc8a,_0x234fbb,_0x37191d,_0x4e6832,_0x4e0897,_0x1a1902),_0x5d0ecf=[];let _0x5cd979='';for(const _0x386182 of _0x11795e){const _0x29bf11=_0x386182[_0x1ec025(0x1e2)][_0x1ec025(0x1f8)];if(_0x4011bb&&(0x0,parser_1[_0x1ec025(0x209)])(_0x29bf11)!==(0x0,parser_1['normalize'])(_0x4e6832)&&(0x0,parser_1[_0x1ec025(0x209)])(_0x29bf11)!==(0x0,parser_1[_0x1ec025(0x209)])(_0x5cd979)){const _0x474cb5=(0x0,market_plan_1[_0x1ec025(0x1eb)])(_0x29bf11);_0x5d0ecf[_0x1ec025(0x208)]({'text':_0x474cb5,'market':_0x29bf11,'category':'','product':_0x474cb5});}_0x5d0ecf[_0x1ec025(0x208)]({'text':String(_0x386182[_0x1ec025(0x1e2)]['originalText'])[_0x1ec025(0x1e7)](),'market':_0x29bf11,'category':_0x386182[_0x1ec025(0x1e2)]['category'],'product':_0x386182['parsed'][_0x1ec025(0x1c4)]}),_0x5cd979=_0x29bf11;}if(_0x5d0ecf['length']!==_0x5c5ebd[_0x1ec025(0x1c1)])return _0x5c5ebd[_0x1ec025(0x1d6)]((_0x227021,_0xbd12d4)=>{const _0x5bb10c=_0x1ec025,_0xaa9487=String(_0x227021[_0x5bb10c(0x1d8)])['trim']();return{'position':_0xbd12d4+0x1,'id':String(_0x227021['id']),'createdDateTime':toTimestamp(_0x227021[_0x5bb10c(0x1ee)]),'from':_0xaa9487,'to':_0xaa9487,'market':_0x4e6832,'category':'','product':_0xaa9487,'changed':![]};});return _0x5c5ebd['map']((_0x195a6f,_0x5ac63c)=>{const _0xf9ab9f=_0x1ec025,_0x3d4bcc=_0x5d0ecf[_0x5ac63c],_0x52d3f7=String(_0x195a6f[_0xf9ab9f(0x1d8)])[_0xf9ab9f(0x1e7)](),_0x16d280=_0x3d4bcc?.[_0xf9ab9f(0x1bc)]||_0x52d3f7;return{'position':_0x5ac63c+0x1,'id':String(_0x195a6f['id']),'createdDateTime':toTimestamp(_0x195a6f[_0xf9ab9f(0x1ee)]),'from':_0x52d3f7,'to':_0x16d280,'market':_0x3d4bcc?.['market']||_0x4e6832,'category':_0x3d4bcc?.['category']||'','product':_0x3d4bcc?.[_0xf9ab9f(0x1e3)]||_0x16d280,'changed':_0x52d3f7!==_0x16d280};});}function collectUnknownItems(_0x35fcc2,_0x18f93e,_0x2c5179,_0x874c1b,_0x185ba3=''){const _0x1d44ff=_0x17758f,_0x333209=new Set(),_0x332b4e=[];for(const _0x4741be of activeItems(_0x35fcc2)){if((0x0,market_plan_1[_0x1d44ff(0x1f3)])(String(_0x4741be[_0x1d44ff(0x1d8)]),_0x18f93e))continue;const _0x2de698=(0x0,parser_1[_0x1d44ff(0x200)])(String(_0x4741be['value']),_0x18f93e,_0x2c5179,_0x874c1b,_0x185ba3);if(_0x2de698[_0x1d44ff(0x1fa)])continue;const _0x56bd8a=(0x0,parser_1['canonicalProductKey'])(_0x2de698[_0x1d44ff(0x1c4)])||(0x0,parser_1['normalize'])(_0x2de698['productName']);if(!_0x56bd8a||_0x333209[_0x1d44ff(0x1e8)](_0x56bd8a))continue;_0x333209['add'](_0x56bd8a),_0x332b4e['push']({'key':_0x56bd8a,'text':_0x2de698[_0x1d44ff(0x1ff)],'product':_0x2de698[_0x1d44ff(0x1c4)],'market':_0x2de698[_0x1d44ff(0x1f8)],'guessedCategory':_0x2de698[_0x1d44ff(0x1ce)],'ambiguousMarketSuffix':_0x2de698[_0x1d44ff(0x202)]});}return _0x332b4e;}function mergeUnknownProducts(_0x2d88e1,_0x1e4d93,_0x5ddc15,_0x4f92d2,_0x1e9be2=''){const _0x2cf894=_0x17758f,_0x4b47e4=_0x5ddc15[_0x2cf894(0x1d6)](_0x513973=>({..._0x513973})),_0x57a9bd=[],_0x2de4af=new Set(_0x4b47e4['flatMap'](_0x474d7c=>[_0x474d7c[_0x2cf894(0x1c6)],...String(_0x474d7c[_0x2cf894(0x1dd)]||'')[_0x2cf894(0x1d3)](/[;,]/)])['map'](parser_1['canonicalProductKey'])[_0x2cf894(0x206)](Boolean)),_0x21dd87=collectUnknownItems(_0x2d88e1,_0x1e4d93,_0x4b47e4,_0x4f92d2,_0x1e9be2);for(const _0x22e764 of _0x21dd87){const _0x413cfd=String(_0x22e764[_0x2cf894(0x1e3)]||'')[_0x2cf894(0x1e7)](),_0x7287ed=(0x0,parser_1[_0x2cf894(0x1d1)])(_0x413cfd);if(!_0x7287ed||_0x2de4af[_0x2cf894(0x1e8)](_0x7287ed))continue;if(_0x22e764[_0x2cf894(0x202)])continue;const _0x32b617=(0x0,parser_1[_0x2cf894(0x1fd)])(_0x413cfd,_0x4b47e4);if(_0x32b617)continue;const _0xc95e={'name':_0x413cfd,'aliases':'','category':_0x22e764['guessedCategory']||'Sonstiges','defaultMarket':'','availableMarkets':''};_0x4b47e4['push'](_0xc95e),_0x57a9bd[_0x2cf894(0x208)](_0xc95e),_0x2de4af[_0x2cf894(0x1e0)](_0x7287ed);}return{'products':_0x4b47e4,'learned':_0x57a9bd};}function mergeReviewQueue(_0x914a1e,_0x5cf42e,_0x226966=new Date()[_0x17758f(0x1ca)]()){const _0x7d0114=_0x17758f,_0x17019b=new Map(_0x914a1e[_0x7d0114(0x1d6)](_0x32e672=>[_0x32e672['key'],{..._0x32e672}]));for(const _0x574cdd of _0x5cf42e){const _0xe0a03d=_0x17019b[_0x7d0114(0x1fe)](_0x574cdd[_0x7d0114(0x1c5)]);if(_0xe0a03d?.[_0x7d0114(0x1c2)]===_0x7d0114(0x1fc)){_0x17019b['set'](_0x574cdd[_0x7d0114(0x1c5)],_0xe0a03d);continue;}const _0x1db95a={'key':_0x574cdd[_0x7d0114(0x1c5)],'text':_0x574cdd[_0x7d0114(0x1bc)],'product':_0xe0a03d?.['product']||_0x574cdd['product'],'guessedCategory':_0x574cdd[_0x7d0114(0x203)],'market':_0x574cdd[_0x7d0114(0x1f8)],'category':_0xe0a03d?.['category']||_0x574cdd['guessedCategory'],'defaultMarket':_0xe0a03d?.[_0x7d0114(0x1f2)]||'','availableMarkets':_0xe0a03d?.[_0x7d0114(0x205)]??'','aliases':_0xe0a03d?.['aliases']||'','action':_0xe0a03d?.[_0x7d0114(0x1c2)]||'pending','firstSeen':_0xe0a03d?.[_0x7d0114(0x1ef)]||_0x226966,'lastSeen':_0x226966},_0x36ab42=Boolean(_0xe0a03d)&&_0xe0a03d['text']===_0x1db95a[_0x7d0114(0x1bc)]&&_0xe0a03d['product']===_0x1db95a['product']&&_0xe0a03d[_0x7d0114(0x203)]===_0x1db95a[_0x7d0114(0x203)]&&_0xe0a03d[_0x7d0114(0x1f8)]===_0x1db95a[_0x7d0114(0x1f8)]&&_0xe0a03d[_0x7d0114(0x1ce)]===_0x1db95a[_0x7d0114(0x1ce)]&&_0xe0a03d[_0x7d0114(0x1f2)]===_0x1db95a[_0x7d0114(0x1f2)]&&JSON['stringify'](_0xe0a03d['availableMarkets']??'')===JSON['stringify'](_0x1db95a[_0x7d0114(0x205)]??'')&&_0xe0a03d[_0x7d0114(0x1dd)]===_0x1db95a[_0x7d0114(0x1dd)]&&_0xe0a03d[_0x7d0114(0x1c2)]===_0x1db95a[_0x7d0114(0x1c2)]&&_0xe0a03d['firstSeen']===_0x1db95a[_0x7d0114(0x1ef)];_0x17019b['set'](_0x574cdd['key'],_0x36ab42?_0xe0a03d:_0x1db95a);}return[..._0x17019b[_0x7d0114(0x20b)]()][_0x7d0114(0x207)]((_0x2dd0bc,_0x2bf22e)=>_0x2dd0bc[_0x7d0114(0x1e3)][_0x7d0114(0x1f5)](_0x2bf22e[_0x7d0114(0x1e3)],'de',{'sensitivity':'base'}));}function _0x4c10(){const _0x2fa4b3=['isFinite','trim','has','2cSlgRi','optimizeMarketAssignments','formatMarketHeader','818408rwKbEb','21AiTegM','createdDateTime','firstSeen','toTimestamp','marketOrder','defaultMarket','isMarketHeader','collectUnknownItems','localeCompare','order','134576ZLrGbQ','market','join','knownProduct','changed','ignore','findProduct','get','originalText','parseItem','categoryOrder','ambiguousMarketSuffix','guessedCategory','activeItems','availableMarkets','filter','sort','push','normalize','from','values','text','number','48aeZNLD','337005NVripr','changedIds','length','action','completed','productName','key','name','./parser','\x20/\x20','1372110Jsaxpi','toISOString','string','addedIds','11943547OCGkfc','category','buildDesiredItems','mergeUnknownProducts','canonicalProductKey','missingIds','split','18zjxzUn','sortSlotsOldestFirst','map','accept','value','base','2484251XqPmRV','parse','position','aliases','mergeReviewQueue','makePreviewText','add','defineProperty','parsed','product','468527OJwjlI','isArray'];_0x4c10=function(){return _0x2fa4b3;};return _0x4c10();}function applyReviewActions(_0x2523f3,_0x2426a2){const _0x5eff35=_0x17758f,_0x4ba5a3=_0x2523f3[_0x5eff35(0x1d6)](_0x1f9fc5=>({..._0x1f9fc5})),_0xe4d2af=[],_0x34eaa5=[];for(const _0x1ad323 of _0x2426a2){if(_0x1ad323[_0x5eff35(0x1c2)]!==_0x5eff35(0x1d7)){_0x34eaa5[_0x5eff35(0x208)]({..._0x1ad323});continue;}const _0x25b76b=String(_0x1ad323['product']||'')['trim']();if(!_0x25b76b)continue;const _0x3d6a7b=(0x0,parser_1[_0x5eff35(0x1fd)])(_0x25b76b,_0x4ba5a3);if(_0x3d6a7b){if(_0x1ad323['category'])_0x3d6a7b[_0x5eff35(0x1ce)]=_0x1ad323[_0x5eff35(0x1ce)];if(_0x1ad323[_0x5eff35(0x1f2)]!==undefined)_0x3d6a7b['defaultMarket']=_0x1ad323[_0x5eff35(0x1f2)];_0x1ad323['availableMarkets']!==undefined&&(_0x3d6a7b[_0x5eff35(0x205)]=Array[_0x5eff35(0x1e5)](_0x1ad323[_0x5eff35(0x205)])?[..._0x1ad323['availableMarkets']]:String(_0x1ad323[_0x5eff35(0x205)]||''));if(_0x1ad323[_0x5eff35(0x1dd)]){const _0x2218cb=new Set(String(_0x3d6a7b[_0x5eff35(0x1dd)]||'')['split'](/[;,]/)[_0x5eff35(0x1d6)](_0x1dc022=>_0x1dc022['trim']())[_0x5eff35(0x206)](Boolean));for(const _0x1e23fa of _0x1ad323['aliases']['split'](/[;,]/)['map'](_0x1cd711=>_0x1cd711[_0x5eff35(0x1e7)]())[_0x5eff35(0x206)](Boolean))_0x2218cb['add'](_0x1e23fa);_0x3d6a7b[_0x5eff35(0x1dd)]=[..._0x2218cb][_0x5eff35(0x1f9)](',');}_0xe4d2af[_0x5eff35(0x208)]({..._0x3d6a7b});continue;}const _0x2d38ce={'name':_0x25b76b,'aliases':String(_0x1ad323['aliases']||''),'category':String(_0x1ad323['category']||_0x1ad323['guessedCategory']||'Sonstiges'),'defaultMarket':String(_0x1ad323[_0x5eff35(0x1f2)]||''),'availableMarkets':Array['isArray'](_0x1ad323['availableMarkets'])?[..._0x1ad323[_0x5eff35(0x205)]]:String(_0x1ad323[_0x5eff35(0x205)]||'')};_0x4ba5a3[_0x5eff35(0x208)](_0x2d38ce),_0xe4d2af[_0x5eff35(0x208)](_0x2d38ce);}return{'products':_0x4ba5a3[_0x5eff35(0x207)]((_0x2fe6a9,_0x14be5e)=>_0x2fe6a9[_0x5eff35(0x1c6)]['localeCompare'](_0x14be5e[_0x5eff35(0x1c6)],'de',{'sensitivity':'base'})),'remainingReviews':_0x34eaa5,'accepted':_0xe4d2af};}function makePreviewText(_0x51ca80,_0x65433a){const _0x18be3d=_0x17758f,_0x157796=['Liste:\x20'+_0x51ca80,'Aktive\x20Plätze:\x20'+_0x65433a['length'],'Änderungen:\x20'+_0x65433a['filter'](_0xd2c233=>_0xd2c233[_0x18be3d(0x1fb)])['length']];for(const _0x44737e of _0x65433a){const _0x34bc30=_0x44737e[_0x18be3d(0x1fb)]?'→':'=';_0x157796['push'](String(_0x44737e[_0x18be3d(0x1dc)])['padStart'](0x2,'0')+'.\x20'+_0x44737e[_0x18be3d(0x20a)]+'\x20'+_0x34bc30+'\x20'+_0x44737e['to']+'\x20['+_0x44737e['market']+_0x18be3d(0x1c8)+_0x44737e[_0x18be3d(0x1ce)]+']');}return _0x157796[_0x18be3d(0x1f9)]('\x0a');}
|
package/build/lib/statistics.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function _0x2249(_0x49e3d5,_0x44969a){_0x49e3d5=_0x49e3d5-0x1d8;const _0x2f63ee=_0x2f63();let _0x224996=_0x2f63ee[_0x49e3d5];return _0x224996;}const _0x2e07d5=_0x2249;(function(_0x4fb0fe,_0x31cbf1){const _0x163a69=_0x2249,_0x53d37f=_0x4fb0fe();while(!![]){try{const _0x32dfc8=-parseInt(_0x163a69(0x1f5))/0x1+-parseInt(_0x163a69(0x1e5))/0x2*(parseInt(_0x163a69(0x1f4))/0x3)+-parseInt(_0x163a69(0x1d8))/0x4+parseInt(_0x163a69(0x1ee))/0x5+parseInt(_0x163a69(0x1e1))/0x6*(parseInt(_0x163a69(0x1e0))/0x7)+parseInt(_0x163a69(0x1df))/0x8*(-parseInt(_0x163a69(0x1ec))/0x9)+parseInt(_0x163a69(0x1e3))/0xa*(parseInt(_0x163a69(0x1ed))/0xb);if(_0x32dfc8===_0x31cbf1)break;else _0x53d37f['push'](_0x53d37f['shift']());}catch(_0x25d546){_0x53d37f['push'](_0x53d37f['shift']());}}}(_0x2f63,0xbe611));Object[_0x2e07d5(0x1e8)](exports,_0x2e07d5(0x1e2),{'value':!![]}),exports[_0x2e07d5(0x1f1)]=emptyUsageStatistics,exports[_0x2e07d5(0x1dc)]=normalizeUsageStatistics,exports[_0x2e07d5(0x1f0)]=recordAddedItem;function emptyUsageStatistics(_0x4a5d75=new Date()){const _0x5358ac=_0x4a5d75['toISOString']();return{'startedAt':_0x5358ac,'lastUpdated':_0x5358ac,'totalAddedItems':0x0,'byProduct':{},'byMarket':{},'byCategory':{},'byList':{},'automaticLearned':0x0,'reviewAccepted':0x0,'reviewIgnored':0x0};}function normalizeUsageStatistics(_0x48a357,_0x2594f0=new Date()){const _0x53aaf5=_0x2e07d5,_0x22587d=emptyUsageStatistics(_0x2594f0);if(!_0x48a357||typeof _0x48a357!==_0x53aaf5(0x1db)||Array[_0x53aaf5(0x1f6)](_0x48a357))return _0x22587d;const _0x9b8c85=_0x48a357;return{'startedAt':String(_0x9b8c85['startedAt']||_0x22587d[_0x53aaf5(0x1d9)]),'lastUpdated':String(_0x9b8c85['lastUpdated']||_0x22587d[_0x53aaf5(0x1eb)]),'totalAddedItems':Math[_0x53aaf5(0x1da)](0x0,Number(_0x9b8c85[_0x53aaf5(0x1e9)])||0x0),'byProduct':{..._0x9b8c85[_0x53aaf5(0x1de)]||{}},'byMarket':{..._0x9b8c85[_0x53aaf5(0x1e7)]||{}},'byCategory':{..._0x9b8c85[_0x53aaf5(0x1e6)]||{}},'byList':{..._0x9b8c85[_0x53aaf5(0x1ea)]||{}},'automaticLearned':Math[_0x53aaf5(0x1da)](0x0,Number(_0x9b8c85[_0x53aaf5(0x1e4)])||0x0),'reviewAccepted':Math[_0x53aaf5(0x1da)](0x0,Number(_0x9b8c85['reviewAccepted'])||0x0),'reviewIgnored':Math[_0x53aaf5(0x1da)](0x0,Number(_0x9b8c85[_0x53aaf5(0x1f2)])||0x0)};}function increment(_0x3508c8,_0x434a60){const _0x523be3=_0x2e07d5,_0x23e1af=String(_0x434a60||'')[_0x523be3(0x1dd)]()||'Unbekannt';_0x3508c8[_0x23e1af]=(Number(_0x3508c8[_0x23e1af])||0x0)+0x1;}function _0x2f63(){const _0x2fde60=['object','normalizeUsageStatistics','trim','byProduct','8fBUbKn','837690LRNRsn','72vQlHKc','__esModule','77980VoJbzh','automaticLearned','1744006FpIbLD','byCategory','byMarket','defineProperty','totalAddedItems','byList','lastUpdated','11915721QbCxnd','3289QqWQLX','1877780dmYanj','category','recordAddedItem','emptyUsageStatistics','reviewIgnored','productName','3usXixF','343639pfjwUZ','isArray','3295176ElrWie','startedAt','max'];_0x2f63=function(){return _0x2fde60;};return _0x2f63();}function recordAddedItem(_0x3473e3,_0x140827,_0x2a6cc9){const _0x599d80=_0x2e07d5,_0x151bc9=normalizeUsageStatistics(_0x3473e3);return _0x151bc9[_0x599d80(0x1e9)]+=0x1,_0x151bc9[_0x599d80(0x1eb)]=new Date()['toISOString'](),increment(_0x151bc9[_0x599d80(0x1de)],_0x2a6cc9[_0x599d80(0x1f3)]),increment(_0x151bc9['byMarket'],_0x2a6cc9['market']),increment(_0x151bc9[_0x599d80(0x1e6)],_0x2a6cc9[_0x599d80(0x1ef)]),increment(_0x151bc9['byList'],_0x140827),_0x151bc9;}
|
package/build/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x13ea5f=_0x5852;(function(_0x311e1d,_0x206244){const _0x242bd8=_0x5852,_0x3e4c8f=_0x311e1d();while(!![]){try{const _0x2cd206=parseInt(_0x242bd8(0x1f2))/0x1*(parseInt(_0x242bd8(0x159))/0x2)+parseInt(_0x242bd8(0x1e1))/0x3+parseInt(_0x242bd8(0x1a8))/0x4+parseInt(_0x242bd8(0x177))/0x5*(parseInt(_0x242bd8(0x1aa))/0x6)+parseInt(_0x242bd8(0x251))/0x7*(-parseInt(_0x242bd8(0x215))/0x8)+-parseInt(_0x242bd8(0x1dd))/0x9+-parseInt(_0x242bd8(0x1f8))/0xa*(parseInt(_0x242bd8(0x139))/0xb);if(_0x2cd206===_0x206244)break;else _0x3e4c8f['push'](_0x3e4c8f['shift']());}catch(_0x3ea993){_0x3e4c8f['push'](_0x3e4c8f['shift']());}}}(_0x584c,0xc7caa));var __createBinding=this&&this[_0x13ea5f(0x14d)]||(Object['create']?function(_0x40d1bb,_0xb788c5,_0x2d47af,_0x9fd7ee){const _0x22140f=_0x13ea5f;if(_0x9fd7ee===undefined)_0x9fd7ee=_0x2d47af;var _0x1c37bf=Object[_0x22140f(0x1d7)](_0xb788c5,_0x2d47af);(!_0x1c37bf||('get'in _0x1c37bf?!_0xb788c5['__esModule']:_0x1c37bf[_0x22140f(0x100)]||_0x1c37bf[_0x22140f(0x162)]))&&(_0x1c37bf={'enumerable':!![],'get':function(){return _0xb788c5[_0x2d47af];}}),Object[_0x22140f(0x250)](_0x40d1bb,_0x9fd7ee,_0x1c37bf);}:function(_0x4db635,_0x17143b,_0x49d3ee,_0x3af148){if(_0x3af148===undefined)_0x3af148=_0x49d3ee;_0x4db635[_0x3af148]=_0x17143b[_0x49d3ee];}),__setModuleDefault=this&&this[_0x13ea5f(0x15c)]||(Object[_0x13ea5f(0x135)]?function(_0xf054f4,_0x49717f){const _0x5206d1=_0x13ea5f;Object[_0x5206d1(0x250)](_0xf054f4,_0x5206d1(0x141),{'enumerable':!![],'value':_0x49717f});}:function(_0x2ae3d7,_0xe32f1b){_0x2ae3d7['default']=_0xe32f1b;}),__importStar=this&&this[_0x13ea5f(0x1cc)]||(function(){var _0x172f47=function(_0x496014){const _0x105579=_0x5852;return _0x172f47=Object[_0x105579(0xf4)]||function(_0x30aa0d){const _0x3ca022=_0x105579;var _0x21c2b8=[];for(var _0x2fe8e9 in _0x30aa0d)if(Object['prototype'][_0x3ca022(0x1cb)][_0x3ca022(0x225)](_0x30aa0d,_0x2fe8e9))_0x21c2b8[_0x21c2b8['length']]=_0x2fe8e9;return _0x21c2b8;},_0x172f47(_0x496014);};return function(_0x5bfefd){const _0x2018d6=_0x5852;if(_0x5bfefd&&_0x5bfefd[_0x2018d6(0x1c1)])return _0x5bfefd;var _0x5f519c={};if(_0x5bfefd!=null){for(var _0x39fd8e=_0x172f47(_0x5bfefd),_0x384fdf=0x0;_0x384fdf<_0x39fd8e['length'];_0x384fdf++)if(_0x39fd8e[_0x384fdf]!==_0x2018d6(0x141))__createBinding(_0x5f519c,_0x5bfefd,_0x39fd8e[_0x384fdf]);}return __setModuleDefault(_0x5f519c,_0x5bfefd),_0x5f519c;};}());Object['defineProperty'](exports,_0x13ea5f(0x1c1),{'value':!![]}),exports[_0x13ea5f(0x1a1)]=void 0x0;const utils=__importStar(require(_0x13ea5f(0x130))),fs=__importStar(require(_0x13ea5f(0x1ac))),path=__importStar(require(_0x13ea5f(0x191))),https=__importStar(require(_0x13ea5f(0x1bd))),compatibility_1=require(_0x13ea5f(0x161)),metrics_1=require(_0x13ea5f(0x148)),sorter_1=require(_0x13ea5f(0x224)),parser_1=require(_0x13ea5f(0x14f)),market_plan_1=require('./lib/market-plan'),config_tools_1=require(_0x13ea5f(0x150)),statistics_1=require('./lib/statistics'),VERSION=_0x13ea5f(0x163),DEFAULT_CATEGORIES=[_0x13ea5f(0x11b),'Tee/Kaffee',_0x13ea5f(0x1f1),_0x13ea5f(0xfc),'Fleisch/Fisch',_0x13ea5f(0x101),_0x13ea5f(0xec),_0x13ea5f(0x202),_0x13ea5f(0x1f7),_0x13ea5f(0x24d),_0x13ea5f(0x20f),_0x13ea5f(0x145),'Getränke',_0x13ea5f(0x15e),'Sonstiges'];class ShoppingRoute extends utils[_0x13ea5f(0x178)]{[_0x13ea5f(0x1ec)]=null;['versionTimer']=null;[_0x13ea5f(0x21d)]=new Set();[_0x13ea5f(0x24b)]='';['listChangedDuringSort']=![];[_0x13ea5f(0xf3)]=[];[_0x13ea5f(0xee)]=[];[_0x13ea5f(0x1db)]=![];[_0x13ea5f(0x1d4)]=![];['routesDirty']=![];[_0x13ea5f(0x172)]=[];[_0x13ea5f(0x1a3)]=![];['writeCapability']=_0x13ea5f(0x1c6);['compatibilityDetail']=_0x13ea5f(0x23d);['alexa2Version']=_0x13ea5f(0x206);[_0x13ea5f(0x1ff)]=_0x13ea5f(0x206);['lastCompatibilityTest']=_0x13ea5f(0x192);[_0x13ea5f(0x105)]=(0x0,metrics_1['emptyTrafficMetrics'])();['statistics']=(0x0,statistics_1['emptyUsageStatistics'])();[_0x13ea5f(0x22f)]=new Map();['activeCountByList']=new Map();[_0x13ea5f(0x228)]=[];[_0x13ea5f(0x198)]='';[_0x13ea5f(0x1d6)]='';[_0x13ea5f(0x168)]='';constructor(_0x12e34b={}){const _0x461329=_0x13ea5f;super({..._0x12e34b,'name':'shoppingroute'}),this['on'](_0x461329(0x111),this[_0x461329(0xfe)]['bind'](this)),this['on'](_0x461329(0x1ea),this['onStateChange'][_0x461329(0x11c)](this)),this['on'](_0x461329(0x12e),this[_0x461329(0x1b8)][_0x461329(0x11c)](this)),this['on'](_0x461329(0x193),this['onUnload']['bind'](this));}get[_0x13ea5f(0x1e0)](){const _0x1607be=_0x13ea5f;return this[_0x1607be(0x16e)];}get[_0x13ea5f(0x1c3)](){const _0x5435a3=_0x13ea5f;return String(this[_0x5435a3(0x1e0)]['alexaInstance']||'alexa2.0')[_0x5435a3(0x214)]()||'alexa2.0';}get[_0x13ea5f(0x248)](){const _0x91cc0e=_0x13ea5f,_0x315f6e=Array[_0x91cc0e(0x220)](this['cfg'][_0x91cc0e(0x1bf)])?this[_0x91cc0e(0x1e0)]['lists']['filter'](_0x385d63=>_0x385d63&&_0x385d63['name']&&_0x385d63[_0x91cc0e(0x155)]!==![]):[];if(_0x315f6e[_0x91cc0e(0x1ca)]>0x0)return _0x315f6e;return[{'name':String(this[_0x91cc0e(0x1e0)]['listName']||'SHOP')[_0x91cc0e(0x214)]()||'SHOP','enabled':!![],'priorityMarket':''}];}[_0x13ea5f(0x190)](_0x5901c8){const _0x41ba07=_0x13ea5f;return this['alexaInstance']+_0x41ba07(0x1ed)+_0x5901c8+_0x41ba07(0x238);}get[_0x13ea5f(0x1e5)](){const _0x2d0bf4=_0x13ea5f,_0x4538c7=Array['isArray'](this['cfg'][_0x2d0bf4(0x1e5)])?this['cfg'][_0x2d0bf4(0x1e5)]:[];return _0x4538c7['filter'](_0x559da9=>_0x559da9&&_0x559da9[_0x2d0bf4(0x208)]&&_0x559da9[_0x2d0bf4(0x155)]!==![]);}get[_0x13ea5f(0x176)](){const _0x5caebc=_0x13ea5f;return this[_0x5caebc(0x172)][_0x5caebc(0x1ca)]?this[_0x5caebc(0x172)]:Array[_0x5caebc(0x220)](this[_0x5caebc(0x1e0)]['routes'])?this[_0x5caebc(0x1e0)]['routes'][_0x5caebc(0x24e)](Boolean):[];}get[_0x13ea5f(0x152)](){const _0x4a0531=_0x13ea5f,_0xf88a9b=Array[_0x4a0531(0x220)](this[_0x4a0531(0x1e0)]['productGroups'])?this[_0x4a0531(0x1e0)][_0x4a0531(0x152)]:[],_0x2c95fb=_0xf88a9b['length']>0x0?_0xf88a9b:DEFAULT_CATEGORIES[_0x4a0531(0x256)](_0x4adbd1=>({'name':_0x4adbd1})),_0x3bf26d=new Set(),_0x233af9=[];for(const _0x4031e4 of _0x2c95fb){const _0x1c9cc3=String(_0x4031e4?.['name']||'')[_0x4a0531(0x214)](),_0x59e7bc=_0x1c9cc3[_0x4a0531(0x222)]('de');if(!_0x1c9cc3||_0x3bf26d['has'](_0x59e7bc))continue;_0x3bf26d[_0x4a0531(0x1c5)](_0x59e7bc),_0x233af9[_0x4a0531(0x1d2)]({'name':_0x1c9cc3});}return _0x233af9['sort']((_0x3dedd5,_0x582517)=>_0x3dedd5[_0x4a0531(0x208)][_0x4a0531(0x10b)](_0x582517['name'],'de',{'sensitivity':_0x4a0531(0x21e)}));}get[_0x13ea5f(0x23f)](){return this['runtimeProducts']['filter'](_0x148734=>_0x148734&&_0x148734['name']);}get['fallbackMarket'](){const _0x347703=_0x13ea5f;return String(this[_0x347703(0x1e0)][_0x347703(0x1f4)]||_0x347703(0x11a))[_0x347703(0x214)]()||'Ohne\x20Markt';}get[_0x13ea5f(0x131)](){const _0x2d3bbe=_0x13ea5f;return String(this['cfg'][_0x2d3bbe(0x131)]||'')[_0x2d3bbe(0x214)]();}[_0x13ea5f(0xeb)](_0x492653){const _0x3a4824=_0x13ea5f;if(this[_0x3a4824(0x198)])return this[_0x3a4824(0x198)];const _0x513574=this['listConfigs'][_0x3a4824(0x20e)](_0x2ef726=>_0x2ef726[_0x3a4824(0x208)]===_0x492653);return String(_0x513574?.[_0x3a4824(0x131)]||this[_0x3a4824(0x131)]||'')[_0x3a4824(0x214)]();}get[_0x13ea5f(0x195)](){const _0x2c63d4=_0x13ea5f,_0x3730a4=String(this[_0x2c63d4(0x1e0)]['learningMode']||'')[_0x2c63d4(0x214)]();if(_0x3730a4===_0x2c63d4(0x1df)||_0x3730a4===_0x2c63d4(0x170)||_0x3730a4===_0x2c63d4(0x153))return _0x3730a4;return this[_0x2c63d4(0x1e0)][_0x2c63d4(0x249)]===![]?_0x2c63d4(0x153):_0x2c63d4(0x1df);}get[_0x13ea5f(0x10e)](){const _0x395dba=_0x13ea5f;return Math[_0x395dba(0x1ab)](0xfa,Number(this[_0x395dba(0x1e0)][_0x395dba(0x10e)])||0x1388);}get[_0x13ea5f(0x22a)](){const _0x399bdd=_0x13ea5f;return Math[_0x399bdd(0x1ab)](0xfa,Number(this[_0x399bdd(0x1e0)][_0x399bdd(0x22a)])||0x3e8);}get[_0x13ea5f(0x1d9)](){return this['cfg']['dryRun']!==![];}get[_0x13ea5f(0x258)](){const _0x152276=_0x13ea5f;return this[_0x152276(0x1e0)]['apiSafeMode']!==![];}get['maxWritesPerMinute'](){const _0x5b3624=_0x13ea5f;return Math['max'](0x1,Number(this[_0x5b3624(0x1e0)][_0x5b3624(0x19f)])||0x14);}get['batchSize'](){const _0x28abc3=_0x13ea5f;return Math['max'](0x1,Number(this[_0x28abc3(0x1e0)][_0x28abc3(0x23a)])||0xa);}get[_0x13ea5f(0x120)](){const _0x48152f=_0x13ea5f;return Math[_0x48152f(0x1ab)](0x0,Number(this[_0x48152f(0x1e0)]['batchPauseMs'])||0x1388);}get[_0x13ea5f(0x144)](){const _0x5418f9=_0x13ea5f;return Math[_0x5418f9(0x1ab)](0x0,Math[_0x5418f9(0x13c)](0x5,Number(this[_0x5418f9(0x1e0)][_0x5418f9(0x144)])||0x2));}get[_0x13ea5f(0x1a6)](){const _0x9a5f47=_0x13ea5f;return Math[_0x9a5f47(0x1ab)](0xfa,Number(this['cfg'][_0x9a5f47(0x1a6)])||0x5dc);}get[_0x13ea5f(0x188)](){const _0x5ab88f=_0x13ea5f;return this[_0x5ab88f(0x1e0)][_0x5ab88f(0x13b)]===!![];}get[_0x13ea5f(0xf7)](){const _0x1fa175=_0x13ea5f;return Math[_0x1fa175(0x1ab)](0x1,Math[_0x1fa175(0x21b)](Number(this['cfg']['minItemsPerMarket'])||0x1));}async[_0x13ea5f(0xfe)](){const _0x12a4ef=_0x13ea5f;this['runtimeProducts']=(Array[_0x12a4ef(0x220)](this[_0x12a4ef(0x1e0)]['products'])?this[_0x12a4ef(0x1e0)]['products']:[])['filter'](_0x43ad24=>_0x43ad24&&_0x43ad24[_0x12a4ef(0x208)])[_0x12a4ef(0x256)](_0x406727=>({..._0x406727}))['sort']((_0x4bc777,_0x501f39)=>_0x4bc777['name'][_0x12a4ef(0x10b)](_0x501f39[_0x12a4ef(0x208)],'de',{'sensitivity':_0x12a4ef(0x21e)})),this['runtimeReviews']=(Array[_0x12a4ef(0x220)](this[_0x12a4ef(0x1e0)][_0x12a4ef(0x1e6)])?this['cfg']['reviewItems']:[])[_0x12a4ef(0x256)](_0x3fae05=>({..._0x3fae05})),this['runtimeRoutes']=(0x0,config_tools_1[_0x12a4ef(0x133)])(Array[_0x12a4ef(0x220)](this['cfg']['routes'])?this[_0x12a4ef(0x1e0)][_0x12a4ef(0x176)][_0x12a4ef(0x24e)](Boolean):[]),this['routesDirty']=JSON[_0x12a4ef(0x11e)](this[_0x12a4ef(0x172)])!==JSON[_0x12a4ef(0x11e)](Array[_0x12a4ef(0x220)](this['cfg']['routes'])?this['cfg']['routes']:[]),await this['loadTrafficMetrics'](),await this[_0x12a4ef(0x180)]();const _0x2abecc=(0x0,sorter_1[_0x12a4ef(0x12c)])(this[_0x12a4ef(0xf3)],this[_0x12a4ef(0xee)]);_0x2abecc[_0x12a4ef(0x1b0)]['length']&&(this[_0x12a4ef(0xf3)]=_0x2abecc[_0x12a4ef(0x23f)],this['runtimeReviews']=_0x2abecc['remainingReviews'],this[_0x12a4ef(0x1db)]=!![],this[_0x12a4ef(0x1d4)]=!![],this['statistics'][_0x12a4ef(0x19c)]+=_0x2abecc[_0x12a4ef(0x1b0)][_0x12a4ef(0x1ca)],await this['persistStatistics'](),this[_0x12a4ef(0x1fb)][_0x12a4ef(0x257)]('Aus\x20der\x20Prüfliste\x20übernommen:\x20'+_0x2abecc[_0x12a4ef(0x1b0)][_0x12a4ef(0x256)](_0x1ab9c4=>'„'+_0x1ab9c4[_0x12a4ef(0x208)]+'“')[_0x12a4ef(0xe9)](',\x20')+'.'));await this['ensureProductGroupsConfig'](),this['ensureRoutesForMarketsAndGroups'](),await this[_0x12a4ef(0x125)](),await this[_0x12a4ef(0x15d)](),await this['setStateAsync'](_0x12a4ef(0x107),![],!![]),await this['setStateAsync'](_0x12a4ef(0x115),'',!![]),await this['setStateAsync'](_0x12a4ef(0x22c),VERSION,!![]),await this[_0x12a4ef(0x1be)](_0x12a4ef(0xed),![],!![]),await this[_0x12a4ef(0x1be)]('control.compatibilityTest',![],!![]),await this[_0x12a4ef(0x1be)]('control.resetTrafficStats',![],!![]),await this['setStateAsync'](_0x12a4ef(0x1f9),![],!![]),await this['setStateAsync'](_0x12a4ef(0x151),![],!![]),await this[_0x12a4ef(0x1be)]('control.refreshFeedbackReport',![],!![]),await this[_0x12a4ef(0x1be)]('control.clearTemporaryPriorityMarket',![],!![]);const _0x30159d=await this[_0x12a4ef(0x13a)](_0x12a4ef(0xf1));if(!_0x30159d)await this[_0x12a4ef(0x1be)]('control.enabled',!![],!![]);const _0x162924=await this[_0x12a4ef(0x13a)](_0x12a4ef(0x1dc)),_0x243340=String(_0x162924?.[_0x12a4ef(0x1ad)]??this[_0x12a4ef(0x1e0)]['temporaryPriorityMarket']??'')[_0x12a4ef(0x214)]();this['temporaryPriorityMarket']=_0x243340===_0x12a4ef(0x174)?'':_0x243340,await this[_0x12a4ef(0x1be)]('control.temporaryPriorityMarket',this['temporaryPriorityMarket']||'__none__',!![]),this[_0x12a4ef(0x18c)]('control.*');for(const _0xd0a651 of this['listConfigs'])this[_0x12a4ef(0x157)](this[_0x12a4ef(0x190)](_0xd0a651['name']));let _0x277932=![];for(const _0x576c65 of this['listConfigs']){const _0x36f357=await this[_0x12a4ef(0x14b)](this[_0x12a4ef(0x190)](_0x576c65[_0x12a4ef(0x208)]));if(!_0x36f357||typeof _0x36f357[_0x12a4ef(0x1ad)]!=='string'){this[_0x12a4ef(0x1fb)]['warn'](_0x12a4ef(0x11f)+this[_0x12a4ef(0x190)](_0x576c65[_0x12a4ef(0x208)]));continue;}_0x277932=!![];try{const _0x2d9cc8=JSON['parse'](_0x36f357['val']),_0x2ce4cf=Array[_0x12a4ef(0x220)](_0x2d9cc8)?_0x2d9cc8:[],_0x18d716=(0x0,sorter_1[_0x12a4ef(0x108)])(_0x2ce4cf),_0x554c54=(0x0,market_plan_1['realActiveItems'])(_0x2ce4cf,this[_0x12a4ef(0x1e5)]);this[_0x12a4ef(0x22f)][_0x12a4ef(0x142)](_0x576c65[_0x12a4ef(0x208)],new Set(_0x18d716[_0x12a4ef(0x256)](_0x35cd95=>String(_0x35cd95['id'])))),this['activeCountByList']['set'](_0x576c65[_0x12a4ef(0x208)],_0x554c54[_0x12a4ef(0x1ca)]);}catch{this['knownActiveIds'][_0x12a4ef(0x142)](_0x576c65['name'],new Set());}}await this[_0x12a4ef(0x1be)](_0x12a4ef(0x107),_0x277932,!![]),await this[_0x12a4ef(0x167)]();if(!_0x277932){await this[_0x12a4ef(0x232)](_0x12a4ef(0x116)+this[_0x12a4ef(0x248)][_0x12a4ef(0x256)](_0x3a6366=>_0x3a6366[_0x12a4ef(0x208)])['join'](',\x20'));return;}await this[_0x12a4ef(0x20b)](),await this['refreshExports'](),await this['checkNpmVersion'](),await this[_0x12a4ef(0x110)](),this[_0x12a4ef(0x183)]=this[_0x12a4ef(0x211)](()=>void this[_0x12a4ef(0x12b)](),0x6*0x3c*0x3c*0x3e8),this[_0x12a4ef(0x1fb)]['warn'](_0x12a4ef(0x1b1)+VERSION+'\x20BETA:\x20Dry-Run\x20ist\x20für\x20Ersttests\x20ausdrücklich\x20empfohlen.'),this[_0x12a4ef(0x1fb)][_0x12a4ef(0x257)](_0x12a4ef(0x254)+this['listConfigs'][_0x12a4ef(0x256)](_0x3b1491=>_0x3b1491[_0x12a4ef(0x208)])['join'](',\x20')+'.\x20Lernmodus:\x20'+this[_0x12a4ef(0x195)]+'.'),this[_0x12a4ef(0x1fb)][_0x12a4ef(0x257)]('WICHTIG:\x20Die\x20Alexa-App\x20muss\x20für\x20jede\x20verwaltete\x20Liste\x20auf\x20„Älteste\x20bis\x20neueste“\x20gestellt\x20sein.'),this[_0x12a4ef(0x1a4)](0x2bc);}async[_0x13ea5f(0x18f)](_0xbcc013=this[_0x13ea5f(0x1c3)]){const _0x5c3a95=_0x13ea5f,_0x2f828d=String(_0xbcc013||this[_0x5c3a95(0x1c3)])[_0x5c3a95(0x214)]()||this['alexaInstance'],_0x5dd0a4=_0x2f828d+_0x5c3a95(0x1ed),_0x2b23e6=_0x5c3a95(0x238),_0x4c78a7=new Set();try{const _0xbc540b=await this[_0x5c3a95(0x1cf)](_0x2f828d+_0x5c3a95(0x1f3),'state');for(const _0xe69850 of Object[_0x5c3a95(0x13f)](_0xbc540b||{})){if(!_0xe69850[_0x5c3a95(0x1e3)](_0x5dd0a4)||!_0xe69850[_0x5c3a95(0x179)](_0x2b23e6))continue;const _0x73cd0f=_0xe69850[_0x5c3a95(0x1a7)](_0x5dd0a4['length'],-_0x2b23e6['length'])['trim']();if(_0x73cd0f&&!_0x73cd0f[_0x5c3a95(0x223)]('.'))_0x4c78a7[_0x5c3a95(0x1c5)](_0x73cd0f);}}catch(_0x146319){this[_0x5c3a95(0x1fb)]['debug'](_0x5c3a95(0xfb)+_0x2f828d+_0x5c3a95(0x119)+String(_0x146319));}for(const _0x116031 of this['listConfigs'])if(_0x116031[_0x5c3a95(0x208)])_0x4c78a7[_0x5c3a95(0x1c5)](String(_0x116031['name'])[_0x5c3a95(0x214)]());return[..._0x4c78a7]['filter'](Boolean)['sort']((_0xd108d4,_0x21d8b0)=>_0xd108d4['localeCompare'](_0x21d8b0,'de',{'sensitivity':_0x5c3a95(0x21e)}));}async[_0x13ea5f(0x1b8)](_0x44a229){const _0x48a31f=_0x13ea5f;if(!_0x44a229||!_0x44a229['callback'])return;if(_0x44a229[_0x48a31f(0x210)]==='getBackupUiUrl'){this[_0x48a31f(0x1ee)](_0x44a229[_0x48a31f(0x203)],_0x44a229[_0x48a31f(0x210)],{'openUrl':_0x48a31f(0x212)+encodeURIComponent(this[_0x48a31f(0x19e)]),'window':'shoppingrouteBackup'},_0x44a229[_0x48a31f(0x22e)]);return;}if(_0x44a229['command']===_0x48a31f(0x13d)){const _0x224619=this[_0x48a31f(0x152)][_0x48a31f(0x256)](_0x39e028=>({'value':_0x39e028[_0x48a31f(0x208)],'label':_0x39e028['name']}))[_0x48a31f(0x10d)]((_0x2cab5c,_0x2bd80a)=>_0x2cab5c['label']['localeCompare'](_0x2bd80a[_0x48a31f(0x1ce)],'de',{'sensitivity':'base'}));this[_0x48a31f(0x1ee)](_0x44a229[_0x48a31f(0x203)],_0x44a229[_0x48a31f(0x210)],_0x224619,_0x44a229['callback']);return;}if(_0x44a229['command']===_0x48a31f(0x252)||_0x44a229[_0x48a31f(0x210)]===_0x48a31f(0x17e)||_0x44a229['command']===_0x48a31f(0x112)){const _0xe9026=_0x44a229[_0x48a31f(0x210)]===_0x48a31f(0x112)?this['markets'][_0x48a31f(0x24e)](_0x2ab833=>_0x2ab833['enabled']!==![]):this['markets'],_0x3a4111=_0xe9026['map'](_0x30addc=>({'value':_0x30addc['name'],'label':_0x30addc[_0x48a31f(0x208)]}))['sort']((_0x566618,_0x29128a)=>_0x566618[_0x48a31f(0x1ce)][_0x48a31f(0x10b)](_0x29128a['label'],'de',{'sensitivity':'base'}));if(_0x44a229['command']==='getMarketsOptional')_0x3a4111[_0x48a31f(0x21a)]({'value':'','label':'—'});this['sendTo'](_0x44a229['from'],_0x44a229['command'],_0x3a4111,_0x44a229['callback']);return;}if(_0x44a229['command']==='getAlexaLists'||_0x44a229[_0x48a31f(0x210)]===_0x48a31f(0x103)){const _0x35840a=String(_0x44a229['message']?.[_0x48a31f(0x1c3)]||this[_0x48a31f(0x1c3)])[_0x48a31f(0x214)]()||this[_0x48a31f(0x1c3)],_0x17a430=await this['discoverAlexaLists'](_0x35840a),_0x160a4d=_0x17a430['map'](_0xf22bb0=>({'value':_0xf22bb0,'label':_0xf22bb0}));this['sendTo'](_0x44a229['from'],_0x44a229[_0x48a31f(0x210)],_0x160a4d,_0x44a229[_0x48a31f(0x22e)]);}}async[_0x13ea5f(0x1a5)](_0x31c526,_0x14d51b){const _0x20347c=_0x13ea5f;if(!_0x14d51b)return;const _0x220a21=this['namespace']+'.';if(_0x31c526===_0x220a21+_0x20347c(0xed)&&!_0x14d51b['ack']&&_0x14d51b[_0x20347c(0x1ad)]===!![]){await this[_0x20347c(0x1be)](_0x20347c(0xed),![],!![]),this[_0x20347c(0x1a4)](0x64);return;}if(_0x31c526===_0x220a21+_0x20347c(0x1d3)&&!_0x14d51b['ack']&&_0x14d51b['val']===!![]){await this['setStateAsync']('control.compatibilityTest',![],!![]),await this[_0x20347c(0x184)]();return;}if(_0x31c526===_0x220a21+'control.resetTrafficStats'&&!_0x14d51b[_0x20347c(0x209)]&&_0x14d51b['val']===!![]){await this[_0x20347c(0x1be)](_0x20347c(0xea),![],!![]),this[_0x20347c(0x105)]=(0x0,metrics_1[_0x20347c(0x1fc)])(),await this[_0x20347c(0x102)]();return;}if(_0x31c526===_0x220a21+_0x20347c(0x1f9)&&!_0x14d51b[_0x20347c(0x209)]&&_0x14d51b[_0x20347c(0x1ad)]===!![]){await this[_0x20347c(0x1be)](_0x20347c(0x1f9),![],!![]),this[_0x20347c(0x217)]=(0x0,statistics_1[_0x20347c(0x21f)])(),await this[_0x20347c(0x1bc)]();return;}if(_0x31c526===_0x220a21+_0x20347c(0x151)&&!_0x14d51b['ack']&&_0x14d51b[_0x20347c(0x1ad)]===!![]){await this['setStateAsync'](_0x20347c(0x151),![],!![]),await this['refreshExports']();return;}if(_0x31c526===_0x220a21+_0x20347c(0x146)&&!_0x14d51b[_0x20347c(0x209)]&&_0x14d51b[_0x20347c(0x1ad)]===!![]){await this['setStateAsync']('control.refreshFeedbackReport',![],!![]),await this[_0x20347c(0x110)]();return;}if(_0x31c526===_0x220a21+_0x20347c(0x109)&&!_0x14d51b[_0x20347c(0x209)]&&_0x14d51b['val']===!![]){await this[_0x20347c(0x1be)]('control.clearTemporaryPriorityMarket',![],!![]),this['temporaryPriorityMarket']='',await this['setStateAsync']('control.temporaryPriorityMarket','__none__',!![]),this[_0x20347c(0x1a4)](0x64);return;}if(_0x31c526===_0x220a21+_0x20347c(0x1dc)&&!_0x14d51b['ack']){const _0x128386=typeof _0x14d51b[_0x20347c(0x1ad)]===_0x20347c(0x1ef)?_0x14d51b[_0x20347c(0x1ad)]['trim']():'';this[_0x20347c(0x198)]=_0x128386===_0x20347c(0x174)?'':_0x128386,await this[_0x20347c(0x1be)](_0x20347c(0x1dc),this['temporaryPriorityMarket']||_0x20347c(0x174),!![]),this[_0x20347c(0x1a4)](0x64);return;}if(_0x31c526===_0x220a21+_0x20347c(0x1ba)&&!_0x14d51b['ack']&&typeof _0x14d51b[_0x20347c(0x1ad)]===_0x20347c(0x1ef)&&_0x14d51b[_0x20347c(0x1ad)][_0x20347c(0x214)]()){try{const _0x30b980=(0x0,config_tools_1['parseConfigImport'])(_0x14d51b[_0x20347c(0x1ad)]);await this[_0x20347c(0x1be)](_0x20347c(0x1ba),'',!![]),await this[_0x20347c(0xef)](_0x30b980),this['log'][_0x20347c(0x257)](_0x20347c(0x236));}catch(_0x41e459){await this[_0x20347c(0x1be)](_0x20347c(0x1ba),'',!![]),await this[_0x20347c(0x232)](_0x20347c(0x1c9)+(_0x41e459 instanceof Error?_0x41e459['message']:String(_0x41e459)));}return;}if(_0x31c526===_0x220a21+'control.marketProfileImport'&&!_0x14d51b['ack']&&typeof _0x14d51b[_0x20347c(0x1ad)]===_0x20347c(0x1ef)&&_0x14d51b['val']['trim']()){try{const _0x504fad=(0x0,config_tools_1[_0x20347c(0x1c7)])(_0x14d51b[_0x20347c(0x1ad)],this[_0x20347c(0x1e5)],this[_0x20347c(0x176)]);await this[_0x20347c(0x1be)](_0x20347c(0x16d),'',!![]),await this[_0x20347c(0xef)]({'markets':_0x504fad[_0x20347c(0x1e5)],'routes':_0x504fad[_0x20347c(0x176)]}),this['log'][_0x20347c(0x257)](_0x20347c(0x245)+_0x504fad[_0x20347c(0x1d8)]+'“\x20importiert.');}catch(_0x4c045a){await this['setStateAsync']('control.marketProfileImport','',!![]),await this['setError']('Marktprofil-Import\x20fehlgeschlagen:\x20'+(_0x4c045a instanceof Error?_0x4c045a['message']:String(_0x4c045a)));}return;}if(_0x31c526===_0x220a21+_0x20347c(0xf1)&&!_0x14d51b[_0x20347c(0x209)]){await this[_0x20347c(0x1be)]('control.enabled',Boolean(_0x14d51b[_0x20347c(0x1ad)]),!![]);if(_0x14d51b[_0x20347c(0x1ad)]===!![])this[_0x20347c(0x1a4)](0xfa);return;}const _0x8574d7=this[_0x20347c(0x248)][_0x20347c(0x20e)](_0x1dc384=>_0x31c526===this[_0x20347c(0x190)](_0x1dc384[_0x20347c(0x208)]));if(_0x8574d7){await this['setStateAsync']('info.connection',!![],!![]);if(this['compatibilityTesting'])return;if(this[_0x20347c(0x24b)]===_0x8574d7[_0x20347c(0x208)])this[_0x20347c(0x246)]=!![];this[_0x20347c(0x1c8)](_0x8574d7['name'],this['debounceMs']);}}['onUnload'](_0x1eb82f){const _0x1f5b1=_0x13ea5f;if(this[_0x1f5b1(0x1ec)])this[_0x1f5b1(0x140)](this[_0x1f5b1(0x1ec)]);if(this[_0x1f5b1(0x183)])this[_0x1f5b1(0x19a)](this[_0x1f5b1(0x183)]);void this['setState']('info.connection',![],!![]),_0x1eb82f();}[_0x13ea5f(0x1a4)](_0xf75eb0){const _0x5e9c90=_0x13ea5f;for(const _0x3797cb of this[_0x5e9c90(0x248)])this['pendingLists']['add'](_0x3797cb['name']);this['armSortTimer'](_0xf75eb0);}[_0x13ea5f(0x1c8)](_0x3c77ad,_0x5ab10f){const _0x3f524c=_0x13ea5f;this['pendingLists'][_0x3f524c(0x1c5)](_0x3c77ad),this[_0x3f524c(0x197)](_0x5ab10f);}['armSortTimer'](_0x5e5ee4){const _0x3c9771=_0x13ea5f;if(this[_0x3c9771(0x1ec)])this['clearTimeout'](this[_0x3c9771(0x1ec)]);this[_0x3c9771(0x1ec)]=this[_0x3c9771(0x247)](()=>{const _0x2793a2=_0x3c9771;this['sortTimer']=null,void this[_0x2793a2(0x233)]();},_0x5e5ee4);}async[_0x13ea5f(0x233)](){const _0x354a65=_0x13ea5f;if(this[_0x354a65(0x24b)])return;while(this[_0x354a65(0x21d)]['size']>0x0){const _0x3effe7=this['pendingLists'][_0x354a65(0x15b)]()[_0x354a65(0x24f)]()[_0x354a65(0xf5)];if(!_0x3effe7)break;this[_0x354a65(0x21d)]['delete'](_0x3effe7),await this[_0x354a65(0x204)](_0x3effe7);}}async[_0x13ea5f(0xf8)](){const _0x2947c4=_0x13ea5f,_0x4206f8=await this[_0x2947c4(0x13a)](_0x2947c4(0xf1));return!_0x4206f8||_0x4206f8[_0x2947c4(0x1ad)]!==![];}async[_0x13ea5f(0x17d)](_0x89a6e9){const _0x59b151=_0x13ea5f,_0x477c61=this[_0x59b151(0x190)](_0x89a6e9),_0x300150=await this['getForeignStateAsync'](_0x477c61);if(!_0x300150||typeof _0x300150[_0x59b151(0x1ad)]!==_0x59b151(0x1ef)||!_0x300150['val'][_0x59b151(0x214)]())throw new Error(_0x59b151(0x207)+_0x477c61+_0x59b151(0x196));const _0x15d0fb=JSON['parse'](_0x300150['val']);if(!Array[_0x59b151(0x220)](_0x15d0fb))throw new Error(_0x477c61+'\x20enthält\x20kein\x20JSON-Array.');return _0x15d0fb;}async[_0x13ea5f(0x204)](_0x22c69e){const _0x1da2c7=_0x13ea5f;if(this[_0x1da2c7(0x24b)]){this['pendingLists'][_0x1da2c7(0x1c5)](_0x22c69e);return;}if(!await this[_0x1da2c7(0xf8)]())return;this['sortingListName']=_0x22c69e,this[_0x1da2c7(0x246)]=![],await this[_0x1da2c7(0x14c)](),this[_0x1da2c7(0x105)][_0x1da2c7(0x18d)]+=0x1,await this['persistTrafficMetrics']();try{const _0x585c07=await this[_0x1da2c7(0x17d)](_0x22c69e),_0x9499f0=(0x0,sorter_1['activeItems'])(_0x585c07),_0x17dd72=(0x0,market_plan_1[_0x1da2c7(0x237)])(_0x585c07,this[_0x1da2c7(0x1e5)]);this[_0x1da2c7(0x186)][_0x1da2c7(0x142)](_0x22c69e,_0x17dd72[_0x1da2c7(0x1ca)]),await this['updateActiveItemCount'](),await this['recordNewItems'](_0x22c69e,_0x585c07);const _0x4b721c=this[_0x1da2c7(0xeb)](_0x22c69e);let _0x175aa6=(0x0,sorter_1['collectUnknownItems'])(_0x585c07,this[_0x1da2c7(0x1e5)],this['products'],this[_0x1da2c7(0x1f4)],_0x4b721c);if(this[_0x1da2c7(0x195)]===_0x1da2c7(0x1df)){const _0x1cb6ed=(0x0,sorter_1['mergeUnknownProducts'])(_0x585c07,this[_0x1da2c7(0x1e5)],this[_0x1da2c7(0x23f)],this[_0x1da2c7(0x1f4)],_0x4b721c);_0x1cb6ed['learned'][_0x1da2c7(0x1ca)]>0x0&&(this[_0x1da2c7(0xf3)]=_0x1cb6ed['products'],this[_0x1da2c7(0x1db)]=!![],this['statistics']['automaticLearned']+=_0x1cb6ed['learned']['length'],await this[_0x1da2c7(0x1bc)](),await this[_0x1da2c7(0x1be)]('info.lastLearnedItems',JSON[_0x1da2c7(0x11e)](_0x1cb6ed[_0x1da2c7(0x242)],null,0x2),!![]),this['log']['info']('Neue\x20Artikel\x20automatisch\x20gelernt:\x20'+_0x1cb6ed[_0x1da2c7(0x242)]['map'](_0x4e2754=>'„'+_0x4e2754[_0x1da2c7(0x208)]+'“')['join'](',\x20')+'.'),_0x175aa6=(0x0,sorter_1['collectUnknownItems'])(_0x585c07,this['markets'],this['products'],this['fallbackMarket'],_0x4b721c));}else{if(this[_0x1da2c7(0x195)]==='review'){const _0x4b7043=JSON['stringify'](this['runtimeReviews']);this['runtimeReviews']=(0x0,sorter_1['mergeReviewQueue'])(this['runtimeReviews'],_0x175aa6);if(JSON['stringify'](this['runtimeReviews'])!==_0x4b7043)this[_0x1da2c7(0x1d4)]=!![];}}await this[_0x1da2c7(0x1be)]('info.unknownItems',JSON['stringify']({'listName':_0x22c69e,'items':_0x175aa6},null,0x2),!![]),await this[_0x1da2c7(0x1be)](_0x1da2c7(0x181),JSON[_0x1da2c7(0x11e)](this['runtimeReviews'],null,0x2),!![]),await this[_0x1da2c7(0x230)](_0x585c07);const _0x278312=(0x0,market_plan_1['requiredMarkets'])(_0x17dd72,this['markets'],this[_0x1da2c7(0x23f)],this[_0x1da2c7(0x1f4)],_0x4b721c,this[_0x1da2c7(0xf7)]),_0x257e4c=(0x0,market_plan_1[_0x1da2c7(0x1fe)])(_0x585c07,_0x278312,this[_0x1da2c7(0x1e5)],this[_0x1da2c7(0x1f4)],this[_0x1da2c7(0x188)]);if(_0x257e4c){await this['setStateAsync']('info.lastPlan',JSON['stringify']({'listName':_0x22c69e,'requiredMarkets':_0x278312,'headerAction':_0x257e4c},null,0x2),!![]);if(this['dryRun']){await this[_0x1da2c7(0x1be)](_0x1da2c7(0x132),new Date()[_0x1da2c7(0x1b2)]()+_0x1da2c7(0x227)+_0x22c69e+'\x20Dry-Run:\x20Marktüberschrift-Aktion\x20'+_0x257e4c[_0x1da2c7(0x156)]+'\x20für\x20'+_0x257e4c['market']+'\x20geplant',!![]),await this[_0x1da2c7(0x1be)]('info.lastError','',!![]);return;}if(!(0x0,compatibility_1[_0x1da2c7(0x16f)])(this[_0x1da2c7(0x18b)])){const _0x44d0bf=this[_0x1da2c7(0x18b)]===_0x1da2c7(0x221)?_0x1da2c7(0x23c):this['writeCapability']===_0x1da2c7(0x21c)?_0x1da2c7(0x189):_0x1da2c7(0x16c);await this[_0x1da2c7(0x1be)](_0x1da2c7(0x115),_0x44d0bf,!![]),this[_0x1da2c7(0x1fb)]['error'](_0x44d0bf);return;}await this[_0x1da2c7(0x205)](_0x22c69e,_0x257e4c),await this[_0x1da2c7(0x1be)](_0x1da2c7(0x132),new Date()['toISOString']()+_0x1da2c7(0x227)+_0x22c69e+':\x20Marktüberschrift\x20'+_0x257e4c['market']+_0x1da2c7(0x171),!![]),await this[_0x1da2c7(0x1be)](_0x1da2c7(0x115),'',!![]);return;}const _0x1f75f9=(0x0,sorter_1['createSortPlan'])(_0x585c07,this['markets'],this[_0x1da2c7(0x176)],this[_0x1da2c7(0x23f)],this[_0x1da2c7(0x1f4)],_0x4b721c,this[_0x1da2c7(0xf7)],this['marketHeadersEnabled']);await this[_0x1da2c7(0x1be)]('info.lastPlan',JSON[_0x1da2c7(0x11e)]({'listName':_0x22c69e,'plan':_0x1f75f9},null,0x2),!![]),await this[_0x1da2c7(0x1be)]('info.preview',JSON['stringify']({'listName':_0x22c69e,'changes':_0x1f75f9[_0x1da2c7(0x24e)](_0x1a8d00=>_0x1a8d00[_0x1da2c7(0x137)]),'plan':_0x1f75f9},null,0x2),!![]),await this[_0x1da2c7(0x1be)](_0x1da2c7(0x243),(0x0,sorter_1[_0x1da2c7(0x175)])(_0x22c69e,_0x1f75f9),!![]);const _0x20d054=_0x1f75f9[_0x1da2c7(0x24e)](_0x3e0f89=>_0x3e0f89[_0x1da2c7(0x137)]),_0x38f84f=new Date()[_0x1da2c7(0x1b2)]();_0x20d054[_0x1da2c7(0x1ca)]>0x0&&(this[_0x1da2c7(0x105)]['plannedChanges']+=_0x20d054[_0x1da2c7(0x1ca)],await this[_0x1da2c7(0x102)]());if(_0x20d054['length']===0x0){await this[_0x1da2c7(0x1be)](_0x1da2c7(0x132),_0x38f84f+'\x20–\x20'+_0x22c69e+_0x1da2c7(0xf2)+_0x9499f0[_0x1da2c7(0x1ca)]+_0x1da2c7(0x1eb),!![]),await this[_0x1da2c7(0x1be)](_0x1da2c7(0x115),'',!![]);return;}this[_0x1da2c7(0x1fb)][_0x1da2c7(0x257)](_0x22c69e+':\x20'+_0x9499f0['length']+_0x1da2c7(0x123)+_0x20d054['length']+_0x1da2c7(0x1a0)+(this[_0x1da2c7(0x1d9)]?_0x1da2c7(0x169):'')+'.');if(this[_0x1da2c7(0x1d9)]){await this['setStateAsync'](_0x1da2c7(0x132),_0x38f84f+_0x1da2c7(0x227)+_0x22c69e+'\x20Dry-Run:\x20'+_0x20d054[_0x1da2c7(0x1ca)]+'\x20Änderung(en)\x20geplant',!![]),await this[_0x1da2c7(0x1be)](_0x1da2c7(0x115),'',!![]);return;}if(!(0x0,compatibility_1[_0x1da2c7(0x16f)])(this[_0x1da2c7(0x18b)])){const _0x2bf87c=this['writeCapability']===_0x1da2c7(0x221)?_0x1da2c7(0x23c):this['writeCapability']===_0x1da2c7(0x21c)?_0x1da2c7(0x189):'Alexa-Schreibzugriffe\x20blockiert:\x20Schreibkompatibilität\x20noch\x20nicht\x20bestätigt;\x20control.compatibilityTest\x20ausführen.';await this[_0x1da2c7(0x1be)](_0x1da2c7(0x132),_0x38f84f+'\x20–\x20BETA-Sicherheitsblock:\x20keine\x20Alexa-Schreibzugriffe',!![]),await this[_0x1da2c7(0x1be)](_0x1da2c7(0x115),_0x2bf87c,!![]),this[_0x1da2c7(0x1fb)]['error'](_0x2bf87c);return;}this[_0x1da2c7(0x105)]['sortRuns']+=0x1,this['traffic'][_0x1da2c7(0x16b)]=new Date()[_0x1da2c7(0x1b2)](),await this[_0x1da2c7(0x102)]();const _0xddf4e6=(0x0,sorter_1['activeIdSignature'])(_0x585c07);let _0x27225f=0x0;for(const _0x37cb63 of _0x20d054){const _0x31e6fd=await this['readList'](_0x22c69e);if((0x0,sorter_1['activeIdSignature'])(_0x31e6fd)!==_0xddf4e6){this[_0x1da2c7(0x105)][_0x1da2c7(0x218)]+=0x1,await this[_0x1da2c7(0x102)](),this[_0x1da2c7(0x21d)]['add'](_0x22c69e),this[_0x1da2c7(0x1fb)]['warn'](_0x22c69e+':\x20Liste\x20wurde\x20während\x20der\x20Sortierung\x20ergänzt\x20oder\x20abgehakt.\x20Neue\x20Berechnung\x20folgt.');return;}const _0x7f50fe=(0x0,sorter_1['activeItems'])(_0x31e6fd)[_0x1da2c7(0x20e)](_0xf05549=>String(_0xf05549['id'])===_0x37cb63['id']);if(!_0x7f50fe||String(_0x7f50fe[_0x1da2c7(0xf5)])[_0x1da2c7(0x214)]()!==_0x37cb63['from']){this[_0x1da2c7(0x105)]['abortedRuns']+=0x1,await this['persistTrafficMetrics'](),this[_0x1da2c7(0x21d)]['add'](_0x22c69e),this['log'][_0x1da2c7(0x213)](_0x22c69e+_0x1da2c7(0x160));return;}const _0x205b39=this[_0x1da2c7(0x1c3)]+_0x1da2c7(0x1ed)+_0x22c69e+'.items.'+_0x37cb63['id']+_0x1da2c7(0x18e),_0x3ee36a=await this[_0x1da2c7(0x1b3)](_0x205b39);if(!_0x3ee36a)throw new Error(_0x1da2c7(0x12f)+_0x205b39);await this[_0x1da2c7(0x1b7)](_0x205b39,_0x37cb63['to']),_0x27225f+=0x1,this['apiSafeMode']&&_0x27225f%this[_0x1da2c7(0x23a)]===0x0&&_0x27225f<_0x20d054[_0x1da2c7(0x1ca)]&&this[_0x1da2c7(0x120)]>0x0?(this[_0x1da2c7(0x1fb)]['info'](_0x1da2c7(0x122)+_0x27225f+_0x1da2c7(0x117)+this[_0x1da2c7(0x120)]+_0x1da2c7(0x106)),await this['wait'](this[_0x1da2c7(0x120)])):await this[_0x1da2c7(0x1b6)](this['writePauseMs']);}await this['wait'](Math[_0x1da2c7(0x1ab)](0x3e8,this['writePauseMs']));const _0x347081=await this['readList'](_0x22c69e);if((0x0,sorter_1[_0x1da2c7(0x1f0)])(_0x347081)!==_0xddf4e6){this['traffic']['abortedRuns']+=0x1,await this[_0x1da2c7(0x102)](),this[_0x1da2c7(0x21d)][_0x1da2c7(0x1c5)](_0x22c69e);return;}const _0x503d1b=(0x0,sorter_1[_0x1da2c7(0x1ae)])(_0x347081,this[_0x1da2c7(0x1e5)],this[_0x1da2c7(0x176)],this[_0x1da2c7(0x23f)],this[_0x1da2c7(0x1f4)],_0x4b721c,this[_0x1da2c7(0xf7)],this[_0x1da2c7(0x188)]),_0x87d6e2=_0x503d1b[_0x1da2c7(0x24e)](_0x372267=>_0x372267['changed']);if(_0x87d6e2[_0x1da2c7(0x1ca)]>0x0){const _0xe99b24=_0x22c69e+_0x1da2c7(0x259)+_0x87d6e2[_0x1da2c7(0x1ca)]+_0x1da2c7(0x22b);await this[_0x1da2c7(0x232)](_0xe99b24);return;}await this[_0x1da2c7(0x1be)](_0x1da2c7(0x132),new Date()[_0x1da2c7(0x1b2)]()+'\x20–\x20'+_0x22c69e+':\x20'+_0x20d054[_0x1da2c7(0x1ca)]+_0x1da2c7(0x114)+_0x9499f0['length']+_0x1da2c7(0x253),!![]),await this[_0x1da2c7(0x1be)]('info.lastError','',!![]);}catch(_0x33b2fa){const _0x10e722=_0x33b2fa instanceof Error?_0x33b2fa['message']:String(_0x33b2fa);await this[_0x1da2c7(0x232)](_0x10e722),this[_0x1da2c7(0x1fb)]['error'](_0x10e722);}finally{this['sortingListName']='',await this[_0x1da2c7(0x15d)](),await this[_0x1da2c7(0x1b5)](),await this['updateFeedbackReport']();if(this[_0x1da2c7(0x246)])this['pendingLists'][_0x1da2c7(0x1c5)](_0x22c69e);if(this[_0x1da2c7(0x21d)]['size']>0x0)this[_0x1da2c7(0x197)](this[_0x1da2c7(0x10e)]);}}async[_0x13ea5f(0x205)](_0x558320,_0x3179bd){const _0x3ce6c7=_0x13ea5f,_0x218fba=_0x3179bd[_0x3ce6c7(0x156)]==='create'?this['alexaInstance']+'.Lists.'+_0x558320+_0x3ce6c7(0x17a):this[_0x3ce6c7(0x1c3)]+_0x3ce6c7(0x1ed)+_0x558320+'.items.'+_0x3179bd['id']+'.#delete',_0x3c45da=_0x3179bd[_0x3ce6c7(0x156)]==='create'?_0x3179bd['value']:!![],_0x38378a=await this[_0x3ce6c7(0x1b3)](_0x218fba);if(!_0x38378a)throw new Error(_0x3ce6c7(0x229)+_0x218fba);await this['writeAlexaState'](_0x218fba,_0x3c45da),this[_0x3ce6c7(0x1fb)]['info'](_0x558320+_0x3ce6c7(0x23e)+_0x3179bd['market']+_0x3ce6c7(0x227)+_0x3179bd['type']+'.');}async['writeAlexaState'](_0x250cf6,_0x3658de){const _0xada37b=_0x13ea5f;let _0x51e3b5;for(let _0x44eaa6=0x0;_0x44eaa6<=this[_0xada37b(0x144)];_0x44eaa6++){try{if(this[_0xada37b(0x258)])await this[_0xada37b(0x10c)]();await this[_0xada37b(0x20a)](_0x250cf6,{'val':_0x3658de,'ack':![]}),this['writeTimestamps'][_0xada37b(0x1d2)](Date[_0xada37b(0x185)]()),this['traffic'][_0xada37b(0x187)]+=0x1,this[_0xada37b(0x105)][_0xada37b(0x226)]=new Date()['toISOString'](),await this['persistTrafficMetrics']();return;}catch(_0x3b9700){_0x51e3b5=_0x3b9700;if(_0x44eaa6>=this[_0xada37b(0x144)])break;const _0x101102=this[_0xada37b(0x1a6)]*Math[_0xada37b(0x13e)](0x2,_0x44eaa6);this[_0xada37b(0x1fb)][_0xada37b(0x213)]('Alexa-Schreibzugriff\x20fehlgeschlagen;\x20Retry\x20'+(_0x44eaa6+0x1)+'/'+this['maxWriteRetries']+'\x20in\x20'+_0x101102+_0xada37b(0x182)),await this[_0xada37b(0x1b6)](_0x101102);}}throw _0x51e3b5 instanceof Error?_0x51e3b5:new Error(String(_0x51e3b5));}async['waitForWriteBudget'](){const _0x42e4da=_0x13ea5f;while(!![]){const _0x5928b4=Date[_0x42e4da(0x185)]();this[_0x42e4da(0x228)]=this[_0x42e4da(0x228)]['filter'](_0x5d8fa5=>_0x5928b4-_0x5d8fa5<0xea60);if(this[_0x42e4da(0x228)][_0x42e4da(0x1ca)]<this[_0x42e4da(0x19f)])return;const _0x43b0e3=Math[_0x42e4da(0x1ab)](0x1f4,0xea60-(_0x5928b4-this['writeTimestamps'][0x0])+0x64);this['log']['info'](_0x42e4da(0x1f5)+this[_0x42e4da(0x19f)]+_0x42e4da(0x19d)+_0x43b0e3+'\x20ms.'),await this[_0x42e4da(0x1b6)](_0x43b0e3);}}async[_0x13ea5f(0x230)](_0x4d3454){const _0x3f0a03=_0x13ea5f;if(this['cfg']['autoAliasSuggestions']===![]){await this[_0x3f0a03(0x1be)]('info.aliasSuggestions','[]',!![]);return;}const _0x26a573=[];for(const _0x393ea6 of(0x0,sorter_1[_0x3f0a03(0x108)])(_0x4d3454)){if((0x0,market_plan_1[_0x3f0a03(0x1a9)])(String(_0x393ea6[_0x3f0a03(0xf5)]),this[_0x3f0a03(0x1e5)]))continue;const _0x5fa34a=(0x0,parser_1[_0x3f0a03(0x219)])(String(_0x393ea6[_0x3f0a03(0xf5)]),this[_0x3f0a03(0x1e5)],this['products'],this['fallbackMarket'],this['priorityMarket']),_0x25a77c=(0x0,parser_1[_0x3f0a03(0xff)])(_0x5fa34a[_0x3f0a03(0x1e4)],this['products']);if(!_0x25a77c)continue;for(const _0x454cde of(0x0,parser_1[_0x3f0a03(0x14a)])(_0x5fa34a[_0x3f0a03(0x1e4)],_0x25a77c))_0x26a573['push']({'product':_0x25a77c[_0x3f0a03(0x208)],'alias':_0x454cde});}const _0x4c8f5c=[...new Map(_0x26a573[_0x3f0a03(0x256)](_0x29b0b1=>[(_0x29b0b1[_0x3f0a03(0x149)]+'|'+_0x29b0b1[_0x3f0a03(0x12a)])[_0x3f0a03(0x222)]('de'),_0x29b0b1]))[_0x3f0a03(0x15b)]()];await this[_0x3f0a03(0x1be)](_0x3f0a03(0x24c),JSON[_0x3f0a03(0x11e)](_0x4c8f5c,null,0x2),!![]);}async[_0x13ea5f(0x200)](_0x44b286,_0x465843){const _0x12f59a=_0x13ea5f,_0x55d01c=(0x0,sorter_1[_0x12f59a(0x108)])(_0x465843),_0x3d0569=this[_0x12f59a(0x22f)][_0x12f59a(0x147)](_0x44b286),_0x2fa049=new Set(_0x55d01c['map'](_0xb4e892=>String(_0xb4e892['id'])));if(!_0x3d0569){this[_0x12f59a(0x22f)][_0x12f59a(0x142)](_0x44b286,_0x2fa049);return;}for(const _0x39ab40 of _0x55d01c){if(_0x3d0569[_0x12f59a(0x1b4)](String(_0x39ab40['id'])))continue;if((0x0,market_plan_1[_0x12f59a(0x1a9)])(String(_0x39ab40[_0x12f59a(0xf5)]),this[_0x12f59a(0x1e5)]))continue;const _0x1fc23c=(0x0,parser_1[_0x12f59a(0x219)])(String(_0x39ab40['value']),this[_0x12f59a(0x1e5)],this[_0x12f59a(0x23f)],this['fallbackMarket'],this['priorityMarketForList'](_0x44b286));this['statistics']=(0x0,statistics_1[_0x12f59a(0x15f)])(this[_0x12f59a(0x217)],_0x44b286,_0x1fc23c);}this[_0x12f59a(0x22f)][_0x12f59a(0x142)](_0x44b286,_0x2fa049),await this[_0x12f59a(0x1bc)]();}async[_0x13ea5f(0x167)](){const _0x52d80c=_0x13ea5f,_0x8a330a=[...this[_0x52d80c(0x186)][_0x52d80c(0x15b)]()]['reduce']((_0xdf416b,_0x11c915)=>_0xdf416b+_0x11c915,0x0);await this[_0x52d80c(0x1be)](_0x52d80c(0xfd),_0x8a330a,!![]),await this[_0x52d80c(0x1be)]('info.activeItemsByList',JSON[_0x52d80c(0x11e)](Object[_0x52d80c(0x1da)](this['activeCountByList']),null,0x2),!![]);}async['runStartupCompatibilityCheck'](){const _0x531bc0=_0x13ea5f;try{const _0x5c764e=await this[_0x531bc0(0x1b3)]('system.adapter.'+this[_0x531bc0(0x1c3)]),_0x58a108=_0x5c764e?.[_0x531bc0(0x113)]?.[_0x531bc0(0x194)];this[_0x531bc0(0x239)]=typeof _0x58a108===_0x531bc0(0x1ef)?_0x58a108:_0x531bc0(0x206);}catch{this[_0x531bc0(0x239)]=_0x531bc0(0x206);}try{const _0x5a3a19=require['resolve'](_0x531bc0(0x11d)),_0xb8ad89=fs['readFileSync'](_0x5a3a19,'utf8'),_0x1d7b56=(0x0,compatibility_1['inspectAlexaRemoteSource'])(_0xb8ad89);this[_0x531bc0(0x18b)]=_0x1d7b56[_0x531bc0(0x1e8)],this['compatibilityDetail']=_0x1d7b56[_0x531bc0(0x17b)],this[_0x531bc0(0x1ff)]=this['findPackageVersion'](_0x5a3a19,'alexa-remote2');}catch(_0x106f8c){this['writeCapability']='unknown',this[_0x531bc0(0xfa)]=_0x531bc0(0x129)+(_0x106f8c instanceof Error?_0x106f8c[_0x531bc0(0x12e)]:String(_0x106f8c)),this[_0x531bc0(0x1ff)]='unbekannt';}await this['updateCompatibilityDiagnostics']();}['findPackageVersion'](_0x3903e7,_0x2ae764){const _0x46bb42=_0x13ea5f;let _0xd10fd1=path[_0x46bb42(0x126)](_0x3903e7);for(let _0x371125=0x0;_0x371125<0x6;_0x371125++){const _0x4d42ac=path[_0x46bb42(0xe9)](_0xd10fd1,_0x46bb42(0x10a));try{const _0x48b3bc=JSON[_0x46bb42(0x136)](fs[_0x46bb42(0x138)](_0x4d42ac,_0x46bb42(0x20c)));if(_0x48b3bc[_0x46bb42(0x208)]===_0x2ae764&&_0x48b3bc[_0x46bb42(0x194)])return _0x48b3bc[_0x46bb42(0x194)];}catch{}const _0x46c6d8=path[_0x46bb42(0x126)](_0xd10fd1);if(_0x46c6d8===_0xd10fd1)break;_0xd10fd1=_0x46c6d8;}return _0x46bb42(0x206);}async[_0x13ea5f(0x184)](){const _0x39129f=_0x13ea5f;if(this['compatibilityTesting']||this['sortingListName'])return;this['compatibilityTesting']=!![];try{const _0x54f64a=this[_0x39129f(0x248)][0x0]?.['name'];if(!_0x54f64a)throw new Error('Keine\x20aktive\x20Alexa-Liste\x20konfiguriert.');const _0x59e77a=await this['readList'](_0x54f64a),_0x3dddc2=(0x0,sorter_1[_0x39129f(0x1bb)])((0x0,sorter_1[_0x39129f(0x108)])(_0x59e77a))[0x0];if(!_0x3dddc2)throw new Error(_0x39129f(0x15a));const _0x306e0c=this['alexaInstance']+_0x39129f(0x1ed)+_0x54f64a+_0x39129f(0x154)+_0x3dddc2['id']+'.value',_0x5f3c6d=await this[_0x39129f(0x14b)](_0x306e0c),_0x585024=String(_0x5f3c6d?.[_0x39129f(0x1ad)]??_0x3dddc2[_0x39129f(0xf5)])[_0x39129f(0x214)]();if(!_0x585024)throw new Error('Der\x20Testeintrag\x20enthält\x20keinen\x20sichtbaren\x20value-Text.');const _0x3cbf37=Number(_0x5f3c6d?.['ts']||0x0);await this['setForeignStateAsync'](_0x306e0c,{'val':_0x585024,'ack':![]}),this[_0x39129f(0x105)]['alexaWrites']+=0x1,this[_0x39129f(0x105)]['compatibilityWrites']+=0x1,this[_0x39129f(0x105)][_0x39129f(0x226)]=new Date()[_0x39129f(0x1b2)](),await this[_0x39129f(0x102)]();const _0x1c4ced=Date[_0x39129f(0x185)]()+0x2710;let _0x2cb568=![];while(Date[_0x39129f(0x185)]()<_0x1c4ced){await this['wait'](0xfa);const _0x50f58f=await this[_0x39129f(0x14b)](_0x306e0c);if(_0x50f58f&&_0x50f58f[_0x39129f(0x209)]===!![]&&String(_0x50f58f[_0x39129f(0x1ad)]??'')[_0x39129f(0x214)]()===_0x585024&&Number(_0x50f58f['ts']||0x0)>_0x3cbf37){_0x2cb568=!![];break;}}_0x2cb568?(this[_0x39129f(0x18b)]='live-ok',this[_0x39129f(0xfa)]=_0x39129f(0x121),this['lastCompatibilityTest']=new Date()[_0x39129f(0x1b2)]()+_0x39129f(0x1a2)+_0x585024+'“',await this[_0x39129f(0x1be)](_0x39129f(0x115),'',!![])):(this['writeCapability']=_0x39129f(0x21c),this[_0x39129f(0xfa)]='Live-Test\x20fehlgeschlagen:\x20Alexa2\x20hat\x20den\x20value-Schreibzugriff\x20nicht\x20innerhalb\x20von\x2010\x20Sekunden\x20bestätigt.',this['lastCompatibilityTest']=new Date()['toISOString']()+_0x39129f(0x1de)+_0x585024+'“',await this[_0x39129f(0x1be)](_0x39129f(0x115),'Alexa-Schreibkompatibilitätstest\x20fehlgeschlagen;\x20Sortierschreibzugriffe\x20bleiben\x20blockiert.',!![])),await this[_0x39129f(0x1e2)]();}catch(_0x39ab89){const _0x5d1f8a=_0x39ab89 instanceof Error?_0x39ab89['message']:String(_0x39ab89);this[_0x39129f(0x18b)]='live-failed',this['compatibilityDetail']=_0x39129f(0x166)+_0x5d1f8a,this['lastCompatibilityTest']=new Date()['toISOString']()+_0x39129f(0x20d)+_0x5d1f8a,await this[_0x39129f(0x1be)](_0x39129f(0x115),_0x39129f(0x24a)+_0x5d1f8a,!![]),await this[_0x39129f(0x1e2)]();}finally{this['compatibilityTesting']=![];}}async[_0x13ea5f(0x1e2)](){const _0x317394=_0x13ea5f;await this[_0x317394(0x1be)](_0x317394(0x10f),this[_0x317394(0x18b)],!![]),await this[_0x317394(0x1be)](_0x317394(0x1e7),this[_0x317394(0x1c2)],!![]),await this[_0x317394(0x1be)](_0x317394(0x164),JSON[_0x317394(0x11e)]({'shoppingrouteVersion':VERSION,'beta':!![],'alexaInstance':this['alexaInstance'],'alexa2Version':this[_0x317394(0x239)],'alexaRemote2Version':this[_0x317394(0x1ff)],'lists':this[_0x317394(0x248)]['map'](_0x6943ee=>_0x6943ee[_0x317394(0x208)]),'dryRun':this[_0x317394(0x1d9)],'writeCapability':this[_0x317394(0x18b)],'detail':this[_0x317394(0xfa)],'lastCompatibilityTest':this['lastCompatibilityTest'],'requiredAlexaAppSorting':'Älteste\x20bis\x20neueste\x20/\x20Oldest\x20to\x20newest','checkedAt':new Date()[_0x317394(0x1b2)]()},null,0x2),!![]);}async[_0x13ea5f(0x125)](){const _0xe48680=_0x13ea5f;try{const _0x43e720={'__none__':_0xe48680(0x22d)};for(const _0x18624d of[...this[_0xe48680(0x1e5)]][_0xe48680(0x10d)]((_0x44dc69,_0x26ae7f)=>_0x44dc69['name'][_0xe48680(0x10b)](_0x26ae7f['name'],'de',{'sensitivity':'base'}))){_0x43e720[_0x18624d[_0xe48680(0x208)]]=_0x18624d[_0xe48680(0x208)];}await this[_0xe48680(0x231)](_0xe48680(0x1dc),{'common':{'states':_0x43e720}});}catch(_0x2a6a2e){this['log'][_0xe48680(0x213)](_0xe48680(0x134)+(_0x2a6a2e instanceof Error?_0x2a6a2e['message']:String(_0x2a6a2e)));}}['ensureRoutesForMarketsAndGroups'](){const _0xd695d=_0x13ea5f,_0x12d8a2=(0x0,config_tools_1['ensureMarketRoutes'])(this[_0xd695d(0x1e5)],this['productGroups'],this[_0xd695d(0x172)]);if(_0x12d8a2[_0xd695d(0x201)]<=0x0)return;this['runtimeRoutes']=_0x12d8a2['routes'],this['routesDirty']=!![],this['log'][_0xd695d(0x257)](_0x12d8a2[_0xd695d(0x201)]+_0xd695d(0x124));}async['ensureProductGroupsConfig'](){const _0x363a40=_0x13ea5f;if(Array[_0x363a40(0x220)](this[_0x363a40(0x1e0)]['productGroups'])&&this[_0x363a40(0x1e0)][_0x363a40(0x152)]['length']>0x0)return;try{await this['updateConfig']({'productGroups':DEFAULT_CATEGORIES[_0x363a40(0x256)](_0x1fa78a=>({'name':_0x1fa78a}))});}catch(_0x5cdc7e){this['log']['warn']('Produktgruppen\x20konnten\x20nicht\x20initialisiert\x20werden:\x20'+(_0x5cdc7e instanceof Error?_0x5cdc7e['message']:String(_0x5cdc7e)));}}async[_0x13ea5f(0x15d)](){const _0x4bb0bd=_0x13ea5f;if(!this['productsDirty']&&!this['reviewsDirty']&&!this[_0x4bb0bd(0x16a)])return;try{const _0x1a9e78=_0x4bb0bd(0x1f6)+this['namespace'],_0x549b79=await this[_0x4bb0bd(0x1b3)](_0x1a9e78);if(!_0x549b79)throw new Error('Instanzobjekt\x20nicht\x20gefunden:\x20'+_0x1a9e78);const _0x5b4ed4=_0x549b79['native']||{};_0x549b79['native']={..._0x5b4ed4,...this['productsDirty']?{'products':this[_0x4bb0bd(0xf3)][_0x4bb0bd(0x256)](_0x5ec448=>({..._0x5ec448}))}:{},...this[_0x4bb0bd(0x1d4)]?{'reviewItems':this[_0x4bb0bd(0xee)][_0x4bb0bd(0x256)](_0xc634a5=>({..._0xc634a5}))}:{},...this[_0x4bb0bd(0x16a)]?{'routes':this[_0x4bb0bd(0x172)][_0x4bb0bd(0x256)](_0x150045=>({..._0x150045}))}:{}},await this[_0x4bb0bd(0x1af)](_0x1a9e78,_0x549b79),this[_0x4bb0bd(0x1db)]=![],this[_0x4bb0bd(0x1d4)]=![],this[_0x4bb0bd(0x16a)]=![];}catch(_0x569a1f){await this['setStateAsync'](_0x4bb0bd(0x115),'Lern-/Konfigurationsdaten\x20konnten\x20nicht\x20gespeichert\x20werden:\x20'+(_0x569a1f instanceof Error?_0x569a1f['message']:String(_0x569a1f)),!![]);}}async[_0x13ea5f(0x1b5)](){const _0x2eda7f=_0x13ea5f,_0x38ff61={...this[_0x2eda7f(0x1e0)],'products':this[_0x2eda7f(0xf3)],'routes':this[_0x2eda7f(0x176)],'reviewItems':this[_0x2eda7f(0xee)]};await this['setStateAsync'](_0x2eda7f(0x173),JSON[_0x2eda7f(0x11e)]((0x0,config_tools_1[_0x2eda7f(0x240)])(_0x38ff61,VERSION),null,0x2),!![]),await this[_0x2eda7f(0x1be)](_0x2eda7f(0x17c),JSON[_0x2eda7f(0x11e)]((0x0,config_tools_1[_0x2eda7f(0x1b9)])(this[_0x2eda7f(0x1e5)],this[_0x2eda7f(0x176)]),null,0x2),!![]);}async[_0x13ea5f(0x23b)](){const _0x4578b5=_0x13ea5f;try{const _0x5584bd=await this[_0x4578b5(0x13a)]('info.traffic');this[_0x4578b5(0x105)]=(0x0,metrics_1[_0x4578b5(0x1c4)])(_0x5584bd&&typeof _0x5584bd[_0x4578b5(0x1ad)]===_0x4578b5(0x1ef)&&_0x5584bd[_0x4578b5(0x1ad)][_0x4578b5(0x214)]()?JSON[_0x4578b5(0x136)](_0x5584bd[_0x4578b5(0x1ad)]):null);}catch{this['traffic']=(0x0,metrics_1['emptyTrafficMetrics'])();}await this['persistTrafficMetrics']();}async['ensureTrafficDay'](){const _0x41b186=_0x13ea5f,_0x2627c5=(0x0,metrics_1['normalizeTrafficMetrics'])(this[_0x41b186(0x105)]);_0x2627c5['date']!==this[_0x41b186(0x105)][_0x41b186(0x255)]&&(this['traffic']=_0x2627c5,await this[_0x41b186(0x102)]());}async[_0x13ea5f(0x102)](){const _0x23b3c7=_0x13ea5f;this[_0x23b3c7(0x105)]=(0x0,metrics_1[_0x23b3c7(0x1c4)])(this['traffic']),await this['setStateAsync']('info.localChecksToday',this[_0x23b3c7(0x105)][_0x23b3c7(0x18d)],!![]),await this['setStateAsync']('info.plannedChangesToday',this[_0x23b3c7(0x105)][_0x23b3c7(0x128)],!![]),await this[_0x23b3c7(0x1be)](_0x23b3c7(0x19b),this['traffic'][_0x23b3c7(0x244)],!![]),await this[_0x23b3c7(0x1be)](_0x23b3c7(0xf0),this[_0x23b3c7(0x105)][_0x23b3c7(0x187)],!![]),await this[_0x23b3c7(0x1be)]('info.compatibilityWritesToday',this['traffic'][_0x23b3c7(0x14e)],!![]),await this['setStateAsync']('info.abortedRunsToday',this[_0x23b3c7(0x105)][_0x23b3c7(0x218)],!![]),await this['setStateAsync'](_0x23b3c7(0x12d),JSON[_0x23b3c7(0x11e)]({...this[_0x23b3c7(0x105)],'note':_0x23b3c7(0x1d5)},null,0x2),!![]);}async[_0x13ea5f(0x180)](){const _0x3256bb=_0x13ea5f;try{const _0x36cfae=await this[_0x3256bb(0x13a)](_0x3256bb(0x158));this[_0x3256bb(0x217)]=(0x0,statistics_1[_0x3256bb(0x18a)])(_0x36cfae&&typeof _0x36cfae['val']===_0x3256bb(0x1ef)&&_0x36cfae[_0x3256bb(0x1ad)][_0x3256bb(0x214)]()?JSON[_0x3256bb(0x136)](_0x36cfae[_0x3256bb(0x1ad)]):null);}catch{this[_0x3256bb(0x217)]=(0x0,statistics_1['emptyUsageStatistics'])();}await this[_0x3256bb(0x1bc)]();}async[_0x13ea5f(0x1bc)](){const _0x10e6c3=_0x13ea5f;this['statistics'][_0x10e6c3(0x1cd)]=new Date()[_0x10e6c3(0x1b2)](),await this[_0x10e6c3(0x1be)](_0x10e6c3(0x158),JSON[_0x10e6c3(0x11e)](this['statistics'],null,0x2),!![]);}async[_0x13ea5f(0x12b)](){const _0x3bb772=_0x13ea5f;try{const _0x2eb078=await this[_0x3bb772(0x1d0)](_0x3bb772(0x216)),_0xc0319b=_0x2eb078['dist-tags']||{},_0x1c0e75=typeof _0xc0319b[_0x3bb772(0x1fa)]===_0x3bb772(0x1ef)?_0xc0319b[_0x3bb772(0x1fa)]:'',_0x108795=typeof _0xc0319b['latest']===_0x3bb772(0x1ef)?_0xc0319b[_0x3bb772(0x143)]:'';this['latestBetaVersion']=_0x1c0e75||_0x108795,this[_0x3bb772(0x168)]=new Date()[_0x3bb772(0x1b2)](),await this[_0x3bb772(0x1be)](_0x3bb772(0x17f),this[_0x3bb772(0x1d6)]||_0x3bb772(0x206),!![]),await this[_0x3bb772(0x1be)](_0x3bb772(0x104),Boolean(this[_0x3bb772(0x1d6)]&&this['latestBetaVersion']!==VERSION),!![]),await this['setStateAsync'](_0x3bb772(0xf6),this[_0x3bb772(0x168)]+_0x3bb772(0x241)+(this[_0x3bb772(0x1d6)]||'unbekannt'),!![]);}catch(_0x493b6f){this[_0x3bb772(0x168)]=new Date()['toISOString'](),await this[_0x3bb772(0x1be)](_0x3bb772(0xf6),this[_0x3bb772(0x168)]+'\x20–\x20npm-Abfrage\x20fehlgeschlagen:\x20'+(_0x493b6f instanceof Error?_0x493b6f[_0x3bb772(0x12e)]:String(_0x493b6f)),!![]);}await this['updateFeedbackReport']();}[_0x13ea5f(0x1d0)](_0x1faa36){return new Promise((_0x44fb71,_0x34af0d)=>{const _0x29f573=_0x5852,_0x586bb5=https[_0x29f573(0x147)](_0x1faa36,{'headers':{'User-Agent':_0x29f573(0x1e9)+VERSION}},_0xc2fd56=>{const _0x45522e=_0x29f573;if((_0xc2fd56['statusCode']||0x1f4)>=0x190){_0xc2fd56[_0x45522e(0x165)](),_0x34af0d(new Error(_0x45522e(0x235)+_0xc2fd56['statusCode']));return;}let _0xfa20b2='';_0xc2fd56['setEncoding'](_0x45522e(0x20c)),_0xc2fd56['on'](_0x45522e(0x234),_0x191c1d=>{_0xfa20b2+=_0x191c1d;}),_0xc2fd56['on'](_0x45522e(0x118),()=>{const _0x292d54=_0x45522e;try{_0x44fb71(JSON[_0x292d54(0x136)](_0xfa20b2));}catch(_0x3d6708){_0x34af0d(_0x3d6708 instanceof Error?_0x3d6708:new Error(_0x292d54(0x127)));}});});_0x586bb5[_0x29f573(0x247)](0x1f40,()=>_0x586bb5[_0x29f573(0x1d1)](new Error('Timeout'))),_0x586bb5['on']('error',_0x34af0d);});}async[_0x13ea5f(0x110)](){const _0x3e919f=_0x13ea5f,_0x471add={'generatedAt':new Date()[_0x3e919f(0x1b2)](),'shoppingrouteVersion':VERSION,'node':process[_0x3e919f(0x194)],'alexaInstance':this[_0x3e919f(0x1c3)],'alexa2Version':this[_0x3e919f(0x239)],'alexaRemote2Version':this[_0x3e919f(0x1ff)],'lists':this['listConfigs'][_0x3e919f(0x256)](_0x39f729=>({'name':_0x39f729[_0x3e919f(0x208)],'activeItems':this['activeCountByList'][_0x3e919f(0x147)](_0x39f729[_0x3e919f(0x208)])||0x0})),'dryRun':this['dryRun'],'learningMode':this[_0x3e919f(0x195)],'apiSafeMode':this[_0x3e919f(0x258)],'writeCapability':this['writeCapability'],'lastCompatibilityTest':this[_0x3e919f(0x1c2)],'lastError':String((await this['getStateAsync'](_0x3e919f(0x115)))?.['val']||''),'traffic':this[_0x3e919f(0x105)],'update':{'installed':VERSION,'npmBeta':this[_0x3e919f(0x1d6)]||_0x3e919f(0x206),'checkedAt':this[_0x3e919f(0x168)]||_0x3e919f(0x1c0)},'privacy':_0x3e919f(0xf9)};await this['setStateAsync']('info.feedbackReport',JSON[_0x3e919f(0x11e)](_0x471add,null,0x2),!![]);}async[_0x13ea5f(0x232)](_0x3e773e){const _0x342b6f=_0x13ea5f;await this['setStateAsync'](_0x342b6f(0x115),_0x3e773e,!![]);}['wait'](_0x15c99a){const _0x3e1fc9=_0x13ea5f;return new Promise(_0x1546f1=>this[_0x3e1fc9(0x247)](_0x1546f1,_0x15c99a));}static[_0x13ea5f(0x1fd)](){return[...DEFAULT_CATEGORIES];}}function _0x5852(_0x3ffc33,_0x599095){_0x3ffc33=_0x3ffc33-0xe9;const _0x584c47=_0x584c();let _0x5852c6=_0x584c47[_0x3ffc33];return _0x5852c6;}exports[_0x13ea5f(0x1a1)]=ShoppingRoute;if(require[_0x13ea5f(0x25a)]!==module)module[_0x13ea5f(0x199)]=_0x31913b=>new ShoppingRoute(_0x31913b);else((()=>new ShoppingRoute())());function _0x584c(){const _0x425d5e=['stateChange','\x20aktiv)','sortTimer','.Lists.','sendTo','string','activeIdSignature','Brot/Gebäck','12799tFMkUR','.Lists.*.json','fallbackMarket','API-Schonmodus:\x20Schreiblimit\x20','system.adapter.','Nonfood','90idTFuo','control.resetStatistics','beta','log','emptyTrafficMetrics','getDefaultCategories','planMarketHeaderAction','alexaRemote2Version','recordNewItems','added','Haushalt/Hygiene','from','sortList','applyMarketHeaderAction','unbekannt','Datenpunkt\x20','name','ack','setForeignStateAsync','runStartupCompatibilityCheck','utf8','\x20–\x20FEHLER:\x20','find','H-Milch/Nudeln','command','setInterval','./adapter/shoppingroute/backup-transfer.html?instance=','warn','trim','104aBXsuz','https://registry.npmjs.org/iobroker.shoppingroute','statistics','abortedRuns','parseItem','unshift','floor','live-failed','pendingLists','base','emptyUsageStatistics','isArray','known-bug','toLocaleLowerCase','includes','./lib/sorter','call','lastAlexaWrite','\x20–\x20','writeTimestamps','Alexa-Datenpunkt\x20für\x20Marktüberschrift\x20fehlt:\x20','writePauseMs','\x20geplante\x20Textänderung(en)\x20nicht\x20bestätigt;\x20kein\x20automatischer\x20Endlos-Retry.','info.versionInstalled','—\x20Kein\x20Markt\x20—','callback','knownActiveIds','updateAliasSuggestions','extendObjectAsync','setError','processPendingSorts','data','HTTP\x20','ShoppingRoute-Konfiguration\x20importiert;\x20Instanz\x20wird\x20durch\x20ioBroker\x20neu\x20gestartet.','realActiveItems','.json','alexa2Version','batchSize','loadTrafficMetrics','Alexa-Schreibzugriffe\x20blockiert:\x20bekannte\x20fehlerhafte\x20alexa-remote2\x20version-Query\x20erkannt.','Noch\x20nicht\x20geprüft.',':\x20Marktüberschrift\x20','products','exportConfig','\x20–\x20npm\x20beta:\x20','learned','info.previewText','sortRuns','Marktprofil\x20„','listChangedDuringSort','setTimeout','listConfigs','autoLearnProducts','Kompatibilitätstest:\x20','sortingListName','info.aliasSuggestions','Konserven','filter','next','defineProperty','642593qnvhuQ','getMarkets','\x20aktiv','Listen:\x20','date','map','info','apiSafeMode',':\x20Alexa\x20hat\x20','main','join','control.resetTrafficStats','priorityMarketForList','Milchprodukte','control.sortNow','runtimeReviews','updateConfig','info.alexaWritesToday','control.enabled',':\x20bereits\x20sortiert\x20(','runtimeProducts','getOwnPropertyNames','value','info.versionCheck','minimumItemsPerMarket','isEnabled','Produktnamen,\x20Einkaufslistentexte,\x20Aliase\x20und\x20komplette\x20Konfiguration\x20sind\x20absichtlich\x20nicht\x20enthalten.','compatibilityDetail','Alexa-Listen\x20konnten\x20für\x20','Schokolade/Naschen','info.activeItems','onReady','findProduct','writable','Wurst/Salate/Teigwaren','persistTrafficMetrics','getLists','info.updateAvailable','traffic','\x20ms).','info.connection','activeItems','control.clearTemporaryPriorityMarket','package.json','localeCompare','waitForWriteBudget','sort','debounceMs','info.writeCapability','updateFeedbackReport','ready','getActiveMarkets','common','\x20Änderung(en),\x20','info.lastError','Keine\x20der\x20konfigurierten\x20Alexa-Listen\x20ist\x20lesbar:\x20','\x20Schreibzugriffen\x20(','end','\x20nicht\x20automatisch\x20gelesen\x20werden:\x20','Ohne\x20Markt','Obst/Gemüse','bind','alexa-remote2','stringify','Alexa-Liste\x20nicht\x20gefunden:\x20','batchPauseMs','Live-Test\x20erfolgreich:\x20Alexa2\x20hat\x20einen\x20unveränderten\x20value-Schreibzugriff\x20bestätigt.','API-Schonmodus:\x20Batch-Pause\x20nach\x20','\x20aktive\x20Artikel,\x20','\x20fehlende\x20Laufweg-Zuordnung(en)\x20für\x20neue\x20Märkte/Produktgruppen\x20automatisch\x20ergänzt.','updateTemporaryMarketStateOptions','dirname','Ungültige\x20JSON-Antwort','plannedChanges','alexa-remote2\x20konnte\x20nicht\x20automatisch\x20geprüft\x20werden:\x20','alias','checkNpmVersion','applyReviewActions','info.traffic','message','Alexa-Wertedatenpunkt\x20fehlt:\x20','@iobroker/adapter-core','priorityMarket','info.lastSort','normalizeRoutesForAdmin','Temporäre\x20Markt-Auswahlliste\x20konnte\x20nicht\x20aktualisiert\x20werden:\x20','create','parse','changed','readFileSync','348018eriPIM','getStateAsync','marketHeaders','min','getProductGroups','pow','keys','clearTimeout','default','set','latest','maxWriteRetries','Kosmetikartikel','control.refreshFeedbackReport','get','./lib/metrics','product','suggestAliases','getForeignStateAsync','ensureTrafficDay','__createBinding','compatibilityWrites','./lib/parser','./lib/config-tools','control.exportConfig','productGroups','off','.items.','enabled','type','subscribeForeignStates','info.statistics','148EjrzVd','Für\x20den\x20Kompatibilitätstest\x20wird\x20mindestens\x20ein\x20aktiver\x20Listeneintrag\x20benötigt.','values','__setModuleDefault','persistRuntimeConfig','TK-Produkte','recordAddedItem',':\x20Eintrag\x20wurde\x20während\x20der\x20Sortierung\x20verändert.\x20Neue\x20Berechnung\x20folgt.','./lib/compatibility','configurable','0.3.1','info.compatibility','resume','Live-Test\x20konnte\x20nicht\x20abgeschlossen\x20werden:\x20','updateActiveItemCount','lastVersionCheck','\x20[DRY-RUN]','routesDirty','lastSortRun','Alexa-Schreibzugriffe\x20blockiert:\x20Schreibkompatibilität\x20noch\x20nicht\x20bestätigt;\x20control.compatibilityTest\x20ausführen.','control.marketProfileImport','config','canWriteAlexa','review','\x20aktualisiert','runtimeRoutes','info.configExport','__none__','makePreviewText','routes','65cpHbra','Adapter','endsWith','.#New','detail','info.marketProfiles','readList','getMarketsOptional','info.versionBeta','loadStatistics','info.reviewQueue','\x20ms.','versionTimer','runLiveCompatibilityTest','now','activeCountByList','alexaWrites','marketHeadersEnabled','Alexa-Schreibzugriffe\x20blockiert:\x20Kompatibilitätstest\x20fehlgeschlagen.','normalizeUsageStatistics','writeCapability','subscribeStates','localChecks','.value','discoverAlexaLists','listStateId','node:path','Noch\x20nicht\x20ausgeführt.','unload','version','learningMode','\x20enthält\x20keine\x20lesbare\x20Liste.','armSortTimer','temporaryPriorityMarket','exports','clearInterval','info.sortRunsToday','reviewAccepted','/Minute\x20erreicht,\x20Pause\x20','namespace','maxWritesPerMinute','\x20Änderung(en)','ShoppingRoute','\x20–\x20ERFOLG\x20mit\x20„','compatibilityTesting','scheduleAll','onStateChange','retryBaseMs','slice','3296856jQOylo','isMarketHeader','278004EwKPWy','max','node:fs','val','createSortPlan','setForeignObjectAsync','accepted','ShoppingRoute\x20','toISOString','getForeignObjectAsync','has','refreshExports','wait','writeAlexaState','onMessage','buildMarketProfiles','control.importConfigJson','sortSlotsOldestFirst','persistStatistics','node:https','setStateAsync','lists','noch\x20nicht','__esModule','lastCompatibilityTest','alexaInstance','normalizeTrafficMetrics','add','unknown','importMarketProfile','scheduleSort','Konfigurationsimport\x20fehlgeschlagen:\x20','length','hasOwnProperty','__importStar','lastUpdated','label','getForeignObjectsAsync','httpJson','destroy','push','control.compatibilityTest','reviewsDirty','Zählt\x20Operationen,\x20keine\x20Netzwerk-Bytes.','latestBetaVersion','getOwnPropertyDescriptor','market','dryRun','fromEntries','productsDirty','control.temporaryPriorityMarket','4417029VCyWyW','\x20–\x20FEHLGESCHLAGEN\x20mit\x20„','automatic','cfg','1240722nKQYQS','updateCompatibilityDiagnostics','startsWith','productText','markets','reviewItems','info.lastCompatibilityTest','status','ioBroker.shoppingroute/'];_0x584c=function(){return _0x425d5e;};return _0x584c();}
|
|
1
|
+
'use strict';const _0x259ade=_0x4105;function _0x45a3(){const _0x2c4847=['updatedDateTime','scheduleSort','6362sGRqvH','bind','onUnload','Kompatibilitätstest:\x20','setTimeout','routes','refreshVisibleAlexaOrder','runtimeProducts','checkNpmVersion','setStateAsync','apiSafeMode','marker','reconcilePendingTransactionStep','Produktnamen,\x20Einkaufslistentexte,\x20Aliase\x20und\x20komplette\x20Konfiguration\x20sind\x20absichtlich\x20nicht\x20enthalten.','TK-Produkte','\x20Dry-Run:\x20','runtimeReviews','control.exportConfig','waitForVisibleOrderTouchConfirmation','\x20enthält\x20keine\x20lesbare\x20Liste.','info.previewText','getMarketsOptional','beta','info.compatibility','updateConfig','getActiveMarkets','info.plannedChangesToday','node:https',':\x20Abschlussprüfung\x20der\x20sichtbaren\x20Reihenfolge\x20wird\x20neu\x20berechnet:\x20','error','wait','writes','activateSortSafetyStop','off','1899BPIvfu','getOwnPropertyDescriptor','.Lists.*.json','control.sortNow','normalizeMarketSelection','main','statusCode','getDefaultCategories','batchSize','default','Datenpunkt\x20','control.clearTemporaryPriorityMarket','createBufferedSortProgram','alexa2.0','API-Schonmodus:\x20Schreiblimit\x20','normalizeRoutesForAdmin','info.configExport','subscribeStates',':\x20Letzter\x20Rollback-Schritt\x20der\x20unterbrochenen\x20Transaktion\x20ist\x20nicht\x20eindeutig\x20auflösbar.','unload','filter','refreshExports','Keine\x20der\x20konfigurierten\x20Alexa-Listen\x20ist\x20lesbar:\x20','info.lastPlan','command','markAllReviewItemsAccept','getProductGroups','availableMarkets','node:path','waitForAlexaValueConfirmation','name','fallbackMarket','./lib/sorter','rollback','3128lRXhhO','createVisibleOrderRefreshPlan','Live-Test\x20konnte\x20nicht\x20abgeschlossen\x20werden:\x20',':\x20Während\x20der\x20Sortierung\x20ist\x20ein\x20neuer\x20aktiver\x20Alexa-Listeneintrag\x20hinzugekommen.','Nonfood','enabled','ready','createSortPlan','listConfigs','\x20fehlende\x20Laufweg-Zuordnung(en)\x20für\x20neue\x20Märkte/Produktgruppen\x20automatisch\x20ergänzt.','visibleOrderRefreshIds','alexa-remote2','sortingListName','added','ambiguous','marketHeadersEnabled','info.compatibilityWritesToday','\x20Aktualisierung(en)','batchPauseMs','./adapter/shoppingroute/backup-transfer.html?instance=','recordNewItems','discoverAlexaLists','sortTimer','random',':\x20Rollback\x20überschreibt\x20extern\x20geänderte\x20ID\x20','abortedRuns','alexa2Version','maxWriteRetries','delete','\x20–\x20BETA-Sicherheitsblock:\x20keine\x20Alexa-Schreibzugriffe','.value','create','debounceMs','products','sendTo','missingIds','message','parseConfigImport','.\x20Lernmodus:\x20','\x20Der\x20bestätigte\x20Sortierpfad\x20wurde\x20rückwärts\x20zurückgesetzt;\x20neue\x20Berechnung\x20folgt.','armSortTimer','\x20aktualisiert',':\x20Neuer\x20aktiver\x20Alexa-Listeneintrag\x20vor\x20der\x20Reihenfolge-Finalisierung\x20erkannt;\x20Finalisierung\x20abgebrochen.\x20Neue\x20Berechnung\x20folgt\x20nach\x20Synchronisationsruhe.',':\x20Marktüberschrift\x20','\x20für\x20','join',':\x20Alexa2\x20hat\x20Sortierschritt\x20','httpJson','find','Synchronisationsschutz:\x20Sortierschreibzugriffe\x20starten\x20erst\x20nach\x20mindestens\x2030\x20Sekunden\x20ohne\x20Listenänderung.',':\x20Wiederherstellung\x20der\x20unterbrochenen\x20Sortierung\x20fehlgeschlagen:\x20','object','Älteste\x20bis\x20neueste\x20/\x20Oldest\x20to\x20newest','length','Fleisch/Fisch','391698sPuyZF','native','updateAliasSuggestions','suggestAliases','activeItems','emptyUsageStatistics','namespace','lastSortRun','versionTimer','lastCompatibilityTest','\x20inhaltsneutralen\x20Schreibzugriff(en)\x20korrigiert,\x20','exports','setError',':\x20sichtbare\x20Reihenfolge\x20mit\x20','info.aliasSuggestions','ShoppingRoute\x20','Lern-/Konfigurationsdaten\x20konnten\x20nicht\x20gespeichert\x20werden:\x20','control.importConfigJson','stringify','entries','unknown','getForeignStateAsync','localeCompare','\x20aktive\x20Artikel,\x20','unbekannt','\x20–\x20','control.temporaryPriorityMarket','Marktprofil-Import\x20fehlgeschlagen:\x20','marketHeaders','830715twHBoZ','“\x20importiert.','setInterval','sortStabilityDelayMs','.json','from','getStateAsync','\x20–\x20ERFOLG\x20mit\x20„','known-bug','\x20BETA:\x20Dry-Run\x20ist\x20für\x20Ersttests\x20ausdrücklich\x20empfohlen.','type','\x20Der\x20bestätigte\x20Sortierpfad\x20wurde\x20rückwärts\x20zurückgesetzt.','compareActiveSnapshot','automatic','writeTimestamps','info','\x20gefunden;\x20Wiederherstellung\x20startet.','reviewItems','./lib/market-plan','H-Milch/Nudeln','emptyTrafficMetrics','log','listName','not-applied','version','ensureTrafficDay','rollbackBufferedTransaction','onReady','traffic','\x20in\x20','transactionMatchesTarget','Adapter','transactionId','@iobroker/adapter-core','values','ensureProductGroupsConfig','Kosmetikartikel','info.feedbackReport','ungültige\x20Journal-Struktur','Getränke','get','includes','\x20SICHERHEITSSTOPP:\x20ShoppingRoute\x20wurde\x20deaktiviert;\x20weitere\x20automatische\x20Sortierung\x20bleibt\x20gesperrt.','getAlexaLists','isEnabled','sort',':\x20Unterbrochene\x20Sortiertransaktion\x20','lists','waitForWriteBudget','dirname','realActiveItems',':\x20Sortierpuffer\x20erwartete\x20bei\x20ID\x20',':\x20Gepufferte\x20Sortierung\x20abgebrochen\x20und\x20rückwärts\x20auf\x20den\x20Ausgangszustand\x20gesetzt:\x20','knownActiveIds','interrupted','Temporäre\x20Markt-Auswahlliste\x20konnte\x20nicht\x20aktualisiert\x20werden:\x20','alexaWrites','Live-Test\x20erfolgreich:\x20Alexa2\x20hat\x20einen\x20unveränderten\x20value-Schreibzugriff\x20bestätigt.','persistSortTransaction','normalizeUsageStatistics','runLiveCompatibilityTest','dryRun','shoppingrouteBackup','push','info.lastSort',':\x20Inhalte\x20sind\x20sortiert,\x20sichtbare\x20Alexa-Reihenfolge\x20benötigt\x20',':\x20Liste\x20wurde\x20während\x20der\x20Reihenfolge-Finalisierung\x20verändert;\x20keine\x20Textwerte\x20wurden\x20zurückgerollt,\x20neue\x20Berechnung\x20folgt.','info.connection','1431458SttmdM','Alexa-Schreibzugriffe\x20blockiert:\x20Kompatibilitätstest\x20fehlgeschlagen.',':\x20Alexa2\x20hat\x20die\x20updatedDateTime-Aktualisierung\x20für\x20die\x20sichtbare\x20Reihenfolge\x20nicht\x20bestätigt.','HTTP\x20','Neue\x20Artikel\x20automatisch\x20gelernt:\x20',':\x20Rollback-Schritt\x20für\x20ID\x20','info.abortedRunsToday','control.marketProfileImport','system.adapter.','Alexa-Schreibzugriffe\x20blockiert:\x20bekannte\x20fehlerhafte\x20alexa-remote2\x20version-Query\x20erkannt.','\x20ms).','Ohne\x20Markt','scheduleAll','fromEntries',':\x20bereits\x20sortiert\x20(','onMessage','cfg','mergeReviewQueue','ensureRoutesForMarketsAndGroups','live-failed','min','persistStatistics','Keine\x20aktive\x20Alexa-Liste\x20konfiguriert.','findProduct','control.refreshFeedbackReport','./lib/buffered-sort','toString','statistics','lastVersionCheck','\x20Ausgangszustand\x20wurde\x20wiederhergestellt.','lastUpdated','subscribeForeignStates','learningMode','info.activeItemsByList','has','control.*','info.unknownItems','Instanzobjekt\x20nicht\x20gefunden:\x20','readSortTransaction','recoverInterruptedSortTransaction','updateTemporaryMarketStateOptions','catch','control.resetStatistics','product','callback','info.statistics',':\x20Gepufferte\x20Sortierung\x20abgebrochen\x20und\x20zurückgesetzt:\x20','autoLearnProducts','isArray','steps','info.writeCapability','toLocaleLowerCase','confirmedSteps','.Lists.','buildMarketProfiles',':\x20Ein\x20ursprünglicher\x20Listeneintrag\x20wurde\x20während\x20der\x20Sortierung\x20verändert.','compatibilityTesting','\x20–\x20FEHLGESCHLAGEN\x20mit\x20„','writable','Noch\x20nicht\x20geprüft.','getForeignObjectAsync','\x20gepufferte\x20Schreibzugriffe,\x20','./lib/metrics','pendingLists','endsWith',':\x20Abschlussprüfung\x20der\x20gepufferten\x20Sortierung\x20ist\x20fehlgeschlagen.','autoAliasSuggestions','info.lastError','Zählt\x20Operationen,\x20keine\x20Netzwerk-Bytes.','maxWritesPerMinute','runStartupCompatibilityCheck','refresh','updateCompatibilityDiagnostics','position','shoppingroute','unshift','slice','confirmed','14968ruqWvE','info.lastLearnedItems','alexaRemote2Version','writePauseMs','control.compatibilityTest','persistTrafficMetrics','2eOjbvj','minItemsPerMarket','all','updateFeedbackReport','failed-applying','value','productGroups','map','minimumItemsPerMarket','\x20aktiv','\x20Änderung(en)\x20geplant','max','priorityMarket','\x20Aktualisierung(en)\x20der\x20sichtbaren\x20Reihenfolge\x20geplant','plannedChanges','extendObjectAsync','changed','Alexa-Schreibkompatibilitätstest\x20fehlgeschlagen;\x20Sortierschreibzugriffe\x20bleiben\x20blockiert.','markets','now','getBackupUiUrl','some','isMarketHeader','ShoppingRoute','\x20Reihenfolge-Schreibzugriff(e),\x20','__setModuleDefault','control.resetTrafficStats','__none__','__SHOPPINGROUTE_PUFFER_','applyMarketHeaderAction','findPackageVersion','failed-rollback','temporaryPriorityMarket','writeAlexaState','ack','clearInterval','\x20nicht\x20automatisch\x20gelesen\x20werden:\x20','./lib/compatibility','detail','listStateId','control.enabled','localChecks','routesDirty','Alexa-Listen\x20konnten\x20für\x20','info.preview','loadStatistics','canWriteAlexa','label','retryBaseMs','Milchprodukte','date','setForeignStateAsync','inspectAlexaRemoteSource','Obst/Gemüse','persistRuntimeConfig','Ungültige\x20JSON-Antwort','parse','readList','“,\x20gefunden\x20wurde\x20ein\x20anderer\x20Wert.','trim','changedSlots','add','automaticLearned','Sichtbare\x20Reihenfolge\x20kann\x20nicht\x20geprüft\x20werden:\x20Ein\x20geplanter\x20aktiver\x20Alexa-Eintrag\x20fehlt.','remainingReviews','utf8','alexaInstance','activeCountByList','next','\x20nicht.',':\x20Unterbrochene\x20Transaktion\x20war\x20bereits\x20vollständig\x20abgeschlossen;\x20Journal\x20bereinigt.','learned',':\x20Unterbrochene\x20Sortierung\x20konnte\x20nicht\x20vollständig\x20zurückgesetzt\x20werden.','live-ok','Alexa-Wertedatenpunkt\x20fehlt:\x20',':\x20Alexa2\x20hat\x20einen\x20Sortierschritt\x20verworfen;\x20Ausgangszustand\x20wurde\x20wiederhergestellt.','defineProperty','\x20ms.','package.json','market','API-Schonmodus:\x20Batch-Pause\x20nach\x20','runtimeRoutes','base','data','__esModule','2469760wWYMds',':\x20Sichtbare\x20Reihenfolge\x20wird\x20neu\x20berechnet:\x20','clear','warn','productText','onStateChange',':\x20Alexa2\x20hat\x20die\x20sichtbare\x20Zielreihenfolge\x20trotz\x20bestätigter\x20Same-Value-Writes\x20nicht\x20hergestellt.','size','\x20Reihenfolge-Schreibzugriffen\x20(','dist-tags','set','noch\x20nicht','.items.','66dzYpcj','productsDirty',':\x20Ein\x20ursprünglicher\x20Listeneintrag\x20wurde\x20während\x20der\x20Sortierung\x20entfernt\x20oder\x20abgehakt.','info.activeItems','val','accepted','0.3.2',':\x20Unterbrochene\x20Sortierung\x20kann\x20wegen\x20fehlender\x20Alexa-Schreibfreigabe\x20nicht\x20wiederhergestellt\x20werden.','info.sortTransaction','compatibilityDetail','priorityMarketForList','latestBetaVersion','status','mergeUnknownProducts','updateActiveItemCount','\x20geplant','startsWith','stateChange',':\x20Neuer\x20aktiver\x20Alexa-Listeneintrag\x20während\x20der\x20Reihenfolge-Finalisierung\x20erkannt;\x20weitere\x20Same-Value-Writes\x20werden\x20abgebrochen.','writeCapability','reviewsDirty','readFileSync','processPendingSorts','lastAlexaWrite','string',':\x20Rollback\x20überspringt\x20extern\x20entfernte\x20ID\x20','review','\x20Ausgangseinträge',':\x20Unterbrochene\x20Sortierung\x20wurde\x20anhand\x20des\x20lokalen\x20Journals\x20vollständig\x20rückwärts\x20aufgelöst.','sortRuns','info.traffic','requiredMarkets','prototype','toISOString','Sonstiges','targetValues','listChangedDuringSort','loadTrafficMetrics'];_0x45a3=function(){return _0x2c4847;};return _0x45a3();}(function(_0x3d3155,_0x3d21bc){const _0x2e0346=_0x4105,_0x3ac317=_0x3d3155();while(!![]){try{const _0x306789=-parseInt(_0x2e0346(0x2ea))/0x1*(parseInt(_0x2e0346(0x374))/0x2)+parseInt(_0x2e0346(0x34c))/0x3*(-parseInt(_0x2e0346(0x2e4))/0x4)+parseInt(_0x2e0346(0x252))/0x5+parseInt(_0x2e0346(0x235))/0x6+-parseInt(_0x2e0346(0x296))/0x7+parseInt(_0x2e0346(0x1fe))/0x8*(-parseInt(_0x2e0346(0x1dc))/0x9)+parseInt(_0x2e0346(0x33f))/0xa;if(_0x306789===_0x3d21bc)break;else _0x3ac317['push'](_0x3ac317['shift']());}catch(_0x3962df){_0x3ac317['push'](_0x3ac317['shift']());}}}(_0x45a3,0x19141));var __createBinding=this&&this['__createBinding']||(Object[_0x259ade(0x21d)]?function(_0x656373,_0x3e1f80,_0x151d5d,_0x318c04){const _0x2a0d68=_0x259ade;if(_0x318c04===undefined)_0x318c04=_0x151d5d;var _0x32deba=Object[_0x2a0d68(0x1dd)](_0x3e1f80,_0x151d5d);(!_0x32deba||('get'in _0x32deba?!_0x3e1f80[_0x2a0d68(0x33e)]:_0x32deba[_0x2a0d68(0x2d0)]||_0x32deba['configurable']))&&(_0x32deba={'enumerable':!![],'get':function(){return _0x3e1f80[_0x151d5d];}}),Object['defineProperty'](_0x656373,_0x318c04,_0x32deba);}:function(_0x318c9d,_0x2e45e0,_0x29aba7,_0x48eb17){if(_0x48eb17===undefined)_0x48eb17=_0x29aba7;_0x318c9d[_0x48eb17]=_0x2e45e0[_0x29aba7];}),__setModuleDefault=this&&this[_0x259ade(0x303)]||(Object[_0x259ade(0x21d)]?function(_0x29a34f,_0x73633d){const _0x5ac4ff=_0x259ade;Object[_0x5ac4ff(0x336)](_0x29a34f,'default',{'enumerable':!![],'value':_0x73633d});}:function(_0x5387f4,_0x3ecd3c){const _0x1b1350=_0x259ade;_0x5387f4[_0x1b1350(0x1e5)]=_0x3ecd3c;}),__importStar=this&&this['__importStar']||(function(){var _0x161ba2=function(_0x375192){return _0x161ba2=Object['getOwnPropertyNames']||function(_0x466430){const _0x14f401=_0x4105;var _0x3e770c=[];for(var _0x398d32 in _0x466430)if(Object[_0x14f401(0x36c)]['hasOwnProperty']['call'](_0x466430,_0x398d32))_0x3e770c[_0x3e770c['length']]=_0x398d32;return _0x3e770c;},_0x161ba2(_0x375192);};return function(_0x333b42){const _0x5629f4=_0x4105;if(_0x333b42&&_0x333b42[_0x5629f4(0x33e)])return _0x333b42;var _0xa29b7d={};if(_0x333b42!=null){for(var _0x25a2b9=_0x161ba2(_0x333b42),_0x5f2f38=0x0;_0x5f2f38<_0x25a2b9['length'];_0x5f2f38++)if(_0x25a2b9[_0x5f2f38]!==_0x5629f4(0x1e5))__createBinding(_0xa29b7d,_0x333b42,_0x25a2b9[_0x5f2f38]);}return __setModuleDefault(_0xa29b7d,_0x333b42),_0xa29b7d;};}());Object['defineProperty'](exports,_0x259ade(0x33e),{'value':!![]}),exports[_0x259ade(0x301)]=void 0x0;const utils=__importStar(require(_0x259ade(0x273))),fs=__importStar(require('node:fs')),path=__importStar(require(_0x259ade(0x1f8))),https=__importStar(require(_0x259ade(0x1d5))),compatibility_1=require(_0x259ade(0x30f)),metrics_1=require(_0x259ade(0x2d4)),sorter_1=require(_0x259ade(0x1fc)),buffered_sort_1=require(_0x259ade(0x2af)),parser_1=require('./lib/parser'),market_plan_1=require(_0x259ade(0x264)),config_tools_1=require('./lib/config-tools'),statistics_1=require('./lib/statistics'),VERSION=_0x259ade(0x352),LIST_STABILITY_MS=0x7530,DEFAULT_CATEGORIES=[_0x259ade(0x31f),'Tee/Kaffee','Brot/Gebäck','Schokolade/Naschen',_0x259ade(0x234),'Wurst/Salate/Teigwaren',_0x259ade(0x31b),'Haushalt/Hygiene',_0x259ade(0x202),'Konserven',_0x259ade(0x265),_0x259ade(0x276),_0x259ade(0x279),_0x259ade(0x382),_0x259ade(0x36e)];class ShoppingRoute extends utils[_0x259ade(0x271)]{[_0x259ade(0x214)]=null;[_0x259ade(0x23d)]=null;[_0x259ade(0x2d5)]=new Set();[_0x259ade(0x20a)]='';['listChangedDuringSort']=![];[_0x259ade(0x37b)]=[];['runtimeReviews']=[];['productsDirty']=![];[_0x259ade(0x360)]=![];['routesDirty']=![];['runtimeRoutes']=[];[_0x259ade(0x2ce)]=![];['writeCapability']='unknown';[_0x259ade(0x355)]=_0x259ade(0x2d1);[_0x259ade(0x218)]=_0x259ade(0x24d);[_0x259ade(0x2e6)]=_0x259ade(0x24d);['lastCompatibilityTest']='Noch\x20nicht\x20ausgeführt.';[_0x259ade(0x26e)]=(0x0,metrics_1[_0x259ade(0x266)])();[_0x259ade(0x2b1)]=(0x0,statistics_1['emptyUsageStatistics'])();['knownActiveIds']=new Map();['activeCountByList']=new Map();['writeTimestamps']=[];[_0x259ade(0x30a)]='';[_0x259ade(0x357)]='';[_0x259ade(0x2b2)]='';constructor(_0x3ae77c={}){const _0x4986c0=_0x259ade;super({..._0x3ae77c,'name':_0x4986c0(0x2e0)}),this['on'](_0x4986c0(0x204),this[_0x4986c0(0x26d)]['bind'](this)),this['on'](_0x4986c0(0x35d),this[_0x4986c0(0x344)][_0x4986c0(0x375)](this)),this['on'](_0x4986c0(0x222),this[_0x4986c0(0x2a5)][_0x4986c0(0x375)](this)),this['on'](_0x4986c0(0x1ef),this[_0x4986c0(0x376)][_0x4986c0(0x375)](this));}get[_0x259ade(0x2a6)](){return this['config'];}get['alexaInstance'](){const _0x42c155=_0x259ade;return String(this['cfg'][_0x42c155(0x32c)]||_0x42c155(0x1e9))[_0x42c155(0x325)]()||'alexa2.0';}get[_0x259ade(0x206)](){const _0x5364e2=_0x259ade,_0x12ee3a=Array[_0x5364e2(0x2c6)](this['cfg']['lists'])?this['cfg'][_0x5364e2(0x281)][_0x5364e2(0x1f0)](_0x165f09=>_0x165f09&&_0x165f09['name']&&_0x165f09[_0x5364e2(0x203)]!==![]):[];if(_0x12ee3a['length']>0x0)return _0x12ee3a;return[{'name':String(this[_0x5364e2(0x2a6)]['listName']||'SHOP')['trim']()||'SHOP','enabled':!![],'priorityMarket':''}];}[_0x259ade(0x311)](_0xeccc5c){const _0x3d468d=_0x259ade;return this[_0x3d468d(0x32c)]+_0x3d468d(0x2cb)+_0xeccc5c+_0x3d468d(0x256);}get[_0x259ade(0x2fc)](){const _0x43b2cd=_0x259ade,_0x45df66=Array['isArray'](this['cfg']['markets'])?this[_0x43b2cd(0x2a6)][_0x43b2cd(0x2fc)]:[];return _0x45df66[_0x43b2cd(0x1f0)](_0x250060=>_0x250060&&_0x250060['name']&&_0x250060[_0x43b2cd(0x203)]!==![]);}get[_0x259ade(0x379)](){const _0x110978=_0x259ade;return this['runtimeRoutes'][_0x110978(0x233)]?this[_0x110978(0x33b)]:Array[_0x110978(0x2c6)](this['cfg'][_0x110978(0x379)])?this[_0x110978(0x2a6)][_0x110978(0x379)][_0x110978(0x1f0)](Boolean):[];}get[_0x259ade(0x2f0)](){const _0x207f50=_0x259ade,_0x37ae1c=Array[_0x207f50(0x2c6)](this['cfg'][_0x207f50(0x2f0)])?this[_0x207f50(0x2a6)][_0x207f50(0x2f0)]:[],_0x36e5c5=_0x37ae1c[_0x207f50(0x233)]>0x0?_0x37ae1c:DEFAULT_CATEGORIES['map'](_0x42bcd9=>({'name':_0x42bcd9})),_0xabb875=new Set(),_0x43d23a=[];for(const _0x38fc47 of _0x36e5c5){const _0x549b2a=String(_0x38fc47?.['name']||'')[_0x207f50(0x325)](),_0x327b74=_0x549b2a['toLocaleLowerCase']('de');if(!_0x549b2a||_0xabb875['has'](_0x327b74))continue;_0xabb875[_0x207f50(0x327)](_0x327b74),_0x43d23a[_0x207f50(0x291)]({'name':_0x549b2a});}return _0x43d23a['sort']((_0x38ba56,_0x4c2cf9)=>_0x38ba56[_0x207f50(0x1fa)][_0x207f50(0x24b)](_0x4c2cf9[_0x207f50(0x1fa)],'de',{'sensitivity':_0x207f50(0x33c)}));}get[_0x259ade(0x21f)](){const _0x20bffa=_0x259ade;return this[_0x20bffa(0x37b)][_0x20bffa(0x1f0)](_0x7fd902=>_0x7fd902&&_0x7fd902[_0x20bffa(0x1fa)]);}get[_0x259ade(0x1fb)](){const _0x35a29f=_0x259ade;return String(this[_0x35a29f(0x2a6)][_0x35a29f(0x1fb)]||_0x35a29f(0x2a1))[_0x35a29f(0x325)]()||_0x35a29f(0x2a1);}get[_0x259ade(0x2f6)](){return String(this['cfg']['priorityMarket']||'')['trim']();}[_0x259ade(0x356)](_0x5e6361){const _0x218c52=_0x259ade;if(this['temporaryPriorityMarket'])return this[_0x218c52(0x30a)];const _0x48c464=this[_0x218c52(0x206)][_0x218c52(0x22e)](_0x47bd9a=>_0x47bd9a[_0x218c52(0x1fa)]===_0x5e6361);return String(_0x48c464?.[_0x218c52(0x2f6)]||this[_0x218c52(0x2f6)]||'')[_0x218c52(0x325)]();}get[_0x259ade(0x2b6)](){const _0x2f3d37=_0x259ade,_0x3b0117=String(this[_0x2f3d37(0x2a6)]['learningMode']||'')['trim']();if(_0x3b0117===_0x2f3d37(0x25f)||_0x3b0117===_0x2f3d37(0x366)||_0x3b0117==='off')return _0x3b0117;return this[_0x2f3d37(0x2a6)][_0x2f3d37(0x2c5)]===![]?_0x2f3d37(0x1db):'automatic';}get['debounceMs'](){const _0x501a2e=_0x259ade;return Math[_0x501a2e(0x2f5)](0xfa,Number(this[_0x501a2e(0x2a6)]['debounceMs'])||0x1388);}get[_0x259ade(0x255)](){const _0x10e01a=_0x259ade;return Math[_0x10e01a(0x2f5)](this[_0x10e01a(0x21e)],LIST_STABILITY_MS);}get[_0x259ade(0x2e7)](){const _0x31f2f3=_0x259ade;return Math['max'](0xfa,Number(this[_0x31f2f3(0x2a6)][_0x31f2f3(0x2e7)])||0x3e8);}get[_0x259ade(0x28f)](){const _0x3ba503=_0x259ade;return this[_0x3ba503(0x2a6)]['dryRun']!==![];}get[_0x259ade(0x37e)](){return this['cfg']['apiSafeMode']!==![];}get[_0x259ade(0x2db)](){const _0x35ea32=_0x259ade;return Math[_0x35ea32(0x2f5)](0x1,Number(this['cfg']['maxWritesPerMinute'])||0x14);}get[_0x259ade(0x1e4)](){const _0x5e6ac1=_0x259ade;return Math['max'](0x1,Number(this[_0x5e6ac1(0x2a6)][_0x5e6ac1(0x1e4)])||0xa);}get[_0x259ade(0x210)](){const _0x57c0e9=_0x259ade;return Math[_0x57c0e9(0x2f5)](0x0,Number(this[_0x57c0e9(0x2a6)][_0x57c0e9(0x210)])||0x1388);}get[_0x259ade(0x219)](){const _0x435950=_0x259ade;return Math['max'](0x0,Math[_0x435950(0x2aa)](0x5,Number(this[_0x435950(0x2a6)]['maxWriteRetries'])||0x2));}get[_0x259ade(0x31a)](){const _0x83682a=_0x259ade;return Math[_0x83682a(0x2f5)](0xfa,Number(this[_0x83682a(0x2a6)][_0x83682a(0x31a)])||0x5dc);}get[_0x259ade(0x20d)](){const _0x114900=_0x259ade;return this[_0x114900(0x2a6)][_0x114900(0x251)]===!![];}get['minimumItemsPerMarket'](){const _0x38e4bc=_0x259ade;return Math[_0x38e4bc(0x2f5)](0x1,Math['floor'](Number(this[_0x38e4bc(0x2a6)][_0x38e4bc(0x2eb)])||0x1));}async[_0x259ade(0x26d)](){const _0x2618fc=_0x259ade;this[_0x2618fc(0x37b)]=(Array['isArray'](this[_0x2618fc(0x2a6)][_0x2618fc(0x21f)])?this[_0x2618fc(0x2a6)][_0x2618fc(0x21f)]:[])[_0x2618fc(0x1f0)](_0x272d04=>_0x272d04&&_0x272d04[_0x2618fc(0x1fa)])[_0x2618fc(0x2f1)](_0x585a42=>({..._0x585a42}))[_0x2618fc(0x27f)]((_0x265d23,_0x279462)=>_0x265d23[_0x2618fc(0x1fa)][_0x2618fc(0x24b)](_0x279462[_0x2618fc(0x1fa)],'de',{'sensitivity':_0x2618fc(0x33c)})),this[_0x2618fc(0x384)]=(Array[_0x2618fc(0x2c6)](this['cfg'][_0x2618fc(0x263)])?this[_0x2618fc(0x2a6)]['reviewItems']:[])['map'](_0x435e84=>({..._0x435e84})),this['runtimeRoutes']=(0x0,config_tools_1[_0x2618fc(0x1eb)])(Array[_0x2618fc(0x2c6)](this['cfg']['routes'])?this[_0x2618fc(0x2a6)][_0x2618fc(0x379)]['filter'](Boolean):[]),this[_0x2618fc(0x314)]=JSON[_0x2618fc(0x247)](this[_0x2618fc(0x33b)])!==JSON['stringify'](Array[_0x2618fc(0x2c6)](this[_0x2618fc(0x2a6)]['routes'])?this['cfg'][_0x2618fc(0x379)]:[]),await this[_0x2618fc(0x371)](),await this[_0x2618fc(0x317)]();const _0x43bf1c=(0x0,sorter_1['applyReviewActions'])(this[_0x2618fc(0x37b)],this[_0x2618fc(0x384)]);_0x43bf1c[_0x2618fc(0x351)]['length']&&(this['runtimeProducts']=_0x43bf1c[_0x2618fc(0x21f)],this['runtimeReviews']=_0x43bf1c[_0x2618fc(0x32a)],this['productsDirty']=!![],this[_0x2618fc(0x360)]=!![],this[_0x2618fc(0x2b1)]['reviewAccepted']+=_0x43bf1c[_0x2618fc(0x351)][_0x2618fc(0x233)],await this['persistStatistics'](),this[_0x2618fc(0x267)][_0x2618fc(0x261)]('Aus\x20der\x20Prüfliste\x20übernommen:\x20'+_0x43bf1c[_0x2618fc(0x351)][_0x2618fc(0x2f1)](_0x38e68f=>'„'+_0x38e68f[_0x2618fc(0x1fa)]+'“')[_0x2618fc(0x22b)](',\x20')+'.'));await this[_0x2618fc(0x275)](),this['ensureRoutesForMarketsAndGroups'](),await this[_0x2618fc(0x2be)](),await this['persistRuntimeConfig'](),await this['setStateAsync'](_0x2618fc(0x295),![],!![]),await this[_0x2618fc(0x37d)]('info.lastError','',!![]),await this['setStateAsync']('info.versionInstalled',VERSION,!![]),await this['setStateAsync']('control.sortNow',![],!![]),await this[_0x2618fc(0x37d)](_0x2618fc(0x2e8),![],!![]),await this['setStateAsync']('control.resetTrafficStats',![],!![]),await this['setStateAsync'](_0x2618fc(0x2c0),![],!![]),await this[_0x2618fc(0x37d)](_0x2618fc(0x1cb),![],!![]),await this['setStateAsync']('control.refreshFeedbackReport',![],!![]),await this['setStateAsync'](_0x2618fc(0x1e7),![],!![]);const _0x2ad22b=await this[_0x2618fc(0x258)]('control.enabled');if(!_0x2ad22b)await this[_0x2618fc(0x37d)](_0x2618fc(0x312),!![],!![]);const _0x523a9f=await this['getStateAsync'](_0x2618fc(0x24f)),_0x3456f7=String(_0x523a9f?.['val']??this[_0x2618fc(0x2a6)][_0x2618fc(0x30a)]??'')['trim']();this[_0x2618fc(0x30a)]=_0x3456f7==='__none__'?'':_0x3456f7,await this['setStateAsync'](_0x2618fc(0x24f),this[_0x2618fc(0x30a)]||'__none__',!![]),this[_0x2618fc(0x1ed)](_0x2618fc(0x2b9));for(const _0x272e1a of this[_0x2618fc(0x206)])this[_0x2618fc(0x2b5)](this[_0x2618fc(0x311)](_0x272e1a[_0x2618fc(0x1fa)]));let _0x8b99f3=![];for(const _0x2ba39c of this[_0x2618fc(0x206)]){const _0x52186f=await this['getForeignStateAsync'](this['listStateId'](_0x2ba39c[_0x2618fc(0x1fa)]));if(!_0x52186f||typeof _0x52186f['val']!==_0x2618fc(0x364)){this[_0x2618fc(0x267)][_0x2618fc(0x342)]('Alexa-Liste\x20nicht\x20gefunden:\x20'+this['listStateId'](_0x2ba39c[_0x2618fc(0x1fa)]));continue;}_0x8b99f3=!![];try{const _0x2788a7=JSON[_0x2618fc(0x322)](_0x52186f[_0x2618fc(0x350)]),_0x34d31f=Array['isArray'](_0x2788a7)?_0x2788a7:[],_0x5c2901=(0x0,sorter_1['activeItems'])(_0x34d31f),_0x27b320=(0x0,market_plan_1['realActiveItems'])(_0x34d31f,this[_0x2618fc(0x2fc)]);this[_0x2618fc(0x287)][_0x2618fc(0x349)](_0x2ba39c[_0x2618fc(0x1fa)],new Set(_0x5c2901[_0x2618fc(0x2f1)](_0x5386e9=>String(_0x5386e9['id'])))),this['activeCountByList'][_0x2618fc(0x349)](_0x2ba39c['name'],_0x27b320[_0x2618fc(0x233)]);}catch{this['knownActiveIds']['set'](_0x2ba39c[_0x2618fc(0x1fa)],new Set());}}await this['setStateAsync'](_0x2618fc(0x295),_0x8b99f3,!![]),await this['updateActiveItemCount']();if(!_0x8b99f3){await this[_0x2618fc(0x241)](_0x2618fc(0x1f2)+this[_0x2618fc(0x206)]['map'](_0x1c20be=>_0x1c20be[_0x2618fc(0x1fa)])['join'](',\x20'));return;}await this['runStartupCompatibilityCheck'](),await this[_0x2618fc(0x2bd)](),await this[_0x2618fc(0x1f1)](),await this[_0x2618fc(0x37c)](),await this['updateFeedbackReport'](),this[_0x2618fc(0x23d)]=this[_0x2618fc(0x254)](()=>void this['checkNpmVersion'](),0x6*0x3c*0x3c*0x3e8),this[_0x2618fc(0x267)][_0x2618fc(0x342)](_0x2618fc(0x244)+VERSION+_0x2618fc(0x25b)),this[_0x2618fc(0x267)]['info']('Listen:\x20'+this[_0x2618fc(0x206)]['map'](_0x525ffe=>_0x525ffe['name'])[_0x2618fc(0x22b)](',\x20')+_0x2618fc(0x224)+this[_0x2618fc(0x2b6)]+'.'),this['log']['info']('WICHTIG:\x20Die\x20Alexa-App\x20muss\x20für\x20jede\x20verwaltete\x20Liste\x20auf\x20„Älteste\x20bis\x20neueste“\x20gestellt\x20sein.'),this[_0x2618fc(0x267)][_0x2618fc(0x261)](_0x2618fc(0x22f)),this['scheduleAll'](this['sortStabilityDelayMs']);}async[_0x259ade(0x213)](_0x5dc3c6=this['alexaInstance']){const _0x5c7c60=_0x259ade,_0x2e8d3f=String(_0x5dc3c6||this[_0x5c7c60(0x32c)])[_0x5c7c60(0x325)]()||this['alexaInstance'],_0x1a2cb9=_0x2e8d3f+_0x5c7c60(0x2cb),_0xe60573='.json',_0x18ac6e=new Set();try{const _0x622754=await this['getForeignObjectsAsync'](_0x2e8d3f+_0x5c7c60(0x1de),'state');for(const _0x22d28f of Object['keys'](_0x622754||{})){if(!_0x22d28f[_0x5c7c60(0x35c)](_0x1a2cb9)||!_0x22d28f[_0x5c7c60(0x2d6)](_0xe60573))continue;const _0x5a0a69=_0x22d28f[_0x5c7c60(0x2e2)](_0x1a2cb9[_0x5c7c60(0x233)],-_0xe60573[_0x5c7c60(0x233)])['trim']();if(_0x5a0a69&&!_0x5a0a69[_0x5c7c60(0x27b)]('.'))_0x18ac6e['add'](_0x5a0a69);}}catch(_0x3b7769){this['log']['debug'](_0x5c7c60(0x315)+_0x2e8d3f+_0x5c7c60(0x30e)+String(_0x3b7769));}for(const _0x1a20e8 of this['listConfigs'])if(_0x1a20e8[_0x5c7c60(0x1fa)])_0x18ac6e[_0x5c7c60(0x327)](String(_0x1a20e8[_0x5c7c60(0x1fa)])[_0x5c7c60(0x325)]());return[..._0x18ac6e]['filter'](Boolean)[_0x5c7c60(0x27f)]((_0x1d8673,_0x128ecf)=>_0x1d8673['localeCompare'](_0x128ecf,'de',{'sensitivity':_0x5c7c60(0x33c)}));}async[_0x259ade(0x2a5)](_0x56d273){const _0x2363e8=_0x259ade;if(!_0x56d273||!_0x56d273[_0x2363e8(0x2c2)])return;if(_0x56d273[_0x2363e8(0x1f4)]===_0x2363e8(0x1f5)){const _0x3f47bb=_0x56d273['message']?.['native']&&typeof _0x56d273['message']['native']===_0x2363e8(0x231)?{..._0x56d273[_0x2363e8(0x222)]['native']}:{...this['cfg']},_0x3c8a13=Array[_0x2363e8(0x2c6)](_0x3f47bb[_0x2363e8(0x263)])?_0x3f47bb['reviewItems']:this['runtimeReviews'];_0x3f47bb[_0x2363e8(0x263)]=_0x3c8a13[_0x2363e8(0x2f1)](_0x444ede=>({..._0x444ede,'availableMarkets':Array[_0x2363e8(0x2c6)](_0x444ede?.[_0x2363e8(0x1f7)])?_0x444ede[_0x2363e8(0x1f7)][_0x2363e8(0x2f1)](_0x12eb54=>typeof _0x12eb54===_0x2363e8(0x364)?_0x12eb54[_0x2363e8(0x325)]():'')[_0x2363e8(0x1f0)](Boolean)['join'](','):String(_0x444ede?.['availableMarkets']||''),'action':'accept'})),this[_0x2363e8(0x220)](_0x56d273[_0x2363e8(0x257)],_0x56d273[_0x2363e8(0x1f4)],{'command':{'command':_0x2363e8(0x2dd),'data':_0x3f47bb,'fullRefresh':!![]}},_0x56d273['callback']);return;}if(_0x56d273['command']===_0x2363e8(0x1e0)){const _0x3fef68=_0x56d273['message']?.[_0x2363e8(0x2ef)],_0x3c0c24=Array['isArray'](_0x3fef68)?_0x3fef68:String(_0x3fef68||'')['split'](/[;,]/),_0x178fc1=[],_0x20962b=new Set();for(const _0x49abe2 of _0x3c0c24){if(typeof _0x49abe2!=='string')continue;const _0x449b46=_0x49abe2[_0x2363e8(0x325)](),_0x4dbb0f=_0x449b46['toLocaleLowerCase']('de');if(!_0x449b46||_0x20962b[_0x2363e8(0x2b8)](_0x4dbb0f))continue;_0x20962b[_0x2363e8(0x327)](_0x4dbb0f),_0x178fc1['push'](_0x449b46);}this['sendTo'](_0x56d273[_0x2363e8(0x257)],_0x56d273[_0x2363e8(0x1f4)],_0x178fc1,_0x56d273['callback']);return;}if(_0x56d273['command']===_0x2363e8(0x2fe)){this['sendTo'](_0x56d273['from'],_0x56d273['command'],{'openUrl':_0x2363e8(0x211)+encodeURIComponent(this['namespace']),'window':_0x2363e8(0x290)},_0x56d273['callback']);return;}if(_0x56d273[_0x2363e8(0x1f4)]===_0x2363e8(0x1f6)){const _0x7edc29=Array[_0x2363e8(0x2c6)](_0x56d273['message']?.[_0x2363e8(0x2f0)])?_0x56d273['message'][_0x2363e8(0x2f0)][_0x2363e8(0x2f1)](_0x15ca17=>({'name':String(_0x15ca17?.['name']||'')['trim']()}))[_0x2363e8(0x1f0)](_0x51cbbc=>Boolean(_0x51cbbc['name'])):this[_0x2363e8(0x2f0)],_0x24cc5f=_0x7edc29[_0x2363e8(0x2f1)](_0x4846e7=>({'value':_0x4846e7[_0x2363e8(0x1fa)],'label':_0x4846e7['name']}))['sort']((_0x3ca26e,_0x1f20dd)=>_0x3ca26e[_0x2363e8(0x319)][_0x2363e8(0x24b)](_0x1f20dd['label'],'de',{'sensitivity':'base'}));this['sendTo'](_0x56d273['from'],_0x56d273['command'],_0x24cc5f,_0x56d273[_0x2363e8(0x2c2)]);return;}if(_0x56d273[_0x2363e8(0x1f4)]==='getMarkets'||_0x56d273['command']===_0x2363e8(0x1cf)||_0x56d273['command']==='getActiveMarkets'){const _0x43b254=Array[_0x2363e8(0x2c6)](_0x56d273[_0x2363e8(0x222)]?.['markets'])?_0x56d273[_0x2363e8(0x222)][_0x2363e8(0x2fc)][_0x2363e8(0x2f1)](_0x1b2cf4=>({'name':String(_0x1b2cf4?.['name']||'')[_0x2363e8(0x325)](),'enabled':_0x1b2cf4?.[_0x2363e8(0x203)]!==![]}))[_0x2363e8(0x1f0)](_0x3f026f=>Boolean(_0x3f026f[_0x2363e8(0x1fa)])):this[_0x2363e8(0x2fc)],_0x13a96d=_0x56d273[_0x2363e8(0x1f4)]===_0x2363e8(0x1d3)?_0x43b254['filter'](_0x5ddd84=>_0x5ddd84[_0x2363e8(0x203)]!==![]):_0x43b254,_0x2ec5e7=_0x13a96d[_0x2363e8(0x2f1)](_0x4d45a6=>({'value':_0x4d45a6[_0x2363e8(0x1fa)],'label':_0x4d45a6['name']}))[_0x2363e8(0x27f)]((_0x2f4088,_0x143c5f)=>_0x2f4088[_0x2363e8(0x319)][_0x2363e8(0x24b)](_0x143c5f['label'],'de',{'sensitivity':'base'}));if(_0x56d273['command']==='getMarketsOptional')_0x2ec5e7[_0x2363e8(0x2e1)]({'value':'','label':'—'});this[_0x2363e8(0x220)](_0x56d273[_0x2363e8(0x257)],_0x56d273[_0x2363e8(0x1f4)],_0x2ec5e7,_0x56d273[_0x2363e8(0x2c2)]);return;}if(_0x56d273['command']===_0x2363e8(0x27d)||_0x56d273['command']==='getLists'){const _0x1fafb7=String(_0x56d273[_0x2363e8(0x222)]?.['alexaInstance']||this['alexaInstance'])[_0x2363e8(0x325)]()||this[_0x2363e8(0x32c)],_0x31b8d8=await this[_0x2363e8(0x213)](_0x1fafb7),_0x5c5d97=_0x31b8d8[_0x2363e8(0x2f1)](_0x28933e=>({'value':_0x28933e,'label':_0x28933e}));this['sendTo'](_0x56d273['from'],_0x56d273[_0x2363e8(0x1f4)],_0x5c5d97,_0x56d273['callback']);}}async[_0x259ade(0x344)](_0x2bc557,_0x15dc8d){const _0x1f216c=_0x259ade;if(!_0x15dc8d)return;const _0xfb2353=this['namespace']+'.';if(_0x2bc557===_0xfb2353+_0x1f216c(0x1df)&&!_0x15dc8d['ack']&&_0x15dc8d[_0x1f216c(0x350)]===!![]){await this[_0x1f216c(0x37d)](_0x1f216c(0x1df),![],!![]),this['scheduleAll'](this[_0x1f216c(0x255)]);return;}if(_0x2bc557===_0xfb2353+_0x1f216c(0x2e8)&&!_0x15dc8d['ack']&&_0x15dc8d[_0x1f216c(0x350)]===!![]){await this[_0x1f216c(0x37d)]('control.compatibilityTest',![],!![]),await this[_0x1f216c(0x28e)]();return;}if(_0x2bc557===_0xfb2353+_0x1f216c(0x304)&&!_0x15dc8d['ack']&&_0x15dc8d[_0x1f216c(0x350)]===!![]){await this[_0x1f216c(0x37d)]('control.resetTrafficStats',![],!![]),this[_0x1f216c(0x26e)]=(0x0,metrics_1[_0x1f216c(0x266)])(),await this['persistTrafficMetrics']();return;}if(_0x2bc557===_0xfb2353+_0x1f216c(0x2c0)&&!_0x15dc8d[_0x1f216c(0x30c)]&&_0x15dc8d[_0x1f216c(0x350)]===!![]){await this[_0x1f216c(0x37d)]('control.resetStatistics',![],!![]),this['statistics']=(0x0,statistics_1[_0x1f216c(0x23a)])(),await this[_0x1f216c(0x2ab)]();return;}if(_0x2bc557===_0xfb2353+_0x1f216c(0x1cb)&&!_0x15dc8d['ack']&&_0x15dc8d[_0x1f216c(0x350)]===!![]){await this['setStateAsync'](_0x1f216c(0x1cb),![],!![]),await this[_0x1f216c(0x1f1)]();return;}if(_0x2bc557===_0xfb2353+'control.refreshFeedbackReport'&&!_0x15dc8d['ack']&&_0x15dc8d[_0x1f216c(0x350)]===!![]){await this[_0x1f216c(0x37d)](_0x1f216c(0x2ae),![],!![]),await this[_0x1f216c(0x2ed)]();return;}if(_0x2bc557===_0xfb2353+_0x1f216c(0x1e7)&&!_0x15dc8d['ack']&&_0x15dc8d['val']===!![]){await this[_0x1f216c(0x37d)]('control.clearTemporaryPriorityMarket',![],!![]),this[_0x1f216c(0x30a)]='',await this[_0x1f216c(0x37d)]('control.temporaryPriorityMarket',_0x1f216c(0x305),!![]),this[_0x1f216c(0x2a2)](this[_0x1f216c(0x255)]);return;}if(_0x2bc557===_0xfb2353+_0x1f216c(0x24f)&&!_0x15dc8d[_0x1f216c(0x30c)]){const _0x4d833a=typeof _0x15dc8d['val']===_0x1f216c(0x364)?_0x15dc8d[_0x1f216c(0x350)]['trim']():'';this[_0x1f216c(0x30a)]=_0x4d833a==='__none__'?'':_0x4d833a,await this['setStateAsync']('control.temporaryPriorityMarket',this[_0x1f216c(0x30a)]||'__none__',!![]),this[_0x1f216c(0x2a2)](this['sortStabilityDelayMs']);return;}if(_0x2bc557===_0xfb2353+_0x1f216c(0x246)&&!_0x15dc8d['ack']&&typeof _0x15dc8d[_0x1f216c(0x350)]==='string'&&_0x15dc8d['val'][_0x1f216c(0x325)]()){try{const _0x164072=(0x0,config_tools_1[_0x1f216c(0x223)])(_0x15dc8d[_0x1f216c(0x350)]);await this[_0x1f216c(0x37d)](_0x1f216c(0x246),'',!![]),await this[_0x1f216c(0x1d2)](_0x164072),this['log'][_0x1f216c(0x261)]('ShoppingRoute-Konfiguration\x20importiert;\x20Instanz\x20wird\x20durch\x20ioBroker\x20neu\x20gestartet.');}catch(_0x17ae3f){await this['setStateAsync']('control.importConfigJson','',!![]),await this[_0x1f216c(0x241)]('Konfigurationsimport\x20fehlgeschlagen:\x20'+(_0x17ae3f instanceof Error?_0x17ae3f['message']:String(_0x17ae3f)));}return;}if(_0x2bc557===_0xfb2353+_0x1f216c(0x29d)&&!_0x15dc8d['ack']&&typeof _0x15dc8d['val']===_0x1f216c(0x364)&&_0x15dc8d[_0x1f216c(0x350)]['trim']()){try{const _0x412ab1=(0x0,config_tools_1['importMarketProfile'])(_0x15dc8d[_0x1f216c(0x350)],this[_0x1f216c(0x2fc)],this['routes']);await this['setStateAsync'](_0x1f216c(0x29d),'',!![]),await this[_0x1f216c(0x1d2)]({'markets':_0x412ab1[_0x1f216c(0x2fc)],'routes':_0x412ab1['routes']}),this['log'][_0x1f216c(0x261)]('Marktprofil\x20„'+_0x412ab1[_0x1f216c(0x339)]+_0x1f216c(0x253));}catch(_0x4e6869){await this[_0x1f216c(0x37d)](_0x1f216c(0x29d),'',!![]),await this[_0x1f216c(0x241)](_0x1f216c(0x250)+(_0x4e6869 instanceof Error?_0x4e6869[_0x1f216c(0x222)]:String(_0x4e6869)));}return;}if(_0x2bc557===_0xfb2353+'control.enabled'&&!_0x15dc8d[_0x1f216c(0x30c)]){await this[_0x1f216c(0x37d)](_0x1f216c(0x312),Boolean(_0x15dc8d[_0x1f216c(0x350)]),!![]);if(_0x15dc8d['val']===!![])this['scheduleAll'](this['sortStabilityDelayMs']);return;}const _0x25327b=this['listConfigs']['find'](_0x52573e=>_0x2bc557===this['listStateId'](_0x52573e[_0x1f216c(0x1fa)]));if(_0x25327b){await this['setStateAsync']('info.connection',!![],!![]);if(this[_0x1f216c(0x2ce)])return;if(this[_0x1f216c(0x20a)]===_0x25327b['name'])this['listChangedDuringSort']=!![];this['scheduleSort'](_0x25327b['name'],this['sortStabilityDelayMs']);}}[_0x259ade(0x376)](_0x3eeb6e){const _0xf73c95=_0x259ade;if(this[_0xf73c95(0x214)])this['clearTimeout'](this[_0xf73c95(0x214)]);if(this['versionTimer'])this[_0xf73c95(0x30d)](this[_0xf73c95(0x23d)]);void this[_0xf73c95(0x37d)]('info.connection',![],!![])[_0xf73c95(0x2bf)](()=>undefined)['finally'](_0x3eeb6e);}[_0x259ade(0x2a2)](_0x45bdd5){const _0x1f3a3a=_0x259ade;for(const _0x52539f of this[_0x1f3a3a(0x206)])this['pendingLists'][_0x1f3a3a(0x327)](_0x52539f[_0x1f3a3a(0x1fa)]);this[_0x1f3a3a(0x226)](_0x45bdd5);}[_0x259ade(0x373)](_0x37594c,_0x50744d){const _0x254739=_0x259ade;this['pendingLists'][_0x254739(0x327)](_0x37594c),this[_0x254739(0x226)](_0x50744d);}[_0x259ade(0x226)](_0x408e42){const _0x3a4296=_0x259ade;if(this[_0x3a4296(0x214)])this['clearTimeout'](this[_0x3a4296(0x214)]);this[_0x3a4296(0x214)]=this[_0x3a4296(0x378)](()=>{const _0x625422=_0x3a4296;this[_0x625422(0x214)]=null,void this['processPendingSorts']();},_0x408e42);}async[_0x259ade(0x362)](){const _0x28f695=_0x259ade;if(this[_0x28f695(0x20a)])return;while(this[_0x28f695(0x2d5)]['size']>0x0){const _0x319bed=this[_0x28f695(0x2d5)][_0x28f695(0x274)]()[_0x28f695(0x32e)]()[_0x28f695(0x2ef)];if(!_0x319bed)break;this[_0x28f695(0x2d5)][_0x28f695(0x21a)](_0x319bed),await this['sortList'](_0x319bed);}}async['isEnabled'](){const _0x36b386=_0x259ade,_0x17270f=await this['getStateAsync'](_0x36b386(0x312));return!_0x17270f||_0x17270f[_0x36b386(0x350)]!==![];}async['readList'](_0x5f1a3b){const _0x4301aa=_0x259ade,_0xe4c9eb=this[_0x4301aa(0x311)](_0x5f1a3b),_0x135f28=await this[_0x4301aa(0x24a)](_0xe4c9eb);if(!_0x135f28||typeof _0x135f28[_0x4301aa(0x350)]!=='string'||!_0x135f28['val']['trim']())throw new Error(_0x4301aa(0x1e6)+_0xe4c9eb+_0x4301aa(0x1cd));const _0x81328b=JSON[_0x4301aa(0x322)](_0x135f28['val']);if(!Array['isArray'](_0x81328b))throw new Error(_0xe4c9eb+'\x20enthält\x20kein\x20JSON-Array.');return _0x81328b;}async['sortList'](_0x5381d9){const _0x4e0294=_0x259ade;if(this[_0x4e0294(0x20a)]){this[_0x4e0294(0x2d5)][_0x4e0294(0x327)](_0x5381d9);return;}if(!await this[_0x4e0294(0x27e)]())return;this[_0x4e0294(0x20a)]=_0x5381d9,this[_0x4e0294(0x370)]=![],await this[_0x4e0294(0x26b)](),this['traffic']['localChecks']+=0x1,await this['persistTrafficMetrics']();try{const _0x231744=await this['readList'](_0x5381d9),_0x1e0ad8=(0x0,sorter_1[_0x4e0294(0x239)])(_0x231744),_0x439f03=(0x0,market_plan_1[_0x4e0294(0x284)])(_0x231744,this[_0x4e0294(0x2fc)]);this[_0x4e0294(0x32d)]['set'](_0x5381d9,_0x439f03[_0x4e0294(0x233)]),await this[_0x4e0294(0x35a)](),await this[_0x4e0294(0x212)](_0x5381d9,_0x231744);const _0x1a18fd=this[_0x4e0294(0x356)](_0x5381d9);let _0x1d5f3f=(0x0,sorter_1['collectUnknownItems'])(_0x231744,this['markets'],this[_0x4e0294(0x21f)],this['fallbackMarket'],_0x1a18fd);if(this[_0x4e0294(0x2b6)]==='automatic'){const _0x287a8b=(0x0,sorter_1[_0x4e0294(0x359)])(_0x231744,this['markets'],this[_0x4e0294(0x21f)],this[_0x4e0294(0x1fb)],_0x1a18fd);_0x287a8b['learned']['length']>0x0&&(this[_0x4e0294(0x37b)]=_0x287a8b[_0x4e0294(0x21f)],this[_0x4e0294(0x34d)]=!![],this[_0x4e0294(0x2b1)][_0x4e0294(0x328)]+=_0x287a8b[_0x4e0294(0x331)]['length'],await this[_0x4e0294(0x2ab)](),await this[_0x4e0294(0x37d)](_0x4e0294(0x2e5),JSON[_0x4e0294(0x247)](_0x287a8b[_0x4e0294(0x331)],null,0x2),!![]),this[_0x4e0294(0x267)]['info'](_0x4e0294(0x29a)+_0x287a8b[_0x4e0294(0x331)][_0x4e0294(0x2f1)](_0x359cce=>'„'+_0x359cce[_0x4e0294(0x1fa)]+'“')[_0x4e0294(0x22b)](',\x20')+'.'),_0x1d5f3f=(0x0,sorter_1['collectUnknownItems'])(_0x231744,this['markets'],this[_0x4e0294(0x21f)],this[_0x4e0294(0x1fb)],_0x1a18fd));}else{if(this[_0x4e0294(0x2b6)]==='review'){const _0x2a5b0b=JSON[_0x4e0294(0x247)](this[_0x4e0294(0x384)]);this[_0x4e0294(0x384)]=(0x0,sorter_1[_0x4e0294(0x2a7)])(this[_0x4e0294(0x384)],_0x1d5f3f);if(JSON[_0x4e0294(0x247)](this[_0x4e0294(0x384)])!==_0x2a5b0b)this['reviewsDirty']=!![];}}await this['setStateAsync'](_0x4e0294(0x2ba),JSON[_0x4e0294(0x247)]({'listName':_0x5381d9,'items':_0x1d5f3f},null,0x2),!![]),await this[_0x4e0294(0x37d)]('info.reviewQueue',JSON[_0x4e0294(0x247)](this['runtimeReviews'],null,0x2),!![]),await this[_0x4e0294(0x237)](_0x231744);const _0x1e7c81=(0x0,market_plan_1[_0x4e0294(0x36b)])(_0x439f03,this[_0x4e0294(0x2fc)],this[_0x4e0294(0x21f)],this['fallbackMarket'],_0x1a18fd,this[_0x4e0294(0x2f2)]),_0x4a6f4c=(0x0,market_plan_1['planMarketHeaderAction'])(_0x231744,_0x1e7c81,this[_0x4e0294(0x2fc)],this[_0x4e0294(0x1fb)],this[_0x4e0294(0x20d)]);if(_0x4a6f4c){await this['setStateAsync'](_0x4e0294(0x1f3),JSON[_0x4e0294(0x247)]({'listName':_0x5381d9,'requiredMarkets':_0x1e7c81,'headerAction':_0x4a6f4c},null,0x2),!![]);if(this[_0x4e0294(0x28f)]){await this[_0x4e0294(0x37d)]('info.lastSort',new Date()['toISOString']()+_0x4e0294(0x24e)+_0x5381d9+'\x20Dry-Run:\x20Marktüberschrift-Aktion\x20'+_0x4a6f4c[_0x4e0294(0x25c)]+_0x4e0294(0x22a)+_0x4a6f4c[_0x4e0294(0x339)]+_0x4e0294(0x35b),!![]),await this['setStateAsync'](_0x4e0294(0x2d9),'',!![]);return;}if(!(0x0,compatibility_1['canWriteAlexa'])(this[_0x4e0294(0x35f)])){const _0x406cd9=this['writeCapability']===_0x4e0294(0x25a)?_0x4e0294(0x29f):this[_0x4e0294(0x35f)]===_0x4e0294(0x2a9)?_0x4e0294(0x297):'Alexa-Schreibzugriffe\x20blockiert:\x20Schreibkompatibilität\x20noch\x20nicht\x20bestätigt;\x20control.compatibilityTest\x20ausführen.';await this[_0x4e0294(0x37d)](_0x4e0294(0x2d9),_0x406cd9,!![]),this['log']['error'](_0x406cd9);return;}await this[_0x4e0294(0x307)](_0x5381d9,_0x4a6f4c),await this['setStateAsync'](_0x4e0294(0x292),new Date()['toISOString']()+'\x20–\x20'+_0x5381d9+':\x20Marktüberschrift\x20'+_0x4a6f4c[_0x4e0294(0x339)]+_0x4e0294(0x227),!![]),await this[_0x4e0294(0x37d)]('info.lastError','',!![]);return;}const _0x41dfff=(0x0,sorter_1[_0x4e0294(0x205)])(_0x231744,this['markets'],this[_0x4e0294(0x379)],this[_0x4e0294(0x21f)],this[_0x4e0294(0x1fb)],_0x1a18fd,this[_0x4e0294(0x2f2)],this[_0x4e0294(0x20d)]);await this['setStateAsync'](_0x4e0294(0x1f3),JSON['stringify']({'listName':_0x5381d9,'plan':_0x41dfff},null,0x2),!![]),await this['setStateAsync'](_0x4e0294(0x316),JSON[_0x4e0294(0x247)]({'listName':_0x5381d9,'changes':_0x41dfff[_0x4e0294(0x1f0)](_0x2ddc7b=>_0x2ddc7b['changed']),'plan':_0x41dfff},null,0x2),!![]),await this['setStateAsync'](_0x4e0294(0x1ce),(0x0,sorter_1['makePreviewText'])(_0x5381d9,_0x41dfff),!![]);const _0x2a5a1a=_0x41dfff[_0x4e0294(0x1f0)](_0x3fa9dd=>_0x3fa9dd[_0x4e0294(0x2fa)]),_0x1e4849=new Date()[_0x4e0294(0x36d)]();_0x2a5a1a['length']>0x0&&(this['traffic'][_0x4e0294(0x2f8)]+=_0x2a5a1a['length'],await this['persistTrafficMetrics']());if(_0x2a5a1a[_0x4e0294(0x233)]===0x0){const _0x28506d=this[_0x4e0294(0x208)](_0x231744,_0x41dfff);if(_0x28506d[_0x4e0294(0x233)]===0x0){await this[_0x4e0294(0x37d)](_0x4e0294(0x292),_0x1e4849+_0x4e0294(0x24e)+_0x5381d9+_0x4e0294(0x2a4)+_0x1e0ad8['length']+'\x20aktiv)',!![]),await this[_0x4e0294(0x37d)]('info.lastError','',!![]);return;}this[_0x4e0294(0x267)]['info'](_0x5381d9+_0x4e0294(0x293)+_0x28506d[_0x4e0294(0x233)]+_0x4e0294(0x20f)+(this[_0x4e0294(0x28f)]?'\x20[DRY-RUN]':'')+'.');if(this[_0x4e0294(0x28f)]){await this[_0x4e0294(0x37d)](_0x4e0294(0x292),_0x1e4849+_0x4e0294(0x24e)+_0x5381d9+_0x4e0294(0x383)+_0x28506d[_0x4e0294(0x233)]+_0x4e0294(0x2f7),!![]),await this['setStateAsync']('info.lastError','',!![]);return;}if(!(0x0,compatibility_1[_0x4e0294(0x318)])(this[_0x4e0294(0x35f)])){const _0x1f8bcc=this[_0x4e0294(0x35f)]==='known-bug'?_0x4e0294(0x29f):this['writeCapability']==='live-failed'?_0x4e0294(0x297):'Alexa-Schreibzugriffe\x20blockiert:\x20Schreibkompatibilität\x20noch\x20nicht\x20bestätigt;\x20control.compatibilityTest\x20ausführen.';await this['setStateAsync'](_0x4e0294(0x292),_0x1e4849+_0x4e0294(0x21b),!![]),await this[_0x4e0294(0x37d)](_0x4e0294(0x2d9),_0x1f8bcc,!![]),this['log'][_0x4e0294(0x1d7)](_0x1f8bcc);return;}this[_0x4e0294(0x26e)][_0x4e0294(0x369)]+=0x1,this[_0x4e0294(0x26e)][_0x4e0294(0x23c)]=new Date()['toISOString'](),await this[_0x4e0294(0x2e9)]();const _0x53d173=await this['refreshVisibleAlexaOrder'](_0x5381d9,_0x41dfff);if(_0x53d173['interrupted'])return;await this[_0x4e0294(0x37d)](_0x4e0294(0x292),new Date()['toISOString']()+'\x20–\x20'+_0x5381d9+_0x4e0294(0x242)+_0x53d173[_0x4e0294(0x1d9)]+_0x4e0294(0x23f)+_0x1e0ad8['length']+_0x4e0294(0x2f3),!![]),await this['setStateAsync']('info.lastError','',!![]);return;}this[_0x4e0294(0x267)][_0x4e0294(0x261)](_0x5381d9+':\x20'+_0x1e0ad8[_0x4e0294(0x233)]+_0x4e0294(0x24c)+_0x2a5a1a[_0x4e0294(0x233)]+'\x20Änderung(en)'+(this['dryRun']?'\x20[DRY-RUN]':'')+'.');if(this[_0x4e0294(0x28f)]){await this[_0x4e0294(0x37d)](_0x4e0294(0x292),_0x1e4849+_0x4e0294(0x24e)+_0x5381d9+_0x4e0294(0x383)+_0x2a5a1a['length']+_0x4e0294(0x2f4),!![]),await this[_0x4e0294(0x37d)]('info.lastError','',!![]);return;}if(!(0x0,compatibility_1[_0x4e0294(0x318)])(this[_0x4e0294(0x35f)])){const _0x5da2c1=this[_0x4e0294(0x35f)]===_0x4e0294(0x25a)?'Alexa-Schreibzugriffe\x20blockiert:\x20bekannte\x20fehlerhafte\x20alexa-remote2\x20version-Query\x20erkannt.':this[_0x4e0294(0x35f)]===_0x4e0294(0x2a9)?'Alexa-Schreibzugriffe\x20blockiert:\x20Kompatibilitätstest\x20fehlgeschlagen.':'Alexa-Schreibzugriffe\x20blockiert:\x20Schreibkompatibilität\x20noch\x20nicht\x20bestätigt;\x20control.compatibilityTest\x20ausführen.';await this[_0x4e0294(0x37d)]('info.lastSort',_0x1e4849+_0x4e0294(0x21b),!![]),await this[_0x4e0294(0x37d)]('info.lastError',_0x5da2c1,!![]),this[_0x4e0294(0x267)][_0x4e0294(0x1d7)](_0x5da2c1);return;}this[_0x4e0294(0x26e)][_0x4e0294(0x369)]+=0x1,this[_0x4e0294(0x26e)][_0x4e0294(0x23c)]=new Date()[_0x4e0294(0x36d)](),await this['persistTrafficMetrics']();const _0x54a4da=_0x1e0ad8[_0x4e0294(0x2f1)](_0xf40cb1=>({..._0xf40cb1})),_0x55f656=Object['fromEntries'](_0x54a4da[_0x4e0294(0x2f1)](_0x216425=>[String(_0x216425['id']),String(_0x216425[_0x4e0294(0x2ef)]||'')[_0x4e0294(0x325)]()])),_0xfba27=Object[_0x4e0294(0x2a3)](_0x41dfff[_0x4e0294(0x2f1)](_0x518abb=>[String(_0x518abb['id']),String(_0x518abb['to']||'')[_0x4e0294(0x325)]()])),_0x25dc74=new Map(Object['entries'](_0x55f656));let _0x521c92,_0x3f7c98='';for(let _0x43b499=0x0;_0x43b499<0xa;_0x43b499++){_0x3f7c98=_0x4e0294(0x306)+Date['now']()[_0x4e0294(0x2b0)](0x24)+'_'+_0x43b499+'__';try{_0x521c92=(0x0,buffered_sort_1[_0x4e0294(0x1e8)])(_0x41dfff,_0x3f7c98);break;}catch(_0x4f37a5){if(!String(_0x4f37a5)[_0x4e0294(0x27b)]('kollidiert')||_0x43b499===0x9)throw _0x4f37a5;}}if(!_0x521c92)throw new Error('Sortierpuffer\x20konnte\x20nicht\x20erzeugt\x20werden.');const _0x1168cb={'version':0x1,'transactionId':Date[_0x4e0294(0x2fd)]()[_0x4e0294(0x2b0)](0x24)+'-'+Math[_0x4e0294(0x215)]()[_0x4e0294(0x2b0)](0x24)[_0x4e0294(0x2e2)](0x2,0xa),'listName':_0x5381d9,'marker':_0x3f7c98,'startedAt':new Date()[_0x4e0294(0x36d)](),'status':'applying','originalValues':_0x55f656,'targetValues':_0xfba27,'steps':_0x521c92[_0x4e0294(0x2c7)],'confirmedSteps':0x0};await this[_0x4e0294(0x28c)](_0x1168cb);let _0x3c52a2=0x0;try{for(let _0x9801a2=0x0;_0x9801a2<_0x521c92[_0x4e0294(0x2c7)][_0x4e0294(0x233)];_0x9801a2++){const _0x11f3db=_0x521c92[_0x4e0294(0x2c7)][_0x9801a2],_0x140786=await this[_0x4e0294(0x323)](_0x5381d9),_0x1721c6=(0x0,sorter_1[_0x4e0294(0x25e)])(_0x54a4da,_0x140786,_0x25dc74);if((0x0,sorter_1['activeSnapshotHasConflict'])(_0x1721c6)){const _0x32a06e=_0x1721c6['addedIds'][_0x4e0294(0x233)]>0x0?_0x5381d9+_0x4e0294(0x201):_0x1721c6[_0x4e0294(0x221)]['length']>0x0?_0x5381d9+_0x4e0294(0x34e):_0x5381d9+_0x4e0294(0x2cd);this[_0x4e0294(0x26e)][_0x4e0294(0x217)]+=0x1,await this['persistTrafficMetrics']();const _0x574e94=await this[_0x4e0294(0x26c)](_0x1168cb);if(!_0x574e94){await this['activateSortSafetyStop'](_0x5381d9,_0x32a06e,_0x1168cb);return;}this[_0x4e0294(0x2d5)][_0x4e0294(0x327)](_0x5381d9),this['log'][_0x4e0294(0x342)](_0x32a06e+_0x4e0294(0x225));return;}const _0x75b724=(0x0,sorter_1['activeItems'])(_0x140786)[_0x4e0294(0x22e)](_0x341886=>String(_0x341886['id'])===_0x11f3db['id']);if(!_0x75b724||String(_0x75b724[_0x4e0294(0x2ef)]||'')[_0x4e0294(0x325)]()!==_0x11f3db[_0x4e0294(0x257)]){this['traffic'][_0x4e0294(0x217)]+=0x1,await this[_0x4e0294(0x2e9)]();const _0x3153e4=_0x5381d9+_0x4e0294(0x285)+_0x11f3db['id']+'\x20„'+_0x11f3db[_0x4e0294(0x257)]+_0x4e0294(0x324),_0x567a99=await this['rollbackBufferedTransaction'](_0x1168cb);if(!_0x567a99){await this[_0x4e0294(0x1da)](_0x5381d9,_0x3153e4,_0x1168cb);return;}this[_0x4e0294(0x2d5)][_0x4e0294(0x327)](_0x5381d9),this[_0x4e0294(0x267)][_0x4e0294(0x342)](_0x3153e4+_0x4e0294(0x25d));return;}const _0x2ec1ca=this[_0x4e0294(0x32c)]+_0x4e0294(0x2cb)+_0x5381d9+'.items.'+_0x11f3db['id']+'.value',_0x297819=await this['getForeignObjectAsync'](_0x2ec1ca);if(!_0x297819)throw new Error(_0x4e0294(0x334)+_0x2ec1ca);const _0x3c6db2=await this[_0x4e0294(0x24a)](_0x2ec1ca),_0x391560=Number(_0x3c6db2?.['ts']||0x0);await this['writeAlexaState'](_0x2ec1ca,_0x11f3db['to']);const _0x1a82ca=await this['waitForAlexaValueConfirmation'](_0x5381d9,_0x11f3db['id'],_0x11f3db[_0x4e0294(0x257)],_0x11f3db['to'],_0x391560);if(_0x1a82ca===_0x4e0294(0x20c)){this[_0x4e0294(0x26e)][_0x4e0294(0x217)]+=0x1,await this[_0x4e0294(0x2e9)](),await this[_0x4e0294(0x1da)](_0x5381d9,_0x5381d9+_0x4e0294(0x22c)+(_0x9801a2+0x1)+'/'+_0x521c92[_0x4e0294(0x2c7)][_0x4e0294(0x233)]+'\x20nicht\x20eindeutig\x20bestätigt.',_0x1168cb);return;}if(_0x1a82ca===_0x4e0294(0x269)){this[_0x4e0294(0x26e)][_0x4e0294(0x217)]+=0x1,await this[_0x4e0294(0x2e9)]();const _0x3f15f9=await this[_0x4e0294(0x26c)](_0x1168cb);if(!_0x3f15f9){await this[_0x4e0294(0x1da)](_0x5381d9,_0x5381d9+':\x20Sortierschritt\x20'+(_0x9801a2+0x1)+'/'+_0x521c92['steps'][_0x4e0294(0x233)]+'\x20wurde\x20von\x20Alexa2\x20verworfen.',_0x1168cb);return;}this[_0x4e0294(0x2d5)][_0x4e0294(0x327)](_0x5381d9),await this['setError'](_0x5381d9+_0x4e0294(0x335));return;}_0x25dc74['set'](_0x11f3db['id'],_0x11f3db['to']),_0x1168cb['confirmedSteps']=_0x9801a2+0x1,await this['persistSortTransaction'](_0x1168cb),_0x3c52a2+=0x1;const _0x402d8e=await this[_0x4e0294(0x323)](_0x5381d9),_0x32a131=(0x0,sorter_1['compareActiveSnapshot'])(_0x54a4da,_0x402d8e,_0x25dc74);if((0x0,sorter_1['activeSnapshotHasConflict'])(_0x32a131)){this[_0x4e0294(0x26e)][_0x4e0294(0x217)]+=0x1,await this[_0x4e0294(0x2e9)]();const _0x46e6d0=_0x5381d9+':\x20Die\x20Liste\x20wurde\x20während\x20der\x20gepufferten\x20Sortierung\x20außerhalb\x20des\x20bestätigten\x20Schritts\x20verändert.',_0x21137f=await this['rollbackBufferedTransaction'](_0x1168cb);if(!_0x21137f){await this[_0x4e0294(0x1da)](_0x5381d9,_0x46e6d0,_0x1168cb);return;}this[_0x4e0294(0x2d5)][_0x4e0294(0x327)](_0x5381d9),this[_0x4e0294(0x267)]['warn'](_0x46e6d0+_0x4e0294(0x25d));return;}this[_0x4e0294(0x37e)]&&_0x3c52a2%this[_0x4e0294(0x1e4)]===0x0&&_0x3c52a2<_0x521c92['steps'][_0x4e0294(0x233)]&&this['batchPauseMs']>0x0?(this[_0x4e0294(0x267)]['info']('API-Schonmodus:\x20Batch-Pause\x20nach\x20'+_0x3c52a2+'\x20Schreibzugriffen\x20('+this[_0x4e0294(0x210)]+_0x4e0294(0x2a0)),await this[_0x4e0294(0x1d8)](this['batchPauseMs'])):await this[_0x4e0294(0x1d8)](this['writePauseMs']);}const _0x5148e4=await this['readList'](_0x5381d9),_0x595381=new Map(Object[_0x4e0294(0x248)](_0xfba27)),_0x44934c=(0x0,sorter_1['compareActiveSnapshot'])(_0x54a4da,_0x5148e4,_0x595381);if((0x0,sorter_1['activeSnapshotHasConflict'])(_0x44934c)){this[_0x4e0294(0x26e)][_0x4e0294(0x217)]+=0x1,await this[_0x4e0294(0x2e9)]();const _0x2427a9=_0x5381d9+_0x4e0294(0x2d7),_0x3afefd=await this[_0x4e0294(0x26c)](_0x1168cb);if(!_0x3afefd){await this['activateSortSafetyStop'](_0x5381d9,_0x2427a9,_0x1168cb);return;}this['pendingLists'][_0x4e0294(0x327)](_0x5381d9),this[_0x4e0294(0x267)][_0x4e0294(0x342)](_0x2427a9+_0x4e0294(0x2b3));return;}}catch(_0x2ee886){const _0xc32aef=_0x2ee886 instanceof Error?_0x2ee886['message']:String(_0x2ee886);this[_0x4e0294(0x26e)][_0x4e0294(0x217)]+=0x1,await this[_0x4e0294(0x2e9)]();const _0x3e747c=await this[_0x4e0294(0x380)](_0x1168cb);if(_0x3e747c==='ambiguous'){await this[_0x4e0294(0x1da)](_0x5381d9,_0x5381d9+':\x20Sortierfehler\x20mit\x20unklarem\x20Alexa2-Schreibstatus:\x20'+_0xc32aef,_0x1168cb);return;}const _0x4ba5b7=await this['rollbackBufferedTransaction'](_0x1168cb);if(!_0x4ba5b7){await this[_0x4e0294(0x1da)](_0x5381d9,_0x5381d9+':\x20Sortierfehler:\x20'+_0xc32aef,_0x1168cb);return;}this['pendingLists'][_0x4e0294(0x327)](_0x5381d9),await this['setError'](_0x5381d9+_0x4e0294(0x286)+_0xc32aef),this[_0x4e0294(0x267)][_0x4e0294(0x1d7)](_0x5381d9+_0x4e0294(0x2c4)+_0xc32aef);return;}await this[_0x4e0294(0x28c)](null);const _0x142f0e=await this[_0x4e0294(0x37a)](_0x5381d9,_0x41dfff);if(_0x142f0e[_0x4e0294(0x288)])return;await this[_0x4e0294(0x37d)]('info.lastSort',new Date()['toISOString']()+'\x20–\x20'+_0x5381d9+':\x20'+_0x521c92[_0x4e0294(0x326)]+'\x20Änderung(en),\x20'+_0x521c92['amazonWrites']+_0x4e0294(0x2d3)+_0x142f0e[_0x4e0294(0x1d9)]+_0x4e0294(0x302)+_0x1e0ad8['length']+_0x4e0294(0x367),!![]),await this['setStateAsync']('info.lastError','',!![]);}catch(_0x33f0b3){const _0x16d5d1=_0x33f0b3 instanceof Error?_0x33f0b3[_0x4e0294(0x222)]:String(_0x33f0b3);await this[_0x4e0294(0x241)](_0x16d5d1),this[_0x4e0294(0x267)][_0x4e0294(0x1d7)](_0x16d5d1);}finally{this[_0x4e0294(0x20a)]='',await this[_0x4e0294(0x320)](),await this[_0x4e0294(0x1f1)](),await this[_0x4e0294(0x2ed)]();if(this[_0x4e0294(0x370)])this['pendingLists'][_0x4e0294(0x327)](_0x5381d9);if(this[_0x4e0294(0x2d5)][_0x4e0294(0x346)]>0x0)this['armSortTimer'](this[_0x4e0294(0x255)]);}}[_0x259ade(0x208)](_0xbd51c4,_0x3e224b){const _0x45f4a=_0x259ade,_0x5a936d=[..._0x3e224b]['sort']((_0x4ca1a0,_0x49033b)=>Number(_0x4ca1a0['position'])-Number(_0x49033b[_0x45f4a(0x2df)])),_0x19f4d1=_0x5a936d['map'](_0x5acfca=>String(_0x5acfca['id'])),_0x50c519=new Set(_0x19f4d1),_0x1441bf=(0x0,sorter_1[_0x45f4a(0x239)])(_0xbd51c4)['filter'](_0x3601b6=>_0x50c519[_0x45f4a(0x2b8)](String(_0x3601b6['id'])));if(_0x1441bf[_0x45f4a(0x233)]!==_0x19f4d1[_0x45f4a(0x233)])throw new Error(_0x45f4a(0x329));const _0x38b35d=(0x0,buffered_sort_1['sortIdsByAlexaUpdatedTime'])(_0x1441bf);return(0x0,buffered_sort_1[_0x45f4a(0x1ff)])(_0x38b35d,_0x19f4d1);}async[_0x259ade(0x1cc)](_0x15c8bb,_0x411255,_0xda8ff,_0x82e90c,_0x4be309,_0x234172=0x3a98){const _0x490236=_0x259ade,_0x5c061c=this[_0x490236(0x32c)]+'.Lists.'+_0x15c8bb+_0x490236(0x34b)+_0x411255+_0x490236(0x21c),_0x4796b5=_0x82e90c===undefined?'':String(_0x82e90c),_0x4f266b=Date[_0x490236(0x2fd)]()+_0x234172;while(Date[_0x490236(0x2fd)]()<_0x4f266b){const [_0x598261,_0x1f8e7e]=await Promise[_0x490236(0x2ec)]([this['getForeignStateAsync'](_0x5c061c),this[_0x490236(0x323)](_0x15c8bb)]),_0x532557=_0x1f8e7e[_0x490236(0x22e)](_0x42c767=>String(_0x42c767?.['id']||'')===_0x411255),_0x127f72=_0x532557?String(_0x532557[_0x490236(0x2ef)]||'')[_0x490236(0x325)]():undefined,_0x174f9c=_0x598261?String(_0x598261['val']??'')[_0x490236(0x325)]():undefined,_0x4dab04=Number(_0x598261?.['ts']||0x0),_0x259b7f=_0x532557?.[_0x490236(0x372)]===undefined?'':String(_0x532557[_0x490236(0x372)]);if(_0x127f72===_0xda8ff&&_0x174f9c===_0xda8ff&&_0x598261?.[_0x490236(0x30c)]===!![]&&_0x4dab04>_0x4be309&&_0x259b7f!==_0x4796b5&&_0x259b7f!=='')return!![];await this[_0x490236(0x1d8)](0xfa);}return![];}async[_0x259ade(0x37a)](_0x264771,_0x452af6){const _0x907c9a=_0x259ade,_0x48f9e4=[..._0x452af6][_0x907c9a(0x27f)]((_0x33709d,_0x219474)=>Number(_0x33709d[_0x907c9a(0x2df)])-Number(_0x219474[_0x907c9a(0x2df)])),_0x30b11e=_0x48f9e4['map'](_0x2a018f=>String(_0x2a018f['id'])),_0x16b9c8=new Set(_0x30b11e),_0x46f634=new Map(_0x48f9e4['map'](_0x2a3c8c=>[String(_0x2a3c8c['id']),String(_0x2a3c8c['to']||'')[_0x907c9a(0x325)]()])),_0x33554e=await this['readList'](_0x264771);let _0x3ee455=(0x0,sorter_1['activeItems'])(_0x33554e)[_0x907c9a(0x2ff)](_0x1f7db8=>!_0x16b9c8['has'](String(_0x1f7db8['id'])));if(_0x3ee455)return this['pendingLists']['add'](_0x264771),this['log']['warn'](_0x264771+_0x907c9a(0x228)),{'writes':0x0,'interrupted':!![],'additionalItems':!![]};let _0x462bda;try{_0x462bda=this[_0x907c9a(0x208)](_0x33554e,_0x48f9e4);}catch(_0x2c240f){return this[_0x907c9a(0x2d5)][_0x907c9a(0x327)](_0x264771),this['log'][_0x907c9a(0x342)](_0x264771+_0x907c9a(0x340)+(_0x2c240f instanceof Error?_0x2c240f[_0x907c9a(0x222)]:String(_0x2c240f))),{'writes':0x0,'interrupted':!![],'additionalItems':_0x3ee455};}if(_0x462bda['length']===0x0)return{'writes':0x0,'interrupted':![],'additionalItems':_0x3ee455};let _0x1774a6=0x0;for(let _0x5d3f44=0x0;_0x5d3f44<_0x462bda[_0x907c9a(0x233)];_0x5d3f44++){const _0x4df433=_0x462bda[_0x5d3f44],_0xe47b7b=await this[_0x907c9a(0x323)](_0x264771),_0xcebb23=(0x0,sorter_1[_0x907c9a(0x239)])(_0xe47b7b);if(_0xcebb23['some'](_0x446ea7=>!_0x16b9c8[_0x907c9a(0x2b8)](String(_0x446ea7['id']))))return _0x3ee455=!![],this['pendingLists']['add'](_0x264771),this[_0x907c9a(0x267)][_0x907c9a(0x342)](_0x264771+_0x907c9a(0x35e)),{'writes':_0x1774a6,'interrupted':!![],'additionalItems':_0x3ee455};const _0x4e6dc0=new Map(_0xcebb23['map'](_0x37cc14=>[String(_0x37cc14['id']),_0x37cc14]));let _0x13e033=![];for(const [_0x1dad07,_0x30c753]of _0x46f634){const _0x32e0b0=_0x4e6dc0[_0x907c9a(0x27a)](_0x1dad07);if(!_0x32e0b0||String(_0x32e0b0[_0x907c9a(0x2ef)]||'')[_0x907c9a(0x325)]()!==_0x30c753){_0x13e033=!![];break;}}if(_0x13e033)return this[_0x907c9a(0x2d5)][_0x907c9a(0x327)](_0x264771),this[_0x907c9a(0x267)]['warn'](_0x264771+_0x907c9a(0x294)),{'writes':_0x1774a6,'interrupted':!![],'additionalItems':_0x3ee455};const _0x31601f=_0x4e6dc0['get'](_0x4df433),_0x504633=_0x46f634['get'](_0x4df433);if(!_0x31601f||_0x504633===undefined)return this[_0x907c9a(0x2d5)][_0x907c9a(0x327)](_0x264771),{'writes':_0x1774a6,'interrupted':!![],'additionalItems':_0x3ee455};const _0x1f15ed=this[_0x907c9a(0x32c)]+'.Lists.'+_0x264771+_0x907c9a(0x34b)+_0x4df433+_0x907c9a(0x21c),_0x54a91e=await this['getForeignObjectAsync'](_0x1f15ed);if(!_0x54a91e)return await this[_0x907c9a(0x1da)](_0x264771,_0x264771+':\x20Alexa-Wertedatenpunkt\x20für\x20die\x20sichtbare\x20Reihenfolge\x20fehlt:\x20'+_0x1f15ed),{'writes':_0x1774a6,'interrupted':!![],'additionalItems':_0x3ee455};const _0x4efe24=await this[_0x907c9a(0x24a)](_0x1f15ed),_0x5ce8e2=Number(_0x4efe24?.['ts']||0x0),_0x4fffc6=_0x31601f['updatedDateTime'];await this[_0x907c9a(0x30b)](_0x1f15ed,_0x504633);const _0x271c6d=await this[_0x907c9a(0x1cc)](_0x264771,_0x4df433,_0x504633,_0x4fffc6,_0x5ce8e2);if(!_0x271c6d)return await this[_0x907c9a(0x1da)](_0x264771,_0x264771+_0x907c9a(0x298)),{'writes':_0x1774a6,'interrupted':!![],'additionalItems':_0x3ee455};_0x1774a6+=0x1,this['apiSafeMode']&&_0x1774a6%this['batchSize']===0x0&&_0x1774a6<_0x462bda[_0x907c9a(0x233)]&&this[_0x907c9a(0x210)]>0x0?(this[_0x907c9a(0x267)]['info'](_0x907c9a(0x33a)+_0x1774a6+_0x907c9a(0x347)+this[_0x907c9a(0x210)]+_0x907c9a(0x2a0)),await this['wait'](this['batchPauseMs'])):await this['wait'](this[_0x907c9a(0x2e7)]);}const _0x860c6d=await this[_0x907c9a(0x323)](_0x264771);if((0x0,sorter_1['activeItems'])(_0x860c6d)['some'](_0x339cd0=>!_0x16b9c8[_0x907c9a(0x2b8)](String(_0x339cd0['id']))))return _0x3ee455=!![],this[_0x907c9a(0x2d5)][_0x907c9a(0x327)](_0x264771),this['log']['warn'](_0x264771+':\x20Neuer\x20aktiver\x20Alexa-Listeneintrag\x20bei\x20der\x20Abschlussprüfung\x20erkannt;\x20neue\x20Berechnung\x20folgt\x20nach\x20Synchronisationsruhe.'),{'writes':_0x1774a6,'interrupted':!![],'additionalItems':_0x3ee455};let _0x3d20b0;try{_0x3d20b0=this[_0x907c9a(0x208)](_0x860c6d,_0x48f9e4);}catch(_0x8d9963){return this['pendingLists']['add'](_0x264771),this[_0x907c9a(0x267)][_0x907c9a(0x342)](_0x264771+_0x907c9a(0x1d6)+(_0x8d9963 instanceof Error?_0x8d9963[_0x907c9a(0x222)]:String(_0x8d9963))),{'writes':_0x1774a6,'interrupted':!![],'additionalItems':_0x3ee455};}if(_0x3d20b0['length']>0x0)return await this['activateSortSafetyStop'](_0x264771,_0x264771+_0x907c9a(0x345)),{'writes':_0x1774a6,'interrupted':!![],'additionalItems':_0x3ee455};return{'writes':_0x1774a6,'interrupted':![],'additionalItems':_0x3ee455};}async[_0x259ade(0x28c)](_0x7a6f0e){const _0x3ba688=_0x259ade;await this['setStateAsync']('info.sortTransaction',_0x7a6f0e?JSON[_0x3ba688(0x247)](_0x7a6f0e,null,0x2):'{}',!![]);}async[_0x259ade(0x2bc)](){const _0x4544de=_0x259ade,_0x428791=await this[_0x4544de(0x258)](_0x4544de(0x354)),_0x1a0b3d=String(_0x428791?.['val']||'')['trim']();if(!_0x1a0b3d||_0x1a0b3d==='{}')return null;try{const _0x367251=JSON[_0x4544de(0x322)](_0x1a0b3d);if(_0x367251?.[_0x4544de(0x26a)]!==0x1||!_0x367251[_0x4544de(0x268)]||!_0x367251[_0x4544de(0x37f)]||!Array[_0x4544de(0x2c6)](_0x367251['steps'])||!Number['isInteger'](_0x367251[_0x4544de(0x2ca)])||_0x367251[_0x4544de(0x2ca)]<0x0||_0x367251[_0x4544de(0x2ca)]>_0x367251[_0x4544de(0x2c7)][_0x4544de(0x233)]||!_0x367251['originalValues']||!_0x367251['targetValues']||!['applying',_0x4544de(0x1fd),_0x4544de(0x2ee),_0x4544de(0x309)][_0x4544de(0x27b)](_0x367251[_0x4544de(0x358)]))throw new Error(_0x4544de(0x278));return _0x367251;}catch(_0x39bf6a){throw new Error('Sortierjournal\x20ist\x20beschädigt:\x20'+(_0x39bf6a instanceof Error?_0x39bf6a[_0x4544de(0x222)]:String(_0x39bf6a)));}}async['waitForAlexaValueConfirmation'](_0x3d84d5,_0x4f6cca,_0x3c3c7b,_0x4eb313,_0x4a6695=0x0,_0x25b181=0x3a98){const _0x31c07a=_0x259ade,_0xb2377d=this[_0x31c07a(0x32c)]+'.Lists.'+_0x3d84d5+'.items.'+_0x4f6cca+'.value',_0x3d01e7=Date[_0x31c07a(0x2fd)]()+_0x25b181;while(Date[_0x31c07a(0x2fd)]()<_0x3d01e7){const [_0x432c4b,_0x59108a]=await Promise['all']([this[_0x31c07a(0x24a)](_0xb2377d),this[_0x31c07a(0x323)](_0x3d84d5)]),_0x22fac8=_0x59108a[_0x31c07a(0x22e)](_0x441e0d=>String(_0x441e0d?.['id']||'')===_0x4f6cca),_0x986e39=_0x22fac8?String(_0x22fac8[_0x31c07a(0x2ef)]||'')[_0x31c07a(0x325)]():undefined,_0x2b2ccd=_0x432c4b?String(_0x432c4b[_0x31c07a(0x350)]??'')['trim']():undefined,_0x5904e6=Number(_0x432c4b?.['ts']||0x0);if(_0x986e39===_0x4eb313&&_0x2b2ccd===_0x4eb313&&_0x432c4b?.['ack']===!![]&&_0x5904e6>=_0x4a6695)return _0x31c07a(0x2e3);await this['wait'](0xfa);}const [_0x255aaa,_0x570f22]=await Promise[_0x31c07a(0x2ec)]([this[_0x31c07a(0x24a)](_0xb2377d),this[_0x31c07a(0x323)](_0x3d84d5)]),_0x25b544=_0x570f22[_0x31c07a(0x22e)](_0x368b37=>String(_0x368b37?.['id']||'')===_0x4f6cca),_0x11a7ae=_0x25b544?String(_0x25b544['value']||'')[_0x31c07a(0x325)]():undefined,_0x66e6d8=_0x255aaa?String(_0x255aaa['val']??'')[_0x31c07a(0x325)]():undefined;if(_0x11a7ae===_0x4eb313&&_0x66e6d8===_0x4eb313&&_0x255aaa?.[_0x31c07a(0x30c)]===!![])return'confirmed';if(_0x11a7ae===_0x3c3c7b&&_0x66e6d8===_0x3c3c7b&&_0x255aaa?.['ack']===!![])return _0x31c07a(0x269);return _0x31c07a(0x20c);}async['reconcilePendingTransactionStep'](_0x470269){const _0x1b48a1=_0x259ade;if(_0x470269[_0x1b48a1(0x2ca)]>=_0x470269['steps'][_0x1b48a1(0x233)])return _0x1b48a1(0x2e3);const _0x13c45e=_0x470269[_0x1b48a1(0x2c7)][_0x470269['confirmedSteps']],_0x18e066=this[_0x1b48a1(0x32c)]+'.Lists.'+_0x470269[_0x1b48a1(0x268)]+'.items.'+_0x13c45e['id']+_0x1b48a1(0x21c),[_0x55028b,_0x2b76f9]=await Promise[_0x1b48a1(0x2ec)]([this[_0x1b48a1(0x24a)](_0x18e066),this[_0x1b48a1(0x323)](_0x470269[_0x1b48a1(0x268)])]),_0x107073=_0x2b76f9['find'](_0x468893=>String(_0x468893?.['id']||'')===_0x13c45e['id']),_0x1fe0e7=_0x107073?String(_0x107073['value']||'')[_0x1b48a1(0x325)]():undefined,_0x332af8=_0x55028b?String(_0x55028b[_0x1b48a1(0x350)]??'')['trim']():undefined;if(_0x1fe0e7===_0x13c45e['to']&&_0x332af8===_0x13c45e['to']&&_0x55028b?.[_0x1b48a1(0x30c)]===!![])return _0x470269['confirmedSteps']+=0x1,await this[_0x1b48a1(0x28c)](_0x470269),'confirmed';if(_0x1fe0e7===_0x13c45e[_0x1b48a1(0x257)]&&_0x332af8===_0x13c45e[_0x1b48a1(0x257)]&&_0x55028b?.[_0x1b48a1(0x30c)]===!![])return'not-applied';if(_0x332af8===_0x13c45e['to']&&_0x55028b?.['ack']===![]){const _0x3bd768=await this[_0x1b48a1(0x1f9)](_0x470269[_0x1b48a1(0x268)],_0x13c45e['id'],_0x13c45e[_0x1b48a1(0x257)],_0x13c45e['to'],Number(_0x55028b?.['ts']||0x0),0x7530);return _0x3bd768==='confirmed'&&(_0x470269['confirmedSteps']+=0x1,await this['persistSortTransaction'](_0x470269)),_0x3bd768;}return _0x1b48a1(0x20c);}async['reconcilePendingRollbackStep'](_0x13d6a7){const _0x433b4f=_0x259ade;if(_0x13d6a7['confirmedSteps']<=0x0)return _0x433b4f(0x2e3);const _0x5cac6b=_0x13d6a7['steps'][_0x13d6a7[_0x433b4f(0x2ca)]-0x1],_0x497143=this['alexaInstance']+_0x433b4f(0x2cb)+_0x13d6a7[_0x433b4f(0x268)]+_0x433b4f(0x34b)+_0x5cac6b['id']+'.value',[_0x2520f4,_0x37bdf3]=await Promise['all']([this['getForeignStateAsync'](_0x497143),this['readList'](_0x13d6a7['listName'])]),_0x86b1f3=_0x37bdf3[_0x433b4f(0x22e)](_0x134be2=>String(_0x134be2?.['id']||'')===_0x5cac6b['id']),_0x3bc097=_0x86b1f3?String(_0x86b1f3[_0x433b4f(0x2ef)]||'')[_0x433b4f(0x325)]():undefined,_0xeacbb8=_0x2520f4?String(_0x2520f4[_0x433b4f(0x350)]??'')[_0x433b4f(0x325)]():undefined;if(_0x3bc097===_0x5cac6b[_0x433b4f(0x257)]&&_0xeacbb8===_0x5cac6b[_0x433b4f(0x257)]&&_0x2520f4?.[_0x433b4f(0x30c)]===!![])return _0x13d6a7[_0x433b4f(0x2ca)]-=0x1,await this[_0x433b4f(0x28c)](_0x13d6a7),_0x433b4f(0x2e3);if(_0x3bc097===_0x5cac6b['to']&&_0xeacbb8===_0x5cac6b['to']&&_0x2520f4?.[_0x433b4f(0x30c)]===!![])return'not-applied';if(_0xeacbb8===_0x5cac6b[_0x433b4f(0x257)]&&_0x2520f4?.[_0x433b4f(0x30c)]===![]){const _0x5aba87=await this[_0x433b4f(0x1f9)](_0x13d6a7[_0x433b4f(0x268)],_0x5cac6b['id'],_0x5cac6b['to'],_0x5cac6b[_0x433b4f(0x257)],Number(_0x2520f4?.['ts']||0x0),0x7530);return _0x5aba87===_0x433b4f(0x2e3)&&(_0x13d6a7['confirmedSteps']-=0x1,await this['persistSortTransaction'](_0x13d6a7)),_0x5aba87;}return _0x433b4f(0x20c);}async[_0x259ade(0x26c)](_0x5c08e6){const _0x55af63=_0x259ade;_0x5c08e6[_0x55af63(0x358)]=_0x55af63(0x1fd),await this[_0x55af63(0x28c)](_0x5c08e6);while(_0x5c08e6['confirmedSteps']>0x0){const _0x50726=_0x5c08e6['confirmedSteps']-0x1,_0x943508=_0x5c08e6[_0x55af63(0x2c7)][_0x50726];try{const _0x6e9fa8=await this['readList'](_0x5c08e6['listName']),_0x17b2af=_0x6e9fa8['find'](_0x46b1b4=>String(_0x46b1b4?.['id']||'')===_0x943508['id']);if(!_0x17b2af){this[_0x55af63(0x267)][_0x55af63(0x342)](_0x5c08e6[_0x55af63(0x268)]+_0x55af63(0x365)+_0x943508['id']+'.'),_0x5c08e6[_0x55af63(0x2ca)]-=0x1,await this[_0x55af63(0x28c)](_0x5c08e6);continue;}const _0x3c6a09=String(_0x17b2af['value']||'')[_0x55af63(0x325)]();if(_0x3c6a09===_0x943508[_0x55af63(0x257)]){_0x5c08e6['confirmedSteps']-=0x1,await this['persistSortTransaction'](_0x5c08e6);continue;}if(_0x3c6a09!==_0x943508['to']){this['log']['warn'](_0x5c08e6['listName']+_0x55af63(0x216)+_0x943508['id']+_0x55af63(0x32f)),_0x5c08e6[_0x55af63(0x2ca)]-=0x1,await this['persistSortTransaction'](_0x5c08e6);continue;}const _0x19873f=this['alexaInstance']+_0x55af63(0x2cb)+_0x5c08e6[_0x55af63(0x268)]+_0x55af63(0x34b)+_0x943508['id']+_0x55af63(0x21c),_0x328e12=await this[_0x55af63(0x2d2)](_0x19873f);if(!_0x328e12)return this[_0x55af63(0x267)]['error'](_0x5c08e6[_0x55af63(0x268)]+':\x20Rollback-Datenpunkt\x20fehlt:\x20'+_0x19873f),![];const _0x38fc5f=await this[_0x55af63(0x24a)](_0x19873f),_0x11c728=Number(_0x38fc5f?.['ts']||0x0);await this['writeAlexaState'](_0x19873f,_0x943508[_0x55af63(0x257)]);const _0xb10932=await this['waitForAlexaValueConfirmation'](_0x5c08e6[_0x55af63(0x268)],_0x943508['id'],_0x943508['to'],_0x943508['from'],_0x11c728);if(_0xb10932!==_0x55af63(0x2e3))return this[_0x55af63(0x267)][_0x55af63(0x1d7)](_0x5c08e6['listName']+_0x55af63(0x29b)+_0x943508['id']+'\x20wurde\x20nicht\x20eindeutig\x20bestätigt.'),![];_0x5c08e6[_0x55af63(0x2ca)]-=0x1,await this[_0x55af63(0x28c)](_0x5c08e6),await this['wait'](this[_0x55af63(0x2e7)]);}catch(_0x5391b5){return this['log'][_0x55af63(0x1d7)](_0x5c08e6['listName']+':\x20Rollback\x20für\x20ID\x20'+_0x943508['id']+'\x20fehlgeschlagen:\x20'+(_0x5391b5 instanceof Error?_0x5391b5[_0x55af63(0x222)]:String(_0x5391b5))),![];}}return await this[_0x55af63(0x28c)](null),!![];}async[_0x259ade(0x270)](_0x2fd7d5){const _0xb478fc=_0x259ade,_0x512cab=await this['readList'](_0x2fd7d5[_0xb478fc(0x268)]),_0x45a07f=new Map(_0x512cab['map'](_0x2804ec=>[String(_0x2804ec?.['id']||''),String(_0x2804ec?.[_0xb478fc(0x2ef)]||'')['trim']()]));for(const [_0x18fbd0,_0x57b056]of Object[_0xb478fc(0x248)](_0x2fd7d5[_0xb478fc(0x36f)])){if(_0x45a07f['get'](_0x18fbd0)!==_0x57b056)return![];}return!![];}async[_0x259ade(0x2bd)](){const _0xf284c8=_0x259ade;let _0x346260;try{_0x346260=await this[_0xf284c8(0x2bc)]();}catch(_0x196cb0){await this['activateSortSafetyStop']('unbekannt',_0x196cb0 instanceof Error?_0x196cb0['message']:String(_0x196cb0));return;}if(!_0x346260)return;this[_0xf284c8(0x267)]['warn'](_0x346260['listName']+_0xf284c8(0x280)+_0x346260[_0xf284c8(0x272)]+_0xf284c8(0x262));if(!(0x0,compatibility_1['canWriteAlexa'])(this[_0xf284c8(0x35f)])){await this['activateSortSafetyStop'](_0x346260[_0xf284c8(0x268)],_0x346260[_0xf284c8(0x268)]+_0xf284c8(0x353),_0x346260);return;}await this[_0xf284c8(0x1d8)](0xbb8);try{if(await this[_0xf284c8(0x270)](_0x346260)){await this[_0xf284c8(0x28c)](null),this[_0xf284c8(0x267)]['info'](_0x346260[_0xf284c8(0x268)]+_0xf284c8(0x330));return;}if(_0x346260['status']===_0xf284c8(0x1fd)||_0x346260[_0xf284c8(0x358)]==='failed-rollback'){const _0x2797b7=await this['reconcilePendingRollbackStep'](_0x346260);if(_0x2797b7==='ambiguous'){await this[_0xf284c8(0x1da)](_0x346260[_0xf284c8(0x268)],_0x346260['listName']+_0xf284c8(0x1ee),_0x346260);return;}}else{if(_0x346260[_0xf284c8(0x2ca)]<_0x346260[_0xf284c8(0x2c7)][_0xf284c8(0x233)]){const _0x38be53=await this[_0xf284c8(0x380)](_0x346260);if(_0x38be53===_0xf284c8(0x20c)){await this[_0xf284c8(0x1da)](_0x346260['listName'],_0x346260[_0xf284c8(0x268)]+':\x20Letzter\x20Sortierschritt\x20der\x20unterbrochenen\x20Transaktion\x20ist\x20nicht\x20eindeutig\x20auflösbar.',_0x346260);return;}}}const _0x33dffd=await this[_0xf284c8(0x26c)](_0x346260);if(!_0x33dffd){await this[_0xf284c8(0x1da)](_0x346260['listName'],_0x346260[_0xf284c8(0x268)]+_0xf284c8(0x332),_0x346260);return;}this['log']['warn'](_0x346260[_0xf284c8(0x268)]+_0xf284c8(0x368));}catch(_0x141249){await this[_0xf284c8(0x1da)](_0x346260['listName'],_0x346260['listName']+_0xf284c8(0x230)+(_0x141249 instanceof Error?_0x141249[_0xf284c8(0x222)]:String(_0x141249)),_0x346260);}}async[_0x259ade(0x1da)](_0x5ac640,_0x33884b,_0x19b159){const _0xbade03=_0x259ade;this['pendingLists'][_0xbade03(0x341)]();_0x19b159&&(_0x19b159[_0xbade03(0x358)]=_0x19b159[_0xbade03(0x358)]==='rollback'||_0x19b159[_0xbade03(0x358)]==='failed-rollback'?_0xbade03(0x309):_0xbade03(0x2ee),await this[_0xbade03(0x28c)](_0x19b159));await this['setStateAsync'](_0xbade03(0x312),![],!![]);const _0x5263cf=_0x5ac640!=='unbekannt'&&!_0x33884b[_0xbade03(0x35c)](_0x5ac640+':')?_0x5ac640+':\x20':'',_0x52a64f=''+_0x5263cf+_0x33884b+_0xbade03(0x27c);await this['setError'](_0x52a64f),this['log']['error'](_0x52a64f);}async[_0x259ade(0x307)](_0x27cd00,_0x4d7486){const _0xd72958=_0x259ade,_0x4ab800=_0x4d7486['type']==='create'?this[_0xd72958(0x32c)]+'.Lists.'+_0x27cd00+'.#New':this['alexaInstance']+'.Lists.'+_0x27cd00+_0xd72958(0x34b)+_0x4d7486['id']+'.#delete',_0x52877e=_0x4d7486[_0xd72958(0x25c)]===_0xd72958(0x21d)?_0x4d7486[_0xd72958(0x2ef)]:!![],_0x46fb3a=await this['getForeignObjectAsync'](_0x4ab800);if(!_0x46fb3a)throw new Error('Alexa-Datenpunkt\x20für\x20Marktüberschrift\x20fehlt:\x20'+_0x4ab800);await this['writeAlexaState'](_0x4ab800,_0x52877e),this['log']['info'](_0x27cd00+_0xd72958(0x229)+_0x4d7486[_0xd72958(0x339)]+_0xd72958(0x24e)+_0x4d7486['type']+'.');}async[_0x259ade(0x30b)](_0x59a420,_0x582e33){const _0xaa7f6a=_0x259ade;let _0x4cc5c0;for(let _0x370564=0x0;_0x370564<=this[_0xaa7f6a(0x219)];_0x370564++){try{if(this['apiSafeMode'])await this['waitForWriteBudget']();await this[_0xaa7f6a(0x31d)](_0x59a420,{'val':_0x582e33,'ack':![]}),this[_0xaa7f6a(0x260)]['push'](Date[_0xaa7f6a(0x2fd)]()),this[_0xaa7f6a(0x26e)][_0xaa7f6a(0x28a)]+=0x1,this['traffic'][_0xaa7f6a(0x363)]=new Date()['toISOString'](),await this['persistTrafficMetrics']();return;}catch(_0x555aa3){_0x4cc5c0=_0x555aa3;if(_0x370564>=this['maxWriteRetries'])break;const _0x45d5f8=this['retryBaseMs']*Math['pow'](0x2,_0x370564);this[_0xaa7f6a(0x267)][_0xaa7f6a(0x342)]('Alexa-Schreibzugriff\x20fehlgeschlagen;\x20Retry\x20'+(_0x370564+0x1)+'/'+this['maxWriteRetries']+_0xaa7f6a(0x26f)+_0x45d5f8+_0xaa7f6a(0x337)),await this[_0xaa7f6a(0x1d8)](_0x45d5f8);}}throw _0x4cc5c0 instanceof Error?_0x4cc5c0:new Error(String(_0x4cc5c0));}async[_0x259ade(0x282)](){const _0x1a1b9f=_0x259ade;while(!![]){const _0x4d498c=Date['now']();this['writeTimestamps']=this['writeTimestamps'][_0x1a1b9f(0x1f0)](_0x4b1bd9=>_0x4d498c-_0x4b1bd9<0xea60);if(this[_0x1a1b9f(0x260)]['length']<this['maxWritesPerMinute'])return;const _0x4ca3dc=Math[_0x1a1b9f(0x2f5)](0x1f4,0xea60-(_0x4d498c-this[_0x1a1b9f(0x260)][0x0])+0x64);this[_0x1a1b9f(0x267)]['info'](_0x1a1b9f(0x1ea)+this[_0x1a1b9f(0x2db)]+'/Minute\x20erreicht,\x20Pause\x20'+_0x4ca3dc+'\x20ms.'),await this['wait'](_0x4ca3dc);}}async[_0x259ade(0x237)](_0x4c17ce){const _0xf3803a=_0x259ade;if(this['cfg'][_0xf3803a(0x2d8)]===![]){await this['setStateAsync'](_0xf3803a(0x243),'[]',!![]);return;}const _0x454808=[];for(const _0x23a616 of(0x0,sorter_1['activeItems'])(_0x4c17ce)){if((0x0,market_plan_1[_0xf3803a(0x300)])(String(_0x23a616[_0xf3803a(0x2ef)]),this[_0xf3803a(0x2fc)]))continue;const _0x252382=(0x0,parser_1['parseItem'])(String(_0x23a616[_0xf3803a(0x2ef)]),this[_0xf3803a(0x2fc)],this['products'],this[_0xf3803a(0x1fb)],this[_0xf3803a(0x2f6)]),_0x51d400=(0x0,parser_1[_0xf3803a(0x2ad)])(_0x252382[_0xf3803a(0x343)],this['products']);if(!_0x51d400)continue;for(const _0x593205 of(0x0,parser_1[_0xf3803a(0x238)])(_0x252382[_0xf3803a(0x343)],_0x51d400))_0x454808['push']({'product':_0x51d400[_0xf3803a(0x1fa)],'alias':_0x593205});}const _0x3a455b=[...new Map(_0x454808['map'](_0x13aa3b=>[(_0x13aa3b[_0xf3803a(0x2c1)]+'|'+_0x13aa3b['alias'])[_0xf3803a(0x2c9)]('de'),_0x13aa3b]))['values']()];await this['setStateAsync']('info.aliasSuggestions',JSON[_0xf3803a(0x247)](_0x3a455b,null,0x2),!![]);}async[_0x259ade(0x212)](_0x142538,_0xa81f3){const _0x5d9300=_0x259ade,_0xfe855f=(0x0,sorter_1['activeItems'])(_0xa81f3),_0x47a8ac=this[_0x5d9300(0x287)][_0x5d9300(0x27a)](_0x142538),_0x480022=new Set(_0xfe855f[_0x5d9300(0x2f1)](_0x2a6997=>String(_0x2a6997['id'])));if(!_0x47a8ac){this[_0x5d9300(0x287)][_0x5d9300(0x349)](_0x142538,_0x480022);return;}for(const _0x3a26b3 of _0xfe855f){if(_0x47a8ac[_0x5d9300(0x2b8)](String(_0x3a26b3['id'])))continue;if((0x0,market_plan_1[_0x5d9300(0x300)])(String(_0x3a26b3[_0x5d9300(0x2ef)]),this['markets']))continue;const _0xe56fa3=(0x0,parser_1['parseItem'])(String(_0x3a26b3[_0x5d9300(0x2ef)]),this['markets'],this['products'],this[_0x5d9300(0x1fb)],this[_0x5d9300(0x356)](_0x142538));this[_0x5d9300(0x2b1)]=(0x0,statistics_1['recordAddedItem'])(this['statistics'],_0x142538,_0xe56fa3);}this['knownActiveIds'][_0x5d9300(0x349)](_0x142538,_0x480022),await this['persistStatistics']();}async[_0x259ade(0x35a)](){const _0x5e3f7f=_0x259ade,_0x325b9e=[...this['activeCountByList'][_0x5e3f7f(0x274)]()]['reduce']((_0x23c04a,_0x4074e3)=>_0x23c04a+_0x4074e3,0x0);await this[_0x5e3f7f(0x37d)](_0x5e3f7f(0x34f),_0x325b9e,!![]),await this[_0x5e3f7f(0x37d)](_0x5e3f7f(0x2b7),JSON['stringify'](Object[_0x5e3f7f(0x2a3)](this[_0x5e3f7f(0x32d)]),null,0x2),!![]);}async[_0x259ade(0x2dc)](){const _0x4ba729=_0x259ade;try{const _0x39c57b=await this[_0x4ba729(0x2d2)](_0x4ba729(0x29e)+this['alexaInstance']),_0x3d766a=_0x39c57b?.['common']?.['version'];this[_0x4ba729(0x218)]=typeof _0x3d766a==='string'?_0x3d766a:_0x4ba729(0x24d);}catch{this['alexa2Version']=_0x4ba729(0x24d);}try{const _0x3322e3=require['resolve']('alexa-remote2'),_0x39dc02=fs[_0x4ba729(0x361)](_0x3322e3,_0x4ba729(0x32b)),_0x790f53=(0x0,compatibility_1[_0x4ba729(0x31e)])(_0x39dc02);this[_0x4ba729(0x35f)]=_0x790f53['status'],this[_0x4ba729(0x355)]=_0x790f53[_0x4ba729(0x310)],this['alexaRemote2Version']=this['findPackageVersion'](_0x3322e3,_0x4ba729(0x209));}catch(_0x15c025){this[_0x4ba729(0x35f)]=_0x4ba729(0x249),this[_0x4ba729(0x355)]='alexa-remote2\x20konnte\x20nicht\x20automatisch\x20geprüft\x20werden:\x20'+(_0x15c025 instanceof Error?_0x15c025[_0x4ba729(0x222)]:String(_0x15c025)),this[_0x4ba729(0x2e6)]=_0x4ba729(0x24d);}await this[_0x4ba729(0x2de)]();}[_0x259ade(0x308)](_0x297be5,_0x413664){const _0x5405fe=_0x259ade;let _0x442f89=path[_0x5405fe(0x283)](_0x297be5);for(let _0x30f2fc=0x0;_0x30f2fc<0x6;_0x30f2fc++){const _0x5ca92b=path['join'](_0x442f89,_0x5405fe(0x338));try{const _0x6d9810=JSON[_0x5405fe(0x322)](fs[_0x5405fe(0x361)](_0x5ca92b,_0x5405fe(0x32b)));if(_0x6d9810['name']===_0x413664&&_0x6d9810['version'])return _0x6d9810['version'];}catch{}const _0x509d6d=path[_0x5405fe(0x283)](_0x442f89);if(_0x509d6d===_0x442f89)break;_0x442f89=_0x509d6d;}return _0x5405fe(0x24d);}async['runLiveCompatibilityTest'](){const _0x4c5969=_0x259ade;if(this['compatibilityTesting']||this[_0x4c5969(0x20a)])return;this['compatibilityTesting']=!![];try{const _0x3a8aa6=this[_0x4c5969(0x206)][0x0]?.[_0x4c5969(0x1fa)];if(!_0x3a8aa6)throw new Error(_0x4c5969(0x2ac));const _0x38e9c5=await this[_0x4c5969(0x323)](_0x3a8aa6),_0x11c0a4=(0x0,sorter_1['sortSlotsOldestFirst'])((0x0,sorter_1[_0x4c5969(0x239)])(_0x38e9c5))[0x0];if(!_0x11c0a4)throw new Error('Für\x20den\x20Kompatibilitätstest\x20wird\x20mindestens\x20ein\x20aktiver\x20Listeneintrag\x20benötigt.');const _0x279dbb=this['alexaInstance']+_0x4c5969(0x2cb)+_0x3a8aa6+_0x4c5969(0x34b)+_0x11c0a4['id']+'.value',_0x5bbbfb=await this[_0x4c5969(0x24a)](_0x279dbb),_0x4ae2a6=String(_0x5bbbfb?.[_0x4c5969(0x350)]??_0x11c0a4[_0x4c5969(0x2ef)])[_0x4c5969(0x325)]();if(!_0x4ae2a6)throw new Error('Der\x20Testeintrag\x20enthält\x20keinen\x20sichtbaren\x20value-Text.');const _0x261381=Number(_0x5bbbfb?.['ts']||0x0);await this[_0x4c5969(0x31d)](_0x279dbb,{'val':_0x4ae2a6,'ack':![]}),this[_0x4c5969(0x26e)][_0x4c5969(0x28a)]+=0x1,this['traffic']['compatibilityWrites']+=0x1,this['traffic']['lastAlexaWrite']=new Date()['toISOString'](),await this['persistTrafficMetrics']();const _0x345aa5=Date['now']()+0x2710;let _0x834423=![];while(Date['now']()<_0x345aa5){await this[_0x4c5969(0x1d8)](0xfa);const _0x492003=await this[_0x4c5969(0x24a)](_0x279dbb);if(_0x492003&&_0x492003[_0x4c5969(0x30c)]===!![]&&String(_0x492003[_0x4c5969(0x350)]??'')['trim']()===_0x4ae2a6&&Number(_0x492003['ts']||0x0)>_0x261381){_0x834423=!![];break;}}_0x834423?(this[_0x4c5969(0x35f)]=_0x4c5969(0x333),this[_0x4c5969(0x355)]=_0x4c5969(0x28b),this[_0x4c5969(0x23e)]=new Date()[_0x4c5969(0x36d)]()+_0x4c5969(0x259)+_0x4ae2a6+'“',await this[_0x4c5969(0x37d)](_0x4c5969(0x2d9),'',!![])):(this['writeCapability']=_0x4c5969(0x2a9),this[_0x4c5969(0x355)]='Live-Test\x20fehlgeschlagen:\x20Alexa2\x20hat\x20den\x20value-Schreibzugriff\x20nicht\x20innerhalb\x20von\x2010\x20Sekunden\x20bestätigt.',this[_0x4c5969(0x23e)]=new Date()['toISOString']()+_0x4c5969(0x2cf)+_0x4ae2a6+'“',await this[_0x4c5969(0x37d)](_0x4c5969(0x2d9),_0x4c5969(0x2fb),!![])),await this[_0x4c5969(0x2de)]();}catch(_0x126bfa){const _0x135168=_0x126bfa instanceof Error?_0x126bfa[_0x4c5969(0x222)]:String(_0x126bfa);this[_0x4c5969(0x35f)]='live-failed',this[_0x4c5969(0x355)]=_0x4c5969(0x200)+_0x135168,this['lastCompatibilityTest']=new Date()['toISOString']()+'\x20–\x20FEHLER:\x20'+_0x135168,await this[_0x4c5969(0x37d)](_0x4c5969(0x2d9),_0x4c5969(0x377)+_0x135168,!![]),await this[_0x4c5969(0x2de)]();}finally{this['compatibilityTesting']=![];}}async[_0x259ade(0x2de)](){const _0x4683cd=_0x259ade;await this[_0x4683cd(0x37d)](_0x4683cd(0x2c8),this[_0x4683cd(0x35f)],!![]),await this[_0x4683cd(0x37d)]('info.lastCompatibilityTest',this[_0x4683cd(0x23e)],!![]),await this[_0x4683cd(0x37d)](_0x4683cd(0x1d1),JSON[_0x4683cd(0x247)]({'shoppingrouteVersion':VERSION,'beta':!![],'alexaInstance':this[_0x4683cd(0x32c)],'alexa2Version':this[_0x4683cd(0x218)],'alexaRemote2Version':this['alexaRemote2Version'],'lists':this[_0x4683cd(0x206)]['map'](_0x154eb4=>_0x154eb4[_0x4683cd(0x1fa)]),'dryRun':this[_0x4683cd(0x28f)],'writeCapability':this['writeCapability'],'detail':this[_0x4683cd(0x355)],'lastCompatibilityTest':this[_0x4683cd(0x23e)],'requiredAlexaAppSorting':_0x4683cd(0x232),'checkedAt':new Date()[_0x4683cd(0x36d)]()},null,0x2),!![]);}async[_0x259ade(0x2be)](){const _0x2b81eb=_0x259ade;try{const _0x490afc={'__none__':'—\x20Kein\x20Markt\x20—'};for(const _0xf117a4 of[...this['markets']][_0x2b81eb(0x27f)]((_0x3f929d,_0x28f551)=>_0x3f929d[_0x2b81eb(0x1fa)][_0x2b81eb(0x24b)](_0x28f551[_0x2b81eb(0x1fa)],'de',{'sensitivity':'base'}))){_0x490afc[_0xf117a4[_0x2b81eb(0x1fa)]]=_0xf117a4[_0x2b81eb(0x1fa)];}await this[_0x2b81eb(0x2f9)]('control.temporaryPriorityMarket',{'common':{'states':_0x490afc}});}catch(_0x4cbec9){this[_0x2b81eb(0x267)]['warn'](_0x2b81eb(0x289)+(_0x4cbec9 instanceof Error?_0x4cbec9[_0x2b81eb(0x222)]:String(_0x4cbec9)));}}[_0x259ade(0x2a8)](){const _0x5f4a3d=_0x259ade,_0x37d4f4=(0x0,config_tools_1['ensureMarketRoutes'])(this[_0x5f4a3d(0x2fc)],this[_0x5f4a3d(0x2f0)],this[_0x5f4a3d(0x33b)]);if(_0x37d4f4['added']<=0x0)return;this[_0x5f4a3d(0x33b)]=_0x37d4f4[_0x5f4a3d(0x379)],this[_0x5f4a3d(0x314)]=!![],this['log'][_0x5f4a3d(0x261)](_0x37d4f4[_0x5f4a3d(0x20b)]+_0x5f4a3d(0x207));}async[_0x259ade(0x275)](){const _0x125a5c=_0x259ade;if(Array['isArray'](this[_0x125a5c(0x2a6)][_0x125a5c(0x2f0)])&&this[_0x125a5c(0x2a6)]['productGroups'][_0x125a5c(0x233)]>0x0)return;try{await this[_0x125a5c(0x1d2)]({'productGroups':DEFAULT_CATEGORIES[_0x125a5c(0x2f1)](_0x2fcd52=>({'name':_0x2fcd52}))});}catch(_0x2f8aae){this['log'][_0x125a5c(0x342)]('Produktgruppen\x20konnten\x20nicht\x20initialisiert\x20werden:\x20'+(_0x2f8aae instanceof Error?_0x2f8aae['message']:String(_0x2f8aae)));}}async[_0x259ade(0x320)](){const _0x44f731=_0x259ade;if(!this['productsDirty']&&!this[_0x44f731(0x360)]&&!this['routesDirty'])return;try{const _0x26641d='system.adapter.'+this[_0x44f731(0x23b)],_0x16482c=await this[_0x44f731(0x2d2)](_0x26641d);if(!_0x16482c)throw new Error(_0x44f731(0x2bb)+_0x26641d);const _0x59984c=_0x16482c['native']||{};_0x16482c[_0x44f731(0x236)]={..._0x59984c,...this['productsDirty']?{'products':this['runtimeProducts'][_0x44f731(0x2f1)](_0x2be2b8=>({..._0x2be2b8}))}:{},...this[_0x44f731(0x360)]?{'reviewItems':this[_0x44f731(0x384)][_0x44f731(0x2f1)](_0x5978ec=>({..._0x5978ec}))}:{},...this[_0x44f731(0x314)]?{'routes':this[_0x44f731(0x33b)][_0x44f731(0x2f1)](_0xe2446e=>({..._0xe2446e}))}:{}},await this['setForeignObjectAsync'](_0x26641d,_0x16482c),this[_0x44f731(0x34d)]=![],this[_0x44f731(0x360)]=![],this[_0x44f731(0x314)]=![];}catch(_0x4a2b45){await this['setStateAsync'](_0x44f731(0x2d9),_0x44f731(0x245)+(_0x4a2b45 instanceof Error?_0x4a2b45['message']:String(_0x4a2b45)),!![]);}}async[_0x259ade(0x1f1)](){const _0x86cb92=_0x259ade,_0x459ac5={...this['cfg'],'products':this[_0x86cb92(0x37b)],'routes':this[_0x86cb92(0x379)],'reviewItems':this[_0x86cb92(0x384)]};await this[_0x86cb92(0x37d)](_0x86cb92(0x1ec),JSON[_0x86cb92(0x247)]((0x0,config_tools_1['exportConfig'])(_0x459ac5,VERSION),null,0x2),!![]),await this['setStateAsync']('info.marketProfiles',JSON[_0x86cb92(0x247)]((0x0,config_tools_1[_0x86cb92(0x2cc)])(this[_0x86cb92(0x2fc)],this['routes']),null,0x2),!![]);}async['loadTrafficMetrics'](){const _0x48157b=_0x259ade;try{const _0x174b08=await this[_0x48157b(0x258)](_0x48157b(0x36a));this['traffic']=(0x0,metrics_1['normalizeTrafficMetrics'])(_0x174b08&&typeof _0x174b08[_0x48157b(0x350)]===_0x48157b(0x364)&&_0x174b08[_0x48157b(0x350)][_0x48157b(0x325)]()?JSON[_0x48157b(0x322)](_0x174b08[_0x48157b(0x350)]):null);}catch{this['traffic']=(0x0,metrics_1[_0x48157b(0x266)])();}await this[_0x48157b(0x2e9)]();}async[_0x259ade(0x26b)](){const _0x2f601d=_0x259ade,_0x33c09=(0x0,metrics_1['normalizeTrafficMetrics'])(this['traffic']);_0x33c09[_0x2f601d(0x31c)]!==this[_0x2f601d(0x26e)]['date']&&(this[_0x2f601d(0x26e)]=_0x33c09,await this[_0x2f601d(0x2e9)]());}async['persistTrafficMetrics'](){const _0x53b465=_0x259ade;this['traffic']=(0x0,metrics_1['normalizeTrafficMetrics'])(this['traffic']),await this[_0x53b465(0x37d)]('info.localChecksToday',this[_0x53b465(0x26e)][_0x53b465(0x313)],!![]),await this[_0x53b465(0x37d)](_0x53b465(0x1d4),this[_0x53b465(0x26e)][_0x53b465(0x2f8)],!![]),await this['setStateAsync']('info.sortRunsToday',this['traffic'][_0x53b465(0x369)],!![]),await this[_0x53b465(0x37d)]('info.alexaWritesToday',this[_0x53b465(0x26e)][_0x53b465(0x28a)],!![]),await this['setStateAsync'](_0x53b465(0x20e),this['traffic']['compatibilityWrites'],!![]),await this[_0x53b465(0x37d)](_0x53b465(0x29c),this[_0x53b465(0x26e)][_0x53b465(0x217)],!![]),await this[_0x53b465(0x37d)](_0x53b465(0x36a),JSON[_0x53b465(0x247)]({...this[_0x53b465(0x26e)],'note':_0x53b465(0x2da)},null,0x2),!![]);}async['loadStatistics'](){const _0x190396=_0x259ade;try{const _0x5f053c=await this[_0x190396(0x258)](_0x190396(0x2c3));this['statistics']=(0x0,statistics_1[_0x190396(0x28d)])(_0x5f053c&&typeof _0x5f053c[_0x190396(0x350)]===_0x190396(0x364)&&_0x5f053c[_0x190396(0x350)]['trim']()?JSON['parse'](_0x5f053c['val']):null);}catch{this[_0x190396(0x2b1)]=(0x0,statistics_1[_0x190396(0x23a)])();}await this[_0x190396(0x2ab)]();}async[_0x259ade(0x2ab)](){const _0x57849b=_0x259ade;this[_0x57849b(0x2b1)][_0x57849b(0x2b4)]=new Date()[_0x57849b(0x36d)](),await this['setStateAsync']('info.statistics',JSON[_0x57849b(0x247)](this['statistics'],null,0x2),!![]);}async[_0x259ade(0x37c)](){const _0x177da5=_0x259ade;try{const _0xf82c0d=await this[_0x177da5(0x22d)]('https://registry.npmjs.org/iobroker.shoppingroute'),_0x52155f=_0xf82c0d[_0x177da5(0x348)]||{},_0x5a73c6=typeof _0x52155f['beta']===_0x177da5(0x364)?_0x52155f[_0x177da5(0x1d0)]:'',_0x576da1=typeof _0x52155f['latest']==='string'?_0x52155f['latest']:'';this[_0x177da5(0x357)]=_0x5a73c6||_0x576da1,this['lastVersionCheck']=new Date()[_0x177da5(0x36d)](),await this['setStateAsync']('info.versionBeta',this[_0x177da5(0x357)]||_0x177da5(0x24d),!![]),await this[_0x177da5(0x37d)]('info.updateAvailable',Boolean(this['latestBetaVersion']&&this['latestBetaVersion']!==VERSION),!![]),await this[_0x177da5(0x37d)]('info.versionCheck',this[_0x177da5(0x2b2)]+'\x20–\x20npm\x20beta:\x20'+(this['latestBetaVersion']||_0x177da5(0x24d)),!![]);}catch(_0x1c9686){this['lastVersionCheck']=new Date()[_0x177da5(0x36d)](),await this[_0x177da5(0x37d)]('info.versionCheck',this[_0x177da5(0x2b2)]+'\x20–\x20npm-Abfrage\x20fehlgeschlagen:\x20'+(_0x1c9686 instanceof Error?_0x1c9686['message']:String(_0x1c9686)),!![]);}await this[_0x177da5(0x2ed)]();}[_0x259ade(0x22d)](_0x352782){return new Promise((_0x4859ca,_0x32d858)=>{const _0x58e300=_0x4105,_0x3cbbc6=https['get'](_0x352782,{'headers':{'User-Agent':'ioBroker.shoppingroute/'+VERSION}},_0x52ce02=>{const _0x56c4b0=_0x4105;if((_0x52ce02[_0x56c4b0(0x1e2)]||0x1f4)>=0x190){_0x52ce02['resume'](),_0x32d858(new Error(_0x56c4b0(0x299)+_0x52ce02['statusCode']));return;}let _0x232d0f='';_0x52ce02['setEncoding'](_0x56c4b0(0x32b)),_0x52ce02['on'](_0x56c4b0(0x33d),_0x399c57=>{_0x232d0f+=_0x399c57;}),_0x52ce02['on']('end',()=>{const _0x52514e=_0x56c4b0;try{_0x4859ca(JSON[_0x52514e(0x322)](_0x232d0f));}catch(_0x32dde7){_0x32d858(_0x32dde7 instanceof Error?_0x32dde7:new Error(_0x52514e(0x321)));}});});_0x3cbbc6[_0x58e300(0x378)](0x1f40,()=>_0x3cbbc6['destroy'](new Error('Timeout'))),_0x3cbbc6['on']('error',_0x32d858);});}async[_0x259ade(0x2ed)](){const _0x1e9a9d=_0x259ade,_0x1bbd4f={'generatedAt':new Date()[_0x1e9a9d(0x36d)](),'shoppingrouteVersion':VERSION,'node':process['version'],'alexaInstance':this[_0x1e9a9d(0x32c)],'alexa2Version':this['alexa2Version'],'alexaRemote2Version':this[_0x1e9a9d(0x2e6)],'lists':this['listConfigs']['map'](_0x354fc4=>({'name':_0x354fc4[_0x1e9a9d(0x1fa)],'activeItems':this[_0x1e9a9d(0x32d)]['get'](_0x354fc4['name'])||0x0})),'dryRun':this[_0x1e9a9d(0x28f)],'learningMode':this[_0x1e9a9d(0x2b6)],'apiSafeMode':this['apiSafeMode'],'writeCapability':this['writeCapability'],'lastCompatibilityTest':this['lastCompatibilityTest'],'lastError':String((await this[_0x1e9a9d(0x258)](_0x1e9a9d(0x2d9)))?.[_0x1e9a9d(0x350)]||''),'traffic':this[_0x1e9a9d(0x26e)],'update':{'installed':VERSION,'npmBeta':this[_0x1e9a9d(0x357)]||_0x1e9a9d(0x24d),'checkedAt':this[_0x1e9a9d(0x2b2)]||_0x1e9a9d(0x34a)},'privacy':_0x1e9a9d(0x381)};await this[_0x1e9a9d(0x37d)](_0x1e9a9d(0x277),JSON['stringify'](_0x1bbd4f,null,0x2),!![]);}async[_0x259ade(0x241)](_0x5d9328){const _0x554b77=_0x259ade;await this['setStateAsync'](_0x554b77(0x2d9),_0x5d9328,!![]);}[_0x259ade(0x1d8)](_0x53c05f){const _0x2fedb2=_0x259ade;return new Promise(_0x551fc7=>this[_0x2fedb2(0x378)](_0x551fc7,_0x53c05f));}static[_0x259ade(0x1e3)](){return[...DEFAULT_CATEGORIES];}}function _0x4105(_0x469395,_0x4d9aae){_0x469395=_0x469395-0x1cb;const _0x45a3d8=_0x45a3();let _0x4105d0=_0x45a3d8[_0x469395];return _0x4105d0;}exports[_0x259ade(0x301)]=ShoppingRoute;if(require[_0x259ade(0x1e1)]!==module)module[_0x259ade(0x240)]=_0x107230=>new ShoppingRoute(_0x107230);else((()=>new ShoppingRoute())());
|
package/io-package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "shoppingroute",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.2",
|
|
5
5
|
"titleLang": {
|
|
6
6
|
"en": "ShoppingRoute",
|
|
7
7
|
"de": "ShoppingRoute",
|
|
@@ -887,6 +887,19 @@
|
|
|
887
887
|
},
|
|
888
888
|
"native": {}
|
|
889
889
|
},
|
|
890
|
+
{
|
|
891
|
+
"_id": "info.sortTransaction",
|
|
892
|
+
"type": "state",
|
|
893
|
+
"common": {
|
|
894
|
+
"name": "Buffered sort transaction journal",
|
|
895
|
+
"type": "string",
|
|
896
|
+
"role": "json",
|
|
897
|
+
"read": true,
|
|
898
|
+
"write": false,
|
|
899
|
+
"def": "{}"
|
|
900
|
+
},
|
|
901
|
+
"native": {}
|
|
902
|
+
},
|
|
890
903
|
{
|
|
891
904
|
"_id": "info.sortRunsToday",
|
|
892
905
|
"type": "state",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.shoppingroute",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Smart Alexa shopping-list routing by market, product group and individual store walking route with learning, multi-list support and API protection.",
|
|
5
5
|
"author": "RaviniZib",
|
|
6
6
|
"license": "MIT",
|