tpmkms_4wp 9.5.1-beta.2 → 9.5.1-beta.21

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.
Files changed (84) hide show
  1. package/common/animals.instance.json +21 -61
  2. package/common/asking.js +102 -100
  3. package/common/can.instance.json +2180 -0
  4. package/common/can.js +254 -0
  5. package/common/can.test.json +50706 -0
  6. package/common/characters.js +3 -3
  7. package/common/colors.instance.json +38 -10
  8. package/common/comparable.instance.json +2 -2
  9. package/common/concept.test.json +54 -40
  10. package/common/conjunction.js +13 -5
  11. package/common/crew.instance.json +241 -123
  12. package/common/crew.js +1 -1
  13. package/common/currency.js +1 -1
  14. package/common/dates.instance.json +87 -3
  15. package/common/dialogues.js +41 -119
  16. package/common/dimension.instance.json +16 -12
  17. package/common/dimension.js +23 -4
  18. package/common/dimension.test.json +1758 -2351
  19. package/common/edible.instance.json +79 -95
  20. package/common/emotions.instance.json +53 -80
  21. package/common/emotions.js +1 -1
  22. package/common/english_helpers.js +277 -67
  23. package/common/fastfood.instance.json +35 -663
  24. package/common/fastfood.js +4 -4
  25. package/common/formulas.instance.json +1 -1
  26. package/common/gdefaults.js +85 -14
  27. package/common/help.js +2 -2
  28. package/common/help.test.json +65 -11
  29. package/common/helpers/concept.js +1 -1
  30. package/common/helpers/conjunction.js +54 -44
  31. package/common/helpers/dateTimeSelectors.js +2 -2
  32. package/common/helpers/dialogues.js +1 -1
  33. package/common/helpers/formulas.js +13 -11
  34. package/common/helpers/menus.js +12 -12
  35. package/common/helpers/meta.js +8 -8
  36. package/common/helpers/properties.js +102 -21
  37. package/common/helpers.js +82 -46
  38. package/common/hierarchy.js +4 -3
  39. package/common/kirk.instance.json +1 -1
  40. package/common/latin.instance.json +10 -10
  41. package/common/latin.js +5 -5
  42. package/common/length.instance.json +20 -2
  43. package/common/length.test.json +2241 -1801
  44. package/common/math.instance.json +20 -20
  45. package/common/math.js +45 -44
  46. package/common/menus.instance.json +3 -3
  47. package/common/menus.js +1 -1
  48. package/common/meta.js +49 -33
  49. package/common/ordering.instance.json +20 -30
  50. package/common/ordering.js +1 -1
  51. package/common/ordering.test.json +354 -296
  52. package/common/people.instance.json +56 -258
  53. package/common/people.js +1 -1
  54. package/common/people.test.json +952 -681
  55. package/common/pipboy.instance.json +72 -16
  56. package/common/pokemon.instance.json +8 -8
  57. package/common/pokemon.js +1 -1
  58. package/common/pressure.instance.json +6 -2
  59. package/common/properties.instance.json +4 -12
  60. package/common/properties.js +16 -3
  61. package/common/reminders.js +1 -1
  62. package/common/reports.instance.json +3 -3
  63. package/common/reports.js +18 -16
  64. package/common/scorekeeper.js +4 -4
  65. package/common/sdefaults.js +22 -2
  66. package/common/spock.instance.json +1 -1
  67. package/common/stgame.js +1 -1
  68. package/common/stm.js +2 -2
  69. package/common/tell.js +1 -1
  70. package/common/temperature.instance.json +6 -2
  71. package/common/tester.js +3 -3
  72. package/common/time.js +3 -3
  73. package/common/tokenize.js +1 -1
  74. package/common/weight.instance.json +19 -2
  75. package/common/words.instance.json +9 -0
  76. package/common/words.js +53 -0
  77. package/common/words.test.json +2 -0
  78. package/common/wp.instance.json +320 -8
  79. package/common/wp.js +8 -4
  80. package/common/wp.test.json +3469 -0
  81. package/main.js +0 -2
  82. package/package.json +9 -5
  83. package/common/listener.js +0 -50
  84. package/common/listener.test.json +0 -142
@@ -901,7 +901,7 @@
901
901
  ]
902
902
  },
