@everymatrix/casino-search 1.5.3 → 1.5.4

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.
@@ -15177,7 +15177,7 @@
15177
15177
  return child_ctx;
15178
15178
  }
15179
15179
 
15180
- // (286:4) {:else}
15180
+ // (291:4) {:else}
15181
15181
  function create_else_block(ctx) {
15182
15182
  let t0;
15183
15183
  let div;
@@ -15203,7 +15203,7 @@
15203
15203
  t1 = space();
15204
15204
  if (if_block2) if_block2.c();
15205
15205
  attr_dev(div, "class", div_class_value = "SearchResultsContainer " + (/*searchActive*/ ctx[13] == true ? '' : 'NotVisible'));
15206
- add_location(div, file, 296, 6, 10386);
15206
+ add_location(div, file, 301, 6, 10571);
15207
15207
  },
15208
15208
  m: function mount(target, anchor) {
15209
15209
  if (if_block0) if_block0.m(target, anchor);
@@ -15272,14 +15272,14 @@
15272
15272
  block,
15273
15273
  id: create_else_block.name,
15274
15274
  type: "else",
15275
- source: "(286:4) {:else}",
15275
+ source: "(291:4) {:else}",
15276
15276
  ctx
15277
15277
  });
15278
15278
 
15279
15279
  return block;
15280
15280
  }
15281
15281
 
15282
- // (284:4) {#if isLoading}
15282
+ // (289:4) {#if isLoading}
15283
15283
  function create_if_block(ctx) {
15284
15284
  let p;
15285
15285
  let t_value = /*$_*/ ctx[17]('Translations.loading') + "";
@@ -15289,7 +15289,7 @@
15289
15289
  c: function create() {
15290
15290
  p = element("p");
15291
15291
  t = text(t_value);
15292
- add_location(p, file, 284, 6, 9878);
15292
+ add_location(p, file, 289, 6, 10063);
15293
15293
  },
15294
15294
  m: function mount(target, anchor) {
15295
15295
  insert_dev(target, p, anchor);
@@ -15307,14 +15307,14 @@
15307
15307
  block,
15308
15308
  id: create_if_block.name,
15309
15309
  type: "if",
15310
- source: "(284:4) {#if isLoading}",
15310
+ source: "(289:4) {#if isLoading}",
15311
15311
  ctx
15312
15312
  });
15313
15313
 
15314
15314
  return block;
15315
15315
  }
15316
15316
 
15317
- // (294:40)
15317
+ // (299:40)
15318
15318
  function create_if_block_5(ctx) {
15319
15319
  let p;
15320
15320
  let t_value = /*$_*/ ctx[17]('Translations.searchResult') + "";
@@ -15325,7 +15325,7 @@
15325
15325
  p = element("p");
15326
15326
  t = text(t_value);
15327
15327
  attr_dev(p, "class", "SearchMessage");
15328
- add_location(p, file, 294, 8, 10304);
15328
+ add_location(p, file, 299, 8, 10489);
15329
15329
  },
15330
15330
  m: function mount(target, anchor) {
15331
15331
  insert_dev(target, p, anchor);
@@ -15343,14 +15343,14 @@
15343
15343
  block,
15344
15344
  id: create_if_block_5.name,
15345
15345
  type: "if",
15346
- source: "(294:40) ",
15346
+ source: "(299:40) ",
15347
15347
  ctx
15348
15348
  });
15349
15349
 
15350
15350
  return block;
15351
15351
  }
15352
15352
 
15353
- // (287:6) {#if searchActive == true && searchValue.length < 2}
15353
+ // (292:6) {#if searchActive == true && searchValue.length < 2}
15354
15354
  function create_if_block_3(ctx) {
15355
15355
  let p;
15356
15356
  let t0_value = /*$_*/ ctx[17]('Translations.recentSearch') + "";
@@ -15367,7 +15367,7 @@
15367
15367
  if (if_block) if_block.c();
15368
15368
  if_block_anchor = empty();
15369
15369
  attr_dev(p, "class", "SearchMessage");
15370
- add_location(p, file, 287, 8, 9993);
15370
+ add_location(p, file, 292, 8, 10178);
15371
15371
  },
15372
15372
  m: function mount(target, anchor) {
15373
15373
  insert_dev(target, p, anchor);
@@ -15404,14 +15404,14 @@
15404
15404
  block,
15405
15405
  id: create_if_block_3.name,
15406
15406
  type: "if",
15407
- source: "(287:6) {#if searchActive == true && searchValue.length < 2}",
15407
+ source: "(292:6) {#if searchActive == true && searchValue.length < 2}",
15408
15408
  ctx
15409
15409
  });
15410
15410
 
15411
15411
  return block;
15412
15412
  }
15413
15413
 
15414
- // (289:10) {#if searchArray.length == 0}
15414
+ // (294:10) {#if searchArray.length == 0}
15415
15415
  function create_if_block_4(ctx) {
15416
15416
  let div;
15417
15417
  let p;
@@ -15424,9 +15424,9 @@
15424
15424
  p = element("p");
15425
15425
  t = text(t_value);
15426
15426
  attr_dev(p, "class", "SearchMessage");
15427
- add_location(p, file, 290, 12, 10154);
15427
+ add_location(p, file, 295, 12, 10339);
15428
15428
  attr_dev(div, "class", "ResultsContainerError");
15429
- add_location(div, file, 289, 10, 10106);
15429
+ add_location(div, file, 294, 10, 10291);
15430
15430
  },
15431
15431
  m: function mount(target, anchor) {
15432
15432
  insert_dev(target, div, anchor);
@@ -15445,14 +15445,14 @@
15445
15445
  block,
15446
15446
  id: create_if_block_4.name,
15447
15447
  type: "if",
15448
- source: "(289:10) {#if searchArray.length == 0}",
15448
+ source: "(294:10) {#if searchArray.length == 0}",
15449
15449
  ctx
15450
15450
  });
15451
15451
 
15452
15452
  return block;
15453
15453
  }
15454
15454
 
15455
- // (298:8) {#if searchCancelled === false}
15455
+ // (303:8) {#if searchCancelled === false}
15456
15456
  function create_if_block_2(ctx) {
15457
15457
  let each_1_anchor;
15458
15458
  let each_value = /*searchArray*/ ctx[11];
@@ -15513,14 +15513,14 @@
15513
15513
  block,
15514
15514
  id: create_if_block_2.name,
15515
15515
  type: "if",
15516
- source: "(298:8) {#if searchCancelled === false}",
15516
+ source: "(303:8) {#if searchCancelled === false}",
15517
15517
  ctx
15518
15518
  });
15519
15519
 
15520
15520
  return block;
15521
15521
  }
15522
15522
 
15523
- // (299:10) {#each searchArray as game}
15523
+ // (304:10) {#each searchArray as game}
15524
15524
  function create_each_block(ctx) {
15525
15525
  let casino_game_thumbnail;
15526
15526
  let casino_game_thumbnail_gamethumbnail_value;
@@ -15561,7 +15561,7 @@
15561
15561
  set_custom_element_data(casino_game_thumbnail, "clientstyling", /*clientstyling*/ ctx[2]);
15562
15562
  set_custom_element_data(casino_game_thumbnail, "clientstylingurl", /*clientstylingurl*/ ctx[3]);
15563
15563
  set_custom_element_data(casino_game_thumbnail, "gamepagemodalurl", /*gamepagemodalurl*/ ctx[6]);
15564
- add_location(casino_game_thumbnail, file, 299, 12, 10555);
15564
+ add_location(casino_game_thumbnail, file, 304, 12, 10740);
15565
15565
  },
15566
15566
  m: function mount(target, anchor) {
15567
15567
  insert_dev(target, casino_game_thumbnail, anchor);
@@ -15658,14 +15658,14 @@
15658
15658
  block,
15659
15659
  id: create_each_block.name,
15660
15660
  type: "each",
15661
- source: "(299:10) {#each searchArray as game}",
15661
+ source: "(304:10) {#each searchArray as game}",
15662
15662
  ctx
15663
15663
  });
15664
15664
 
15665
15665
  return block;
15666
15666
  }
15667
15667
 
15668
- // (324:8) {#if searchValue.length >= 2 && searchArray.length == 0}
15668
+ // (329:8) {#if searchValue.length >= 2 && searchArray.length == 0}
15669
15669
  function create_if_block_1(ctx) {
15670
15670
  let div;
15671
15671
  let p0;
@@ -15685,10 +15685,10 @@
15685
15685
  p1 = element("p");
15686
15686
  t2 = text(t2_value);
15687
15687
  attr_dev(p0, "class", "SearchMessage");
15688
- add_location(p0, file, 325, 12, 11604);
15689
- add_location(p1, file, 326, 12, 11675);
15688
+ add_location(p0, file, 330, 12, 11789);
15689
+ add_location(p1, file, 331, 12, 11860);
15690
15690
  attr_dev(div, "class", "ResultsContainerError");
15691
- add_location(div, file, 324, 10, 11556);
15691
+ add_location(div, file, 329, 10, 11741);
15692
15692
  },
15693
15693
  m: function mount(target, anchor) {
15694
15694
  insert_dev(target, div, anchor);
@@ -15711,7 +15711,7 @@
15711
15711
  block,
15712
15712
  id: create_if_block_1.name,
15713
15713
  type: "if",
15714
- source: "(324:8) {#if searchValue.length >= 2 && searchArray.length == 0}",
15714
+ source: "(329:8) {#if searchValue.length >= 2 && searchArray.length == 0}",
15715
15715
  ctx
15716
15716
  });
15717
15717
 
@@ -15776,47 +15776,47 @@
15776
15776
  attr_dev(path0, "stroke-linecap", "round");
15777
15777
  attr_dev(path0, "stroke-linejoin", "round");