903
903
  {
904
- "apply": "({ask, api}) => {\n // see if followup for drink is needed\n\n const hasDrink = (isA, item) => {\n let hasDrink = false\n for (const modification of (item.modifications || [])) {\n if (isA(modification.id, 'drink')) {\n hasDrink = true\n break\n }\n }\n return hasDrink\n }\n\n const needsDrink = (item) => {\n return item.needsDrink\n }\n\n const askAbout = ({api, isA}) => {\n const items = []\n for (const item of api.items()) {\n if (needsDrink(item) && !hasDrink(isA, item)) {\n items.push(item)\n }\n }\n return items\n }\n\n ask([\n {\n where: where(),\n oneShot: false,\n onNevermind: ({verbatim, ...args}) => {\n // this is cross km boundaries from the dialogues km to this one so the api if for dialogs. \n // i need to get the one for fastfood here.\n const api = args.kms.fastfood.api\n const needsDrink = askAbout({ args, api })\n for (const item of needsDrink) {\n api.remove(item)\n }\n },\n matchq: (args) => askAbout(args).length > 0 && args.context.marker == 'controlEnd',\n applyq: (args) => {\n args.context.cascade = true\n const needsDrink = askAbout(args)\n // const details = args.gp({ marker: 'list', value: needsDrink.map((item) => item.food)})\n if (needsDrink.length > 1) {\n return `What drinks do you want?`\n } else {\n return `What drink do you want?`\n }\n },\n matchr: (args) => {\n if (args.isA(args.context.marker, 'drink') && askAbout(args).length > 0) {\n const needsDrink = askAbout(args)\n if (args.api.isAvailableModification(needsDrink[0].food, { ...args.context , id: args.context.value })) {\n return true\n }\n }\n return false\n },\n applyr: (args) => {\n // TODO check for is available for all modifications\n const needsDrink = askAbout(args)\n const { api, context } = args\n if (isMany(context)) {\n let count = getCount(context) || Number.MAX_SAFE_INTEGER\n for (const item of needsDrink) {\n if (count < 1) {\n break\n }\n count -= 1\n api.addDrink(item.item_id, { id: context.value }) \n }\n } else {\n const item_id = needsDrink[0].item_id\n api.addDrink(item_id, { id: context.value }) \n }\n }\n },\n ])\n }"
904
+ "apply": "({ask, api}) => {\n // see if followup for drink is needed\n\n function hasDrink(isA, item) {\n let hasDrink = false\n for (const modification of (item.modifications || [])) {\n if (isA(modification.id, 'drink')) {\n hasDrink = true\n break\n }\n }\n return hasDrink\n }\n\n function needsDrink (item) {\n return item.needsDrink\n }\n\n function askAbout({api, isA}) {\n const items = []\n for (const item of api.items()) {\n if (needsDrink(item) && !hasDrink(isA, item)) {\n items.push(item)\n }\n }\n return items\n }\n\n ask([\n {\n where: where(),\n oneShot: false,\n onNevermind: ({verbatim, ...args}) => {\n // this is cross km boundaries from the dialogues km to this one so the api if for dialogs. \n // i need to get the one for fastfood here.\n const api = args.kms.fastfood.api\n const needsDrink = askAbout({ args, api })\n for (const item of needsDrink) {\n api.remove(item)\n }\n },\n matchq: (args) => askAbout(args).length > 0 && args.context.marker == 'controlEnd',\n applyq: (args) => {\n args.context.cascade = true\n const needsDrink = askAbout(args)\n // const details = args.gp({ marker: 'list', value: needsDrink.map((item) => item.food)})\n if (needsDrink.length > 1) {\n return `What drinks do you want?`\n } else {\n return `What drink do you want?`\n }\n },\n matchr: (args) => {\n if (args.isA(args.context.marker, 'drink') && askAbout(args).length > 0) {\n const needsDrink = askAbout(args)\n if (args.api.isAvailableModification(needsDrink[0].food, { ...args.context , id: args.context.value })) {\n return true\n }\n }\n return false\n },\n applyr: (args) => {\n // TODO check for is available for all modifications\n const needsDrink = askAbout(args)\n const { api, context } = args\n if (isMany(context)) {\n let count = getCount(context) || Number.MAX_SAFE_INTEGER\n for (const item of needsDrink) {\n if (count < 1) {\n break\n }\n count -= 1\n api.addDrink(item.item_id, { id: context.value }) \n }\n } else {\n const item_id = needsDrink[0].item_id\n api.addDrink(item_id, { id: context.value }) \n }\n }\n },\n ])\n }"
905
905
  },