15778
15778
  attr_dev(path0, "d", "m10.48 10.985 2.21 2.373");
15779
- add_location(path0, file, 269, 10, 8855);
15779
+ add_location(path0, file, 274, 10, 9040);
15780
15780
  attr_dev(circle, "cx", "6.5");
15781
15781
  attr_dev(circle, "cy", "6.5");
15782
15782
  attr_dev(circle, "r", "5.75");
15783
15783
  attr_dev(circle, "stroke", "#212121");
15784
15784
  attr_dev(circle, "stroke-width", "1.5");
15785
- add_location(circle, file, 270, 10, 8983);
15785
+ add_location(circle, file, 275, 10, 9168);
15786
15786
  attr_dev(svg0, "width", "14");
15787
15787
  attr_dev(svg0, "height", "15");
15788
15788
  attr_dev(svg0, "fill", "none");
15789
15789
  attr_dev(svg0, "xmlns", "http://www.w3.org/2000/svg");
15790
- add_location(svg0, file, 268, 8, 8769);
15790
+ add_location(svg0, file, 273, 8, 8954);
15791
15791
  attr_dev(div0, "class", "SearchIcon");
15792
- add_location(div0, file, 267, 6, 8736);
15792
+ add_location(div0, file, 272, 6, 8921);
15793
15793
  attr_dev(input, "class", input_class_value = "SearchInput " + (/*searchCancelled*/ ctx[9] ? '' : 'SearchAnimation'));
15794
15794
  attr_dev(input, "type", "search");
15795
15795
  attr_dev(input, "placeholder", input_placeholder_value = /*$_*/ ctx[17]('Translations.placeHolderSearchGames'));
15796
- add_location(input, file, 273, 8, 9092);
15796
+ add_location(input, file, 278, 8, 9277);
15797
15797
  attr_dev(path1, "d", "m1.45 1.5 8.1 8M1.45 9.5l8.1-8");
15798
15798
  attr_dev(path1, "stroke", "#717171");
15799
15799
  attr_dev(path1, "stroke-width", "2");
15800
15800
  attr_dev(path1, "stroke-linecap", "round");
15801
15801
  attr_dev(path1, "stroke-linejoin", "round");
15802
- add_location(path1, file, 276, 12, 9522);
15802
+ add_location(path1, file, 281, 12, 9707);
15803
15803
  attr_dev(svg1, "width", "11");
15804
15804
  attr_dev(svg1, "height", "11");
15805
15805
  attr_dev(svg1, "fill", "none");
15806
15806
  attr_dev(svg1, "xmlns", "http://www.w3.org/2000/svg");
15807
- add_location(svg1, file, 275, 10, 9434);
15807
+ add_location(svg1, file, 280, 10, 9619);
15808
15808
  attr_dev(span, "class", span_class_value = "SearchClearButton " + (/*searchValue*/ ctx[8].length != 0 ? '' : 'NotVisible'));
15809
- add_location(span, file, 274, 8, 9313);
15809
+ add_location(span, file, 279, 8, 9498);
15810
15810
  attr_dev(small, "class", small_class_value = "SearchCancelButton " + (/*searchCancelled*/ ctx[9] ? 'NotVisible' : ''));
15811
- add_location(small, file, 279, 6, 9685);
15811
+ add_location(small, file, 284, 6, 9870);
15812
15812
  attr_dev(div1, "class", "Search");
15813
- add_location(div1, file, 266, 4, 8709);
15813
+ add_location(div1, file, 271, 4, 8894);
15814
15814
 
15815
15815
  attr_dev(div2, "class", "" + ((getDevice(/*userAgent*/ ctx[18]) !== 'PC'
15816
15816
  ? ''
15817
15817
  : 'Desktop') + " CasinoSearch"));
15818
15818
 
15819
- add_location(div2, file, 265, 2, 8592);
15819
+ add_location(div2, file, 270, 2, 8777);
15820
15820
  },
15821
15821
  l: function claim(nodes) {
15822
15822
  throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
@@ -16001,6 +16001,10 @@
16001
16001
  }
16002
16002
 
16003
16003
  Promise.all(promises).then(res => {
16004
+ res = res.filter(function (element) {
16005
+ return !!element;
16006
+ });
16007
+
16004
16008
  $$invalidate(11, searchArray = res.map(item => {
16005
16009
  item.isFavorite = checkFavorite(item.id);
16006
16010
  return item;
@@ -16043,7 +16047,11 @@
16043
16047
  } else {
16044
16048
  fetch(url).then(fetchRes => fetchRes.json()).then(gameData => {
16045
16049
  $$invalidate(14, isLoading = false);
16046
- gamesCache[gameData[0].gameId] = gameData[0];
16050
+
16051
+ if (!gameData.error) {
16052
+ gamesCache[gameData[0].gameId] = gameData[0];
16053
+ }
16054
+
16047
16055
  resolve(gameData[0]);
16048
16056
  }).catch(err => {
16049
16057
  $$invalidate(14, isLoading = false);