906
906
  {
907
907
  "operators": [
@@ -4137,7 +4137,7 @@
4137
4137
  "word": "food",
4138
4138
  "range": {
4139
4139
  "start": 0,
4140
- "end": 16
4140
+ "end": 3
4141
4141
  },
4142
4142
  "dead": true,
4143
4143
  "types": [
@@ -7197,7 +7197,7 @@
7197
7197
  "word": "drinks",
7198
7198
  "range": {
7199
7199
  "start": 0,
7200
- "end": 19
7200
+ "end": 5
7201
7201
  },
7202
7202
  "dead": true,
7203
7203
  "types": [
@@ -39627,7 +39627,7 @@
39627
39627
  "word": "club",
39628
39628
  "range": {
39629
39629
  "start": 0,
39630
- "end": 17
39630
+ "end": 3
39631
39631
  },
39632
39632
  "dead": true,
39633
39633
  "types": [
@@ -69467,7 +69467,7 @@
69467
69467
  "word": "fries",
69468
69468
  "range": {
69469
69469
  "start": 0,
69470
- "end": 28
69470
+ "end": 11
69471
69471
  },
69472
69472
  "types": [
69473
69473
  "fry",
@@ -89029,7 +89029,7 @@
89029
89029
  ""
89030
89030
  ],
89031
89031
  "paraphrases": [
89032
- "strawberry, guava, mango passion, wild berry and strawberry banana modifies smoothie"
89032
+ "strawberry, guava, mango passion, wild berry and strawberry banana modify smoothie"
89033
89033
  ],
89034
89034
  "paraphrasesParenthesized": [],
89035
89035
  "generatedParenthesized": [],
@@ -96141,7 +96141,7 @@
96141
96141
  "text": "strawberry, guava, mango passion, wild berry, and strawberry banana",
96142
96142
  "range": {
96143
96143
  "start": 0,
96144
- "end": 80
96144
+ "end": 66
96145
96145
  },
96146
96146
  "types": [
96147
96147
  "guava",
@@ -96646,24 +96646,6 @@
96646
96646
  0
96647
96647
  ]
96648
96648
  ],
96649
- [
96650
- [
96651
- "countable",
96652
- 0
96653
- ],
96654
- [
96655
- "is",
96656
- 0
96657
- ],
96658
- [
96659
- "list",
96660
- 1
96661
- ],
96662
- [
96663
- "strawberry",
96664
- 0
96665
- ]
96666
- ],
96667
96649
  [
96668
96650
  [
96669
96651
  "countable",
@@ -109138,7 +109120,7 @@
109138
109120
  "text": "strawberry, guava, mango passion, wild berry, and strawberry banana",
109139
109121
  "range": {
109140
109122
  "start": 0,
109141
- "end": 91
109123
+ "end": 66
109142
109124
  },
109143
109125
  "types": [
109144
109126
  "guava",
@@ -116562,7 +116544,7 @@
116562
116544
  "word": "smoothie",
116563
116545
  "range": {
116564
116546
  "start": 0,
116565
- "end": 20
116547
+ "end": 9
116566
116548
  },
116567
116549
  "dead": true,
116568
116550
  "types": [
@@ -122224,7 +122206,7 @@
122224
122206
  "text": "french fries and waffle fries",
122225
122207
  "range": {
122226
122208
  "start": 0,
122227
- "end": 38
122209
+ "end": 28
122228
122210
  },
122229
122211
  "types": [
122230
122212
  "french_fry",
@@ -128406,7 +128388,7 @@
128406
128388
  "text": "single, double, triple, baconator, and bacon deluxe",
128407
128389
  "range": {
128408
128390
  "start": 0,
128409
- "end": 65
128391
+ "end": 50
128410
128392
  },
128411
128393
  "types": [
128412
128394
  "bacon_deluxe",
@@ -136306,7 +136288,7 @@
136306
136288
  "text": "spicy, homestyle, asiago ranch chicken club, ultimate chicken grill and premium cod",
136307
136289
  "range": {
136308
136290
  "start": 0,
136309
- "end": 97
136291
+ "end": 82
136310
136292
  },
136311
136293
  "types": [
136312
136294
  "asiago_ranch_chicken_club",
@@ -144449,7 +144431,7 @@
144449
144431
  "word": "meals",
144450
144432
  "range": {
144451
144433
  "start": 0,
144452
- "end": 13
144434
+ "end": 4
144453
144435
  },
144454
144436
  "dead": true,
144455
144437
  "types": [
@@ -150205,7 +150187,7 @@
150205
150187
  "word": "combo",
150206
150188
  "range": {
150207
150189
  "start": 0,
150208
- "end": 16
150190
+ "end": 6
150209
150191
  },
150210
150192
  "dead": true,
150211
150193
  "types": [
@@ -150305,24 +150287,6 @@
150305
150287
  0
150306
150288
  ]
150307
150289
  ],
150308
- [
150309
- [
150310
- "a",
150311
- 0
150312
- ],
150313
- [
150314
- "is",
150315
- 0
150316
- ],
150317
- [
150318
- "meal",
150319
- 0
150320
- ],
150321
- [
150322
- "unknown",
150323
- 0
150324
- ]
150325
- ],
150326
150290
  [
150327
150291
  [
150328
150292
  "is",
@@ -156182,7 +156146,7 @@
156182
156146
  "word": "chili",
156183
156147
  "range": {
156184
156148
  "start": 0,
156185
- "end": 14
156149
+ "end": 4
156186
156150
  },
156187
156151
  "dead": true,
156188
156152
  "types": [
@@ -162092,7 +162056,7 @@
162092
162056
  "word": "shake",
162093
162057
  "range": {
162094
162058
  "start": 0,
162095
- "end": 17
162059
+ "end": 6
162096
162060
  },
162097
162061
  "dead": true,
162098
162062
  "types": [
@@ -210058,7 +210022,7 @@
210058
210022
  "word": "frosty",
210059
210023
  "range": {
210060
210024
  "start": 0,
210061
- "end": 16
210025
+ "end": 5
210062
210026
  },
210063
210027
  "dead": true,
210064
210028
  "types": [
@@ -327172,7 +327136,7 @@
327172
327136
  "word": "wrap",
327173
327137
  "range": {
327174
327138
  "start": 0,
327175
- "end": 22
327139
+ "end": 8
327176
327140
  },
327177
327141
  "types": [
327178
327142
  "go_wrap",
@@ -344610,7 +344574,7 @@
344610
344574
  "text": "breakfast baconator, french toast sandwich, egg muffin, chicken on french toast, pancake platter, double sausage muffin, pancakes, french toast and oatmeal",
344611
344575
  "range": {
344612
344576
  "start": 0,
344613
- "end": 174
344577
+ "end": 154
344614
344578
  },
344615
344579
  "types": [
344616
344580
  "breakfast_baconator",
@@ -345517,150 +345481,6 @@
345517
345481
  0
345518
345482
  ]
345519
345483
  ],
345520
- [
345521
- [
345522
- "breakfast",
345523
- 0
345524
- ],
345525
- [
345526
- "breakfast_baconator",
345527
- 0
345528
- ],
345529
- [
345530
- "chicken",
345531
- 0
345532
- ],
345533
- [
345534
- "comma",
345535
- 0
345536
- ],
345537
- [
345538
- "double",
345539
- 0
345540
- ],
345541
- [
345542
- "egg_muffin",
345543
- 0
345544
- ],
345545
- [
345546
- "french",
345547
- 0
345548
- ],
345549
- [
345550
- "french_toast_sandwich",
345551
- 0
345552
- ],
345553
- [
345554
- "is",
345555
- 0
345556
- ],
345557
- [
345558
- "list",
345559
- 0
345560
- ],
345561
- [
345562
- "meal",
345563
- 0
345564
- ],
345565
- [
345566
- "muffin",
345567
- 0
345568
- ],
345569
- [
345570
- "oatmeal",
345571
- 0
345572
- ],
345573
- [
345574
- "on",
345575
- 0
345576
- ],
345577
- [
345578
- "pancake",
345579
- 0
345580
- ],
345581
- [
345582
- "platter",
345583
- 0
345584
- ],
345585
- [
345586
- "sausage",
345587
- 0
345588
- ],
345589
- [
345590
- "toast",
345591
- 0
345592
- ]
345593
- ],
345594
- [
345595
- [
345596
- "breakfast",
345597
- 0
345598
- ],
345599
- [
345600
- "breakfast_baconator",
345601
- 0
345602
- ],
345603
- [
345604
- "chicken_on_french_toast",
345605
- 0
345606
- ],
345607
- [
345608
- "comma",
345609
- 0
345610
- ],
345611
- [
345612
- "double",
345613
- 0
345614
- ],
345615
- [
345616
- "egg_muffin",
345617
- 0
345618
- ],
345619
- [
345620
- "french",
345621
- 0
345622
- ],
345623
- [
345624
- "french_toast_sandwich",
345625
- 0
345626
- ],
345627
- [
345628
- "is",
345629
- 0
345630
- ],
345631
- [
345632
- "list",
345633
- 0
345634
- ],
345635
- [
345636
- "meal",
345637
- 0
345638
- ],
345639
- [
345640
- "muffin",
345641
- 0
345642
- ],
345643
- [
345644
- "oatmeal",
345645
- 0
345646
- ],
345647
- [
345648
- "pancake",
345649
- 0
345650
- ],
345651
- [
345652
- "pancake_platter",
345653
- 0
345654
- ],
345655
- [
345656
- "sausage",
345657
- 0
345658
- ],
345659
- [
345660
- "toast",
345661
- 0
345662
- ]
345663
- ],
345664
345484
  [
345665
345485
  [
345666
345486
  "breakfast",
@@ -360063,7 +359883,7 @@
360063
359883
  "text": "single, double, triple, baconator, bacon deluxe, spicy homestyle and premium cod",
360064
359884
  "range": {
360065
359885
  "start": 0,
360066
- "end": 89
359886
+ "end": 79
360067
359887
  },
360068
359888
  "types": [
360069
359889
  "bacon_deluxe",
@@ -360406,7 +360226,7 @@
360406
360226
  ],
360407
360227
  [
360408
360228
  [
360409
- "bacon",
360229
+ "bacon_deluxe",
360410
360230
  0
360411
360231
  ],
360412
360232
  [
@@ -360421,10 +360241,6 @@
360421
360241
  "comma",
360422
360242
  0
360423
360243
  ],
360424
- [
360425
- "deluxe",
360426
- 0
360427
- ],
360428
360244
  [
360429
360245
  "double",
360430
360246
  0
@@ -360464,7 +360280,7 @@
360464
360280
  ],
360465
360281
  [
360466
360282
  [
360467
- "bacon",
360283
+ "bacon_deluxe",
360468
360284
  0
360469
360285
  ],
360470
360286
  [
@@ -360475,14 +360291,6 @@
360475
360291
  "cod",
360476
360292
  0
360477
360293
  ],
360478
- [
360479
- "comma",
360480
- 0
360481
- ],
360482
- [
360483
- "deluxe",
360484
- 0
360485
- ],
360486
360294
  [
360487
360295
  "double",
360488
360296
  0
@@ -360529,14 +360337,6 @@
360529
360337
  "baconator",
360530
360338
  0
360531
360339
  ],
360532
- [
360533
- "cod",
360534
- 0
360535
- ],
360536
- [
360537
- "comma",
360538
- 0
360539
- ],
360540
360340
  [
360541
360341
  "double",
360542
360342
  0
@@ -360558,7 +360358,7 @@
360558
360358
  0
360559
360359
  ],
360560
360360
  [
360561
- "premium",
360361
+ "premium_cod",
360562
360362
  0
360563
360363
  ],
360564
360364
  [
@@ -360583,34 +360383,22 @@
360583
360383
  "baconator",
360584
360384
  0
360585
360385
  ],
360586
- [
360587
- "cod",
360588
- 0
360589
- ],
360590
360386
  [
360591
360387
  "double",
360592
360388
  0
360593
360389
  ],
360594
- [
360595
- "homestyle",
360596
- 0
360597
- ],
360598
360390
  [
360599
360391
  "is",
360600
360392
  0
360601
360393
  ],
360602
360394
  [
360603
360395
  "list",
360604
- 0
360396
+ 1
360605
360397
  ],
360606
360398
  [
360607
360399
  "meal",
360608
360400
  0
360609
360401
  ],
360610
- [
360611
- "premium",
360612
- 0
360613
- ],
360614
360402
  [
360615
360403
  "single",
360616
360404
  0
@@ -360637,97 +360425,13 @@
360637
360425
  "double",
360638
360426
  0
360639
360427
  ],
360640
- [
360641
- "homestyle",
360642
- 0
360643
- ],
360644
360428
  [
360645
360429
  "is",
360646
360430
  0
360647
360431
  ],
360648
360432
  [
360649
360433
  "list",
360650
- 0
360651
- ],
360652
- [
360653
- "meal",
360654
- 0
360655
- ],
360656
- [
360657
- "premium_cod",
360658
- 0
360659
- ],
360660
- [
360661
- "single",
360662
- 0
360663
- ],
360664
- [
360665
- "spicy",
360666
- 0
360667
- ],
360668
- [
360669
- "triple",
360670
- 0
360671
- ]
360672
- ],
360673
- [
360674
- [
360675
- "bacon_deluxe",
360676
- 0
360677
- ],
360678
- [
360679
- "baconator",
360680
- 0
360681
- ],
360682
- [
360683
- "double",
360684
- 0
360685
- ],
360686
- [
360687
- "is",
360688
- 0
360689
- ],
360690
- [
360691
- "list",
360692
- 1
360693
- ],
360694
- [
360695
- "meal",
360696
- 0
360697
- ],
360698
- [
360699
- "single",
360700
- 0
360701
- ],
360702
- [
360703
- "spicy",
360704
- 0
360705
- ],
360706
- [
360707
- "triple",
360708
- 0
360709
- ]
360710
- ],
360711
- [
360712
- [
360713
- "bacon_deluxe",
360714
- 0
360715
- ],
360716
- [
360717
- "baconator",
360718
- 0
360719
- ],
360720
- [
360721
- "double",
360722
- 0
360723
- ],
360724
- [
360725
- "is",
360726
- 0
360727
- ],
360728
- [
360729
- "list",
360730
- 1
360434
+ 1
360731
360435
  ],
360732
360436
  [
360733
360437
  "meal",
@@ -395706,7 +395410,7 @@
395706
395410
  "text": "coke, coca cola, diet coke, sprite, fanta, barqs and iced tea",
395707
395411
  "range": {
395708
395412
  "start": 0,
395709
- "end": 68
395413
+ "end": 60
395710
395414
  },
395711
395415
  "types": [
395712
395416
  "coca_cola",
@@ -476151,7 +475855,7 @@
476151
475855
  "text": "fries and drinks",
476152
475856
  "range": {
476153
475857
  "start": 0,
476154
- "end": 33
475858
+ "end": 15
476155
475859
  },
476156
475860
  "types": [
476157
475861
  "drink",
@@ -485405,7 +485109,7 @@
485405
485109
  ""
485406
485110
  ],
485407
485111
  "paraphrases": [
485408
- "broccoli and cheddar literally modifies potato"
485112
+ "broccoli and cheddar literally modify potato"
485409
485113
  ],
485410
485114
  "paraphrasesParenthesized": [],
485411
485115
  "generatedParenthesized": [],
@@ -494724,7 +494428,7 @@
494724
494428
  ""
494725
494429
  ],
494726
494430
  "paraphrases": [
494727
- "bacon and cheddar literally modifies potato"
494431
+ "bacon and cheddar literally modify potato"
494728
494432
  ],
494729
494433
  "paraphrasesParenthesized": [],
494730
494434
  "generatedParenthesized": [],
@@ -504120,7 +503824,7 @@
504120
503824
  ""
504121
503825
  ],
504122
503826
  "paraphrases": [
504123
- "chili and cheese literally modifies potato"
503827
+ "chili and cheese literally modify potato"
504124
503828
  ],
504125
503829
  "paraphrasesParenthesized": [],
504126
503830
  "generatedParenthesized": [],
@@ -541514,7 +541218,7 @@
541514
541218
  "word": "water",
541515
541219
  "range": {
541516
541220
  "start": 0,
541517
- "end": 23
541221
+ "end": 12
541518
541222
  },
541519
541223
  "types": [
541520
541224
  "bottled_water",
@@ -570901,7 +570605,7 @@
570901
570605
  "text": "hamburgers, cheeseburgers, crispy chicken and nuggets",
570902
570606
  "range": {
570903
570607
  "start": 0,
570904
- "end": 67
570608
+ "end": 52
570905
570609
  },
570906
570610
  "types": [
570907
570611
  "cheeseburger",
@@ -593232,7 +592936,7 @@
593232
592936
  "text": "nuggets, junior bacon cheeseburgers, chicken go wraps and junior crispy chicken clubs",
593233
592937
  "range": {
593234
592938
  "start": 0,
593235
- "end": 100
592939
+ "end": 84
593236
592940
  },
593237
592941
  "types": [
593238
592942
  "chicken_go_wrap",
@@ -594099,24 +593803,6 @@
594099
593803
  0
594100
593804
  ]
594101
593805
  ],
594102
- [
594103
- [
594104
- "is",
594105
- 0
594106
- ],
594107
- [
594108
- "list",
594109
- 1
594110
- ],
594111
- [
594112
- "meal",
594113
- 0
594114
- ],
594115
- [
594116
- "value",
594117
- 0
594118
- ]
594119
- ],
594120
593806
  [
594121
593807
  [
594122
593808
  "is",
@@ -606001,7 +605687,7 @@
606001
605687
  "text": "combos, chili, fries and drinks",
606002
605688
  "range": {
606003
605689
  "start": 0,
606004
- "end": 43
605690
+ "end": 30
606005
605691
  },
606006
605692
  "types": [
606007
605693
  "chili",
@@ -606978,7 +606664,7 @@
606978
606664
  ]
606979
606665
  },
606980
606666
  {
606981
- "apply": "({ask, api}) => {\n // see if followup for drink is needed\n\n const hasDrink = (isA, item) => {\n let hasDrink = false\n for (const modification of (item.modifications || [])) {\n if (isA(modification.id, 'drink')) {\n hasDrink = true\n break\n }\n }\n return hasDrink\n }\n\n const needsDrink = (item) => {\n return item.needsDrink\n }\n\n const askAbout = ({api, isA}) => {\n const items = []\n for (const item of api.items()) {\n if (needsDrink(item) && !hasDrink(isA, item)) {\n items.push(item)\n }\n }\n return items\n }\n\n ask([\n {\n where: where(),\n oneShot: false,\n onNevermind: ({verbatim, ...args}) => {\n // this is cross km boundaries from the dialogues km to this one so the api if for dialogs. \n // i need to get the one for fastfood here.\n const api = args.kms.fastfood.api\n const needsDrink = askAbout({ args, api })\n for (const item of needsDrink) {\n api.remove(item)\n }\n },\n matchq: (args) => askAbout(args).length > 0 && args.context.marker == 'controlEnd',\n applyq: (args) => {\n args.context.cascade = true\n const needsDrink = askAbout(args)\n // const details = args.gp({ marker: 'list', value: needsDrink.map((item) => item.food)})\n if (needsDrink.length > 1) {\n return `What drinks do you want?`\n } else {\n return `What drink do you want?`\n }\n },\n matchr: (args) => {\n if (args.isA(args.context.marker, 'drink') && askAbout(args).length > 0) {\n const needsDrink = askAbout(args)\n if (args.api.isAvailableModification(needsDrink[0].food, { ...args.context , id: args.context.value })) {\n return true\n }\n }\n return false\n },\n applyr: (args) => {\n // TODO check for is available for all modifications\n const needsDrink = askAbout(args)\n const { api, context } = args\n if (isMany(context)) {\n let count = getCount(context) || Number.MAX_SAFE_INTEGER\n for (const item of needsDrink) {\n if (count < 1) {\n break\n }\n count -= 1\n api.addDrink(item.item_id, { id: context.value }) \n }\n } else {\n const item_id = needsDrink[0].item_id\n api.addDrink(item_id, { id: context.value }) \n }\n }\n },\n ])\n }"
606667
+ "apply": "({ask, api}) => {\n // see if followup for drink is needed\n\n function hasDrink(isA, item) {\n let hasDrink = false\n for (const modification of (item.modifications || [])) {\n if (isA(modification.id, 'drink')) {\n hasDrink = true\n break\n }\n }\n return hasDrink\n }\n\n function needsDrink (item) {\n return item.needsDrink\n }\n\n function askAbout({api, isA}) {\n const items = []\n for (const item of api.items()) {\n if (needsDrink(item) && !hasDrink(isA, item)) {\n items.push(item)\n }\n }\n return items\n }\n\n ask([\n {\n where: where(),\n oneShot: false,\n onNevermind: ({verbatim, ...args}) => {\n // this is cross km boundaries from the dialogues km to this one so the api if for dialogs. \n // i need to get the one for fastfood here.\n const api = args.kms.fastfood.api\n const needsDrink = askAbout({ args, api })\n for (const item of needsDrink) {\n api.remove(item)\n }\n },\n matchq: (args) => askAbout(args).length > 0 && args.context.marker == 'controlEnd',\n applyq: (args) => {\n args.context.cascade = true\n const needsDrink = askAbout(args)\n // const details = args.gp({ marker: 'list', value: needsDrink.map((item) => item.food)})\n if (needsDrink.length > 1) {\n return `What drinks do you want?`\n } else {\n return `What drink do you want?`\n }\n },\n matchr: (args) => {\n if (args.isA(args.context.marker, 'drink') && askAbout(args).length > 0) {\n const needsDrink = askAbout(args)\n if (args.api.isAvailableModification(needsDrink[0].food, { ...args.context , id: args.context.value })) {\n return true\n }\n }\n return false\n },\n applyr: (args) => {\n // TODO check for is available for all modifications\n const needsDrink = askAbout(args)\n const { api, context } = args\n if (isMany(context)) {\n let count = getCount(context) || Number.MAX_SAFE_INTEGER\n for (const item of needsDrink) {\n if (count < 1) {\n break\n }\n count -= 1\n api.addDrink(item.item_id, { id: context.value }) \n }\n } else {\n const item_id = needsDrink[0].item_id\n api.addDrink(item_id, { id: context.value }) \n }\n }\n },\n ])\n }"
606982
606668
  },
606983
606669
  {
606984
606670
  "extraConfig": true,
@@ -607551,24 +607237,6 @@
607551
607237
  0
607552
607238
  ]
607553
607239
  ],
607554
- [
607555
- [
607556
- "a",
607557
- 0
607558
- ],
607559
- [
607560
- "is",
607561
- 0
607562
- ],
607563
- [
607564
- "meal",
607565
- 0
607566
- ],
607567
- [
607568
- "unknown",
607569
- 0
607570
- ]
607571
- ],
607572
607240
  [
607573
607241
  [
607574
607242
  "a",
@@ -607901,122 +607569,6 @@
607901
607569
  0
607902
607570
  ]
607903
607571
  ],
607904
- [
607905
- [
607906
- "bacon",
607907
- 0
607908
- ],
607909
- [
607910
- "baconator",
607911
- 0
607912
- ],
607913
- [
607914
- "cod",
607915
- 0
607916
- ],
607917
- [
607918
- "comma",
607919
- 0
607920
- ],
607921
- [
607922
- "deluxe",
607923
- 0
607924
- ],
607925
- [
607926
- "double",
607927
- 0
607928
- ],
607929
- [
607930
- "homestyle",
607931
- 0
607932
- ],
607933
- [
607934
- "is",
607935
- 0
607936
- ],
607937
- [
607938
- "list",
607939
- 0
607940
- ],
607941
- [
607942
- "meal",
607943
- 0
607944
- ],
607945
- [
607946
- "premium",
607947
- 0
607948
- ],
607949
- [
607950
- "single",
607951
- 0
607952
- ],
607953
- [
607954
- "spicy",
607955
- 0
607956
- ],
607957
- [
607958
- "triple",
607959
- 0
607960
- ]
607961
- ],
607962
- [
607963
- [
607964
- "bacon",
607965
- 0
607966
- ],
607967
- [
607968
- "baconator",
607969
- 0
607970
- ],
607971
- [
607972
- "cod",
607973
- 0
607974
- ],
607975
- [
607976
- "comma",
607977
- 0
607978
- ],
607979
- [
607980
- "deluxe",
607981
- 0
607982
- ],
607983
- [
607984
- "double",
607985
- 0
607986
- ],
607987
- [
607988
- "homestyle",
607989
- 0
607990
- ],
607991
- [
607992
- "is",
607993
- 0
607994
- ],
607995
- [
607996
- "list",
607997
- 0
607998
- ],
607999
- [
608000
- "meal",
608001
- 0
608002
- ],
608003
- [
608004
- "premium",
608005
- 0
608006
- ],
608007
- [
608008
- "single",
608009
- 0
608010
- ],
608011
- [
608012
- "spicy",
608013
- 0
608014
- ],
608015
- [
608016
- "triple",
608017
- 0
608018
- ]
608019
- ],
608020
607572
  [
608021
607573
  [
608022
607574
  "bacon",
@@ -609645,150 +609197,6 @@
609645
609197
  0
609646
609198
  ]
609647
609199
  ],
609648
- [
609649
- [
609650
- "breakfast",
609651
- 0
609652
- ],
609653
- [
609654
- "breakfast_baconator",
609655
- 0
609656
- ],
609657
- [
609658
- "chicken",
609659
- 0
609660
- ],
609661
- [
609662
- "comma",
609663
- 0
609664
- ],
609665
- [
609666
- "double",
609667
- 0
609668
- ],
609669
- [
609670
- "egg_muffin",
609671
- 0
609672
- ],
609673
- [
609674
- "french",
609675
- 0
609676
- ],
609677
- [
609678
- "french_toast_sandwich",
609679
- 0
609680
- ],
609681
- [
609682
- "is",
609683
- 0
609684
- ],
609685
- [
609686
- "list",
609687
- 0
609688
- ],
609689
- [
609690
- "meal",
609691
- 0
609692
- ],
609693
- [
609694
- "muffin",
609695
- 0
609696
- ],
609697
- [
609698
- "oatmeal",
609699
- 0
609700
- ],
609701
- [
609702
- "on",
609703
- 0
609704
- ],
609705
- [
609706
- "pancake",
609707
- 0
609708
- ],
609709
- [
609710
- "platter",
609711
- 0
609712
- ],
609713
- [
609714
- "sausage",
609715
- 0
609716
- ],
609717
- [
609718
- "toast",
609719
- 0
609720
- ]
609721
- ],
609722
- [
609723
- [
609724
- "breakfast",
609725
- 0
609726
- ],
609727
- [
609728
- "breakfast_baconator",
609729
- 0
609730
- ],
609731
- [
609732
- "chicken_on_french_toast",
609733
- 0
609734
- ],
609735
- [
609736
- "comma",
609737
- 0
609738
- ],
609739
- [
609740
- "double",
609741
- 0
609742
- ],
609743
- [
609744
- "egg_muffin",
609745
- 0
609746
- ],
609747
- [
609748
- "french",
609749
- 0
609750
- ],
609751
- [
609752
- "french_toast_sandwich",
609753
- 0
609754
- ],
609755
- [
609756
- "is",
609757
- 0
609758
- ],
609759
- [
609760
- "list",
609761
- 0
609762
- ],
609763
- [
609764
- "meal",
609765
- 0
609766
- ],
609767
- [
609768
- "muffin",
609769
- 0
609770
- ],
609771
- [
609772
- "oatmeal",
609773
- 0
609774
- ],
609775
- [
609776
- "pancake",
609777
- 0
609778
- ],
609779
- [
609780
- "pancake_platter",
609781
- 0
609782
- ],
609783
- [
609784
- "sausage",
609785
- 0
609786
- ],
609787
- [
609788
- "toast",
609789
- 0
609790
- ]
609791
- ],
609792
609200
  [
609793
609201
  [
609794
609202
  "breakfast",
@@ -612191,24 +611599,6 @@
612191
611599
  0
612192
611600
  ]
612193
611601
  ],
612194
- [
612195
- [
612196
- "countable",
612197
- 0
612198
- ],
612199
- [
612200
- "is",
612201
- 0
612202
- ],
612203
- [
612204
- "list",
612205
- 1
612206
- ],
612207
- [
612208
- "strawberry",
612209
- 0
612210
- ]
612211
- ],
612212
611602
  [
612213
611603
  [
612214
611604
  "crispy_chicken",
@@ -613023,24 +612413,6 @@
613023
612413
  0
613024
612414
  ]
613025
612415
  ],
613026
- [
613027
- [
613028
- "is",
613029
- 0
613030
- ],
613031
- [
613032
- "list",
613033
- 1
613034
- ],
613035
- [
613036
- "meal",
613037
- 0
613038
- ],
613039
- [
613040
- "value",
613041
- 0
613042
- ]
613043
- ],
613044
612416
  [
613045
612417
  [
613046
612418
  "is",