vviinn-widgets 2.216.2 → 2.217.1

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 (76) hide show
  1. package/dist/cjs/{index-BM7VfZ_J.js → index-KB8ruJQe.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/resultsPageUrl-Cki7CFQz.js +45 -0
  4. package/dist/cjs/{search.store-DX5IRC4l.js → search.store-C82VhK1A.js} +13 -7
  5. package/dist/cjs/vviinn-button_6.cjs.entry.js +4 -4
  6. package/dist/cjs/vviinn-camera_12.cjs.entry.js +23 -21
  7. package/dist/cjs/vviinn-carousel_10.cjs.entry.js +15 -11
  8. package/dist/cjs/vviinn-shop-the-look.cjs.entry.js +2 -2
  9. package/dist/cjs/vviinn-text-search.cjs.entry.js +21 -15
  10. package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -3
  11. package/dist/cjs/vviinn-widgets.cjs.js +1 -1
  12. package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +3 -5
  13. package/dist/collection/components/vviinn-results/stories/ResultsTemplate.js +3 -1
  14. package/dist/collection/components/vviinn-results/vviinn-results.js +24 -5
  15. package/dist/collection/components/vviinn-shop-the-look/vviinn-shop-the-look.js +1 -1
  16. package/dist/collection/components/vviinn-suggestions/render-helpers.js +4 -2
  17. package/dist/collection/components/vviinn-text-search/helpers/handleSuggestionsKeyDown.js +1 -1
  18. package/dist/collection/components/vviinn-text-search/helpers/renderSuggestions.js +5 -6
  19. package/dist/collection/components/vviinn-text-search/vviinn-text-search.js +34 -8
  20. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +4 -4
  21. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.js +10 -4
  22. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +23 -4
  23. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +33 -14
  24. package/dist/collection/helpers/url/resultsPageUrl.js +24 -7
  25. package/dist/collection/helpers/url/resultsPageUrl.test.js +63 -1
  26. package/dist/collection/store/search.store.js +13 -6
  27. package/dist/esm/{index-CmCUlnFh.js → index-CMX-QEzm.js} +1 -1
  28. package/dist/esm/loader.js +1 -1
  29. package/dist/esm/resultsPageUrl-DbOxfJSz.js +39 -0
  30. package/dist/esm/{search.store-B0ZhYtWV.js → search.store-Bof_HKxz.js} +13 -7
  31. package/dist/esm/vviinn-button_6.entry.js +4 -4
  32. package/dist/esm/vviinn-camera_12.entry.js +23 -21
  33. package/dist/esm/vviinn-carousel_10.entry.js +15 -11
  34. package/dist/esm/vviinn-shop-the-look.entry.js +2 -2
  35. package/dist/esm/vviinn-text-search.entry.js +21 -15
  36. package/dist/esm/vviinn-vps-button.entry.js +3 -3
  37. package/dist/esm/vviinn-widgets.js +1 -1
  38. package/dist/types/components/vviinn-filters/helpers/syncRequestFilters.d.ts +3 -1
  39. package/dist/types/components/vviinn-results/vviinn-results.d.ts +2 -0
  40. package/dist/types/components/vviinn-text-search/vviinn-text-search.d.ts +2 -0
  41. package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +3 -1
  42. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +3 -1
  43. package/dist/types/components.d.ts +36 -4
  44. package/dist/types/helpers/url/resultsPageUrl.d.ts +9 -3
  45. package/dist/types/store/search.store.d.ts +8 -4
  46. package/{www/build/p-a3829a7f.entry.js → dist/vviinn-widgets/p-5ee404fb.entry.js} +1 -1
  47. package/{www/build/p-c64a4923.entry.js → dist/vviinn-widgets/p-756d201c.entry.js} +1 -1
  48. package/dist/vviinn-widgets/{p-1e7d7fc8.entry.js → p-97099d69.entry.js} +1 -1
  49. package/dist/vviinn-widgets/{p-DIMfQtwJ.js → p-DM6fTGU7.js} +1 -1
  50. package/dist/vviinn-widgets/p-DbOxfJSz.js +1 -0
  51. package/dist/vviinn-widgets/p-dcaf6f35.entry.js +1 -0
  52. package/dist/vviinn-widgets/p-e4c19fc9.entry.js +1 -0
  53. package/dist/vviinn-widgets/{p-B--7xBdV.js → p-elxMiKkD.js} +1 -1
  54. package/dist/vviinn-widgets/{p-df67781e.entry.js → p-fbbf34ba.entry.js} +1 -1
  55. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  56. package/package.json +1 -1
  57. package/{dist/vviinn-widgets/p-a3829a7f.entry.js → www/build/p-5ee404fb.entry.js} +1 -1
  58. package/{dist/vviinn-widgets/p-c64a4923.entry.js → www/build/p-756d201c.entry.js} +1 -1
  59. package/www/build/{p-1e7d7fc8.entry.js → p-97099d69.entry.js} +1 -1
  60. package/www/build/{p-DIMfQtwJ.js → p-DM6fTGU7.js} +1 -1
  61. package/www/build/p-DbOxfJSz.js +1 -0
  62. package/www/build/p-dcaf6f35.entry.js +1 -0
  63. package/www/build/p-e4c19fc9.entry.js +1 -0
  64. package/www/build/{p-B--7xBdV.js → p-elxMiKkD.js} +1 -1
  65. package/www/build/{p-df67781e.entry.js → p-fbbf34ba.entry.js} +1 -1
  66. package/www/build/{p-64d1f5a3.js → p-fff4758a.js} +1 -1
  67. package/www/build/vviinn-widgets.esm.js +1 -1
  68. package/www/index.html +1 -1
  69. package/dist/cjs/resultsPageUrl-BMlvrFCW.js +0 -27
  70. package/dist/esm/resultsPageUrl-niHq9WT6.js +0 -22
  71. package/dist/vviinn-widgets/p-137944e9.entry.js +0 -1
  72. package/dist/vviinn-widgets/p-2b96382d.entry.js +0 -1
  73. package/dist/vviinn-widgets/p-niHq9WT6.js +0 -1
  74. package/www/build/p-137944e9.entry.js +0 -1
  75. package/www/build/p-2b96382d.entry.js +0 -1
  76. package/www/build/p-niHq9WT6.js +0 -1
@@ -1 +1 @@
1
- import{a as n,f as r}from"./p-RkvPN2Rk.js";import{r as t,g as e,h as u,j as i,k as o,l as c,n as f,o as a,p as d,q as s,t as l,u as v,v as p,w as h,x as m,y as I,z as g,A as b,E as R,B as x,C as M,D as j,F as y,_ as O,O as U,G as w,H as W,I as S,J as A,K as q,L as k,M as _,N as P,P as C,Q as T,R as E,S as F,T as z,U as N,V,W as D,a as L}from"./p-CrEgr0jU.js";var $,B,H={},K={},J={};function Q(){return $||($=1,function(n){var r=J&&J.__createBinding||(Object.create?function(n,r,t,e){void 0===e&&(e=t);var u=Object.getOwnPropertyDescriptor(r,t);u&&!("get"in u?!r.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,e,u)}:function(n,r,t,e){void 0===e&&(e=t),n[e]=r[t]}),d=J&&J.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),s=J&&J.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(t,n,e);return d(t,n),t},l=J&&J.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var e,u=0,i=r.length;u<i;u++)!e&&u in r||(e||(e=Array.prototype.slice.call(r,0,u)),e[u]=r[u]);return n.concat(e||Array.prototype.slice.call(r))};Object.defineProperty(n,"__esModule",{value:!0}),n.traverse=n.reduceRightWithIndex=n.foldMapWithIndex=n.reduceWithIndex=n.reduceRight=n.foldMap=n.reduce=n.mapWithIndex=n.map=n.flatten=n.duplicate=n.extend=n.flatMap=n.ap=n.alt=n.altW=n.of=n.chunksOf=n.splitAt=n.chop=n.chainWithIndex=n.intersperse=n.prependAll=n.unzip=n.zipWith=n.modifyAt=n.updateAt=n.sort=n.groupBy=n.reverse=n.fromArray=n.unappend=n.unprepend=n.range=n.replicate=n.makeBy=n.fromReadonlyArray=n.rotate=n.union=n.sortBy=n.uniq=n.unsafeUpdateAt=n.unsafeInsertAt=n.append=n.appendW=n.prepend=n.prependW=n.isOutOfBound=n.isNonEmpty=n.empty=void 0,n.insertAt=n.snoc=n.unsnoc=n.uncons=n.filterWithIndex=n.chain=n.intercalate=n.updateLast=n.modifyLast=n.updateHead=n.modifyHead=n.matchRight=n.matchLeft=n.concatAll=n.max=n.min=n.init=n.last=n.tail=n.head=n.apS=n.bind=n.let=n.bindTo=n.Do=n.Comonad=n.Alt=n.TraversableWithIndex=n.Traversable=n.FoldableWithIndex=n.Foldable=n.Monad=n.chainFirst=n.Chain=n.Applicative=n.apSecond=n.apFirst=n.Apply=n.FunctorWithIndex=n.Pointed=n.flap=n.Functor=n.getUnionSemigroup=n.getEq=n.getSemigroup=n.getShow=n.URI=n.extract=n.traverseWithIndex=n.sequence=void 0,n.readonlyNonEmptyArray=n.fold=n.prependToAll=void 0,n.concatW=x,n.concat=M,n.group=j,n.zip=function r(t,e){return void 0===e?function(n){return r(n,t)}:(0,n.zipWith)(t,e,(function(n,r){return[n,r]}))},n.groupSort=function(r){var t=(0,n.sort)(r),e=j(r);return function(r){return(0,n.isNonEmpty)(r)?e(t(r)):n.empty}},n.filter=function(r){return(0,n.filterWithIndex)((function(n,t){return r(t)}))},n.cons=function(r,t){return void 0===t?(0,n.prepend)(r):(0,m.pipe)(t,(0,n.prepend)(r))};var v=o(),p=c(),h=a(),m=u(),I=i(),g=s(t()),b=f(),R=s(e());function x(n){return function(r){return r.concat(n)}}function M(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function j(r){return function(t){var e=t.length;if(0===e)return n.empty;for(var u=[],i=t[0],o=[i],c=1;c<e;c++){var f=t[c];r.equals(f,i)?o.push(f):(u.push(o),o=[i=f])}return u.push(o),u}}n.empty=g.emptyReadonlyArray,n.isNonEmpty=g.isNonEmpty,n.isOutOfBound=function(n,r){return n<0||n>=r.length},n.prependW=function(n){return function(r){return l([n],r,!0)}},n.prepend=n.prependW,n.appendW=function(n){return function(r){return l(l([],r,!0),[n],!1)}},n.append=n.appendW,n.unsafeInsertAt=function(r,t,e){if((0,n.isNonEmpty)(e)){var u=g.fromReadonlyNonEmptyArray(e);return u.splice(r,0,t),u}return[t]},n.unsafeUpdateAt=function(n,r,t){if(t[n]===r)return t;var e=g.fromReadonlyNonEmptyArray(t);return e[n]=r,e},n.uniq=function(r){return function(t){if(1===t.length)return t;for(var e=[(0,n.head)(t)],u=function(n){e.every((function(t){return!r.equals(t,n)}))&&e.push(n)},i=0,o=(0,n.tail)(t);i<o.length;i++)u(o[i]);return e}},n.sortBy=function(r){if((0,n.isNonEmpty)(r)){var t=(0,b.getMonoid)();return(0,n.sort)(r.reduce(t.concat,t.empty))}return m.identity},n.union=function(r){var t=(0,n.uniq)(r);return function(n){return function(r){return t((0,m.pipe)(r,M(n)))}}},n.rotate=function(r){return function(t){var e=t.length,u=Math.round(r)%e;if((0,n.isOutOfBound)(Math.abs(u),t)||0===u)return t;if(u<0){var i=(0,n.splitAt)(-u)(t);return(0,m.pipe)(i[1],M(i[0]))}return(0,n.rotate)(u-e)(t)}},n.fromReadonlyArray=function(r){return(0,n.isNonEmpty)(r)?g.some(r):g.none},n.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),e=[n(0)],u=1;u<t;u++)e.push(n(u));return e}},n.replicate=function(r){return(0,n.makeBy)((function(){return r}))},n.range=function(r,t){return r<=t?(0,n.makeBy)((function(n){return r+n}))(t-r+1):[r]},n.unprepend=function(r){return[(0,n.head)(r),(0,n.tail)(r)]},n.unappend=function(r){return[(0,n.init)(r),(0,n.last)(r)]},n.fromArray=function(r){return(0,n.fromReadonlyArray)(r.slice())},n.reverse=function(r){return 1===r.length?r:l([(0,n.last)(r)],r.slice(0,-1).reverse(),!0)},n.groupBy=function(n){return function(r){for(var t={},e=0,u=r;e<u.length;e++){var i=u[e],o=n(i);g.has.call(t,o)?t[o].push(i):t[o]=[i]}return t}},n.sort=function(n){return function(r){return 1===r.length?r:r.slice().sort(n.compare)}},n.updateAt=function(r,t){return(0,n.modifyAt)(r,(function(){return t}))},n.modifyAt=function(r,t){return function(e){return(0,n.isOutOfBound)(r,e)?g.none:g.some((0,n.unsafeUpdateAt)(r,t(e[r]),e))}},n.zipWith=function(n,r,t){for(var e=[t(n[0],r[0])],u=Math.min(n.length,r.length),i=1;i<u;i++)e[i]=t(n[i],r[i]);return e},n.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],e=1;e<n.length;e++)r[e]=n[e][0],t[e]=n[e][1];return[r,t]},n.prependAll=function(n){return function(r){for(var t=[n,r[0]],e=1;e<r.length;e++)t.push(n,r[e]);return t}},n.intersperse=function(r){return function(t){var e=(0,n.tail)(t);return(0,n.isNonEmpty)(e)?(0,m.pipe)(e,(0,n.prependAll)(r),(0,n.prepend)((0,n.head)(t))):t}},n.chainWithIndex=function(r){return function(t){for(var e=g.fromReadonlyNonEmptyArray(r(0,(0,n.head)(t))),u=1;u<t.length;u++)for(var i=r(u,t[u]),o=0;o<i.length;o++)e.push(i[o]);return e}},n.chop=function(r){return function(t){for(var e=r(t),u=[e[0]],i=e[1];(0,n.isNonEmpty)(i);){var o=r(i),c=o[1];u.push(o[0]),i=c}return u}},n.splitAt=function(r){return function(t){var e=Math.max(1,r);return e>=t.length?[t,n.empty]:[(0,m.pipe)(t.slice(1,e),(0,n.prepend)((0,n.head)(t))),t.slice(e)]}},n.chunksOf=function(r){return(0,n.chop)((0,n.splitAt)(r))};var y=function(r,t){return(0,m.pipe)(r,(0,n.map)(t))},O=function(r,t){return(0,m.pipe)(r,(0,n.mapWithIndex)(t))},U=function(r,t){return(0,m.pipe)(r,(0,n.ap)(t))},w=function(r,t){return(0,m.pipe)(r,(0,n.extend)(t))},W=function(r,t,e){return(0,m.pipe)(r,(0,n.reduce)(t,e))},S=function(r){var t=(0,n.foldMap)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},A=function(r,t,e){return(0,m.pipe)(r,(0,n.reduceRight)(t,e))},q=function(r){var t=(0,n.traverse)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},k=function(r,t){return(0,m.pipe)(r,(0,n.alt)(t))},_=function(r,t,e){return(0,m.pipe)(r,(0,n.reduceWithIndex)(t,e))},P=function(r){var t=(0,n.foldMapWithIndex)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},C=function(r,t,e){return(0,m.pipe)(r,(0,n.reduceRightWithIndex)(t,e))},T=function(r){var t=(0,n.traverseWithIndex)(r);return function(n,r){return(0,m.pipe)(n,t(r))}};n.of=g.singleton,n.altW=function(n){return function(r){return(0,m.pipe)(r,x(n()))}},n.alt=n.altW,n.ap=function(r){return(0,n.flatMap)((function(t){return(0,m.pipe)(r,(0,n.map)(t))}))},n.flatMap=(0,m.dual)(2,(function(r,t){return(0,m.pipe)(r,(0,n.chainWithIndex)((function(n,r){return t(r,n)})))})),n.extend=function(r){return function(t){for(var e=(0,n.tail)(t),u=[r(t)];(0,n.isNonEmpty)(e);)u.push(r(e)),e=(0,n.tail)(e);return u}},n.duplicate=(0,n.extend)(m.identity),n.flatten=(0,n.flatMap)(m.identity),n.map=function(r){return(0,n.mapWithIndex)((function(n,t){return r(t)}))},n.mapWithIndex=function(r){return function(t){for(var e=[r(0,(0,n.head)(t))],u=1;u<t.length;u++)e.push(r(u,t[u]));return e}},n.reduce=function(r,t){return(0,n.reduceWithIndex)(r,(function(n,r,e){return t(r,e)}))},n.foldMap=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,e){return n.concat(t,r(e))}),r(t[0]))}}},n.reduceRight=function(r,t){return(0,n.reduceRightWithIndex)(r,(function(n,r,e){return t(r,e)}))},n.reduceWithIndex=function(n,r){return function(t){return t.reduce((function(n,t,e){return r(e,n,t)}),n)}},n.foldMapWithIndex=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,e,u){return n.concat(t,r(u+1,e))}),r(0,t[0]))}}},n.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,e){return r(e,t,n)}),n)}},n.traverse=function(r){var t=(0,n.traverseWithIndex)(r);return function(n){return t((function(r,t){return n(t)}))}},n.sequence=function(r){return(0,n.traverseWithIndex)(r)(m.SK)},n.traverseWithIndex=function(r){return function(t){return function(e){for(var u=r.map(t(0,(0,n.head)(e)),n.of),i=1;i<e.length;i++)u=r.ap(r.map(u,(function(r){return function(t){return(0,m.pipe)(r,(0,n.append)(t))}})),t(i,e[i]));return u}}},n.extract=g.head,n.URI="ReadonlyNonEmptyArray",n.getShow=function(n){return{show:function(r){return"[".concat(r.map(n.show).join(", "),"]")}}},n.getSemigroup=function(){return{concat:M}},n.getEq=function(n){return(0,h.fromEquals)((function(r,t){return r.length===t.length&&r.every((function(r,e){return n.equals(r,t[e])}))}))},n.getUnionSemigroup=function(r){var t=(0,n.union)(r);return{concat:function(n,r){return t(r)(n)}}},n.Functor={URI:n.URI,map:y},n.flap=(0,I.flap)(n.Functor),n.Pointed={URI:n.URI,of:n.of},n.FunctorWithIndex={URI:n.URI,map:y,mapWithIndex:O},n.Apply={URI:n.URI,map:y,ap:U},n.apFirst=(0,v.apFirst)(n.Apply),n.apSecond=(0,v.apSecond)(n.Apply),n.Applicative={URI:n.URI,map:y,ap:U,of:n.of},n.Chain={URI:n.URI,map:y,ap:U,chain:n.flatMap},n.chainFirst=(0,p.chainFirst)(n.Chain),n.Monad={URI:n.URI,map:y,ap:U,of:n.of,chain:n.flatMap},n.Foldable={URI:n.URI,reduce:W,foldMap:S,reduceRight:A},n.FoldableWithIndex={URI:n.URI,reduce:W,foldMap:S,reduceRight:A,reduceWithIndex:_,foldMapWithIndex:P,reduceRightWithIndex:C},n.Traversable={URI:n.URI,map:y,reduce:W,foldMap:S,reduceRight:A,traverse:q,sequence:n.sequence},n.TraversableWithIndex={URI:n.URI,map:y,mapWithIndex:O,reduce:W,foldMap:S,reduceRight:A,traverse:q,sequence:n.sequence,reduceWithIndex:_,foldMapWithIndex:P,reduceRightWithIndex:C,traverseWithIndex:T},n.Alt={URI:n.URI,map:y,alt:k},n.Comonad={URI:n.URI,map:y,extend:w,extract:n.extract},n.Do=(0,n.of)(g.emptyRecord),n.bindTo=(0,I.bindTo)(n.Functor),n.let=(0,I.let)(n.Functor),n.bind=(0,p.bind)(n.Chain),n.apS=(0,v.apS)(n.Apply),n.head=n.extract,n.tail=g.tail,n.last=function(n){return n[n.length-1]},n.init=function(n){return n.slice(0,-1)},n.min=function(n){var r=R.min(n);return function(n){return n.reduce(r.concat)}},n.max=function(n){var r=R.max(n);return function(n){return n.reduce(r.concat)}},n.concatAll=function(n){return function(r){return r.reduce(n.concat)}},n.matchLeft=function(r){return function(t){return r((0,n.head)(t),(0,n.tail)(t))}},n.matchRight=function(r){return function(t){return r((0,n.init)(t),(0,n.last)(t))}},n.modifyHead=function(r){return function(t){return l([r((0,n.head)(t))],(0,n.tail)(t),!0)}},n.updateHead=function(r){return(0,n.modifyHead)((function(){return r}))},n.modifyLast=function(r){return function(t){return(0,m.pipe)((0,n.init)(t),(0,n.append)(r((0,n.last)(t))))}},n.updateLast=function(r){return(0,n.modifyLast)((function(){return r}))},n.intercalate=function(r){var t=(0,n.concatAll)(r);return function(r){return(0,m.flow)((0,n.intersperse)(r),t)}},n.chain=n.flatMap,n.filterWithIndex=function(r){return function(t){return(0,n.fromReadonlyArray)(t.filter((function(n,t){return r(t,n)})))}},n.uncons=n.unprepend,n.unsnoc=n.unappend,n.snoc=function(n,r){return(0,m.pipe)(n,M([r]))},n.insertAt=function(r,t){return function(e){return r<0||r>e.length?g.none:g.some((0,n.unsafeInsertAt)(r,t,e))}},n.prependToAll=n.prependAll,n.fold=n.concatAll,n.readonlyNonEmptyArray={URI:n.URI,of:n.of,map:y,mapWithIndex:O,ap:U,chain:n.flatMap,extend:w,extract:n.extract,reduce:W,foldMap:S,reduceRight:A,traverse:q,sequence:n.sequence,reduceWithIndex:_,foldMapWithIndex:P,reduceRightWithIndex:C,traverseWithIndex:T,alt:k}}(J)),J}function G(){return B||(B=1,function(n){var r=K&&K.__createBinding||(Object.create?function(n,r,t,e){void 0===e&&(e=t);var u=Object.getOwnPropertyDescriptor(r,t);u&&!("get"in u?!r.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,e,u)}:function(n,r,t,e){void 0===e&&(e=t),n[e]=r[t]}),e=K&&K.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),a=K&&K.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},d=K&&K.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var e,u=0,i=r.length;u<i;u++)!e&&u in r||(e||(e=Array.prototype.slice.call(r,0,u)),e[u]=r[u]);return n.concat(e||Array.prototype.slice.call(r))};Object.defineProperty(n,"__esModule",{value:!0}),n.reduceRightWithIndex=n.reduceRight=n.reduceWithIndex=n.reduce=n.mapWithIndex=n.map=n.flatten=n.duplicate=n.extend=n.flatMap=n.ap=n.alt=n.altW=n.chunksOf=n.splitAt=n.chop=n.chainWithIndex=n.foldMap=n.foldMapWithIndex=n.intersperse=n.prependAll=n.unzip=n.zipWith=n.of=n.copy=n.modifyAt=n.updateAt=n.insertAt=n.sort=n.groupBy=n.reverse=n.unappend=n.unprepend=n.range=n.replicate=n.makeBy=n.fromArray=n.fromReadonlyNonEmptyArray=n.rotate=n.union=n.sortBy=n.uniq=n.unsafeUpdateAt=n.unsafeInsertAt=n.append=n.appendW=n.prepend=n.prependW=n.isOutOfBound=n.isNonEmpty=void 0,n.snoc=n.unsnoc=n.uncons=n.filterWithIndex=n.chain=n.intercalate=n.updateLast=n.modifyLast=n.updateHead=n.modifyHead=n.matchRight=n.matchLeft=n.concatAll=n.max=n.min=n.init=n.last=n.tail=n.head=n.apS=n.bind=n.let=n.bindTo=n.Do=n.Comonad=n.Alt=n.TraversableWithIndex=n.Traversable=n.FoldableWithIndex=n.Foldable=n.Monad=n.chainFirst=n.Chain=n.Applicative=n.apSecond=n.apFirst=n.Apply=n.FunctorWithIndex=n.Pointed=n.flap=n.Functor=n.getUnionSemigroup=n.getEq=n.getSemigroup=n.getShow=n.URI=n.extract=n.traverseWithIndex=n.sequence=n.traverse=void 0,n.nonEmptyArray=n.fold=n.prependToAll=void 0,n.concatW=g,n.concat=b,n.group=R,n.zip=function r(t,e){return void 0===e?function(n){return r(n,t)}:(0,n.zipWith)(t,e,(function(n,r){return[n,r]}))},n.groupSort=function(r){var t=(0,n.sort)(r),e=R(r);return function(r){return(0,n.isNonEmpty)(r)?e(t(r)):[]}},n.filter=function(r){return(0,n.filterWithIndex)((function(n,t){return r(t)}))},n.cons=function(r,t){return void 0===t?(0,n.prepend)(r):(0,v.pipe)(t,(0,n.prepend)(r))};var s=o(),l=c(),v=u(),p=i(),h=a(t()),m=f(),I=a(Q());function g(n){return function(r){return r.concat(n)}}function b(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function R(n){return function(r){var t=r.length;if(0===t)return[];for(var e=[],u=r[0],i=[u],o=1;o<t;o++){var c=r[o];n.equals(c,u)?i.push(c):(e.push(i),i=[u=c])}return e.push(i),e}}n.isNonEmpty=function(n){return n.length>0},n.isOutOfBound=function(n,r){return n<0||n>=r.length},n.prependW=function(n){return function(r){return d([n],r,!0)}},n.prepend=n.prependW,n.appendW=function(n){return function(r){return d(d([],r,!0),[n],!1)}},n.append=n.appendW,n.unsafeInsertAt=function(r,t,e){if((0,n.isNonEmpty)(e)){var u=(0,n.fromReadonlyNonEmptyArray)(e);return u.splice(r,0,t),u}return[t]},n.unsafeUpdateAt=function(r,t,e){var u=(0,n.fromReadonlyNonEmptyArray)(e);return u[r]=t,u},n.uniq=function(r){return function(t){if(1===t.length)return(0,n.copy)(t);for(var e=[(0,n.head)(t)],u=function(n){e.every((function(t){return!r.equals(t,n)}))&&e.push(n)},i=0,o=(0,n.tail)(t);i<o.length;i++)u(o[i]);return e}},n.sortBy=function(r){if((0,n.isNonEmpty)(r)){var t=(0,m.getMonoid)();return(0,n.sort)(r.reduce(t.concat,t.empty))}return n.copy},n.union=function(r){var t=(0,n.uniq)(r);return function(n){return function(r){return t((0,v.pipe)(r,b(n)))}}},n.rotate=function(r){return function(t){var e=t.length,u=Math.round(r)%e;if((0,n.isOutOfBound)(Math.abs(u),t)||0===u)return(0,n.copy)(t);if(u<0){var i=(0,n.splitAt)(-u)(t);return(0,v.pipe)(i[1],b(i[0]))}return(0,n.rotate)(u-e)(t)}},n.fromReadonlyNonEmptyArray=h.fromReadonlyNonEmptyArray,n.fromArray=function(r){return(0,n.isNonEmpty)(r)?h.some(r):h.none},n.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),e=[n(0)],u=1;u<t;u++)e.push(n(u));return e}},n.replicate=function(r){return(0,n.makeBy)((function(){return r}))},n.range=function(r,t){return r<=t?(0,n.makeBy)((function(n){return r+n}))(t-r+1):[r]},n.unprepend=function(r){return[(0,n.head)(r),(0,n.tail)(r)]},n.unappend=function(r){return[(0,n.init)(r),(0,n.last)(r)]},n.reverse=function(r){return d([(0,n.last)(r)],r.slice(0,-1).reverse(),!0)},n.groupBy=function(n){return function(r){for(var t={},e=0,u=r;e<u.length;e++){var i=u[e],o=n(i);h.has.call(t,o)?t[o].push(i):t[o]=[i]}return t}},n.sort=function(n){return function(r){return r.slice().sort(n.compare)}},n.insertAt=function(r,t){return function(e){return r<0||r>e.length?h.none:h.some((0,n.unsafeInsertAt)(r,t,e))}},n.updateAt=function(r,t){return(0,n.modifyAt)(r,(function(){return t}))},n.modifyAt=function(r,t){return function(e){return(0,n.isOutOfBound)(r,e)?h.none:h.some((0,n.unsafeUpdateAt)(r,t(e[r]),e))}},n.copy=n.fromReadonlyNonEmptyArray,n.of=function(n){return[n]},n.zipWith=function(n,r,t){for(var e=[t(n[0],r[0])],u=Math.min(n.length,r.length),i=1;i<u;i++)e[i]=t(n[i],r[i]);return e},n.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],e=1;e<n.length;e++)r[e]=n[e][0],t[e]=n[e][1];return[r,t]},n.prependAll=function(n){return function(r){for(var t=[n,r[0]],e=1;e<r.length;e++)t.push(n,r[e]);return t}},n.intersperse=function(r){return function(t){var e=(0,n.tail)(t);return(0,n.isNonEmpty)(e)?(0,v.pipe)(e,(0,n.prependAll)(r),(0,n.prepend)((0,n.head)(t))):(0,n.copy)(t)}},n.foldMapWithIndex=I.foldMapWithIndex,n.foldMap=I.foldMap,n.chainWithIndex=function(r){return function(t){for(var e=(0,n.fromReadonlyNonEmptyArray)(r(0,(0,n.head)(t))),u=1;u<t.length;u++)for(var i=r(u,t[u]),o=0;o<i.length;o++)e.push(i[o]);return e}},n.chop=function(r){return function(t){for(var e=r(t),u=[e[0]],i=e[1];(0,n.isNonEmpty)(i);){var o=r(i),c=o[1];u.push(o[0]),i=c}return u}},n.splitAt=function(r){return function(t){var e=Math.max(1,r);return e>=t.length?[(0,n.copy)(t),[]]:[(0,v.pipe)(t.slice(1,e),(0,n.prepend)((0,n.head)(t))),t.slice(e)]}},n.chunksOf=function(r){return(0,n.chop)((0,n.splitAt)(r))};var x=function(r,t){return(0,v.pipe)(r,(0,n.map)(t))},M=function(r,t){return(0,v.pipe)(r,(0,n.mapWithIndex)(t))},j=function(r,t){return(0,v.pipe)(r,(0,n.ap)(t))},y=function(r,t){return(0,v.pipe)(r,(0,n.extend)(t))},O=function(r,t,e){return(0,v.pipe)(r,(0,n.reduce)(t,e))},U=function(r){var t=(0,n.foldMap)(r);return function(n,r){return(0,v.pipe)(n,t(r))}},w=function(r,t,e){return(0,v.pipe)(r,(0,n.reduceRight)(t,e))},W=function(r){var t=(0,n.traverse)(r);return function(n,r){return(0,v.pipe)(n,t(r))}},S=function(r,t){return(0,v.pipe)(r,(0,n.alt)(t))},A=function(r,t,e){return(0,v.pipe)(r,(0,n.reduceWithIndex)(t,e))},q=function(r){var t=(0,n.foldMapWithIndex)(r);return function(n,r){return(0,v.pipe)(n,t(r))}},k=function(r,t,e){return(0,v.pipe)(r,(0,n.reduceRightWithIndex)(t,e))},_=function(r){var t=(0,n.traverseWithIndex)(r);return function(n,r){return(0,v.pipe)(n,t(r))}};n.altW=function(n){return function(r){return(0,v.pipe)(r,g(n()))}},n.alt=n.altW,n.ap=function(r){return(0,n.flatMap)((function(t){return(0,v.pipe)(r,(0,n.map)(t))}))},n.flatMap=(0,v.dual)(2,(function(r,t){return(0,v.pipe)(r,(0,n.chainWithIndex)((function(n,r){return t(r,n)})))})),n.extend=function(r){return function(t){for(var e=(0,n.tail)(t),u=[r(t)];(0,n.isNonEmpty)(e);)u.push(r(e)),e=(0,n.tail)(e);return u}},n.duplicate=(0,n.extend)(v.identity),n.flatten=(0,n.flatMap)(v.identity),n.map=function(r){return(0,n.mapWithIndex)((function(n,t){return r(t)}))},n.mapWithIndex=function(r){return function(t){for(var e=[r(0,(0,n.head)(t))],u=1;u<t.length;u++)e.push(r(u,t[u]));return e}},n.reduce=I.reduce,n.reduceWithIndex=I.reduceWithIndex,n.reduceRight=I.reduceRight,n.reduceRightWithIndex=I.reduceRightWithIndex,n.traverse=function(r){var t=(0,n.traverseWithIndex)(r);return function(n){return t((function(r,t){return n(t)}))}},n.sequence=function(r){return(0,n.traverseWithIndex)(r)((function(n,r){return r}))},n.traverseWithIndex=function(r){return function(t){return function(e){for(var u=r.map(t(0,(0,n.head)(e)),n.of),i=1;i<e.length;i++)u=r.ap(r.map(u,(function(r){return function(t){return(0,v.pipe)(r,(0,n.append)(t))}})),t(i,e[i]));return u}}},n.extract=I.head,n.URI="NonEmptyArray",n.getShow=I.getShow,n.getSemigroup=function(){return{concat:b}},n.getEq=I.getEq,n.getUnionSemigroup=function(r){var t=(0,n.union)(r);return{concat:function(n,r){return t(r)(n)}}},n.Functor={URI:n.URI,map:x},n.flap=(0,p.flap)(n.Functor),n.Pointed={URI:n.URI,of:n.of},n.FunctorWithIndex={URI:n.URI,map:x,mapWithIndex:M},n.Apply={URI:n.URI,map:x,ap:j},n.apFirst=(0,s.apFirst)(n.Apply),n.apSecond=(0,s.apSecond)(n.Apply),n.Applicative={URI:n.URI,map:x,ap:j,of:n.of},n.Chain={URI:n.URI,map:x,ap:j,chain:n.flatMap},n.chainFirst=(0,l.chainFirst)(n.Chain),n.Monad={URI:n.URI,map:x,ap:j,of:n.of,chain:n.flatMap},n.Foldable={URI:n.URI,reduce:O,foldMap:U,reduceRight:w},n.FoldableWithIndex={URI:n.URI,reduce:O,foldMap:U,reduceRight:w,reduceWithIndex:A,foldMapWithIndex:q,reduceRightWithIndex:k},n.Traversable={URI:n.URI,map:x,reduce:O,foldMap:U,reduceRight:w,traverse:W,sequence:n.sequence},n.TraversableWithIndex={URI:n.URI,map:x,mapWithIndex:M,reduce:O,foldMap:U,reduceRight:w,traverse:W,sequence:n.sequence,reduceWithIndex:A,foldMapWithIndex:q,reduceRightWithIndex:k,traverseWithIndex:_},n.Alt={URI:n.URI,map:x,alt:S},n.Comonad={URI:n.URI,map:x,extend:y,extract:n.extract},n.Do=(0,n.of)(h.emptyRecord),n.bindTo=(0,p.bindTo)(n.Functor),n.let=(0,p.let)(n.Functor),n.bind=(0,l.bind)(n.Chain),n.apS=(0,s.apS)(n.Apply),n.head=I.head,n.tail=function(n){return n.slice(1)},n.last=I.last,n.init=function(n){return n.slice(0,-1)},n.min=I.min,n.max=I.max,n.concatAll=function(n){return function(r){return r.reduce(n.concat)}},n.matchLeft=function(r){return function(t){return r((0,n.head)(t),(0,n.tail)(t))}},n.matchRight=function(r){return function(t){return r((0,n.init)(t),(0,n.last)(t))}},n.modifyHead=function(r){return function(t){return d([r((0,n.head)(t))],(0,n.tail)(t),!0)}},n.updateHead=function(r){return(0,n.modifyHead)((function(){return r}))},n.modifyLast=function(r){return function(t){return(0,v.pipe)((0,n.init)(t),(0,n.append)(r((0,n.last)(t))))}},n.updateLast=function(r){return(0,n.modifyLast)((function(){return r}))},n.intercalate=I.intercalate,n.chain=n.flatMap,n.filterWithIndex=function(r){return function(t){return(0,n.fromArray)(t.filter((function(n,t){return r(t,n)})))}},n.uncons=n.unprepend,n.unsnoc=n.unappend,n.snoc=function(r,t){return(0,v.pipe)(r,(0,n.append)(t))},n.prependToAll=n.prependAll,n.fold=I.concatAll,n.nonEmptyArray={URI:n.URI,of:n.of,map:x,mapWithIndex:M,ap:j,chain:n.flatMap,extend:y,extract:n.extract,reduce:O,foldMap:U,reduceRight:w,traverse:W,sequence:n.sequence,reduceWithIndex:A,foldMapWithIndex:q,reduceRightWithIndex:k,traverseWithIndex:_,alt:S}}(K)),K}var X,Y,Z,nn={},rn={};function tn(){return X||(X=1,n=rn,Object.defineProperty(n,"__esModule",{value:!0}),n.Field=n.MonoidProduct=n.MonoidSum=n.SemigroupProduct=n.SemigroupSum=n.MagmaSub=n.Show=n.Bounded=n.Ord=n.Eq=n.isNumber=void 0,n.isNumber=function(n){return"number"==typeof n},n.Eq={equals:function(n,r){return n===r}},n.Ord={equals:n.Eq.equals,compare:function(n,r){return n<r?-1:n>r?1:0}},n.Bounded={equals:n.Eq.equals,compare:n.Ord.compare,top:1/0,bottom:-1/0},n.Show={show:function(n){return JSON.stringify(n)}},n.MagmaSub={concat:function(n,r){return n-r}},n.SemigroupSum={concat:function(n,r){return n+r}},n.SemigroupProduct={concat:function(n,r){return n*r}},n.MonoidSum={concat:n.SemigroupSum.concat,empty:0},n.MonoidProduct={concat:n.SemigroupProduct.concat,empty:1},n.Field={add:n.SemigroupSum.concat,zero:0,mul:n.SemigroupProduct.concat,one:1,sub:n.MagmaSub.concat,degree:function(){return 1},div:function(n,r){return n/r},mod:function(n,r){return n%r}}),rn;var n}function en(){return Y||(Y=1,function(n){var r=nn&&nn.__createBinding||(Object.create?function(n,r,t,e){void 0===e&&(e=t);var u=Object.getOwnPropertyDescriptor(r,t);u&&!("get"in u?!r.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,e,u)}:function(n,r,t,e){void 0===e&&(e=t),n[e]=r[t]}),e=nn&&nn.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),p=nn&&nn.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},h=nn&&nn.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var e,u=0,i=r.length;u<i;u++)!e&&u in r||(e||(e=Array.prototype.slice.call(r,0,u)),e[u]=r[u]);return n.concat(e||Array.prototype.slice.call(r))};Object.defineProperty(n,"__esModule",{value:!0}),n.sortBy=n.uniq=n.rotate=n.intersperse=n.prependAll=n.unzip=n.zipWith=n.sort=n.lefts=n.rights=n.reverse=n.modifyAt=n.deleteAt=n.updateAt=n.insertAt=n.findLastIndex=n.findLastMap=n.findFirstMap=n.findIndex=n.dropRight=n.dropLeft=n.takeRight=n.takeLeft=n.init=n.tail=n.last=n.head=n.isOutOfBound=n.size=n.scanRight=n.scanLeft=n.chainWithIndex=n.foldRight=n.matchRight=n.matchRightW=n.foldLeft=n.matchLeft=n.matchLeftW=n.match=n.matchW=n.fromEither=n.fromOption=n.replicate=n.makeBy=n.appendW=n.append=n.prependW=n.prepend=n.isNonEmpty=n.isEmpty=void 0,n.getIntersectionSemigroup=n.getUnionMonoid=n.getUnionSemigroup=n.getOrd=n.getEq=n.getMonoid=n.getSemigroup=n.getShow=n.URI=n.unfold=n.wilt=n.wither=n.traverseWithIndex=n.sequence=n.traverse=n.reduceRightWithIndex=n.reduceRight=n.reduceWithIndex=n.foldMap=n.reduce=n.foldMapWithIndex=n.duplicate=n.extend=n.filterWithIndex=n.partitionMapWithIndex=n.partitionMap=n.partitionWithIndex=n.partition=n.compact=n.filterMap=n.filterMapWithIndex=n.filter=n.separate=n.mapWithIndex=n.map=n.flatten=n.flatMap=n.ap=n.alt=n.altW=n.zero=n.of=n._chainRecBreadthFirst=n._chainRecDepthFirst=n.concat=n.concatW=n.fromOptionK=n.chunksOf=n.splitAt=n.chop=void 0,n.cons=n.range=n.chain=n.apS=n.bind=n.let=n.bindTo=n.Do=n.intercalate=n.exists=n.some=n.empty=n.fromArray=n.toArray=n.unsafeDeleteAt=n.unsafeUpdateAt=n.unsafeInsertAt=n.fromEitherK=n.FromEither=n.filterE=n.Witherable=n.ChainRecBreadthFirst=n.chainRecBreadthFirst=n.ChainRecDepthFirst=n.chainRecDepthFirst=n.TraversableWithIndex=n.Traversable=n.FoldableWithIndex=n.Foldable=n.FilterableWithIndex=n.Filterable=n.Compactable=n.Extend=n.Alternative=n.guard=n.Zero=n.Alt=n.Unfoldable=n.chainFirst=n.Monad=n.Chain=n.Applicative=n.apSecond=n.apFirst=n.Apply=n.FunctorWithIndex=n.Pointed=n.flap=n.Functor=n.getDifferenceMagma=void 0,n.readonlyArray=n.prependToAll=n.snoc=void 0,n.fromPredicate=function(r){return function(t){return r(t)?[t]:n.empty}},n.lookup=function r(t,e){return void 0===e?function(n){return r(t,n)}:(0,n.isOutOfBound)(t,e)?M.none:M.some(e[t])},n.takeLeftWhile=function(r){return function(t){for(var e=[],u=0,i=t;u<i.length;u++){var o=i[u];if(!r(o))break;e.push(o)}var c=e.length;return c===t.length?t:0===c?n.empty:e}},n.spanLeft=function(r){return function(t){var e=(0,n.splitAt)(S(t,r))(t);return{init:e[0],rest:e[1]}}},n.dropLeftWhile=function(r){return function(t){var e=S(t,r);return 0===e?t:e===t.length?n.empty:t.slice(e)}},n.findFirst=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return M.some(r[t]);return M.none}},n.findLast=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return M.some(r[t]);return M.none}},n.zip=function r(t,e){return void 0===e?function(n){return r(n,t)}:(0,n.zipWith)(t,e,(function(n,r){return[n,r]}))},n.elem=A,n.comprehension=function(r,t,e){void 0===e&&(e=function(){return!0});var u=function(r,i){return(0,n.isNonEmpty)(i)?(0,n.flatMap)(O.head(i),(function(t){return u((0,R.pipe)(r,(0,n.append)(t)),O.tail(i))})):e.apply(void 0,r)?[t.apply(void 0,r)]:n.empty};return u(n.empty,r)},n.union=q,n.intersection=k,n.difference=_,n.every=function(n){return function(r){return r.every(n)}};var m=o(),I=c(),g=a(),b=l(),R=u(),x=i(),M=p(t()),j=p(tn()),y=f(),O=p(Q()),U=v(),w=s(),W=d();n.isEmpty=function(n){return 0===n.length},n.isNonEmpty=O.isNonEmpty,n.prepend=O.prepend,n.prependW=O.prependW,n.append=O.append,n.appendW=O.appendW,n.makeBy=function(r,t){return r<=0?n.empty:O.makeBy(t)(r)},n.replicate=function(r,t){return(0,n.makeBy)(r,(function(){return t}))},n.fromOption=function(r){return M.isNone(r)?n.empty:[r.value]},n.fromEither=function(r){return M.isLeft(r)?n.empty:[r.right]},n.matchW=function(r,t){return function(e){return(0,n.isNonEmpty)(e)?t(e):r()}},n.match=n.matchW,n.matchLeftW=function(r,t){return function(e){return(0,n.isNonEmpty)(e)?t(O.head(e),O.tail(e)):r()}},n.matchLeft=n.matchLeftW,n.foldLeft=n.matchLeft,n.matchRightW=function(r,t){return function(e){return(0,n.isNonEmpty)(e)?t(O.init(e),O.last(e)):r()}},n.matchRight=n.matchRightW,n.foldRight=n.matchRight,n.chainWithIndex=function(r){return function(t){if((0,n.isEmpty)(t))return n.empty;for(var e=[],u=0;u<t.length;u++)for(var i=r(u,t[u]),o=0;o<i.length;o++)e.push(i[o]);return e}},n.scanLeft=function(n,r){return function(t){var e=t.length,u=new Array(e+1);u[0]=n;for(var i=0;i<e;i++)u[i+1]=r(u[i],t[i]);return u}},n.scanRight=function(n,r){return function(t){var e=t.length,u=new Array(e+1);u[e]=n;for(var i=e-1;i>=0;i--)u[i]=r(t[i],u[i+1]);return u}},n.size=function(n){return n.length},n.isOutOfBound=O.isOutOfBound,n.head=function(r){return(0,n.isNonEmpty)(r)?M.some(O.head(r)):M.none},n.last=function(r){return(0,n.isNonEmpty)(r)?M.some(O.last(r)):M.none},n.tail=function(r){return(0,n.isNonEmpty)(r)?M.some(O.tail(r)):M.none},n.init=function(r){return(0,n.isNonEmpty)(r)?M.some(O.init(r)):M.none},n.takeLeft=function(r){return function(t){return(0,n.isOutOfBound)(r,t)?t:0===r?n.empty:t.slice(0,r)}},n.takeRight=function(r){return function(t){return(0,n.isOutOfBound)(r,t)?t:0===r?n.empty:t.slice(-r)}};var S=function(n,r){for(var t=n.length,e=0;e<t&&r(n[e]);e++);return e};function A(n){return function(r,t){if(void 0===t){var e=A(n);return function(n){return e(r,n)}}for(var u=0;u<t.length;u++)if(n.equals(t[u],r))return!0;return!1}}function q(r){var t=O.union(r);return function(e,u){if(void 0===u){var i=q(r);return function(n){return i(n,e)}}return(0,n.isNonEmpty)(e)&&(0,n.isNonEmpty)(u)?t(u)(e):(0,n.isNonEmpty)(e)?e:u}}function k(n){var r=A(n);return function(t,e){if(void 0===e){var u=k(n);return function(n){return u(n,t)}}return t.filter((function(n){return r(n,e)}))}}function _(n){var r=A(n);return function(t,e){if(void 0===e){var u=_(n);return function(n){return u(n,t)}}return t.filter((function(n){return!r(n,e)}))}}n.dropLeft=function(r){return function(t){return r<=0||(0,n.isEmpty)(t)?t:r>=t.length?n.empty:t.slice(r,t.length)}},n.dropRight=function(r){return function(t){return r<=0||(0,n.isEmpty)(t)?t:r>=t.length?n.empty:t.slice(0,t.length-r)}},n.findIndex=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return M.some(t);return M.none}},n.findFirstMap=function(n){return function(r){for(var t=0;t<r.length;t++){var e=n(r[t]);if(M.isSome(e))return e}return M.none}},n.findLastMap=function(n){return function(r){for(var t=r.length-1;t>=0;t--){var e=n(r[t]);if(M.isSome(e))return e}return M.none}},n.findLastIndex=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return M.some(t);return M.none}},n.insertAt=function(n,r){return function(t){return n<0||n>t.length?M.none:M.some(O.unsafeInsertAt(n,r,t))}},n.updateAt=function(r,t){return(0,n.modifyAt)(r,(function(){return t}))},n.deleteAt=function(r){return function(t){return(0,n.isOutOfBound)(r,t)?M.none:M.some((0,n.unsafeDeleteAt)(r,t))}},n.modifyAt=function(r,t){return function(e){return(0,n.isOutOfBound)(r,e)?M.none:M.some((0,n.unsafeUpdateAt)(r,t(e[r]),e))}},n.reverse=function(n){return n.length<=1?n:n.slice().reverse()},n.rights=function(n){for(var r=[],t=0;t<n.length;t++){var e=n[t];"Right"===e._tag&&r.push(e.right)}return r},n.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var e=n[t];"Left"===e._tag&&r.push(e.left)}return r},n.sort=function(n){return function(r){return r.length<=1?r:r.slice().sort(n.compare)}},n.zipWith=function(n,r,t){for(var e=[],u=Math.min(n.length,r.length),i=0;i<u;i++)e[i]=t(n[i],r[i]);return e},n.unzip=function(n){for(var r=[],t=[],e=0;e<n.length;e++)r[e]=n[e][0],t[e]=n[e][1];return[r,t]},n.prependAll=function(r){var t=O.prependAll(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):r}},n.intersperse=function(r){var t=O.intersperse(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):r}},n.rotate=function(r){var t=O.rotate(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):r}},n.uniq=function(r){var t=O.uniq(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):r}},n.sortBy=function(r){var t=O.sortBy(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):r}},n.chop=function(r){var t=O.chop(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):n.empty}},n.splitAt=function(r){return function(t){return r>=1&&(0,n.isNonEmpty)(t)?O.splitAt(r)(t):(0,n.isEmpty)(t)?[t,n.empty]:[n.empty,t]}},n.chunksOf=function(r){var t=O.chunksOf(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):n.empty}},n.fromOptionK=function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.fromOption)(r.apply(void 0,t))}},n.concatW=function(r){return function(t){return(0,n.isEmpty)(t)?r:(0,n.isEmpty)(r)?t:t.concat(r)}},n.concat=n.concatW;var P=function(r,t){return(0,R.pipe)(r,(0,n.map)(t))},C=function(r,t){return(0,R.pipe)(r,(0,n.mapWithIndex)(t))},T=function(r,t){return(0,R.pipe)(r,(0,n.ap)(t))},E=function(r,t){return(0,R.pipe)(r,(0,n.filter)(t))},F=function(r,t){return(0,R.pipe)(r,(0,n.filterMap)(t))},z=function(r,t){return(0,R.pipe)(r,(0,n.partition)(t))},N=function(r,t){return(0,R.pipe)(r,(0,n.partitionMap)(t))},V=function(r,t){return(0,R.pipe)(r,(0,n.partitionWithIndex)(t))},D=function(r,t){return(0,R.pipe)(r,(0,n.partitionMapWithIndex)(t))},L=function(r,t){return(0,R.pipe)(r,(0,n.alt)(t))},$=function(r,t,e){return(0,R.pipe)(r,(0,n.reduce)(t,e))},B=function(r){var t=(0,n.foldMap)(r);return function(n,r){return(0,R.pipe)(n,t(r))}},H=function(r,t,e){return(0,R.pipe)(r,(0,n.reduceRight)(t,e))},K=function(r,t,e){return(0,R.pipe)(r,(0,n.reduceWithIndex)(t,e))},J=function(r){var t=(0,n.foldMapWithIndex)(r);return function(n,r){return(0,R.pipe)(n,t(r))}},G=function(r,t,e){return(0,R.pipe)(r,(0,n.reduceRightWithIndex)(t,e))},X=function(r,t){return(0,R.pipe)(r,(0,n.filterMapWithIndex)(t))},Y=function(r,t){return(0,R.pipe)(r,(0,n.filterWithIndex)(t))},Z=function(r,t){return(0,R.pipe)(r,(0,n.extend)(t))},rn=function(r){var t=(0,n.traverse)(r);return function(n,r){return(0,R.pipe)(n,t(r))}},en=function(r){var t=(0,n.traverseWithIndex)(r);return function(n,r){return(0,R.pipe)(n,t(r))}};n._chainRecDepthFirst=function(r,t){return(0,R.pipe)(r,(0,n.chainRecDepthFirst)(t))},n._chainRecBreadthFirst=function(r,t){return(0,R.pipe)(r,(0,n.chainRecBreadthFirst)(t))},n.of=O.of,n.zero=function(){return n.empty},n.altW=function(n){return function(r){return r.concat(n())}},n.alt=n.altW,n.ap=function(r){return(0,n.flatMap)((function(t){return(0,R.pipe)(r,(0,n.map)(t))}))},n.flatMap=(0,R.dual)(2,(function(r,t){return(0,R.pipe)(r,(0,n.chainWithIndex)((function(n,r){return t(r,n)})))})),n.flatten=(0,n.flatMap)(R.identity),n.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},n.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},n.separate=function(n){for(var r=[],t=[],e=0,u=n;e<u.length;e++){var i=u[e];"Left"===i._tag?r.push(i.left):t.push(i.right)}return(0,U.separated)(r,t)},n.filter=function(n){return function(r){return r.filter(n)}},n.filterMapWithIndex=function(n){return function(r){for(var t=[],e=0;e<r.length;e++){var u=n(e,r[e]);M.isSome(u)&&t.push(u.value)}return t}},n.filterMap=function(r){return(0,n.filterMapWithIndex)((function(n,t){return r(t)}))},n.compact=(0,n.filterMap)(R.identity),n.partition=function(r){return(0,n.partitionWithIndex)((function(n,t){return r(t)}))},n.partitionWithIndex=function(n){return function(r){for(var t=[],e=[],u=0;u<r.length;u++){var i=r[u];n(u,i)?e.push(i):t.push(i)}return(0,U.separated)(t,e)}},n.partitionMap=function(r){return(0,n.partitionMapWithIndex)((function(n,t){return r(t)}))},n.partitionMapWithIndex=function(n){return function(r){for(var t=[],e=[],u=0;u<r.length;u++){var i=n(u,r[u]);"Left"===i._tag?t.push(i.left):e.push(i.right)}return(0,U.separated)(t,e)}},n.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},n.extend=function(n){return function(r){return r.map((function(t,e){return n(r.slice(e))}))}},n.duplicate=(0,n.extend)(R.identity),n.foldMapWithIndex=function(n){return function(r){return function(t){return t.reduce((function(t,e,u){return n.concat(t,r(u,e))}),n.empty)}}},n.reduce=function(r,t){return(0,n.reduceWithIndex)(r,(function(n,r,e){return t(r,e)}))},n.foldMap=function(r){var t=(0,n.foldMapWithIndex)(r);return function(n){return t((function(r,t){return n(t)}))}},n.reduceWithIndex=function(n,r){return function(t){for(var e=t.length,u=n,i=0;i<e;i++)u=r(i,u,t[i]);return u}},n.reduceRight=function(r,t){return(0,n.reduceRightWithIndex)(r,(function(n,r,e){return t(r,e)}))},n.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,e){return r(e,t,n)}),n)}},n.traverse=function(r){var t=(0,n.traverseWithIndex)(r);return function(n){return t((function(r,t){return n(t)}))}},n.sequence=function(r){return function(t){return $(t,r.of((0,n.zero)()),(function(t,e){return r.ap(r.map(t,(function(r){return function(t){return(0,R.pipe)(r,(0,n.append)(t))}})),e)}))}},n.traverseWithIndex=function(r){return function(t){return(0,n.reduceWithIndex)(r.of((0,n.zero)()),(function(e,u,i){return r.ap(r.map(u,(function(r){return function(t){return(0,R.pipe)(r,(0,n.append)(t))}})),t(e,i))}))}},n.wither=function(n){var r=un(n);return function(n){return function(t){return r(t,n)}}},n.wilt=function(n){var r=on(n);return function(n){return function(t){return r(t,n)}}},n.unfold=function(n,r){for(var t=[],e=n;;){var u=r(e);if(!M.isSome(u))break;var i=u.value,o=i[1];t.push(i[0]),e=o}return t},n.URI="ReadonlyArray",n.getShow=function(n){return{show:function(r){return"[".concat(r.map(n.show).join(", "),"]")}}},n.getSemigroup=function(){return{concat:function(r,t){return(0,n.isEmpty)(r)?t:(0,n.isEmpty)(t)?r:r.concat(t)}}},n.getMonoid=function(){return{concat:(0,n.getSemigroup)().concat,empty:n.empty}},n.getEq=function(n){return(0,g.fromEquals)((function(r,t){return r.length===t.length&&r.every((function(r,e){return n.equals(r,t[e])}))}))},n.getOrd=function(n){return(0,y.fromCompare)((function(r,t){for(var e=r.length,u=t.length,i=Math.min(e,u),o=0;o<i;o++){var c=n.compare(r[o],t[o]);if(0!==c)return c}return j.Ord.compare(e,u)}))},n.getUnionSemigroup=function(n){var r=q(n);return{concat:function(n,t){return r(t)(n)}}},n.getUnionMonoid=function(r){return{concat:(0,n.getUnionSemigroup)(r).concat,empty:n.empty}},n.getIntersectionSemigroup=function(n){var r=k(n);return{concat:function(n,t){return r(t)(n)}}},n.getDifferenceMagma=function(n){var r=_(n);return{concat:function(n,t){return r(t)(n)}}},n.Functor={URI:n.URI,map:P},n.flap=(0,x.flap)(n.Functor),n.Pointed={URI:n.URI,of:n.of},n.FunctorWithIndex={URI:n.URI,map:P,mapWithIndex:C},n.Apply={URI:n.URI,map:P,ap:T},n.apFirst=(0,m.apFirst)(n.Apply),n.apSecond=(0,m.apSecond)(n.Apply),n.Applicative={URI:n.URI,map:P,ap:T,of:n.of},n.Chain={URI:n.URI,map:P,ap:T,chain:n.flatMap},n.Monad={URI:n.URI,map:P,ap:T,of:n.of,chain:n.flatMap},n.chainFirst=(0,I.chainFirst)(n.Chain),n.Unfoldable={URI:n.URI,unfold:n.unfold},n.Alt={URI:n.URI,map:P,alt:L},n.Zero={URI:n.URI,zero:n.zero},n.guard=(0,W.guard)(n.Zero,n.Pointed),n.Alternative={URI:n.URI,map:P,ap:T,of:n.of,alt:L,zero:n.zero},n.Extend={URI:n.URI,map:P,extend:Z},n.Compactable={URI:n.URI,compact:n.compact,separate:n.separate},n.Filterable={URI:n.URI,map:P,compact:n.compact,separate:n.separate,filter:E,filterMap:F,partition:z,partitionMap:N},n.FilterableWithIndex={URI:n.URI,map:P,mapWithIndex:C,compact:n.compact,separate:n.separate,filter:E,filterMap:F,partition:z,partitionMap:N,partitionMapWithIndex:D,partitionWithIndex:V,filterMapWithIndex:X,filterWithIndex:Y},n.Foldable={URI:n.URI,reduce:$,foldMap:B,reduceRight:H},n.FoldableWithIndex={URI:n.URI,reduce:$,foldMap:B,reduceRight:H,reduceWithIndex:K,foldMapWithIndex:J,reduceRightWithIndex:G},n.Traversable={URI:n.URI,map:P,reduce:$,foldMap:B,reduceRight:H,traverse:rn,sequence:n.sequence},n.TraversableWithIndex={URI:n.URI,map:P,mapWithIndex:C,reduce:$,foldMap:B,reduceRight:H,reduceWithIndex:K,foldMapWithIndex:J,reduceRightWithIndex:G,traverse:rn,sequence:n.sequence,traverseWithIndex:en},n.chainRecDepthFirst=function(n){return function(r){for(var t=h([],n(r),!0),e=[];t.length>0;){var u=t.shift();M.isLeft(u)?t.unshift.apply(t,n(u.left)):e.push(u.right)}return e}},n.ChainRecDepthFirst={URI:n.URI,map:P,ap:T,chain:n.flatMap,chainRec:n._chainRecDepthFirst},n.chainRecBreadthFirst=function(n){return function(r){var t=n(r),e=[],u=[];function i(r){M.isLeft(r)?n(r.left).forEach((function(n){return e.push(n)})):u.push(r.right)}for(var o=0,c=t;o<c.length;o++)i(c[o]);for(;e.length>0;)i(e.shift());return u}},n.ChainRecBreadthFirst={URI:n.URI,map:P,ap:T,chain:n.flatMap,chainRec:n._chainRecBreadthFirst};var un=(0,w.witherDefault)(n.Traversable,n.Compactable),on=(0,w.wiltDefault)(n.Traversable,n.Compactable);n.Witherable={URI:n.URI,map:P,compact:n.compact,separate:n.separate,filter:E,filterMap:F,partition:z,partitionMap:N,reduce:$,foldMap:B,reduceRight:H,traverse:rn,sequence:n.sequence,wither:un,wilt:on},n.filterE=(0,w.filterE)(n.Witherable),n.FromEither={URI:n.URI,fromEither:n.fromEither},n.fromEitherK=(0,b.fromEitherK)(n.FromEither),n.unsafeInsertAt=O.unsafeInsertAt,n.unsafeUpdateAt=function(r,t,e){return(0,n.isNonEmpty)(e)?O.unsafeUpdateAt(r,t,e):e},n.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},n.toArray=function(n){return n.slice()},n.fromArray=function(r){return(0,n.isEmpty)(r)?n.empty:r.slice()},n.empty=O.empty,n.some=function(n){return function(r){return r.some(n)}},n.exists=n.some,n.intercalate=function(r){var t=O.intercalate(r);return function(e){return(0,n.match)((function(){return r.empty}),t(e))}},n.Do=(0,n.of)(M.emptyRecord),n.bindTo=(0,x.bindTo)(n.Functor),n.let=(0,x.let)(n.Functor),n.bind=(0,I.bind)(n.Chain),n.apS=(0,m.apS)(n.Apply),n.chain=n.flatMap,n.range=O.range,n.cons=O.cons,n.snoc=O.snoc,n.prependToAll=n.prependAll,n.readonlyArray={URI:n.URI,compact:n.compact,separate:n.separate,map:P,ap:T,of:n.of,chain:n.flatMap,filter:E,filterMap:F,partition:z,partitionMap:N,mapWithIndex:C,partitionMapWithIndex:D,partitionWithIndex:V,filterMapWithIndex:X,filterWithIndex:Y,alt:L,zero:n.zero,unfold:n.unfold,reduce:$,foldMap:B,reduceRight:H,traverse:rn,sequence:n.sequence,reduceWithIndex:K,foldMapWithIndex:J,reduceRightWithIndex:G,traverseWithIndex:en,extend:Z,wither:un,wilt:on}}(nn)),nn}function un(){return Z||(Z=1,function(n){var r=H&&H.__createBinding||(Object.create?function(n,r,t,e){void 0===e&&(e=t);var u=Object.getOwnPropertyDescriptor(r,t);u&&!("get"in u?!r.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,e,u)}:function(n,r,t,e){void 0===e&&(e=t),n[e]=r[t]}),e=H&&H.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),f=H&&H.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(n,"__esModule",{value:!0}),n.rotate=n.intersperse=n.prependAll=n.unzip=n.zipWith=n.sort=n.lefts=n.rights=n.reverse=n.modifyAt=n.deleteAt=n.updateAt=n.insertAt=n.copy=n.findLastIndex=n.findLastMap=n.findFirstMap=n.findIndex=n.dropRight=n.dropLeft=n.takeRight=n.takeLeft=n.init=n.tail=n.last=n.head=n.lookup=n.isOutOfBound=n.size=n.scanRight=n.scanLeft=n.chainWithIndex=n.foldRight=n.matchRight=n.matchRightW=n.foldLeft=n.matchLeft=n.matchLeftW=n.match=n.matchW=n.fromEither=n.fromOption=n.replicate=n.makeBy=n.appendW=n.append=n.prependW=n.prepend=n.isNonEmpty=n.isEmpty=void 0,n.getUnionMonoid=n.getUnionSemigroup=n.getOrd=n.getEq=n.getMonoid=n.getSemigroup=n.getShow=n.URI=n.unfold=n.wilt=n.wither=n.traverseWithIndex=n.sequence=n.traverse=n.reduceRightWithIndex=n.reduceRight=n.reduceWithIndex=n.reduce=n.foldMapWithIndex=n.foldMap=n.duplicate=n.extend=n.filterWithIndex=n.alt=n.altW=n.partitionMapWithIndex=n.partitionMap=n.partitionWithIndex=n.partition=n.filter=n.separate=n.compact=n.filterMap=n.filterMapWithIndex=n.mapWithIndex=n.flatten=n.flatMap=n.ap=n.map=n.zero=n.of=n.concat=n.concatW=n.fromOptionK=n.chunksOf=n.splitAt=n.chop=n.sortBy=n.uniq=n.elem=void 0,n.cons=n.empty=n.range=n.chain=n.apS=n.bind=n.let=n.bindTo=n.Do=n.intercalate=n.exists=n.some=n.every=n.unsafeDeleteAt=n.unsafeUpdateAt=n.unsafeInsertAt=n.fromEitherK=n.FromEither=n.filterE=n.ChainRecBreadthFirst=n.chainRecBreadthFirst=n.ChainRecDepthFirst=n.chainRecDepthFirst=n.Witherable=n.TraversableWithIndex=n.Traversable=n.FoldableWithIndex=n.Foldable=n.FilterableWithIndex=n.Filterable=n.Compactable=n.Extend=n.Alternative=n.guard=n.Zero=n.Alt=n.Unfoldable=n.Monad=n.chainFirst=n.Chain=n.Applicative=n.apSecond=n.apFirst=n.Apply=n.FunctorWithIndex=n.Pointed=n.flap=n.Functor=n.getDifferenceMagma=n.getIntersectionSemigroup=void 0,n.array=n.prependToAll=n.snoc=void 0,n.fromPredicate=function(n){return function(r){return n(r)?[r]:[]}},n.takeLeftWhile=function(n){return function(r){for(var t=[],e=0,u=r;e<u.length;e++){var i=u[e];if(!n(i))break;t.push(i)}return t}},n.spanLeft=function(r){return function(t){var e=(0,n.splitAt)(y(t,r))(t);return{init:e[0],rest:e[1]}}},n.dropLeftWhile=function(n){return function(r){return r.slice(y(r,n))}},n.findFirst=function(n){return R.findFirst(n)},n.findLast=function(n){return R.findLast(n)},n.zip=function r(t,e){return void 0===e?function(n){return r(n,t)}:(0,n.zipWith)(t,e,(function(n,r){return[n,r]}))},n.comprehension=function(r,t,e){void 0===e&&(e=function(){return!0});var u=function(r,i){return(0,n.isNonEmpty)(i)?(0,n.flatMap)(b.head(i),(function(t){return u((0,m.pipe)(r,(0,n.append)(t)),b.tail(i))})):e.apply(void 0,r)?[t.apply(void 0,r)]:[]};return u([],r)},n.union=O,n.intersection=U,n.difference=w;var a=o(),p=c(),h=l(),m=u(),I=i(),g=f(t()),b=f(G()),R=f(en()),x=v(),M=s(),j=d();n.isEmpty=function(n){return 0===n.length},n.isNonEmpty=b.isNonEmpty,n.prepend=b.prepend,n.prependW=b.prependW,n.append=b.append,n.appendW=b.appendW,n.makeBy=function(n,r){return n<=0?[]:b.makeBy(r)(n)},n.replicate=function(r,t){return(0,n.makeBy)(r,(function(){return t}))},n.fromOption=function(n){return g.isNone(n)?[]:[n.value]},n.fromEither=function(n){return g.isLeft(n)?[]:[n.right]},n.matchW=function(r,t){return function(e){return(0,n.isNonEmpty)(e)?t(e):r()}},n.match=n.matchW,n.matchLeftW=function(r,t){return function(e){return(0,n.isNonEmpty)(e)?t(b.head(e),b.tail(e)):r()}},n.matchLeft=n.matchLeftW,n.foldLeft=n.matchLeft,n.matchRightW=function(r,t){return function(e){return(0,n.isNonEmpty)(e)?t(b.init(e),b.last(e)):r()}},n.matchRight=n.matchRightW,n.foldRight=n.matchRight,n.chainWithIndex=function(n){return function(r){for(var t=[],e=0;e<r.length;e++)for(var u=n(e,r[e]),i=0;i<u.length;i++)t.push(u[i]);return t}},n.scanLeft=function(n,r){return function(t){var e=t.length,u=new Array(e+1);u[0]=n;for(var i=0;i<e;i++)u[i+1]=r(u[i],t[i]);return u}},n.scanRight=function(n,r){return function(t){var e=t.length,u=new Array(e+1);u[e]=n;for(var i=e-1;i>=0;i--)u[i]=r(t[i],u[i+1]);return u}},n.size=function(n){return n.length},n.isOutOfBound=b.isOutOfBound,n.lookup=R.lookup,n.head=R.head,n.last=R.last,n.tail=function(r){return(0,n.isNonEmpty)(r)?g.some(b.tail(r)):g.none},n.init=function(r){return(0,n.isNonEmpty)(r)?g.some(b.init(r)):g.none},n.takeLeft=function(r){return function(t){return(0,n.isOutOfBound)(r,t)?(0,n.copy)(t):t.slice(0,r)}},n.takeRight=function(r){return function(t){return(0,n.isOutOfBound)(r,t)?(0,n.copy)(t):0===r?[]:t.slice(-r)}};var y=function(n,r){for(var t=n.length,e=0;e<t&&r(n[e]);e++);return e};function O(r){var t=b.union(r);return function(e,u){if(void 0===u){var i=O(r);return function(n){return i(n,e)}}return(0,n.isNonEmpty)(e)&&(0,n.isNonEmpty)(u)?t(u)(e):(0,n.isNonEmpty)(e)?(0,n.copy)(e):(0,n.copy)(u)}}function U(r){var t=(0,n.elem)(r);return function(n,e){if(void 0===e){var u=U(r);return function(r){return u(r,n)}}return n.filter((function(n){return t(n,e)}))}}function w(r){var t=(0,n.elem)(r);return function(n,e){if(void 0===e){var u=w(r);return function(r){return u(r,n)}}return n.filter((function(n){return!t(n,e)}))}}n.dropLeft=function(r){return function(t){return r<=0||(0,n.isEmpty)(t)?(0,n.copy)(t):r>=t.length?[]:t.slice(r,t.length)}},n.dropRight=function(r){return function(t){return r<=0||(0,n.isEmpty)(t)?(0,n.copy)(t):r>=t.length?[]:t.slice(0,t.length-r)}},n.findIndex=R.findIndex,n.findFirstMap=R.findFirstMap,n.findLastMap=R.findLastMap,n.findLastIndex=R.findLastIndex,n.copy=function(n){return n.slice()},n.insertAt=function(r,t){return function(e){return r<0||r>e.length?g.none:g.some((0,n.unsafeInsertAt)(r,t,e))}},n.updateAt=function(r,t){return(0,n.modifyAt)(r,(function(){return t}))},n.deleteAt=function(r){return function(t){return(0,n.isOutOfBound)(r,t)?g.none:g.some((0,n.unsafeDeleteAt)(r,t))}},n.modifyAt=function(r,t){return function(e){return(0,n.isOutOfBound)(r,e)?g.none:g.some((0,n.unsafeUpdateAt)(r,t(e[r]),e))}},n.reverse=function(r){return(0,n.isEmpty)(r)?[]:r.slice().reverse()},n.rights=function(n){for(var r=[],t=0;t<n.length;t++){var e=n[t];"Right"===e._tag&&r.push(e.right)}return r},n.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var e=n[t];"Left"===e._tag&&r.push(e.left)}return r},n.sort=function(r){return function(t){return t.length<=1?(0,n.copy)(t):t.slice().sort(r.compare)}},n.zipWith=function(n,r,t){for(var e=[],u=Math.min(n.length,r.length),i=0;i<u;i++)e[i]=t(n[i],r[i]);return e},n.unzip=function(n){for(var r=[],t=[],e=0;e<n.length;e++)r[e]=n[e][0],t[e]=n[e][1];return[r,t]},n.prependAll=function(r){var t=b.prependAll(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):[]}},n.intersperse=function(r){var t=b.intersperse(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):(0,n.copy)(r)}},n.rotate=function(r){var t=b.rotate(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):(0,n.copy)(r)}},n.elem=R.elem,n.uniq=function(r){var t=b.uniq(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):(0,n.copy)(r)}},n.sortBy=function(r){var t=b.sortBy(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):(0,n.copy)(r)}},n.chop=function(r){var t=b.chop(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):[]}},n.splitAt=function(r){return function(t){return r>=1&&(0,n.isNonEmpty)(t)?b.splitAt(r)(t):(0,n.isEmpty)(t)?[(0,n.copy)(t),[]]:[[],(0,n.copy)(t)]}},n.chunksOf=function(r){var t=b.chunksOf(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):[]}},n.fromOptionK=function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.fromOption)(r.apply(void 0,t))}},n.concatW=function(r){return function(t){return(0,n.isEmpty)(t)?(0,n.copy)(r):(0,n.isEmpty)(r)?(0,n.copy)(t):t.concat(r)}},n.concat=n.concatW;var W=function(r,t){return(0,m.pipe)(r,(0,n.map)(t))},S=function(r,t){return(0,m.pipe)(r,(0,n.mapWithIndex)(t))},A=function(r,t){return(0,m.pipe)(r,(0,n.ap)(t))},q=function(r,t){return(0,m.pipe)(r,(0,n.filter)(t))},k=function(r,t){return(0,m.pipe)(r,(0,n.filterMap)(t))},_=function(r,t){return(0,m.pipe)(r,(0,n.partition)(t))},P=function(r,t){return(0,m.pipe)(r,(0,n.partitionMap)(t))},C=function(r,t){return(0,m.pipe)(r,(0,n.partitionWithIndex)(t))},T=function(r,t){return(0,m.pipe)(r,(0,n.partitionMapWithIndex)(t))},E=function(r,t){return(0,m.pipe)(r,(0,n.alt)(t))},F=function(r,t,e){return(0,m.pipe)(r,(0,n.reduce)(t,e))},z=function(r){var t=(0,n.foldMap)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},N=function(r,t,e){return(0,m.pipe)(r,(0,n.reduceRight)(t,e))},V=function(r,t,e){return(0,m.pipe)(r,(0,n.reduceWithIndex)(t,e))},D=function(r){var t=(0,n.foldMapWithIndex)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},L=function(r,t,e){return(0,m.pipe)(r,(0,n.reduceRightWithIndex)(t,e))},$=function(r,t){return(0,m.pipe)(r,(0,n.filterMapWithIndex)(t))},B=function(r,t){return(0,m.pipe)(r,(0,n.filterWithIndex)(t))},K=function(r,t){return(0,m.pipe)(r,(0,n.extend)(t))},J=function(r){var t=(0,n.traverse)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},Q=function(r){var t=(0,n.traverseWithIndex)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},X=R._chainRecDepthFirst,Y=R._chainRecBreadthFirst;n.of=b.of,n.zero=function(){return[]},n.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},n.ap=function(r){return(0,n.flatMap)((function(t){return(0,m.pipe)(r,(0,n.map)(t))}))},n.flatMap=(0,m.dual)(2,(function(r,t){return(0,m.pipe)(r,(0,n.chainWithIndex)((function(n,r){return t(r,n)})))})),n.flatten=(0,n.flatMap)(m.identity),n.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},n.filterMapWithIndex=function(n){return function(r){for(var t=[],e=0;e<r.length;e++){var u=n(e,r[e]);g.isSome(u)&&t.push(u.value)}return t}},n.filterMap=function(r){return(0,n.filterMapWithIndex)((function(n,t){return r(t)}))},n.compact=(0,n.filterMap)(m.identity),n.separate=function(n){for(var r=[],t=[],e=0,u=n;e<u.length;e++){var i=u[e];"Left"===i._tag?r.push(i.left):t.push(i.right)}return(0,x.separated)(r,t)},n.filter=function(n){return function(r){return r.filter(n)}},n.partition=function(r){return(0,n.partitionWithIndex)((function(n,t){return r(t)}))},n.partitionWithIndex=function(n){return function(r){for(var t=[],e=[],u=0;u<r.length;u++){var i=r[u];n(u,i)?e.push(i):t.push(i)}return(0,x.separated)(t,e)}},n.partitionMap=function(r){return(0,n.partitionMapWithIndex)((function(n,t){return r(t)}))},n.partitionMapWithIndex=function(n){return function(r){for(var t=[],e=[],u=0;u<r.length;u++){var i=n(u,r[u]);"Left"===i._tag?t.push(i.left):e.push(i.right)}return(0,x.separated)(t,e)}},n.altW=function(n){return function(r){return r.concat(n())}},n.alt=n.altW,n.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},n.extend=function(n){return function(r){return r.map((function(t,e){return n(r.slice(e))}))}},n.duplicate=(0,n.extend)(m.identity),n.foldMap=R.foldMap,n.foldMapWithIndex=R.foldMapWithIndex,n.reduce=R.reduce,n.reduceWithIndex=R.reduceWithIndex,n.reduceRight=R.reduceRight,n.reduceRightWithIndex=R.reduceRightWithIndex,n.traverse=function(r){var t=(0,n.traverseWithIndex)(r);return function(n){return t((function(r,t){return n(t)}))}},n.sequence=function(r){return function(t){return F(t,r.of((0,n.zero)()),(function(t,e){return r.ap(r.map(t,(function(r){return function(t){return(0,m.pipe)(r,(0,n.append)(t))}})),e)}))}},n.traverseWithIndex=function(r){return function(t){return(0,n.reduceWithIndex)(r.of((0,n.zero)()),(function(e,u,i){return r.ap(r.map(u,(function(r){return function(t){return(0,m.pipe)(r,(0,n.append)(t))}})),t(e,i))}))}},n.wither=function(n){var r=Z(n);return function(n){return function(t){return r(t,n)}}},n.wilt=function(n){var r=nn(n);return function(n){return function(t){return r(t,n)}}},n.unfold=function(n,r){for(var t=[],e=n;;){var u=r(e);if(!g.isSome(u))break;var i=u.value,o=i[1];t.push(i[0]),e=o}return t},n.URI="Array",n.getShow=R.getShow,n.getSemigroup=function(){return{concat:function(n,r){return n.concat(r)}}},n.getMonoid=function(){return{concat:(0,n.getSemigroup)().concat,empty:[]}},n.getEq=R.getEq,n.getOrd=R.getOrd,n.getUnionSemigroup=function(n){var r=O(n);return{concat:function(n,t){return r(t)(n)}}},n.getUnionMonoid=function(r){return{concat:(0,n.getUnionSemigroup)(r).concat,empty:[]}},n.getIntersectionSemigroup=function(n){var r=U(n);return{concat:function(n,t){return r(t)(n)}}},n.getDifferenceMagma=function(n){var r=w(n);return{concat:function(n,t){return r(t)(n)}}},n.Functor={URI:n.URI,map:W},n.flap=(0,I.flap)(n.Functor),n.Pointed={URI:n.URI,of:n.of},n.FunctorWithIndex={URI:n.URI,map:W,mapWithIndex:S},n.Apply={URI:n.URI,map:W,ap:A},n.apFirst=(0,a.apFirst)(n.Apply),n.apSecond=(0,a.apSecond)(n.Apply),n.Applicative={URI:n.URI,map:W,ap:A,of:n.of},n.Chain={URI:n.URI,map:W,ap:A,chain:n.flatMap},n.chainFirst=(0,p.chainFirst)(n.Chain),n.Monad={URI:n.URI,map:W,ap:A,of:n.of,chain:n.flatMap},n.Unfoldable={URI:n.URI,unfold:n.unfold},n.Alt={URI:n.URI,map:W,alt:E},n.Zero={URI:n.URI,zero:n.zero},n.guard=(0,j.guard)(n.Zero,n.Pointed),n.Alternative={URI:n.URI,map:W,ap:A,of:n.of,alt:E,zero:n.zero},n.Extend={URI:n.URI,map:W,extend:K},n.Compactable={URI:n.URI,compact:n.compact,separate:n.separate},n.Filterable={URI:n.URI,map:W,compact:n.compact,separate:n.separate,filter:q,filterMap:k,partition:_,partitionMap:P},n.FilterableWithIndex={URI:n.URI,map:W,mapWithIndex:S,compact:n.compact,separate:n.separate,filter:q,filterMap:k,partition:_,partitionMap:P,partitionMapWithIndex:T,partitionWithIndex:C,filterMapWithIndex:$,filterWithIndex:B},n.Foldable={URI:n.URI,reduce:F,foldMap:z,reduceRight:N},n.FoldableWithIndex={URI:n.URI,reduce:F,foldMap:z,reduceRight:N,reduceWithIndex:V,foldMapWithIndex:D,reduceRightWithIndex:L},n.Traversable={URI:n.URI,map:W,reduce:F,foldMap:z,reduceRight:N,traverse:J,sequence:n.sequence},n.TraversableWithIndex={URI:n.URI,map:W,mapWithIndex:S,reduce:F,foldMap:z,reduceRight:N,reduceWithIndex:V,foldMapWithIndex:D,reduceRightWithIndex:L,traverse:J,sequence:n.sequence,traverseWithIndex:Q};var Z=(0,M.witherDefault)(n.Traversable,n.Compactable),nn=(0,M.wiltDefault)(n.Traversable,n.Compactable);n.Witherable={URI:n.URI,map:W,compact:n.compact,separate:n.separate,filter:q,filterMap:k,partition:_,partitionMap:P,reduce:F,foldMap:z,reduceRight:N,traverse:J,sequence:n.sequence,wither:Z,wilt:nn},n.chainRecDepthFirst=R.chainRecDepthFirst,n.ChainRecDepthFirst={URI:n.URI,map:W,ap:A,chain:n.flatMap,chainRec:X},n.chainRecBreadthFirst=R.chainRecBreadthFirst,n.ChainRecBreadthFirst={URI:n.URI,map:W,ap:A,chain:n.flatMap,chainRec:Y},n.filterE=(0,M.filterE)(n.Witherable),n.FromEither={URI:n.URI,fromEither:n.fromEither},n.fromEitherK=(0,h.fromEitherK)(n.FromEither),n.unsafeInsertAt=b.unsafeInsertAt,n.unsafeUpdateAt=function(r,t,e){return(0,n.isNonEmpty)(e)?b.unsafeUpdateAt(r,t,e):[]},n.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},n.every=R.every,n.some=function(n){return function(r){return r.some(n)}},n.exists=n.some,n.intercalate=R.intercalate,n.Do=(0,n.of)(g.emptyRecord),n.bindTo=(0,I.bindTo)(n.Functor),n.let=(0,I.let)(n.Functor),n.bind=(0,p.bind)(n.Chain),n.apS=(0,a.apS)(n.Apply),n.chain=n.flatMap,n.range=b.range,n.empty=[],n.cons=b.cons,n.snoc=b.snoc,n.prependToAll=n.prependAll,n.array={URI:n.URI,compact:n.compact,separate:n.separate,map:W,ap:A,of:n.of,chain:n.flatMap,filter:q,filterMap:k,partition:_,partitionMap:P,mapWithIndex:S,partitionMapWithIndex:T,partitionWithIndex:C,filterMapWithIndex:$,filterWithIndex:B,alt:E,zero:n.zero,unfold:n.unfold,reduce:F,foldMap:z,reduceRight:N,traverse:J,sequence:n.sequence,reduceWithIndex:V,foldMapWithIndex:D,reduceRightWithIndex:L,traverseWithIndex:Q,extend:K,wither:Z,wilt:nn}}(H)),H}var on=un();const cn={VPR:"Similar Products",VPS:"Visual Search",VCS:"Cross-Selling",TPS:"Text Product Search"};function fn(n,r){return t=>(n=>"VPR"===n._tag)(t)?n():r()}function an(n){return"VPR"===n?{_tag:"VPR"}:{_tag:"VCS"}}const dn=n=>(n=>0===n.length)(n)?m("entity is empty"):I(n),sn=n=>p(n,g("entity not exist"),h(dn)),ln=n=>n.split(";").map((n=>{const[r,t]=n.split(":");return{column:r,values:t?t.split(","):[]}})).filter((({column:n})=>!!n)),vn=(n,r)=>null!=r?{[n]:r}:{},pn=(n,r)=>r&&(Array.isArray(r)?r.length:Object.keys(r).length)?{[n]:r}:{},hn=(n,r)=>r&&Object.keys(r).length>0?{[n]:r}:{},mn=n=>{var r,t;return null!==(t=null!==(r=n.interval)&&void 0!==r?r:n.value)&&void 0!==t?t:n},In=n=>null==n?null:"string"==typeof n||"number"==typeof n?String(n):"object"==typeof n&&null!==n&&"value"in n?In(n.value):String(n),gn=(n,r)=>"object"==typeof n&&"object"==typeof r&&null!==n&&null!==r&&(n.start===r.start&&n.end===r.end),bn=(n,r)=>{const t=n===r,e=void 0!==r.interval&&gn(n,r.interval);return t||e||void 0!==r.value&&n===r.value},Rn=n=>(null==n?void 0:n.length)?n.reduce(((n,r)=>{const t=(n=>{var r;return"categorical"===n.type&&"values"in n?n.values.reduce(((n,r)=>{if(r.selected){const t=In(r.value);t&&n.push(t)}return n}),[]):"interval"===n.type&&"selectedValues"in n&&null!==(r=n.selectedValues)&&void 0!==r?r:[]})(r);return(null==t?void 0:t.length)>0&&n.push({column:r.column,values:t}),n}),[]):[],xn=n=>!("isConnected"in n)||n.isConnected,Mn=(()=>{let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let r of n.keys())n.set(r,n.get(r).filter(xn))})(...r)}),2e3)}})(),jn=n=>"function"==typeof n?n():n,yn=(t,e)=>{const u=((n,r=(n,r)=>n!==r)=>{const t=jn(n);let e=new Map(Object.entries(t??{}));const u={dispose:[],get:[],set:[],reset:[]},i=()=>{e=new Map(Object.entries(jn(n)??{})),u.reset.forEach((n=>n()))},o=n=>(u.get.forEach((r=>r(n))),e.get(n)),c=(n,t)=>{const i=e.get(n);r(t,i,n)&&(e.set(n,t),u.set.forEach((r=>r(n,t,i))))},f="undefined"==typeof Proxy?{}:new Proxy(t,{get:(n,r)=>o(r),ownKeys:()=>Array.from(e.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,r)=>e.has(r),set:(n,r,t)=>(c(r,t),!0)}),a=(n,r)=>(u[n].push(r),()=>{((n,r)=>{const t=n.indexOf(r);t>=0&&(n[t]=n[n.length-1],n.length--)})(u[n],r)});return{state:f,get:o,set:c,on:a,onChange:(r,t)=>{const e=a("set",((n,e)=>{n===r&&t(e)})),u=a("reset",(()=>t(jn(n)[r])));return()=>{e(),u()}},use:(...n)=>{const r=n.reduce(((n,r)=>(r.set&&n.push(a("set",r.set)),r.get&&n.push(a("get",r.get)),r.reset&&n.push(a("reset",r.reset)),r.dispose&&n.push(a("dispose",r.dispose)),n)),[]);return()=>r.forEach((n=>n()))},dispose:()=>{u.dispose.forEach((n=>n())),i()},reset:i,forceUpdate:n=>{const r=e.get(n);u.set.forEach((t=>t(n,r,r)))}}})(t,e);return u.use((()=>{if("function"!=typeof n)return{};const t=new Map;return{dispose:()=>t.clear(),get:r=>{const e=n();e&&((n,r,t)=>{const e=n.get(r);e?e.includes(t)||e.push(t):n.set(r,[t])})(t,r,e)},set:n=>{const e=t.get(n);e&&t.set(n,e.filter(r)),Mn(t)},reset:()=>{t.forEach((n=>n.forEach(r))),Mn(t)}}})()),u},On=n=>new Headers({Authorization:`Bearer ${n}`}),Un=n=>p(n,sn,R.mapLeft((()=>x))),wn=(n,r)=>b((n=>p(n,Un,R.map(On)))(n),R.right(JSON.stringify(r)));var Wn=M();const Sn=()=>{const n=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(n)?"tablet":/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(n)?"mobile":"desktop"},An=()=>{if("undefined"==typeof navigator)return!1;const n=navigator.userAgent;return!!/iPhone|iPad|iPod/.test(n)||/WebKit/.test(n)&&!/Chrome|Edg|OPR/.test(n)},qn=(n=768)=>"undefined"!=typeof window&&window.innerWidth>=n,kn=(n=768)=>"undefined"!=typeof window&&window.innerWidth<n,_n=["jpg","jpeg","png","webp","avif","heic","heif"],Pn=["jpg","jpeg","png","webp","avif"],Cn=n=>"jpg"===n?"image/jpeg":`image/${n}`,Tn=Object.fromEntries(_n.map((n=>[n,Cn(n)]))),En=()=>{const n=An()?[...Pn,"heic"]:Pn;return[...n.map((n=>Tn[n])),...n.map((n=>`.${n}`))].join(",")},Fn=()=>{const n=(An()?[...Pn,"heic"]:Pn).filter((n=>"jpeg"!==n)).map((n=>`.${n}`)),r=n.pop();return`${n.join(", ")}, or ${r}`},zn={kind:"client",inner:"File format not supported",code:"unsupported-file-type"},Nn={kind:"client",inner:"HEIC format is only supported in Safari and iOS browsers",code:"heic-not-supported"},Vn=n=>{const r=n.type.split("/")[1];if(("heic"===r||"heif"===r)&&!An())return R.left(Nn);const t=(e=t=>t===r?U.some(n):U.none,function(n){for(var r=0;r<n.length;r++){var t=e(n[r]);if(j(t))return t}return y})(_n);var e;return O.pipe(t,R.fromOption((()=>zn)))},Dn={kind:"app",inner:"File doesnt exist"},Ln=async n=>new Promise((r=>{const t=new FileReader;t.addEventListener("load",(()=>{r(t.result)})),t.readAsDataURL(n)})),$n=n=>()=>new Promise(((r,t)=>{const e=new FileReader,u=new Image;e.onload=n=>{u.src=n.target.result},e.onerror=()=>{t(new Error("Failed to read file"))},u.onload=()=>{r(u)},u.onerror=()=>{t(new Error("Failed to load image"))},e.readAsDataURL(n)})),Bn=async n=>{const r=await fetch(n),t=await r.blob();return new File([t],"image",{type:t.type,lastModified:Date.now()})},Hn=n=>()=>new Promise((async r=>r(Bn(n))));var Kn,Jn,Qn,Gn,Xn,Yn={},Zn={},nr={},rr={},tr={},er=function(){if(Xn)return Yn;Xn=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.lanczos2=Yn.lanczos=void 0;const n=(Kn||(Kn=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.copy=void 0,Zn.copy=(n,r,t=0,e=0,u=n.width-t,i=n.height-e,o=0,c=0)=>{if(t|=0,e|=0,i|=0,o|=0,c|=0,(u|=0)<=0||i<=0)return;const f=new Uint32Array(n.data.buffer),a=new Uint32Array(r.data.buffer);for(let d=0;d<i;d++){const i=e+d;if(i<0||i>=n.height)continue;const s=c+d;if(!(s<0||s>=r.height))for(let e=0;e<u;e++){const u=t+e;if(u<0||u>=n.width)continue;const c=o+e;c<0||c>=r.width||(a[s*r.width+c]=f[i*n.width+u])}}}),Zn),r=(Jn||(Jn=1,t=nr,Object.defineProperty(t,"__esModule",{value:!0}),t.CreateImageFactory=(n=[0,0,0,0],r=4)=>{if(r=Math.floor(r),isNaN(r)||r<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in n)||n.length<r)throw TypeError(`fill should be iterable with at least ${r} members`);const t=(n=new Uint8ClampedArray(n).slice(0,r)).every((n=>0===n));return(e,u,i)=>{if(void 0===e||void 0===u)throw TypeError("Not enough arguments");if(e=Math.floor(e),u=Math.floor(u),isNaN(e)||e<1||isNaN(u)||u<1)throw TypeError("Index or size is negative or greater than the allowed amount");const o=e*u*r;if(void 0===i&&(i=new Uint8ClampedArray(o)),i instanceof Uint8ClampedArray){if(i.length!==o)throw TypeError("Index or size is negative or greater than the allowed amount");if(!t)for(let t=0;t<u;t++)for(let u=0;u<e;u++){const o=(t*e+u)*r;for(let t=0;t<r;t++)i[o+t]=n[t]}return{get width(){return e},get height(){return u},get data(){return i}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},t.createImage=t.CreateImageFactory()),nr);var t;const e=function(){if(Qn)return rr;Qn=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.filters=void 0;const n=(n,r)=>{if(n<=-r||n>=r)return 0;if(0==n)return 0;const t=n*Math.PI;return Math.sin(t)/t*Math.sin(t/r)/(t/r)},r=n=>Math.round(16383*n);return rr.filters=(t,e,u,i,o)=>{const c=o?2:3,f=1/u,a=Math.min(1,u),d=c/a,s=Math.floor(2*(d+1)),l=new Int16Array((s+2)*e);let v=0;for(let u=0;u<e;u++){const o=(u+.5)*f+i,s=Math.max(0,Math.floor(o-d)),p=Math.min(t-1,Math.ceil(o+d)),h=p-s+1,m=new Float32Array(h),I=new Int16Array(h);let g=0,b=0;for(let r=s;r<=p;r++){const t=n((r+.5-o)*a,c);g+=t,m[b]=t,b++}let R=0;for(let n=0;n<m.length;n++){const t=m[n]/g;R+=t,I[n]=r(t)}I[e>>1]+=r(1-R);let x=0;for(;x<I.length&&0===I[x];)x++;let M=I.length-1;for(;M>0&&0===I[M];)M--;const j=M-x+1;l[v++]=s+x,l[v++]=j,l.set(I.subarray(x,M+1),v),v+=j}return l},rr}(),u=(Gn||(Gn=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.convolve=void 0,tr.convolve=(n,r,t,e,u,i)=>{let o=0,c=0;for(let f=0;f<e;f++){let a=0;for(let t=0;t<u;t++){let t=o+4*i[a++]|0,u=0,f=0,d=0,s=0;for(let r=i[a++];r>0;r--){const r=i[a++];u=u+r*n[t]|0,f=f+r*n[t+1]|0,d=d+r*n[t+2]|0,s=s+r*n[t+3]|0,t=t+4|0}r[c]=u+8192>>14,r[c+1]=f+8192>>14,r[c+2]=d+8192>>14,r[c+3]=s+8192>>14,c=c+4*e|0}c=4*(f+1)|0,o=(f+1)*t*4|0}}),tr),i=(n,r,t=!1)=>{const i=r.height/n.height,o=e.filters(n.width,r.width,r.width/n.width,0,t),c=e.filters(n.height,r.height,i,0,t),f=new Uint8ClampedArray(r.width*n.height*4);u.convolve(n.data,f,n.width,n.height,r.width,o),u.convolve(f,r.data,n.height,r.width,r.height,c)};return Yn.lanczos=(t,e,u=0,o=0,c=t.width-u,f=t.height-o,a=0,d=0,s=e.width-a,l=e.height-d)=>{if(o|=0,f|=0,a|=0,d|=0,s|=0,l|=0,(c|=0)<=0||f<=0||s<=0||l<=0)return;if(0==(u|=0)&&0===o&&c===t.width&&f===t.height&&0===a&&0===d&&s===e.width&&l===e.height)return void i(t,e);const v=r.createImage(c,f),p=r.createImage(s,l);n.copy(t,v,u,o),i(v,p),n.copy(p,e,0,0,p.width,p.height,a,d)},Yn.lanczos2=(t,e,u=0,o=0,c=t.width-u,f=t.height-o,a=0,d=0,s=e.width-a,l=e.height-d)=>{if(o|=0,f|=0,a|=0,d|=0,s|=0,l|=0,(c|=0)<=0||f<=0||s<=0||l<=0)return;if(0==(u|=0)&&0===o&&c===t.width&&f===t.height&&0===a&&0===d&&s===e.width&&l===e.height)return void i(t,e,!0);const v=r.createImage(c,f),p=r.createImage(s,l);n.copy(t,v,u,o),i(v,p,!0),n.copy(p,e,0,0,p.width,p.height,a,d)},Yn}(),ur=tn();const ir=n=>({kind:"height",size:n}),or=f().contramap((n=>n.size))(ur.Ord),cr=on.sort(or),fr=on.sort({equals:(n,r)=>n.kind===r.kind,compare:(n,r)=>n.kind===r.kind?0:"width"===n.kind?-1:1}),ar=(n,r)=>t=>{const e=cr(t),u=(n=>{const[r,t]=n;return r.size/t.size})(e),i=Object.assign(Object.assign({},e[0]),{size:"smallest"===r?n:n*u}),o=Object.assign(Object.assign({},e[1]),{size:"largest"===r?n:n/u});return fr([o,i])},dr=n=>{const{naturalWidth:r,naturalHeight:t}=n;return[(e=r,{kind:"width",size:e}),ir(t)];var e},sr=(n,r)=>{const t=dr(n),e=ar(r,"largest")(t).map((n=>n.size));return[e[0],e[1]]},lr=()=>{const n=document.createElement("canvas"),r=n.getContext("2d");return[n,r]},vr={image:800,highResolutionImage:2e3},pr=(n,r)=>Math.min(n.naturalWidth,n.naturalHeight)>vr[r],hr=(n,r)=>pr(n,r)?((n,r)=>{const t=ar(n,"smallest"),[e,u]=lr(),i=dr(r),[o,c]=t(i).map((n=>n.size)),f=new ImageData(o,c),a=(n=>{const{naturalWidth:r,naturalHeight:t}=n,[e,u]=lr();return e.width=r,e.height=t,u.drawImage(n,0,0),u.getImageData(0,0,r,t)})(r);return e.width=o,e.height=c,er.lanczos(a,f),u.putImageData(f,0,0),e.toDataURL("image/jpeg",.7)})(vr[r],n):(n=>{const r=document.createElement("canvas"),{naturalWidth:t,naturalHeight:e}=n,u=r.getContext("2d");return r.width=t,r.height=e,u.drawImage(n,0,0,t,e),r.toDataURL("image/jpeg")})(n),mr=n=>{const r=(new TextEncoder).encode(n);return btoa(String.fromCharCode.apply(null,r))},Ir="2.216.2",gr={visualSearchId:null,textSearchId:null,textSearchQuery:null,searchType:null,searchStatus:"idle",resultLoaded:!1,resultViewed:!1,image:null,imageBounds:null,searchArea:null,croppedImageUrl:null,visualSearchStarted:!1,requestFilters:[]},br={results:[],sourceProduct:null,dynamicFilters:[],detectedObjects:[],stream:null,redirect:null,autoSuggestCompletions:[]},Rr=Object.assign(Object.assign(Object.assign({},{excluded:null,campaignId:"",campaignIdTextSearch:"",campaignIdVisualSearch:""}),gr),br),{state:xr,onChange:Mr}=yn(Rr),{state:jr,onChange:yr}=yn(Rr),Or=Object.assign({},Rr),{state:Ur}=yn(Or),wr=n=>{switch(n){case"widget":return xr;case"components":return jr;case"shopTheLook":return Ur;default:throw new Error(`Unknown store name: ${n}`)}},Wr=(n,r="appStateAndReceivedData",t=[])=>{const e=wr(n);let u={};switch(r){case"appStateOnly":u=Object.assign({},gr);break;case"receivedDataOnly":u=Object.assign({},br);break;case"appStateAndReceivedData":u=Object.assign(Object.assign({},gr),br);break;case"all":u=Object.assign({},Rr);break;case"manual":for(const n of t)delete e[n];return}for(const n of t)delete u[n];Object.assign(e,u)},Sr=(n,r,t)=>{const e=Object.assign(Object.assign({results:r.results,dynamicFilters:r.dynamicFilters,detectedObjects:r.detectedObjects,requestId:"VPS"===t?r.visualSearchId||"":r.textSearchId||""},vn("query",r.textSearchQuery)),{storeName:n,campaignTypeId:t,campaignTypeName:cn[t],widgetVersion:Ir});document.dispatchEvent(new CustomEvent("vviinnSearchSuccess",{detail:e,bubbles:!0,composed:!0}))},Ar=n=>r=>(Wr(n,"receivedDataOnly"),wr(n).searchStatus="error",r),qr=(n,r,t,e,u=!1)=>p(wn(t,r),_,k,A((n=>V(n,e))),S((r=>(((n,r=!1)=>async t=>{var e,u;const i=wr(n);if("shopTheLook"===n)return void(i.visualSearchId=t.requestId);const o=t.interactions.suggestedSearchAreas.map((({rectangle:n})=>n));o.length>0&&(i.detectedObjects=o);const c=null!==(e=t.interactions.dynamicFilters)&&void 0!==e?e:[];i.visualSearchId=t.requestId,i.results=t.data.products,i.dynamicFilters=c;const f=Rn(c);0===i.requestFilters.length&&f.length>0&&(i.requestFilters=f),i.stream=null!==(u=null==t?void 0:t.stream)&&void 0!==u?u:null,i.searchStatus="success",r||Sr(n,i,"VPS")})(n,u)(r),r))),W(Ar(n))),kr=(n,r,t="image",e,u,i,o=!1)=>c=>{const f=wr(n);return p(k((n=>O.pipe(U.fromNullable(n),R.fromOption((()=>Dn)),R.chain(Vn)))(c)),F((n=>r=>O.pipe(r,$n,Wn.map((r=>hr(r,n))),Wn.chain(Hn)))(t)),A((r=>(n=>r=>p(w($n(r)),S((r=>(wr(n).image=r,r))),S((()=>r))))(n)(r))),A((c=>p(E((async()=>Object.assign(Object.assign(Object.assign({query:{[t]:(await Ln(c)).split(",")[1]},objectDetection:{include:"image"===t}},hn("staticFilters",Object.assign({},pn("excluded",f.excluded)))),vn("requestId",e)),pn("campaign",i||f.campaignIdVisualSearch||f.campaignId))),(n=>({kind:"network error",inner:n}))),A((t=>qr(n,t,r,u,o)))))))},_r=async(n,r,t,e,u)=>{const i=wr(n),o=Object.assign(Object.assign({query:{url:r},objectDetection:{include:!0}},hn("staticFilters",Object.assign({},pn("excluded",i.excluded)))),pn("campaign",u||i.campaignIdVisualSearch||i.campaignId));return qr(n,o,t,e)()},Pr=(n,r,t,e)=>async u=>{var i;const o=wr(n);"shopTheLook"!==n&&Object.assign(o,{image:null,detectedObjects:[],textSearchQuery:null,searchType:"image",searchStatus:"loading",visualSearchStarted:!0});const c=await p(kr(n,r,"image",void 0,t,e)(u))();return(null===(i=o.visualSearchId)||void 0===i?void 0:i.length)&&await p(w($n(u)),S((n=>pr(n,"highResolutionImage"))),z((()=>N(!1))))()?(p(kr(n,r,"highResolutionImage",o.visualSearchId,t,e,!0)(u),D((n=>(console.error("Failed to upload hi-res image:",n),N(c)))))(),c):c},Cr=async(n,r,t,e,u)=>{const i=wr(n);i.textSearchQuery=null,i.searchType="image",i.searchStatus="loading",i.visualSearchStarted=!0;let o=null,c=!1;if(i.searchArea){if("shopTheLook"===n)o=i.searchArea;else if(i.searchArea&&i.imageBounds){const n=L(i.imageBounds)(i.searchArea);o={width:n.width,height:n.height,left:n.left,top:n.top}}}else o=null,c=!0;const f=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},vn("requestId",null!=r?r:i.visualSearchId)),pn("campaign",u||i.campaignIdVisualSearch||i.campaignId)),pn("dynamicFilters",i.requestFilters)),{query:Object.assign({},vn("searchArea",o))}),hn("staticFilters",Object.assign({},pn("excluded",i.excluded)))),{objectDetection:{include:c}});return qr(n,f,t,e)()},Tr=(n,r)=>{wr(n).textSearchQuery=r||null},Er=async(n,r,t,e,u,i)=>{const o=wr(n);o.textSearchQuery=r,o.searchType="text",o.searchStatus="loading";const c=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({query:r},vn("requestId",u)),vn("resultsCount",i)),pn("dynamicFilters",o.requestFilters)),pn("campaign",o.campaignIdTextSearch)),hn("staticFilters",Object.assign({},pn("excluded",o.excluded))));return p(wn(t,c),_,k,A((n=>q(n,e))),S((r=>{var t,e,u,i,c,f,a;o.results=null!==(e=null===(t=null==r?void 0:r.data)||void 0===t?void 0:t.products)&&void 0!==e?e:[],o.textSearchId=r.requestId,o.dynamicFilters=null!==(i=null===(u=null==r?void 0:r.interactions)||void 0===u?void 0:u.dynamicFilters)&&void 0!==i?i:[];const d=Rn(null!==(f=null===(c=null==r?void 0:r.interactions)||void 0===c?void 0:c.dynamicFilters)&&void 0!==f?f:[]);return 0===o.requestFilters.length&&d.length>0&&(o.requestFilters=d),o.stream=null!==(a=null==r?void 0:r.stream)&&void 0!==a?a:null,o.searchStatus="success",Sr(n,o,"TPS"),r})),W(Ar(n)))()},Fr=async(n,r,t,e,u,i,o)=>{const c=wr("components");c.searchStatus="loading";const f="product_type"===n||"google_product_category"===n?p(r,(n=>n.split(" > ").join(">")),mr,(n=>n.split("=")[0])):r,a=Object.assign(Object.assign({staticFilters:{included:[{column:n,values:[f]}]}},vn("resultsCount",u)),vn("dynamicFilters",i));return await p(wn(t,a),_,k,P((n=>C(n,e))),S((n=>{var r,t,e,u;return o||(c.results=null!==(t=null===(r=null==n?void 0:n.data)||void 0===r?void 0:r.products)&&void 0!==t?t:[],c.dynamicFilters=null!==(u=null===(e=null==n?void 0:n.interactions)||void 0===e?void 0:e.dynamicFilters)&&void 0!==u?u:[],c.searchStatus="success",Sr("components",c,"TPS")),n})),W(Ar("components")))()},zr=n=>n?{state:xr,onChange:Mr,storeName:"widget"}:{state:jr,onChange:yr,storeName:"components"},Nr=async(n,r,t,e)=>{const u=wr(n);return p(wn(t,{query:r}),_,k,A((n=>T(n,e))),S((n=>{var t,e;if(n.data.query.trim().toLowerCase()!==(null===(t=u.textSearchQuery)||void 0===t?void 0:t.trim().toLowerCase()))return n;const i=null!==(e=n.data.completions)&&void 0!==e?e:[];u.autoSuggestCompletions=i;const o=i.find((n=>n.suggestion.trim().toLowerCase()===r.trim().toLowerCase()&&(null==n?void 0:n.url)));return u.redirect=(null==o?void 0:o.url)?{url:o.url,query:r}:null,n})),W((n=>n)))()},Vr=n=>{wr(n).autoSuggestCompletions=[]};export{Fr as A,Sn as B,kn as C,an as D,fn as E,on as _,_r as a,$n as b,Pr as c,Tr as d,Vr as e,Nr as f,En as g,cn as h,qn as i,pn as j,Er as k,Fn as l,Cr as m,xr as n,bn as o,ln as p,gn as q,In as r,Ur as s,mn as t,zr as u,Ir as v,Bn as w,sr as x,Vn as y,Wr as z}
1
+ import{a as n,f as r}from"./p-RkvPN2Rk.js";import{r as t,g as e,h as u,j as i,k as o,l as c,n as f,o as a,p as d,q as s,t as l,u as v,v as p,w as h,x as m,y as I,z as g,A as b,E as R,B as x,C as M,D as j,F as y,_ as O,O as U,G as w,H as W,I as S,J as A,K as q,L as k,M as _,N as P,P as T,Q as E,R as C,S as F,T as z,U as N,V,W as D,a as L}from"./p-CrEgr0jU.js";var $,B,H={},K={},J={};function Q(){return $||($=1,function(n){var r=J&&J.__createBinding||(Object.create?function(n,r,t,e){void 0===e&&(e=t);var u=Object.getOwnPropertyDescriptor(r,t);u&&!("get"in u?!r.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,e,u)}:function(n,r,t,e){void 0===e&&(e=t),n[e]=r[t]}),d=J&&J.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),s=J&&J.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(t,n,e);return d(t,n),t},l=J&&J.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var e,u=0,i=r.length;u<i;u++)!e&&u in r||(e||(e=Array.prototype.slice.call(r,0,u)),e[u]=r[u]);return n.concat(e||Array.prototype.slice.call(r))};Object.defineProperty(n,"__esModule",{value:!0}),n.traverse=n.reduceRightWithIndex=n.foldMapWithIndex=n.reduceWithIndex=n.reduceRight=n.foldMap=n.reduce=n.mapWithIndex=n.map=n.flatten=n.duplicate=n.extend=n.flatMap=n.ap=n.alt=n.altW=n.of=n.chunksOf=n.splitAt=n.chop=n.chainWithIndex=n.intersperse=n.prependAll=n.unzip=n.zipWith=n.modifyAt=n.updateAt=n.sort=n.groupBy=n.reverse=n.fromArray=n.unappend=n.unprepend=n.range=n.replicate=n.makeBy=n.fromReadonlyArray=n.rotate=n.union=n.sortBy=n.uniq=n.unsafeUpdateAt=n.unsafeInsertAt=n.append=n.appendW=n.prepend=n.prependW=n.isOutOfBound=n.isNonEmpty=n.empty=void 0,n.insertAt=n.snoc=n.unsnoc=n.uncons=n.filterWithIndex=n.chain=n.intercalate=n.updateLast=n.modifyLast=n.updateHead=n.modifyHead=n.matchRight=n.matchLeft=n.concatAll=n.max=n.min=n.init=n.last=n.tail=n.head=n.apS=n.bind=n.let=n.bindTo=n.Do=n.Comonad=n.Alt=n.TraversableWithIndex=n.Traversable=n.FoldableWithIndex=n.Foldable=n.Monad=n.chainFirst=n.Chain=n.Applicative=n.apSecond=n.apFirst=n.Apply=n.FunctorWithIndex=n.Pointed=n.flap=n.Functor=n.getUnionSemigroup=n.getEq=n.getSemigroup=n.getShow=n.URI=n.extract=n.traverseWithIndex=n.sequence=void 0,n.readonlyNonEmptyArray=n.fold=n.prependToAll=void 0,n.concatW=x,n.concat=M,n.group=j,n.zip=function r(t,e){return void 0===e?function(n){return r(n,t)}:(0,n.zipWith)(t,e,(function(n,r){return[n,r]}))},n.groupSort=function(r){var t=(0,n.sort)(r),e=j(r);return function(r){return(0,n.isNonEmpty)(r)?e(t(r)):n.empty}},n.filter=function(r){return(0,n.filterWithIndex)((function(n,t){return r(t)}))},n.cons=function(r,t){return void 0===t?(0,n.prepend)(r):(0,m.pipe)(t,(0,n.prepend)(r))};var v=o(),p=c(),h=a(),m=u(),I=i(),g=s(t()),b=f(),R=s(e());function x(n){return function(r){return r.concat(n)}}function M(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function j(r){return function(t){var e=t.length;if(0===e)return n.empty;for(var u=[],i=t[0],o=[i],c=1;c<e;c++){var f=t[c];r.equals(f,i)?o.push(f):(u.push(o),o=[i=f])}return u.push(o),u}}n.empty=g.emptyReadonlyArray,n.isNonEmpty=g.isNonEmpty,n.isOutOfBound=function(n,r){return n<0||n>=r.length},n.prependW=function(n){return function(r){return l([n],r,!0)}},n.prepend=n.prependW,n.appendW=function(n){return function(r){return l(l([],r,!0),[n],!1)}},n.append=n.appendW,n.unsafeInsertAt=function(r,t,e){if((0,n.isNonEmpty)(e)){var u=g.fromReadonlyNonEmptyArray(e);return u.splice(r,0,t),u}return[t]},n.unsafeUpdateAt=function(n,r,t){if(t[n]===r)return t;var e=g.fromReadonlyNonEmptyArray(t);return e[n]=r,e},n.uniq=function(r){return function(t){if(1===t.length)return t;for(var e=[(0,n.head)(t)],u=function(n){e.every((function(t){return!r.equals(t,n)}))&&e.push(n)},i=0,o=(0,n.tail)(t);i<o.length;i++)u(o[i]);return e}},n.sortBy=function(r){if((0,n.isNonEmpty)(r)){var t=(0,b.getMonoid)();return(0,n.sort)(r.reduce(t.concat,t.empty))}return m.identity},n.union=function(r){var t=(0,n.uniq)(r);return function(n){return function(r){return t((0,m.pipe)(r,M(n)))}}},n.rotate=function(r){return function(t){var e=t.length,u=Math.round(r)%e;if((0,n.isOutOfBound)(Math.abs(u),t)||0===u)return t;if(u<0){var i=(0,n.splitAt)(-u)(t);return(0,m.pipe)(i[1],M(i[0]))}return(0,n.rotate)(u-e)(t)}},n.fromReadonlyArray=function(r){return(0,n.isNonEmpty)(r)?g.some(r):g.none},n.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),e=[n(0)],u=1;u<t;u++)e.push(n(u));return e}},n.replicate=function(r){return(0,n.makeBy)((function(){return r}))},n.range=function(r,t){return r<=t?(0,n.makeBy)((function(n){return r+n}))(t-r+1):[r]},n.unprepend=function(r){return[(0,n.head)(r),(0,n.tail)(r)]},n.unappend=function(r){return[(0,n.init)(r),(0,n.last)(r)]},n.fromArray=function(r){return(0,n.fromReadonlyArray)(r.slice())},n.reverse=function(r){return 1===r.length?r:l([(0,n.last)(r)],r.slice(0,-1).reverse(),!0)},n.groupBy=function(n){return function(r){for(var t={},e=0,u=r;e<u.length;e++){var i=u[e],o=n(i);g.has.call(t,o)?t[o].push(i):t[o]=[i]}return t}},n.sort=function(n){return function(r){return 1===r.length?r:r.slice().sort(n.compare)}},n.updateAt=function(r,t){return(0,n.modifyAt)(r,(function(){return t}))},n.modifyAt=function(r,t){return function(e){return(0,n.isOutOfBound)(r,e)?g.none:g.some((0,n.unsafeUpdateAt)(r,t(e[r]),e))}},n.zipWith=function(n,r,t){for(var e=[t(n[0],r[0])],u=Math.min(n.length,r.length),i=1;i<u;i++)e[i]=t(n[i],r[i]);return e},n.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],e=1;e<n.length;e++)r[e]=n[e][0],t[e]=n[e][1];return[r,t]},n.prependAll=function(n){return function(r){for(var t=[n,r[0]],e=1;e<r.length;e++)t.push(n,r[e]);return t}},n.intersperse=function(r){return function(t){var e=(0,n.tail)(t);return(0,n.isNonEmpty)(e)?(0,m.pipe)(e,(0,n.prependAll)(r),(0,n.prepend)((0,n.head)(t))):t}},n.chainWithIndex=function(r){return function(t){for(var e=g.fromReadonlyNonEmptyArray(r(0,(0,n.head)(t))),u=1;u<t.length;u++)for(var i=r(u,t[u]),o=0;o<i.length;o++)e.push(i[o]);return e}},n.chop=function(r){return function(t){for(var e=r(t),u=[e[0]],i=e[1];(0,n.isNonEmpty)(i);){var o=r(i),c=o[1];u.push(o[0]),i=c}return u}},n.splitAt=function(r){return function(t){var e=Math.max(1,r);return e>=t.length?[t,n.empty]:[(0,m.pipe)(t.slice(1,e),(0,n.prepend)((0,n.head)(t))),t.slice(e)]}},n.chunksOf=function(r){return(0,n.chop)((0,n.splitAt)(r))};var y=function(r,t){return(0,m.pipe)(r,(0,n.map)(t))},O=function(r,t){return(0,m.pipe)(r,(0,n.mapWithIndex)(t))},U=function(r,t){return(0,m.pipe)(r,(0,n.ap)(t))},w=function(r,t){return(0,m.pipe)(r,(0,n.extend)(t))},W=function(r,t,e){return(0,m.pipe)(r,(0,n.reduce)(t,e))},S=function(r){var t=(0,n.foldMap)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},A=function(r,t,e){return(0,m.pipe)(r,(0,n.reduceRight)(t,e))},q=function(r){var t=(0,n.traverse)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},k=function(r,t){return(0,m.pipe)(r,(0,n.alt)(t))},_=function(r,t,e){return(0,m.pipe)(r,(0,n.reduceWithIndex)(t,e))},P=function(r){var t=(0,n.foldMapWithIndex)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},T=function(r,t,e){return(0,m.pipe)(r,(0,n.reduceRightWithIndex)(t,e))},E=function(r){var t=(0,n.traverseWithIndex)(r);return function(n,r){return(0,m.pipe)(n,t(r))}};n.of=g.singleton,n.altW=function(n){return function(r){return(0,m.pipe)(r,x(n()))}},n.alt=n.altW,n.ap=function(r){return(0,n.flatMap)((function(t){return(0,m.pipe)(r,(0,n.map)(t))}))},n.flatMap=(0,m.dual)(2,(function(r,t){return(0,m.pipe)(r,(0,n.chainWithIndex)((function(n,r){return t(r,n)})))})),n.extend=function(r){return function(t){for(var e=(0,n.tail)(t),u=[r(t)];(0,n.isNonEmpty)(e);)u.push(r(e)),e=(0,n.tail)(e);return u}},n.duplicate=(0,n.extend)(m.identity),n.flatten=(0,n.flatMap)(m.identity),n.map=function(r){return(0,n.mapWithIndex)((function(n,t){return r(t)}))},n.mapWithIndex=function(r){return function(t){for(var e=[r(0,(0,n.head)(t))],u=1;u<t.length;u++)e.push(r(u,t[u]));return e}},n.reduce=function(r,t){return(0,n.reduceWithIndex)(r,(function(n,r,e){return t(r,e)}))},n.foldMap=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,e){return n.concat(t,r(e))}),r(t[0]))}}},n.reduceRight=function(r,t){return(0,n.reduceRightWithIndex)(r,(function(n,r,e){return t(r,e)}))},n.reduceWithIndex=function(n,r){return function(t){return t.reduce((function(n,t,e){return r(e,n,t)}),n)}},n.foldMapWithIndex=function(n){return function(r){return function(t){return t.slice(1).reduce((function(t,e,u){return n.concat(t,r(u+1,e))}),r(0,t[0]))}}},n.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,e){return r(e,t,n)}),n)}},n.traverse=function(r){var t=(0,n.traverseWithIndex)(r);return function(n){return t((function(r,t){return n(t)}))}},n.sequence=function(r){return(0,n.traverseWithIndex)(r)(m.SK)},n.traverseWithIndex=function(r){return function(t){return function(e){for(var u=r.map(t(0,(0,n.head)(e)),n.of),i=1;i<e.length;i++)u=r.ap(r.map(u,(function(r){return function(t){return(0,m.pipe)(r,(0,n.append)(t))}})),t(i,e[i]));return u}}},n.extract=g.head,n.URI="ReadonlyNonEmptyArray",n.getShow=function(n){return{show:function(r){return"[".concat(r.map(n.show).join(", "),"]")}}},n.getSemigroup=function(){return{concat:M}},n.getEq=function(n){return(0,h.fromEquals)((function(r,t){return r.length===t.length&&r.every((function(r,e){return n.equals(r,t[e])}))}))},n.getUnionSemigroup=function(r){var t=(0,n.union)(r);return{concat:function(n,r){return t(r)(n)}}},n.Functor={URI:n.URI,map:y},n.flap=(0,I.flap)(n.Functor),n.Pointed={URI:n.URI,of:n.of},n.FunctorWithIndex={URI:n.URI,map:y,mapWithIndex:O},n.Apply={URI:n.URI,map:y,ap:U},n.apFirst=(0,v.apFirst)(n.Apply),n.apSecond=(0,v.apSecond)(n.Apply),n.Applicative={URI:n.URI,map:y,ap:U,of:n.of},n.Chain={URI:n.URI,map:y,ap:U,chain:n.flatMap},n.chainFirst=(0,p.chainFirst)(n.Chain),n.Monad={URI:n.URI,map:y,ap:U,of:n.of,chain:n.flatMap},n.Foldable={URI:n.URI,reduce:W,foldMap:S,reduceRight:A},n.FoldableWithIndex={URI:n.URI,reduce:W,foldMap:S,reduceRight:A,reduceWithIndex:_,foldMapWithIndex:P,reduceRightWithIndex:T},n.Traversable={URI:n.URI,map:y,reduce:W,foldMap:S,reduceRight:A,traverse:q,sequence:n.sequence},n.TraversableWithIndex={URI:n.URI,map:y,mapWithIndex:O,reduce:W,foldMap:S,reduceRight:A,traverse:q,sequence:n.sequence,reduceWithIndex:_,foldMapWithIndex:P,reduceRightWithIndex:T,traverseWithIndex:E},n.Alt={URI:n.URI,map:y,alt:k},n.Comonad={URI:n.URI,map:y,extend:w,extract:n.extract},n.Do=(0,n.of)(g.emptyRecord),n.bindTo=(0,I.bindTo)(n.Functor),n.let=(0,I.let)(n.Functor),n.bind=(0,p.bind)(n.Chain),n.apS=(0,v.apS)(n.Apply),n.head=n.extract,n.tail=g.tail,n.last=function(n){return n[n.length-1]},n.init=function(n){return n.slice(0,-1)},n.min=function(n){var r=R.min(n);return function(n){return n.reduce(r.concat)}},n.max=function(n){var r=R.max(n);return function(n){return n.reduce(r.concat)}},n.concatAll=function(n){return function(r){return r.reduce(n.concat)}},n.matchLeft=function(r){return function(t){return r((0,n.head)(t),(0,n.tail)(t))}},n.matchRight=function(r){return function(t){return r((0,n.init)(t),(0,n.last)(t))}},n.modifyHead=function(r){return function(t){return l([r((0,n.head)(t))],(0,n.tail)(t),!0)}},n.updateHead=function(r){return(0,n.modifyHead)((function(){return r}))},n.modifyLast=function(r){return function(t){return(0,m.pipe)((0,n.init)(t),(0,n.append)(r((0,n.last)(t))))}},n.updateLast=function(r){return(0,n.modifyLast)((function(){return r}))},n.intercalate=function(r){var t=(0,n.concatAll)(r);return function(r){return(0,m.flow)((0,n.intersperse)(r),t)}},n.chain=n.flatMap,n.filterWithIndex=function(r){return function(t){return(0,n.fromReadonlyArray)(t.filter((function(n,t){return r(t,n)})))}},n.uncons=n.unprepend,n.unsnoc=n.unappend,n.snoc=function(n,r){return(0,m.pipe)(n,M([r]))},n.insertAt=function(r,t){return function(e){return r<0||r>e.length?g.none:g.some((0,n.unsafeInsertAt)(r,t,e))}},n.prependToAll=n.prependAll,n.fold=n.concatAll,n.readonlyNonEmptyArray={URI:n.URI,of:n.of,map:y,mapWithIndex:O,ap:U,chain:n.flatMap,extend:w,extract:n.extract,reduce:W,foldMap:S,reduceRight:A,traverse:q,sequence:n.sequence,reduceWithIndex:_,foldMapWithIndex:P,reduceRightWithIndex:T,traverseWithIndex:E,alt:k}}(J)),J}function G(){return B||(B=1,function(n){var r=K&&K.__createBinding||(Object.create?function(n,r,t,e){void 0===e&&(e=t);var u=Object.getOwnPropertyDescriptor(r,t);u&&!("get"in u?!r.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,e,u)}:function(n,r,t,e){void 0===e&&(e=t),n[e]=r[t]}),e=K&&K.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),a=K&&K.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},d=K&&K.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var e,u=0,i=r.length;u<i;u++)!e&&u in r||(e||(e=Array.prototype.slice.call(r,0,u)),e[u]=r[u]);return n.concat(e||Array.prototype.slice.call(r))};Object.defineProperty(n,"__esModule",{value:!0}),n.reduceRightWithIndex=n.reduceRight=n.reduceWithIndex=n.reduce=n.mapWithIndex=n.map=n.flatten=n.duplicate=n.extend=n.flatMap=n.ap=n.alt=n.altW=n.chunksOf=n.splitAt=n.chop=n.chainWithIndex=n.foldMap=n.foldMapWithIndex=n.intersperse=n.prependAll=n.unzip=n.zipWith=n.of=n.copy=n.modifyAt=n.updateAt=n.insertAt=n.sort=n.groupBy=n.reverse=n.unappend=n.unprepend=n.range=n.replicate=n.makeBy=n.fromArray=n.fromReadonlyNonEmptyArray=n.rotate=n.union=n.sortBy=n.uniq=n.unsafeUpdateAt=n.unsafeInsertAt=n.append=n.appendW=n.prepend=n.prependW=n.isOutOfBound=n.isNonEmpty=void 0,n.snoc=n.unsnoc=n.uncons=n.filterWithIndex=n.chain=n.intercalate=n.updateLast=n.modifyLast=n.updateHead=n.modifyHead=n.matchRight=n.matchLeft=n.concatAll=n.max=n.min=n.init=n.last=n.tail=n.head=n.apS=n.bind=n.let=n.bindTo=n.Do=n.Comonad=n.Alt=n.TraversableWithIndex=n.Traversable=n.FoldableWithIndex=n.Foldable=n.Monad=n.chainFirst=n.Chain=n.Applicative=n.apSecond=n.apFirst=n.Apply=n.FunctorWithIndex=n.Pointed=n.flap=n.Functor=n.getUnionSemigroup=n.getEq=n.getSemigroup=n.getShow=n.URI=n.extract=n.traverseWithIndex=n.sequence=n.traverse=void 0,n.nonEmptyArray=n.fold=n.prependToAll=void 0,n.concatW=g,n.concat=b,n.group=R,n.zip=function r(t,e){return void 0===e?function(n){return r(n,t)}:(0,n.zipWith)(t,e,(function(n,r){return[n,r]}))},n.groupSort=function(r){var t=(0,n.sort)(r),e=R(r);return function(r){return(0,n.isNonEmpty)(r)?e(t(r)):[]}},n.filter=function(r){return(0,n.filterWithIndex)((function(n,t){return r(t)}))},n.cons=function(r,t){return void 0===t?(0,n.prepend)(r):(0,v.pipe)(t,(0,n.prepend)(r))};var s=o(),l=c(),v=u(),p=i(),h=a(t()),m=f(),I=a(Q());function g(n){return function(r){return r.concat(n)}}function b(n,r){return r?n.concat(r):function(r){return r.concat(n)}}function R(n){return function(r){var t=r.length;if(0===t)return[];for(var e=[],u=r[0],i=[u],o=1;o<t;o++){var c=r[o];n.equals(c,u)?i.push(c):(e.push(i),i=[u=c])}return e.push(i),e}}n.isNonEmpty=function(n){return n.length>0},n.isOutOfBound=function(n,r){return n<0||n>=r.length},n.prependW=function(n){return function(r){return d([n],r,!0)}},n.prepend=n.prependW,n.appendW=function(n){return function(r){return d(d([],r,!0),[n],!1)}},n.append=n.appendW,n.unsafeInsertAt=function(r,t,e){if((0,n.isNonEmpty)(e)){var u=(0,n.fromReadonlyNonEmptyArray)(e);return u.splice(r,0,t),u}return[t]},n.unsafeUpdateAt=function(r,t,e){var u=(0,n.fromReadonlyNonEmptyArray)(e);return u[r]=t,u},n.uniq=function(r){return function(t){if(1===t.length)return(0,n.copy)(t);for(var e=[(0,n.head)(t)],u=function(n){e.every((function(t){return!r.equals(t,n)}))&&e.push(n)},i=0,o=(0,n.tail)(t);i<o.length;i++)u(o[i]);return e}},n.sortBy=function(r){if((0,n.isNonEmpty)(r)){var t=(0,m.getMonoid)();return(0,n.sort)(r.reduce(t.concat,t.empty))}return n.copy},n.union=function(r){var t=(0,n.uniq)(r);return function(n){return function(r){return t((0,v.pipe)(r,b(n)))}}},n.rotate=function(r){return function(t){var e=t.length,u=Math.round(r)%e;if((0,n.isOutOfBound)(Math.abs(u),t)||0===u)return(0,n.copy)(t);if(u<0){var i=(0,n.splitAt)(-u)(t);return(0,v.pipe)(i[1],b(i[0]))}return(0,n.rotate)(u-e)(t)}},n.fromReadonlyNonEmptyArray=h.fromReadonlyNonEmptyArray,n.fromArray=function(r){return(0,n.isNonEmpty)(r)?h.some(r):h.none},n.makeBy=function(n){return function(r){for(var t=Math.max(0,Math.floor(r)),e=[n(0)],u=1;u<t;u++)e.push(n(u));return e}},n.replicate=function(r){return(0,n.makeBy)((function(){return r}))},n.range=function(r,t){return r<=t?(0,n.makeBy)((function(n){return r+n}))(t-r+1):[r]},n.unprepend=function(r){return[(0,n.head)(r),(0,n.tail)(r)]},n.unappend=function(r){return[(0,n.init)(r),(0,n.last)(r)]},n.reverse=function(r){return d([(0,n.last)(r)],r.slice(0,-1).reverse(),!0)},n.groupBy=function(n){return function(r){for(var t={},e=0,u=r;e<u.length;e++){var i=u[e],o=n(i);h.has.call(t,o)?t[o].push(i):t[o]=[i]}return t}},n.sort=function(n){return function(r){return r.slice().sort(n.compare)}},n.insertAt=function(r,t){return function(e){return r<0||r>e.length?h.none:h.some((0,n.unsafeInsertAt)(r,t,e))}},n.updateAt=function(r,t){return(0,n.modifyAt)(r,(function(){return t}))},n.modifyAt=function(r,t){return function(e){return(0,n.isOutOfBound)(r,e)?h.none:h.some((0,n.unsafeUpdateAt)(r,t(e[r]),e))}},n.copy=n.fromReadonlyNonEmptyArray,n.of=function(n){return[n]},n.zipWith=function(n,r,t){for(var e=[t(n[0],r[0])],u=Math.min(n.length,r.length),i=1;i<u;i++)e[i]=t(n[i],r[i]);return e},n.unzip=function(n){for(var r=[n[0][0]],t=[n[0][1]],e=1;e<n.length;e++)r[e]=n[e][0],t[e]=n[e][1];return[r,t]},n.prependAll=function(n){return function(r){for(var t=[n,r[0]],e=1;e<r.length;e++)t.push(n,r[e]);return t}},n.intersperse=function(r){return function(t){var e=(0,n.tail)(t);return(0,n.isNonEmpty)(e)?(0,v.pipe)(e,(0,n.prependAll)(r),(0,n.prepend)((0,n.head)(t))):(0,n.copy)(t)}},n.foldMapWithIndex=I.foldMapWithIndex,n.foldMap=I.foldMap,n.chainWithIndex=function(r){return function(t){for(var e=(0,n.fromReadonlyNonEmptyArray)(r(0,(0,n.head)(t))),u=1;u<t.length;u++)for(var i=r(u,t[u]),o=0;o<i.length;o++)e.push(i[o]);return e}},n.chop=function(r){return function(t){for(var e=r(t),u=[e[0]],i=e[1];(0,n.isNonEmpty)(i);){var o=r(i),c=o[1];u.push(o[0]),i=c}return u}},n.splitAt=function(r){return function(t){var e=Math.max(1,r);return e>=t.length?[(0,n.copy)(t),[]]:[(0,v.pipe)(t.slice(1,e),(0,n.prepend)((0,n.head)(t))),t.slice(e)]}},n.chunksOf=function(r){return(0,n.chop)((0,n.splitAt)(r))};var x=function(r,t){return(0,v.pipe)(r,(0,n.map)(t))},M=function(r,t){return(0,v.pipe)(r,(0,n.mapWithIndex)(t))},j=function(r,t){return(0,v.pipe)(r,(0,n.ap)(t))},y=function(r,t){return(0,v.pipe)(r,(0,n.extend)(t))},O=function(r,t,e){return(0,v.pipe)(r,(0,n.reduce)(t,e))},U=function(r){var t=(0,n.foldMap)(r);return function(n,r){return(0,v.pipe)(n,t(r))}},w=function(r,t,e){return(0,v.pipe)(r,(0,n.reduceRight)(t,e))},W=function(r){var t=(0,n.traverse)(r);return function(n,r){return(0,v.pipe)(n,t(r))}},S=function(r,t){return(0,v.pipe)(r,(0,n.alt)(t))},A=function(r,t,e){return(0,v.pipe)(r,(0,n.reduceWithIndex)(t,e))},q=function(r){var t=(0,n.foldMapWithIndex)(r);return function(n,r){return(0,v.pipe)(n,t(r))}},k=function(r,t,e){return(0,v.pipe)(r,(0,n.reduceRightWithIndex)(t,e))},_=function(r){var t=(0,n.traverseWithIndex)(r);return function(n,r){return(0,v.pipe)(n,t(r))}};n.altW=function(n){return function(r){return(0,v.pipe)(r,g(n()))}},n.alt=n.altW,n.ap=function(r){return(0,n.flatMap)((function(t){return(0,v.pipe)(r,(0,n.map)(t))}))},n.flatMap=(0,v.dual)(2,(function(r,t){return(0,v.pipe)(r,(0,n.chainWithIndex)((function(n,r){return t(r,n)})))})),n.extend=function(r){return function(t){for(var e=(0,n.tail)(t),u=[r(t)];(0,n.isNonEmpty)(e);)u.push(r(e)),e=(0,n.tail)(e);return u}},n.duplicate=(0,n.extend)(v.identity),n.flatten=(0,n.flatMap)(v.identity),n.map=function(r){return(0,n.mapWithIndex)((function(n,t){return r(t)}))},n.mapWithIndex=function(r){return function(t){for(var e=[r(0,(0,n.head)(t))],u=1;u<t.length;u++)e.push(r(u,t[u]));return e}},n.reduce=I.reduce,n.reduceWithIndex=I.reduceWithIndex,n.reduceRight=I.reduceRight,n.reduceRightWithIndex=I.reduceRightWithIndex,n.traverse=function(r){var t=(0,n.traverseWithIndex)(r);return function(n){return t((function(r,t){return n(t)}))}},n.sequence=function(r){return(0,n.traverseWithIndex)(r)((function(n,r){return r}))},n.traverseWithIndex=function(r){return function(t){return function(e){for(var u=r.map(t(0,(0,n.head)(e)),n.of),i=1;i<e.length;i++)u=r.ap(r.map(u,(function(r){return function(t){return(0,v.pipe)(r,(0,n.append)(t))}})),t(i,e[i]));return u}}},n.extract=I.head,n.URI="NonEmptyArray",n.getShow=I.getShow,n.getSemigroup=function(){return{concat:b}},n.getEq=I.getEq,n.getUnionSemigroup=function(r){var t=(0,n.union)(r);return{concat:function(n,r){return t(r)(n)}}},n.Functor={URI:n.URI,map:x},n.flap=(0,p.flap)(n.Functor),n.Pointed={URI:n.URI,of:n.of},n.FunctorWithIndex={URI:n.URI,map:x,mapWithIndex:M},n.Apply={URI:n.URI,map:x,ap:j},n.apFirst=(0,s.apFirst)(n.Apply),n.apSecond=(0,s.apSecond)(n.Apply),n.Applicative={URI:n.URI,map:x,ap:j,of:n.of},n.Chain={URI:n.URI,map:x,ap:j,chain:n.flatMap},n.chainFirst=(0,l.chainFirst)(n.Chain),n.Monad={URI:n.URI,map:x,ap:j,of:n.of,chain:n.flatMap},n.Foldable={URI:n.URI,reduce:O,foldMap:U,reduceRight:w},n.FoldableWithIndex={URI:n.URI,reduce:O,foldMap:U,reduceRight:w,reduceWithIndex:A,foldMapWithIndex:q,reduceRightWithIndex:k},n.Traversable={URI:n.URI,map:x,reduce:O,foldMap:U,reduceRight:w,traverse:W,sequence:n.sequence},n.TraversableWithIndex={URI:n.URI,map:x,mapWithIndex:M,reduce:O,foldMap:U,reduceRight:w,traverse:W,sequence:n.sequence,reduceWithIndex:A,foldMapWithIndex:q,reduceRightWithIndex:k,traverseWithIndex:_},n.Alt={URI:n.URI,map:x,alt:S},n.Comonad={URI:n.URI,map:x,extend:y,extract:n.extract},n.Do=(0,n.of)(h.emptyRecord),n.bindTo=(0,p.bindTo)(n.Functor),n.let=(0,p.let)(n.Functor),n.bind=(0,l.bind)(n.Chain),n.apS=(0,s.apS)(n.Apply),n.head=I.head,n.tail=function(n){return n.slice(1)},n.last=I.last,n.init=function(n){return n.slice(0,-1)},n.min=I.min,n.max=I.max,n.concatAll=function(n){return function(r){return r.reduce(n.concat)}},n.matchLeft=function(r){return function(t){return r((0,n.head)(t),(0,n.tail)(t))}},n.matchRight=function(r){return function(t){return r((0,n.init)(t),(0,n.last)(t))}},n.modifyHead=function(r){return function(t){return d([r((0,n.head)(t))],(0,n.tail)(t),!0)}},n.updateHead=function(r){return(0,n.modifyHead)((function(){return r}))},n.modifyLast=function(r){return function(t){return(0,v.pipe)((0,n.init)(t),(0,n.append)(r((0,n.last)(t))))}},n.updateLast=function(r){return(0,n.modifyLast)((function(){return r}))},n.intercalate=I.intercalate,n.chain=n.flatMap,n.filterWithIndex=function(r){return function(t){return(0,n.fromArray)(t.filter((function(n,t){return r(t,n)})))}},n.uncons=n.unprepend,n.unsnoc=n.unappend,n.snoc=function(r,t){return(0,v.pipe)(r,(0,n.append)(t))},n.prependToAll=n.prependAll,n.fold=I.concatAll,n.nonEmptyArray={URI:n.URI,of:n.of,map:x,mapWithIndex:M,ap:j,chain:n.flatMap,extend:y,extract:n.extract,reduce:O,foldMap:U,reduceRight:w,traverse:W,sequence:n.sequence,reduceWithIndex:A,foldMapWithIndex:q,reduceRightWithIndex:k,traverseWithIndex:_,alt:S}}(K)),K}var X,Y,Z,nn={},rn={};function tn(){return X||(X=1,n=rn,Object.defineProperty(n,"__esModule",{value:!0}),n.Field=n.MonoidProduct=n.MonoidSum=n.SemigroupProduct=n.SemigroupSum=n.MagmaSub=n.Show=n.Bounded=n.Ord=n.Eq=n.isNumber=void 0,n.isNumber=function(n){return"number"==typeof n},n.Eq={equals:function(n,r){return n===r}},n.Ord={equals:n.Eq.equals,compare:function(n,r){return n<r?-1:n>r?1:0}},n.Bounded={equals:n.Eq.equals,compare:n.Ord.compare,top:1/0,bottom:-1/0},n.Show={show:function(n){return JSON.stringify(n)}},n.MagmaSub={concat:function(n,r){return n-r}},n.SemigroupSum={concat:function(n,r){return n+r}},n.SemigroupProduct={concat:function(n,r){return n*r}},n.MonoidSum={concat:n.SemigroupSum.concat,empty:0},n.MonoidProduct={concat:n.SemigroupProduct.concat,empty:1},n.Field={add:n.SemigroupSum.concat,zero:0,mul:n.SemigroupProduct.concat,one:1,sub:n.MagmaSub.concat,degree:function(){return 1},div:function(n,r){return n/r},mod:function(n,r){return n%r}}),rn;var n}function en(){return Y||(Y=1,function(n){var r=nn&&nn.__createBinding||(Object.create?function(n,r,t,e){void 0===e&&(e=t);var u=Object.getOwnPropertyDescriptor(r,t);u&&!("get"in u?!r.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,e,u)}:function(n,r,t,e){void 0===e&&(e=t),n[e]=r[t]}),e=nn&&nn.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),p=nn&&nn.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t},h=nn&&nn.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var e,u=0,i=r.length;u<i;u++)!e&&u in r||(e||(e=Array.prototype.slice.call(r,0,u)),e[u]=r[u]);return n.concat(e||Array.prototype.slice.call(r))};Object.defineProperty(n,"__esModule",{value:!0}),n.sortBy=n.uniq=n.rotate=n.intersperse=n.prependAll=n.unzip=n.zipWith=n.sort=n.lefts=n.rights=n.reverse=n.modifyAt=n.deleteAt=n.updateAt=n.insertAt=n.findLastIndex=n.findLastMap=n.findFirstMap=n.findIndex=n.dropRight=n.dropLeft=n.takeRight=n.takeLeft=n.init=n.tail=n.last=n.head=n.isOutOfBound=n.size=n.scanRight=n.scanLeft=n.chainWithIndex=n.foldRight=n.matchRight=n.matchRightW=n.foldLeft=n.matchLeft=n.matchLeftW=n.match=n.matchW=n.fromEither=n.fromOption=n.replicate=n.makeBy=n.appendW=n.append=n.prependW=n.prepend=n.isNonEmpty=n.isEmpty=void 0,n.getIntersectionSemigroup=n.getUnionMonoid=n.getUnionSemigroup=n.getOrd=n.getEq=n.getMonoid=n.getSemigroup=n.getShow=n.URI=n.unfold=n.wilt=n.wither=n.traverseWithIndex=n.sequence=n.traverse=n.reduceRightWithIndex=n.reduceRight=n.reduceWithIndex=n.foldMap=n.reduce=n.foldMapWithIndex=n.duplicate=n.extend=n.filterWithIndex=n.partitionMapWithIndex=n.partitionMap=n.partitionWithIndex=n.partition=n.compact=n.filterMap=n.filterMapWithIndex=n.filter=n.separate=n.mapWithIndex=n.map=n.flatten=n.flatMap=n.ap=n.alt=n.altW=n.zero=n.of=n._chainRecBreadthFirst=n._chainRecDepthFirst=n.concat=n.concatW=n.fromOptionK=n.chunksOf=n.splitAt=n.chop=void 0,n.cons=n.range=n.chain=n.apS=n.bind=n.let=n.bindTo=n.Do=n.intercalate=n.exists=n.some=n.empty=n.fromArray=n.toArray=n.unsafeDeleteAt=n.unsafeUpdateAt=n.unsafeInsertAt=n.fromEitherK=n.FromEither=n.filterE=n.Witherable=n.ChainRecBreadthFirst=n.chainRecBreadthFirst=n.ChainRecDepthFirst=n.chainRecDepthFirst=n.TraversableWithIndex=n.Traversable=n.FoldableWithIndex=n.Foldable=n.FilterableWithIndex=n.Filterable=n.Compactable=n.Extend=n.Alternative=n.guard=n.Zero=n.Alt=n.Unfoldable=n.chainFirst=n.Monad=n.Chain=n.Applicative=n.apSecond=n.apFirst=n.Apply=n.FunctorWithIndex=n.Pointed=n.flap=n.Functor=n.getDifferenceMagma=void 0,n.readonlyArray=n.prependToAll=n.snoc=void 0,n.fromPredicate=function(r){return function(t){return r(t)?[t]:n.empty}},n.lookup=function r(t,e){return void 0===e?function(n){return r(t,n)}:(0,n.isOutOfBound)(t,e)?M.none:M.some(e[t])},n.takeLeftWhile=function(r){return function(t){for(var e=[],u=0,i=t;u<i.length;u++){var o=i[u];if(!r(o))break;e.push(o)}var c=e.length;return c===t.length?t:0===c?n.empty:e}},n.spanLeft=function(r){return function(t){var e=(0,n.splitAt)(S(t,r))(t);return{init:e[0],rest:e[1]}}},n.dropLeftWhile=function(r){return function(t){var e=S(t,r);return 0===e?t:e===t.length?n.empty:t.slice(e)}},n.findFirst=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return M.some(r[t]);return M.none}},n.findLast=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return M.some(r[t]);return M.none}},n.zip=function r(t,e){return void 0===e?function(n){return r(n,t)}:(0,n.zipWith)(t,e,(function(n,r){return[n,r]}))},n.elem=A,n.comprehension=function(r,t,e){void 0===e&&(e=function(){return!0});var u=function(r,i){return(0,n.isNonEmpty)(i)?(0,n.flatMap)(O.head(i),(function(t){return u((0,R.pipe)(r,(0,n.append)(t)),O.tail(i))})):e.apply(void 0,r)?[t.apply(void 0,r)]:n.empty};return u(n.empty,r)},n.union=q,n.intersection=k,n.difference=_,n.every=function(n){return function(r){return r.every(n)}};var m=o(),I=c(),g=a(),b=l(),R=u(),x=i(),M=p(t()),j=p(tn()),y=f(),O=p(Q()),U=v(),w=s(),W=d();n.isEmpty=function(n){return 0===n.length},n.isNonEmpty=O.isNonEmpty,n.prepend=O.prepend,n.prependW=O.prependW,n.append=O.append,n.appendW=O.appendW,n.makeBy=function(r,t){return r<=0?n.empty:O.makeBy(t)(r)},n.replicate=function(r,t){return(0,n.makeBy)(r,(function(){return t}))},n.fromOption=function(r){return M.isNone(r)?n.empty:[r.value]},n.fromEither=function(r){return M.isLeft(r)?n.empty:[r.right]},n.matchW=function(r,t){return function(e){return(0,n.isNonEmpty)(e)?t(e):r()}},n.match=n.matchW,n.matchLeftW=function(r,t){return function(e){return(0,n.isNonEmpty)(e)?t(O.head(e),O.tail(e)):r()}},n.matchLeft=n.matchLeftW,n.foldLeft=n.matchLeft,n.matchRightW=function(r,t){return function(e){return(0,n.isNonEmpty)(e)?t(O.init(e),O.last(e)):r()}},n.matchRight=n.matchRightW,n.foldRight=n.matchRight,n.chainWithIndex=function(r){return function(t){if((0,n.isEmpty)(t))return n.empty;for(var e=[],u=0;u<t.length;u++)for(var i=r(u,t[u]),o=0;o<i.length;o++)e.push(i[o]);return e}},n.scanLeft=function(n,r){return function(t){var e=t.length,u=new Array(e+1);u[0]=n;for(var i=0;i<e;i++)u[i+1]=r(u[i],t[i]);return u}},n.scanRight=function(n,r){return function(t){var e=t.length,u=new Array(e+1);u[e]=n;for(var i=e-1;i>=0;i--)u[i]=r(t[i],u[i+1]);return u}},n.size=function(n){return n.length},n.isOutOfBound=O.isOutOfBound,n.head=function(r){return(0,n.isNonEmpty)(r)?M.some(O.head(r)):M.none},n.last=function(r){return(0,n.isNonEmpty)(r)?M.some(O.last(r)):M.none},n.tail=function(r){return(0,n.isNonEmpty)(r)?M.some(O.tail(r)):M.none},n.init=function(r){return(0,n.isNonEmpty)(r)?M.some(O.init(r)):M.none},n.takeLeft=function(r){return function(t){return(0,n.isOutOfBound)(r,t)?t:0===r?n.empty:t.slice(0,r)}},n.takeRight=function(r){return function(t){return(0,n.isOutOfBound)(r,t)?t:0===r?n.empty:t.slice(-r)}};var S=function(n,r){for(var t=n.length,e=0;e<t&&r(n[e]);e++);return e};function A(n){return function(r,t){if(void 0===t){var e=A(n);return function(n){return e(r,n)}}for(var u=0;u<t.length;u++)if(n.equals(t[u],r))return!0;return!1}}function q(r){var t=O.union(r);return function(e,u){if(void 0===u){var i=q(r);return function(n){return i(n,e)}}return(0,n.isNonEmpty)(e)&&(0,n.isNonEmpty)(u)?t(u)(e):(0,n.isNonEmpty)(e)?e:u}}function k(n){var r=A(n);return function(t,e){if(void 0===e){var u=k(n);return function(n){return u(n,t)}}return t.filter((function(n){return r(n,e)}))}}function _(n){var r=A(n);return function(t,e){if(void 0===e){var u=_(n);return function(n){return u(n,t)}}return t.filter((function(n){return!r(n,e)}))}}n.dropLeft=function(r){return function(t){return r<=0||(0,n.isEmpty)(t)?t:r>=t.length?n.empty:t.slice(r,t.length)}},n.dropRight=function(r){return function(t){return r<=0||(0,n.isEmpty)(t)?t:r>=t.length?n.empty:t.slice(0,t.length-r)}},n.findIndex=function(n){return function(r){for(var t=0;t<r.length;t++)if(n(r[t]))return M.some(t);return M.none}},n.findFirstMap=function(n){return function(r){for(var t=0;t<r.length;t++){var e=n(r[t]);if(M.isSome(e))return e}return M.none}},n.findLastMap=function(n){return function(r){for(var t=r.length-1;t>=0;t--){var e=n(r[t]);if(M.isSome(e))return e}return M.none}},n.findLastIndex=function(n){return function(r){for(var t=r.length-1;t>=0;t--)if(n(r[t]))return M.some(t);return M.none}},n.insertAt=function(n,r){return function(t){return n<0||n>t.length?M.none:M.some(O.unsafeInsertAt(n,r,t))}},n.updateAt=function(r,t){return(0,n.modifyAt)(r,(function(){return t}))},n.deleteAt=function(r){return function(t){return(0,n.isOutOfBound)(r,t)?M.none:M.some((0,n.unsafeDeleteAt)(r,t))}},n.modifyAt=function(r,t){return function(e){return(0,n.isOutOfBound)(r,e)?M.none:M.some((0,n.unsafeUpdateAt)(r,t(e[r]),e))}},n.reverse=function(n){return n.length<=1?n:n.slice().reverse()},n.rights=function(n){for(var r=[],t=0;t<n.length;t++){var e=n[t];"Right"===e._tag&&r.push(e.right)}return r},n.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var e=n[t];"Left"===e._tag&&r.push(e.left)}return r},n.sort=function(n){return function(r){return r.length<=1?r:r.slice().sort(n.compare)}},n.zipWith=function(n,r,t){for(var e=[],u=Math.min(n.length,r.length),i=0;i<u;i++)e[i]=t(n[i],r[i]);return e},n.unzip=function(n){for(var r=[],t=[],e=0;e<n.length;e++)r[e]=n[e][0],t[e]=n[e][1];return[r,t]},n.prependAll=function(r){var t=O.prependAll(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):r}},n.intersperse=function(r){var t=O.intersperse(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):r}},n.rotate=function(r){var t=O.rotate(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):r}},n.uniq=function(r){var t=O.uniq(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):r}},n.sortBy=function(r){var t=O.sortBy(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):r}},n.chop=function(r){var t=O.chop(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):n.empty}},n.splitAt=function(r){return function(t){return r>=1&&(0,n.isNonEmpty)(t)?O.splitAt(r)(t):(0,n.isEmpty)(t)?[t,n.empty]:[n.empty,t]}},n.chunksOf=function(r){var t=O.chunksOf(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):n.empty}},n.fromOptionK=function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.fromOption)(r.apply(void 0,t))}},n.concatW=function(r){return function(t){return(0,n.isEmpty)(t)?r:(0,n.isEmpty)(r)?t:t.concat(r)}},n.concat=n.concatW;var P=function(r,t){return(0,R.pipe)(r,(0,n.map)(t))},T=function(r,t){return(0,R.pipe)(r,(0,n.mapWithIndex)(t))},E=function(r,t){return(0,R.pipe)(r,(0,n.ap)(t))},C=function(r,t){return(0,R.pipe)(r,(0,n.filter)(t))},F=function(r,t){return(0,R.pipe)(r,(0,n.filterMap)(t))},z=function(r,t){return(0,R.pipe)(r,(0,n.partition)(t))},N=function(r,t){return(0,R.pipe)(r,(0,n.partitionMap)(t))},V=function(r,t){return(0,R.pipe)(r,(0,n.partitionWithIndex)(t))},D=function(r,t){return(0,R.pipe)(r,(0,n.partitionMapWithIndex)(t))},L=function(r,t){return(0,R.pipe)(r,(0,n.alt)(t))},$=function(r,t,e){return(0,R.pipe)(r,(0,n.reduce)(t,e))},B=function(r){var t=(0,n.foldMap)(r);return function(n,r){return(0,R.pipe)(n,t(r))}},H=function(r,t,e){return(0,R.pipe)(r,(0,n.reduceRight)(t,e))},K=function(r,t,e){return(0,R.pipe)(r,(0,n.reduceWithIndex)(t,e))},J=function(r){var t=(0,n.foldMapWithIndex)(r);return function(n,r){return(0,R.pipe)(n,t(r))}},G=function(r,t,e){return(0,R.pipe)(r,(0,n.reduceRightWithIndex)(t,e))},X=function(r,t){return(0,R.pipe)(r,(0,n.filterMapWithIndex)(t))},Y=function(r,t){return(0,R.pipe)(r,(0,n.filterWithIndex)(t))},Z=function(r,t){return(0,R.pipe)(r,(0,n.extend)(t))},rn=function(r){var t=(0,n.traverse)(r);return function(n,r){return(0,R.pipe)(n,t(r))}},en=function(r){var t=(0,n.traverseWithIndex)(r);return function(n,r){return(0,R.pipe)(n,t(r))}};n._chainRecDepthFirst=function(r,t){return(0,R.pipe)(r,(0,n.chainRecDepthFirst)(t))},n._chainRecBreadthFirst=function(r,t){return(0,R.pipe)(r,(0,n.chainRecBreadthFirst)(t))},n.of=O.of,n.zero=function(){return n.empty},n.altW=function(n){return function(r){return r.concat(n())}},n.alt=n.altW,n.ap=function(r){return(0,n.flatMap)((function(t){return(0,R.pipe)(r,(0,n.map)(t))}))},n.flatMap=(0,R.dual)(2,(function(r,t){return(0,R.pipe)(r,(0,n.chainWithIndex)((function(n,r){return t(r,n)})))})),n.flatten=(0,n.flatMap)(R.identity),n.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},n.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},n.separate=function(n){for(var r=[],t=[],e=0,u=n;e<u.length;e++){var i=u[e];"Left"===i._tag?r.push(i.left):t.push(i.right)}return(0,U.separated)(r,t)},n.filter=function(n){return function(r){return r.filter(n)}},n.filterMapWithIndex=function(n){return function(r){for(var t=[],e=0;e<r.length;e++){var u=n(e,r[e]);M.isSome(u)&&t.push(u.value)}return t}},n.filterMap=function(r){return(0,n.filterMapWithIndex)((function(n,t){return r(t)}))},n.compact=(0,n.filterMap)(R.identity),n.partition=function(r){return(0,n.partitionWithIndex)((function(n,t){return r(t)}))},n.partitionWithIndex=function(n){return function(r){for(var t=[],e=[],u=0;u<r.length;u++){var i=r[u];n(u,i)?e.push(i):t.push(i)}return(0,U.separated)(t,e)}},n.partitionMap=function(r){return(0,n.partitionMapWithIndex)((function(n,t){return r(t)}))},n.partitionMapWithIndex=function(n){return function(r){for(var t=[],e=[],u=0;u<r.length;u++){var i=n(u,r[u]);"Left"===i._tag?t.push(i.left):e.push(i.right)}return(0,U.separated)(t,e)}},n.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},n.extend=function(n){return function(r){return r.map((function(t,e){return n(r.slice(e))}))}},n.duplicate=(0,n.extend)(R.identity),n.foldMapWithIndex=function(n){return function(r){return function(t){return t.reduce((function(t,e,u){return n.concat(t,r(u,e))}),n.empty)}}},n.reduce=function(r,t){return(0,n.reduceWithIndex)(r,(function(n,r,e){return t(r,e)}))},n.foldMap=function(r){var t=(0,n.foldMapWithIndex)(r);return function(n){return t((function(r,t){return n(t)}))}},n.reduceWithIndex=function(n,r){return function(t){for(var e=t.length,u=n,i=0;i<e;i++)u=r(i,u,t[i]);return u}},n.reduceRight=function(r,t){return(0,n.reduceRightWithIndex)(r,(function(n,r,e){return t(r,e)}))},n.reduceRightWithIndex=function(n,r){return function(t){return t.reduceRight((function(n,t,e){return r(e,t,n)}),n)}},n.traverse=function(r){var t=(0,n.traverseWithIndex)(r);return function(n){return t((function(r,t){return n(t)}))}},n.sequence=function(r){return function(t){return $(t,r.of((0,n.zero)()),(function(t,e){return r.ap(r.map(t,(function(r){return function(t){return(0,R.pipe)(r,(0,n.append)(t))}})),e)}))}},n.traverseWithIndex=function(r){return function(t){return(0,n.reduceWithIndex)(r.of((0,n.zero)()),(function(e,u,i){return r.ap(r.map(u,(function(r){return function(t){return(0,R.pipe)(r,(0,n.append)(t))}})),t(e,i))}))}},n.wither=function(n){var r=un(n);return function(n){return function(t){return r(t,n)}}},n.wilt=function(n){var r=on(n);return function(n){return function(t){return r(t,n)}}},n.unfold=function(n,r){for(var t=[],e=n;;){var u=r(e);if(!M.isSome(u))break;var i=u.value,o=i[1];t.push(i[0]),e=o}return t},n.URI="ReadonlyArray",n.getShow=function(n){return{show:function(r){return"[".concat(r.map(n.show).join(", "),"]")}}},n.getSemigroup=function(){return{concat:function(r,t){return(0,n.isEmpty)(r)?t:(0,n.isEmpty)(t)?r:r.concat(t)}}},n.getMonoid=function(){return{concat:(0,n.getSemigroup)().concat,empty:n.empty}},n.getEq=function(n){return(0,g.fromEquals)((function(r,t){return r.length===t.length&&r.every((function(r,e){return n.equals(r,t[e])}))}))},n.getOrd=function(n){return(0,y.fromCompare)((function(r,t){for(var e=r.length,u=t.length,i=Math.min(e,u),o=0;o<i;o++){var c=n.compare(r[o],t[o]);if(0!==c)return c}return j.Ord.compare(e,u)}))},n.getUnionSemigroup=function(n){var r=q(n);return{concat:function(n,t){return r(t)(n)}}},n.getUnionMonoid=function(r){return{concat:(0,n.getUnionSemigroup)(r).concat,empty:n.empty}},n.getIntersectionSemigroup=function(n){var r=k(n);return{concat:function(n,t){return r(t)(n)}}},n.getDifferenceMagma=function(n){var r=_(n);return{concat:function(n,t){return r(t)(n)}}},n.Functor={URI:n.URI,map:P},n.flap=(0,x.flap)(n.Functor),n.Pointed={URI:n.URI,of:n.of},n.FunctorWithIndex={URI:n.URI,map:P,mapWithIndex:T},n.Apply={URI:n.URI,map:P,ap:E},n.apFirst=(0,m.apFirst)(n.Apply),n.apSecond=(0,m.apSecond)(n.Apply),n.Applicative={URI:n.URI,map:P,ap:E,of:n.of},n.Chain={URI:n.URI,map:P,ap:E,chain:n.flatMap},n.Monad={URI:n.URI,map:P,ap:E,of:n.of,chain:n.flatMap},n.chainFirst=(0,I.chainFirst)(n.Chain),n.Unfoldable={URI:n.URI,unfold:n.unfold},n.Alt={URI:n.URI,map:P,alt:L},n.Zero={URI:n.URI,zero:n.zero},n.guard=(0,W.guard)(n.Zero,n.Pointed),n.Alternative={URI:n.URI,map:P,ap:E,of:n.of,alt:L,zero:n.zero},n.Extend={URI:n.URI,map:P,extend:Z},n.Compactable={URI:n.URI,compact:n.compact,separate:n.separate},n.Filterable={URI:n.URI,map:P,compact:n.compact,separate:n.separate,filter:C,filterMap:F,partition:z,partitionMap:N},n.FilterableWithIndex={URI:n.URI,map:P,mapWithIndex:T,compact:n.compact,separate:n.separate,filter:C,filterMap:F,partition:z,partitionMap:N,partitionMapWithIndex:D,partitionWithIndex:V,filterMapWithIndex:X,filterWithIndex:Y},n.Foldable={URI:n.URI,reduce:$,foldMap:B,reduceRight:H},n.FoldableWithIndex={URI:n.URI,reduce:$,foldMap:B,reduceRight:H,reduceWithIndex:K,foldMapWithIndex:J,reduceRightWithIndex:G},n.Traversable={URI:n.URI,map:P,reduce:$,foldMap:B,reduceRight:H,traverse:rn,sequence:n.sequence},n.TraversableWithIndex={URI:n.URI,map:P,mapWithIndex:T,reduce:$,foldMap:B,reduceRight:H,reduceWithIndex:K,foldMapWithIndex:J,reduceRightWithIndex:G,traverse:rn,sequence:n.sequence,traverseWithIndex:en},n.chainRecDepthFirst=function(n){return function(r){for(var t=h([],n(r),!0),e=[];t.length>0;){var u=t.shift();M.isLeft(u)?t.unshift.apply(t,n(u.left)):e.push(u.right)}return e}},n.ChainRecDepthFirst={URI:n.URI,map:P,ap:E,chain:n.flatMap,chainRec:n._chainRecDepthFirst},n.chainRecBreadthFirst=function(n){return function(r){var t=n(r),e=[],u=[];function i(r){M.isLeft(r)?n(r.left).forEach((function(n){return e.push(n)})):u.push(r.right)}for(var o=0,c=t;o<c.length;o++)i(c[o]);for(;e.length>0;)i(e.shift());return u}},n.ChainRecBreadthFirst={URI:n.URI,map:P,ap:E,chain:n.flatMap,chainRec:n._chainRecBreadthFirst};var un=(0,w.witherDefault)(n.Traversable,n.Compactable),on=(0,w.wiltDefault)(n.Traversable,n.Compactable);n.Witherable={URI:n.URI,map:P,compact:n.compact,separate:n.separate,filter:C,filterMap:F,partition:z,partitionMap:N,reduce:$,foldMap:B,reduceRight:H,traverse:rn,sequence:n.sequence,wither:un,wilt:on},n.filterE=(0,w.filterE)(n.Witherable),n.FromEither={URI:n.URI,fromEither:n.fromEither},n.fromEitherK=(0,b.fromEitherK)(n.FromEither),n.unsafeInsertAt=O.unsafeInsertAt,n.unsafeUpdateAt=function(r,t,e){return(0,n.isNonEmpty)(e)?O.unsafeUpdateAt(r,t,e):e},n.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},n.toArray=function(n){return n.slice()},n.fromArray=function(r){return(0,n.isEmpty)(r)?n.empty:r.slice()},n.empty=O.empty,n.some=function(n){return function(r){return r.some(n)}},n.exists=n.some,n.intercalate=function(r){var t=O.intercalate(r);return function(e){return(0,n.match)((function(){return r.empty}),t(e))}},n.Do=(0,n.of)(M.emptyRecord),n.bindTo=(0,x.bindTo)(n.Functor),n.let=(0,x.let)(n.Functor),n.bind=(0,I.bind)(n.Chain),n.apS=(0,m.apS)(n.Apply),n.chain=n.flatMap,n.range=O.range,n.cons=O.cons,n.snoc=O.snoc,n.prependToAll=n.prependAll,n.readonlyArray={URI:n.URI,compact:n.compact,separate:n.separate,map:P,ap:E,of:n.of,chain:n.flatMap,filter:C,filterMap:F,partition:z,partitionMap:N,mapWithIndex:T,partitionMapWithIndex:D,partitionWithIndex:V,filterMapWithIndex:X,filterWithIndex:Y,alt:L,zero:n.zero,unfold:n.unfold,reduce:$,foldMap:B,reduceRight:H,traverse:rn,sequence:n.sequence,reduceWithIndex:K,foldMapWithIndex:J,reduceRightWithIndex:G,traverseWithIndex:en,extend:Z,wither:un,wilt:on}}(nn)),nn}function un(){return Z||(Z=1,function(n){var r=H&&H.__createBinding||(Object.create?function(n,r,t,e){void 0===e&&(e=t);var u=Object.getOwnPropertyDescriptor(r,t);u&&!("get"in u?!r.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,e,u)}:function(n,r,t,e){void 0===e&&(e=t),n[e]=r[t]}),e=H&&H.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),f=H&&H.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var u in n)"default"!==u&&Object.prototype.hasOwnProperty.call(n,u)&&r(t,n,u);return e(t,n),t};Object.defineProperty(n,"__esModule",{value:!0}),n.rotate=n.intersperse=n.prependAll=n.unzip=n.zipWith=n.sort=n.lefts=n.rights=n.reverse=n.modifyAt=n.deleteAt=n.updateAt=n.insertAt=n.copy=n.findLastIndex=n.findLastMap=n.findFirstMap=n.findIndex=n.dropRight=n.dropLeft=n.takeRight=n.takeLeft=n.init=n.tail=n.last=n.head=n.lookup=n.isOutOfBound=n.size=n.scanRight=n.scanLeft=n.chainWithIndex=n.foldRight=n.matchRight=n.matchRightW=n.foldLeft=n.matchLeft=n.matchLeftW=n.match=n.matchW=n.fromEither=n.fromOption=n.replicate=n.makeBy=n.appendW=n.append=n.prependW=n.prepend=n.isNonEmpty=n.isEmpty=void 0,n.getUnionMonoid=n.getUnionSemigroup=n.getOrd=n.getEq=n.getMonoid=n.getSemigroup=n.getShow=n.URI=n.unfold=n.wilt=n.wither=n.traverseWithIndex=n.sequence=n.traverse=n.reduceRightWithIndex=n.reduceRight=n.reduceWithIndex=n.reduce=n.foldMapWithIndex=n.foldMap=n.duplicate=n.extend=n.filterWithIndex=n.alt=n.altW=n.partitionMapWithIndex=n.partitionMap=n.partitionWithIndex=n.partition=n.filter=n.separate=n.compact=n.filterMap=n.filterMapWithIndex=n.mapWithIndex=n.flatten=n.flatMap=n.ap=n.map=n.zero=n.of=n.concat=n.concatW=n.fromOptionK=n.chunksOf=n.splitAt=n.chop=n.sortBy=n.uniq=n.elem=void 0,n.cons=n.empty=n.range=n.chain=n.apS=n.bind=n.let=n.bindTo=n.Do=n.intercalate=n.exists=n.some=n.every=n.unsafeDeleteAt=n.unsafeUpdateAt=n.unsafeInsertAt=n.fromEitherK=n.FromEither=n.filterE=n.ChainRecBreadthFirst=n.chainRecBreadthFirst=n.ChainRecDepthFirst=n.chainRecDepthFirst=n.Witherable=n.TraversableWithIndex=n.Traversable=n.FoldableWithIndex=n.Foldable=n.FilterableWithIndex=n.Filterable=n.Compactable=n.Extend=n.Alternative=n.guard=n.Zero=n.Alt=n.Unfoldable=n.Monad=n.chainFirst=n.Chain=n.Applicative=n.apSecond=n.apFirst=n.Apply=n.FunctorWithIndex=n.Pointed=n.flap=n.Functor=n.getDifferenceMagma=n.getIntersectionSemigroup=void 0,n.array=n.prependToAll=n.snoc=void 0,n.fromPredicate=function(n){return function(r){return n(r)?[r]:[]}},n.takeLeftWhile=function(n){return function(r){for(var t=[],e=0,u=r;e<u.length;e++){var i=u[e];if(!n(i))break;t.push(i)}return t}},n.spanLeft=function(r){return function(t){var e=(0,n.splitAt)(y(t,r))(t);return{init:e[0],rest:e[1]}}},n.dropLeftWhile=function(n){return function(r){return r.slice(y(r,n))}},n.findFirst=function(n){return R.findFirst(n)},n.findLast=function(n){return R.findLast(n)},n.zip=function r(t,e){return void 0===e?function(n){return r(n,t)}:(0,n.zipWith)(t,e,(function(n,r){return[n,r]}))},n.comprehension=function(r,t,e){void 0===e&&(e=function(){return!0});var u=function(r,i){return(0,n.isNonEmpty)(i)?(0,n.flatMap)(b.head(i),(function(t){return u((0,m.pipe)(r,(0,n.append)(t)),b.tail(i))})):e.apply(void 0,r)?[t.apply(void 0,r)]:[]};return u([],r)},n.union=O,n.intersection=U,n.difference=w;var a=o(),p=c(),h=l(),m=u(),I=i(),g=f(t()),b=f(G()),R=f(en()),x=v(),M=s(),j=d();n.isEmpty=function(n){return 0===n.length},n.isNonEmpty=b.isNonEmpty,n.prepend=b.prepend,n.prependW=b.prependW,n.append=b.append,n.appendW=b.appendW,n.makeBy=function(n,r){return n<=0?[]:b.makeBy(r)(n)},n.replicate=function(r,t){return(0,n.makeBy)(r,(function(){return t}))},n.fromOption=function(n){return g.isNone(n)?[]:[n.value]},n.fromEither=function(n){return g.isLeft(n)?[]:[n.right]},n.matchW=function(r,t){return function(e){return(0,n.isNonEmpty)(e)?t(e):r()}},n.match=n.matchW,n.matchLeftW=function(r,t){return function(e){return(0,n.isNonEmpty)(e)?t(b.head(e),b.tail(e)):r()}},n.matchLeft=n.matchLeftW,n.foldLeft=n.matchLeft,n.matchRightW=function(r,t){return function(e){return(0,n.isNonEmpty)(e)?t(b.init(e),b.last(e)):r()}},n.matchRight=n.matchRightW,n.foldRight=n.matchRight,n.chainWithIndex=function(n){return function(r){for(var t=[],e=0;e<r.length;e++)for(var u=n(e,r[e]),i=0;i<u.length;i++)t.push(u[i]);return t}},n.scanLeft=function(n,r){return function(t){var e=t.length,u=new Array(e+1);u[0]=n;for(var i=0;i<e;i++)u[i+1]=r(u[i],t[i]);return u}},n.scanRight=function(n,r){return function(t){var e=t.length,u=new Array(e+1);u[e]=n;for(var i=e-1;i>=0;i--)u[i]=r(t[i],u[i+1]);return u}},n.size=function(n){return n.length},n.isOutOfBound=b.isOutOfBound,n.lookup=R.lookup,n.head=R.head,n.last=R.last,n.tail=function(r){return(0,n.isNonEmpty)(r)?g.some(b.tail(r)):g.none},n.init=function(r){return(0,n.isNonEmpty)(r)?g.some(b.init(r)):g.none},n.takeLeft=function(r){return function(t){return(0,n.isOutOfBound)(r,t)?(0,n.copy)(t):t.slice(0,r)}},n.takeRight=function(r){return function(t){return(0,n.isOutOfBound)(r,t)?(0,n.copy)(t):0===r?[]:t.slice(-r)}};var y=function(n,r){for(var t=n.length,e=0;e<t&&r(n[e]);e++);return e};function O(r){var t=b.union(r);return function(e,u){if(void 0===u){var i=O(r);return function(n){return i(n,e)}}return(0,n.isNonEmpty)(e)&&(0,n.isNonEmpty)(u)?t(u)(e):(0,n.isNonEmpty)(e)?(0,n.copy)(e):(0,n.copy)(u)}}function U(r){var t=(0,n.elem)(r);return function(n,e){if(void 0===e){var u=U(r);return function(r){return u(r,n)}}return n.filter((function(n){return t(n,e)}))}}function w(r){var t=(0,n.elem)(r);return function(n,e){if(void 0===e){var u=w(r);return function(r){return u(r,n)}}return n.filter((function(n){return!t(n,e)}))}}n.dropLeft=function(r){return function(t){return r<=0||(0,n.isEmpty)(t)?(0,n.copy)(t):r>=t.length?[]:t.slice(r,t.length)}},n.dropRight=function(r){return function(t){return r<=0||(0,n.isEmpty)(t)?(0,n.copy)(t):r>=t.length?[]:t.slice(0,t.length-r)}},n.findIndex=R.findIndex,n.findFirstMap=R.findFirstMap,n.findLastMap=R.findLastMap,n.findLastIndex=R.findLastIndex,n.copy=function(n){return n.slice()},n.insertAt=function(r,t){return function(e){return r<0||r>e.length?g.none:g.some((0,n.unsafeInsertAt)(r,t,e))}},n.updateAt=function(r,t){return(0,n.modifyAt)(r,(function(){return t}))},n.deleteAt=function(r){return function(t){return(0,n.isOutOfBound)(r,t)?g.none:g.some((0,n.unsafeDeleteAt)(r,t))}},n.modifyAt=function(r,t){return function(e){return(0,n.isOutOfBound)(r,e)?g.none:g.some((0,n.unsafeUpdateAt)(r,t(e[r]),e))}},n.reverse=function(r){return(0,n.isEmpty)(r)?[]:r.slice().reverse()},n.rights=function(n){for(var r=[],t=0;t<n.length;t++){var e=n[t];"Right"===e._tag&&r.push(e.right)}return r},n.lefts=function(n){for(var r=[],t=0;t<n.length;t++){var e=n[t];"Left"===e._tag&&r.push(e.left)}return r},n.sort=function(r){return function(t){return t.length<=1?(0,n.copy)(t):t.slice().sort(r.compare)}},n.zipWith=function(n,r,t){for(var e=[],u=Math.min(n.length,r.length),i=0;i<u;i++)e[i]=t(n[i],r[i]);return e},n.unzip=function(n){for(var r=[],t=[],e=0;e<n.length;e++)r[e]=n[e][0],t[e]=n[e][1];return[r,t]},n.prependAll=function(r){var t=b.prependAll(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):[]}},n.intersperse=function(r){var t=b.intersperse(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):(0,n.copy)(r)}},n.rotate=function(r){var t=b.rotate(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):(0,n.copy)(r)}},n.elem=R.elem,n.uniq=function(r){var t=b.uniq(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):(0,n.copy)(r)}},n.sortBy=function(r){var t=b.sortBy(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):(0,n.copy)(r)}},n.chop=function(r){var t=b.chop(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):[]}},n.splitAt=function(r){return function(t){return r>=1&&(0,n.isNonEmpty)(t)?b.splitAt(r)(t):(0,n.isEmpty)(t)?[(0,n.copy)(t),[]]:[[],(0,n.copy)(t)]}},n.chunksOf=function(r){var t=b.chunksOf(r);return function(r){return(0,n.isNonEmpty)(r)?t(r):[]}},n.fromOptionK=function(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.fromOption)(r.apply(void 0,t))}},n.concatW=function(r){return function(t){return(0,n.isEmpty)(t)?(0,n.copy)(r):(0,n.isEmpty)(r)?(0,n.copy)(t):t.concat(r)}},n.concat=n.concatW;var W=function(r,t){return(0,m.pipe)(r,(0,n.map)(t))},S=function(r,t){return(0,m.pipe)(r,(0,n.mapWithIndex)(t))},A=function(r,t){return(0,m.pipe)(r,(0,n.ap)(t))},q=function(r,t){return(0,m.pipe)(r,(0,n.filter)(t))},k=function(r,t){return(0,m.pipe)(r,(0,n.filterMap)(t))},_=function(r,t){return(0,m.pipe)(r,(0,n.partition)(t))},P=function(r,t){return(0,m.pipe)(r,(0,n.partitionMap)(t))},T=function(r,t){return(0,m.pipe)(r,(0,n.partitionWithIndex)(t))},E=function(r,t){return(0,m.pipe)(r,(0,n.partitionMapWithIndex)(t))},C=function(r,t){return(0,m.pipe)(r,(0,n.alt)(t))},F=function(r,t,e){return(0,m.pipe)(r,(0,n.reduce)(t,e))},z=function(r){var t=(0,n.foldMap)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},N=function(r,t,e){return(0,m.pipe)(r,(0,n.reduceRight)(t,e))},V=function(r,t,e){return(0,m.pipe)(r,(0,n.reduceWithIndex)(t,e))},D=function(r){var t=(0,n.foldMapWithIndex)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},L=function(r,t,e){return(0,m.pipe)(r,(0,n.reduceRightWithIndex)(t,e))},$=function(r,t){return(0,m.pipe)(r,(0,n.filterMapWithIndex)(t))},B=function(r,t){return(0,m.pipe)(r,(0,n.filterWithIndex)(t))},K=function(r,t){return(0,m.pipe)(r,(0,n.extend)(t))},J=function(r){var t=(0,n.traverse)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},Q=function(r){var t=(0,n.traverseWithIndex)(r);return function(n,r){return(0,m.pipe)(n,t(r))}},X=R._chainRecDepthFirst,Y=R._chainRecBreadthFirst;n.of=b.of,n.zero=function(){return[]},n.map=function(n){return function(r){return r.map((function(r){return n(r)}))}},n.ap=function(r){return(0,n.flatMap)((function(t){return(0,m.pipe)(r,(0,n.map)(t))}))},n.flatMap=(0,m.dual)(2,(function(r,t){return(0,m.pipe)(r,(0,n.chainWithIndex)((function(n,r){return t(r,n)})))})),n.flatten=(0,n.flatMap)(m.identity),n.mapWithIndex=function(n){return function(r){return r.map((function(r,t){return n(t,r)}))}},n.filterMapWithIndex=function(n){return function(r){for(var t=[],e=0;e<r.length;e++){var u=n(e,r[e]);g.isSome(u)&&t.push(u.value)}return t}},n.filterMap=function(r){return(0,n.filterMapWithIndex)((function(n,t){return r(t)}))},n.compact=(0,n.filterMap)(m.identity),n.separate=function(n){for(var r=[],t=[],e=0,u=n;e<u.length;e++){var i=u[e];"Left"===i._tag?r.push(i.left):t.push(i.right)}return(0,x.separated)(r,t)},n.filter=function(n){return function(r){return r.filter(n)}},n.partition=function(r){return(0,n.partitionWithIndex)((function(n,t){return r(t)}))},n.partitionWithIndex=function(n){return function(r){for(var t=[],e=[],u=0;u<r.length;u++){var i=r[u];n(u,i)?e.push(i):t.push(i)}return(0,x.separated)(t,e)}},n.partitionMap=function(r){return(0,n.partitionMapWithIndex)((function(n,t){return r(t)}))},n.partitionMapWithIndex=function(n){return function(r){for(var t=[],e=[],u=0;u<r.length;u++){var i=n(u,r[u]);"Left"===i._tag?t.push(i.left):e.push(i.right)}return(0,x.separated)(t,e)}},n.altW=function(n){return function(r){return r.concat(n())}},n.alt=n.altW,n.filterWithIndex=function(n){return function(r){return r.filter((function(r,t){return n(t,r)}))}},n.extend=function(n){return function(r){return r.map((function(t,e){return n(r.slice(e))}))}},n.duplicate=(0,n.extend)(m.identity),n.foldMap=R.foldMap,n.foldMapWithIndex=R.foldMapWithIndex,n.reduce=R.reduce,n.reduceWithIndex=R.reduceWithIndex,n.reduceRight=R.reduceRight,n.reduceRightWithIndex=R.reduceRightWithIndex,n.traverse=function(r){var t=(0,n.traverseWithIndex)(r);return function(n){return t((function(r,t){return n(t)}))}},n.sequence=function(r){return function(t){return F(t,r.of((0,n.zero)()),(function(t,e){return r.ap(r.map(t,(function(r){return function(t){return(0,m.pipe)(r,(0,n.append)(t))}})),e)}))}},n.traverseWithIndex=function(r){return function(t){return(0,n.reduceWithIndex)(r.of((0,n.zero)()),(function(e,u,i){return r.ap(r.map(u,(function(r){return function(t){return(0,m.pipe)(r,(0,n.append)(t))}})),t(e,i))}))}},n.wither=function(n){var r=Z(n);return function(n){return function(t){return r(t,n)}}},n.wilt=function(n){var r=nn(n);return function(n){return function(t){return r(t,n)}}},n.unfold=function(n,r){for(var t=[],e=n;;){var u=r(e);if(!g.isSome(u))break;var i=u.value,o=i[1];t.push(i[0]),e=o}return t},n.URI="Array",n.getShow=R.getShow,n.getSemigroup=function(){return{concat:function(n,r){return n.concat(r)}}},n.getMonoid=function(){return{concat:(0,n.getSemigroup)().concat,empty:[]}},n.getEq=R.getEq,n.getOrd=R.getOrd,n.getUnionSemigroup=function(n){var r=O(n);return{concat:function(n,t){return r(t)(n)}}},n.getUnionMonoid=function(r){return{concat:(0,n.getUnionSemigroup)(r).concat,empty:[]}},n.getIntersectionSemigroup=function(n){var r=U(n);return{concat:function(n,t){return r(t)(n)}}},n.getDifferenceMagma=function(n){var r=w(n);return{concat:function(n,t){return r(t)(n)}}},n.Functor={URI:n.URI,map:W},n.flap=(0,I.flap)(n.Functor),n.Pointed={URI:n.URI,of:n.of},n.FunctorWithIndex={URI:n.URI,map:W,mapWithIndex:S},n.Apply={URI:n.URI,map:W,ap:A},n.apFirst=(0,a.apFirst)(n.Apply),n.apSecond=(0,a.apSecond)(n.Apply),n.Applicative={URI:n.URI,map:W,ap:A,of:n.of},n.Chain={URI:n.URI,map:W,ap:A,chain:n.flatMap},n.chainFirst=(0,p.chainFirst)(n.Chain),n.Monad={URI:n.URI,map:W,ap:A,of:n.of,chain:n.flatMap},n.Unfoldable={URI:n.URI,unfold:n.unfold},n.Alt={URI:n.URI,map:W,alt:C},n.Zero={URI:n.URI,zero:n.zero},n.guard=(0,j.guard)(n.Zero,n.Pointed),n.Alternative={URI:n.URI,map:W,ap:A,of:n.of,alt:C,zero:n.zero},n.Extend={URI:n.URI,map:W,extend:K},n.Compactable={URI:n.URI,compact:n.compact,separate:n.separate},n.Filterable={URI:n.URI,map:W,compact:n.compact,separate:n.separate,filter:q,filterMap:k,partition:_,partitionMap:P},n.FilterableWithIndex={URI:n.URI,map:W,mapWithIndex:S,compact:n.compact,separate:n.separate,filter:q,filterMap:k,partition:_,partitionMap:P,partitionMapWithIndex:E,partitionWithIndex:T,filterMapWithIndex:$,filterWithIndex:B},n.Foldable={URI:n.URI,reduce:F,foldMap:z,reduceRight:N},n.FoldableWithIndex={URI:n.URI,reduce:F,foldMap:z,reduceRight:N,reduceWithIndex:V,foldMapWithIndex:D,reduceRightWithIndex:L},n.Traversable={URI:n.URI,map:W,reduce:F,foldMap:z,reduceRight:N,traverse:J,sequence:n.sequence},n.TraversableWithIndex={URI:n.URI,map:W,mapWithIndex:S,reduce:F,foldMap:z,reduceRight:N,reduceWithIndex:V,foldMapWithIndex:D,reduceRightWithIndex:L,traverse:J,sequence:n.sequence,traverseWithIndex:Q};var Z=(0,M.witherDefault)(n.Traversable,n.Compactable),nn=(0,M.wiltDefault)(n.Traversable,n.Compactable);n.Witherable={URI:n.URI,map:W,compact:n.compact,separate:n.separate,filter:q,filterMap:k,partition:_,partitionMap:P,reduce:F,foldMap:z,reduceRight:N,traverse:J,sequence:n.sequence,wither:Z,wilt:nn},n.chainRecDepthFirst=R.chainRecDepthFirst,n.ChainRecDepthFirst={URI:n.URI,map:W,ap:A,chain:n.flatMap,chainRec:X},n.chainRecBreadthFirst=R.chainRecBreadthFirst,n.ChainRecBreadthFirst={URI:n.URI,map:W,ap:A,chain:n.flatMap,chainRec:Y},n.filterE=(0,M.filterE)(n.Witherable),n.FromEither={URI:n.URI,fromEither:n.fromEither},n.fromEitherK=(0,h.fromEitherK)(n.FromEither),n.unsafeInsertAt=b.unsafeInsertAt,n.unsafeUpdateAt=function(r,t,e){return(0,n.isNonEmpty)(e)?b.unsafeUpdateAt(r,t,e):[]},n.unsafeDeleteAt=function(n,r){var t=r.slice();return t.splice(n,1),t},n.every=R.every,n.some=function(n){return function(r){return r.some(n)}},n.exists=n.some,n.intercalate=R.intercalate,n.Do=(0,n.of)(g.emptyRecord),n.bindTo=(0,I.bindTo)(n.Functor),n.let=(0,I.let)(n.Functor),n.bind=(0,p.bind)(n.Chain),n.apS=(0,a.apS)(n.Apply),n.chain=n.flatMap,n.range=b.range,n.empty=[],n.cons=b.cons,n.snoc=b.snoc,n.prependToAll=n.prependAll,n.array={URI:n.URI,compact:n.compact,separate:n.separate,map:W,ap:A,of:n.of,chain:n.flatMap,filter:q,filterMap:k,partition:_,partitionMap:P,mapWithIndex:S,partitionMapWithIndex:E,partitionWithIndex:T,filterMapWithIndex:$,filterWithIndex:B,alt:C,zero:n.zero,unfold:n.unfold,reduce:F,foldMap:z,reduceRight:N,traverse:J,sequence:n.sequence,reduceWithIndex:V,foldMapWithIndex:D,reduceRightWithIndex:L,traverseWithIndex:Q,extend:K,wither:Z,wilt:nn}}(H)),H}var on=un();const cn={VPR:"Similar Products",VPS:"Visual Search",VCS:"Cross-Selling",TPS:"Text Product Search"};function fn(n,r){return t=>(n=>"VPR"===n._tag)(t)?n():r()}function an(n){return"VPR"===n?{_tag:"VPR"}:{_tag:"VCS"}}const dn=n=>(n=>0===n.length)(n)?m("entity is empty"):I(n),sn=n=>p(n,g("entity not exist"),h(dn)),ln=n=>n.split(";").map((n=>{const[r,t]=n.split(":");return{column:r,values:t?t.split(","):[]}})).filter((({column:n})=>!!n)),vn=(n,r)=>null!=r?{[n]:r}:{},pn=(n,r)=>r&&(Array.isArray(r)?r.length:Object.keys(r).length)?{[n]:r}:{},hn=(n,r)=>r&&Object.keys(r).length>0?{[n]:r}:{},mn=n=>{var r,t;return null!==(t=null!==(r=n.interval)&&void 0!==r?r:n.value)&&void 0!==t?t:n},In=n=>null==n?null:"string"==typeof n||"number"==typeof n?String(n):"object"==typeof n&&null!==n&&"value"in n?In(n.value):String(n),gn=(n,r)=>"object"==typeof n&&"object"==typeof r&&null!==n&&null!==r&&(n.start===r.start&&n.end===r.end),bn=(n,r)=>{const t=n===r,e=void 0!==r.interval&&gn(n,r.interval);return t||e||void 0!==r.value&&n===r.value},Rn=n=>(null==n?void 0:n.length)?n.reduce(((n,r)=>{const t=(n=>{var r;return"categorical"===n.type&&"values"in n?n.values.reduce(((n,r)=>{if(r.selected){const t=In(r.value);t&&n.push(t)}return n}),[]):"interval"===n.type&&"selectedValues"in n&&null!==(r=n.selectedValues)&&void 0!==r?r:[]})(r);return(null==t?void 0:t.length)>0&&n.push({column:r.column,values:t}),n}),[]):[],xn=n=>!("isConnected"in n)||n.isConnected,Mn=(()=>{let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let r of n.keys())n.set(r,n.get(r).filter(xn))})(...r)}),2e3)}})(),jn=n=>"function"==typeof n?n():n,yn=(t,e)=>{const u=((n,r=(n,r)=>n!==r)=>{const t=jn(n);let e=new Map(Object.entries(t??{}));const u={dispose:[],get:[],set:[],reset:[]},i=()=>{e=new Map(Object.entries(jn(n)??{})),u.reset.forEach((n=>n()))},o=n=>(u.get.forEach((r=>r(n))),e.get(n)),c=(n,t)=>{const i=e.get(n);r(t,i,n)&&(e.set(n,t),u.set.forEach((r=>r(n,t,i))))},f="undefined"==typeof Proxy?{}:new Proxy(t,{get:(n,r)=>o(r),ownKeys:()=>Array.from(e.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,r)=>e.has(r),set:(n,r,t)=>(c(r,t),!0)}),a=(n,r)=>(u[n].push(r),()=>{((n,r)=>{const t=n.indexOf(r);t>=0&&(n[t]=n[n.length-1],n.length--)})(u[n],r)});return{state:f,get:o,set:c,on:a,onChange:(r,t)=>{const e=a("set",((n,e)=>{n===r&&t(e)})),u=a("reset",(()=>t(jn(n)[r])));return()=>{e(),u()}},use:(...n)=>{const r=n.reduce(((n,r)=>(r.set&&n.push(a("set",r.set)),r.get&&n.push(a("get",r.get)),r.reset&&n.push(a("reset",r.reset)),r.dispose&&n.push(a("dispose",r.dispose)),n)),[]);return()=>r.forEach((n=>n()))},dispose:()=>{u.dispose.forEach((n=>n())),i()},reset:i,forceUpdate:n=>{const r=e.get(n);u.set.forEach((t=>t(n,r,r)))}}})(t,e);return u.use((()=>{if("function"!=typeof n)return{};const t=new Map;return{dispose:()=>t.clear(),get:r=>{const e=n();e&&((n,r,t)=>{const e=n.get(r);e?e.includes(t)||e.push(t):n.set(r,[t])})(t,r,e)},set:n=>{const e=t.get(n);e&&t.set(n,e.filter(r)),Mn(t)},reset:()=>{t.forEach((n=>n.forEach(r))),Mn(t)}}})()),u},On=n=>new Headers({Authorization:`Bearer ${n}`}),Un=n=>p(n,sn,R.mapLeft((()=>x))),wn=(n,r)=>b((n=>p(n,Un,R.map(On)))(n),R.right(JSON.stringify(r)));var Wn=M();const Sn=()=>{const n=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(n)?"tablet":/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(n)?"mobile":"desktop"},An=()=>{if("undefined"==typeof navigator)return!1;const n=navigator.userAgent;return!!/iPhone|iPad|iPod/.test(n)||/WebKit/.test(n)&&!/Chrome|Edg|OPR/.test(n)},qn=(n=768)=>"undefined"!=typeof window&&window.innerWidth>=n,kn=(n=768)=>"undefined"!=typeof window&&window.innerWidth<n,_n=["jpg","jpeg","png","webp","avif","heic","heif"],Pn=["jpg","jpeg","png","webp","avif"],Tn=n=>"jpg"===n?"image/jpeg":`image/${n}`,En=Object.fromEntries(_n.map((n=>[n,Tn(n)]))),Cn=()=>{const n=An()?[...Pn,"heic"]:Pn;return[...n.map((n=>En[n])),...n.map((n=>`.${n}`))].join(",")},Fn=()=>{const n=(An()?[...Pn,"heic"]:Pn).filter((n=>"jpeg"!==n)).map((n=>`.${n}`)),r=n.pop();return`${n.join(", ")}, or ${r}`},zn={kind:"client",inner:"File format not supported",code:"unsupported-file-type"},Nn={kind:"client",inner:"HEIC format is only supported in Safari and iOS browsers",code:"heic-not-supported"},Vn=n=>{const r=n.type.split("/")[1];if(("heic"===r||"heif"===r)&&!An())return R.left(Nn);const t=(e=t=>t===r?U.some(n):U.none,function(n){for(var r=0;r<n.length;r++){var t=e(n[r]);if(j(t))return t}return y})(_n);var e;return O.pipe(t,R.fromOption((()=>zn)))},Dn={kind:"app",inner:"File doesnt exist"},Ln=async n=>new Promise((r=>{const t=new FileReader;t.addEventListener("load",(()=>{r(t.result)})),t.readAsDataURL(n)})),$n=n=>()=>new Promise(((r,t)=>{const e=new FileReader,u=new Image;e.onload=n=>{u.src=n.target.result},e.onerror=()=>{t(new Error("Failed to read file"))},u.onload=()=>{r(u)},u.onerror=()=>{t(new Error("Failed to load image"))},e.readAsDataURL(n)})),Bn=async n=>{const r=await fetch(n),t=await r.blob();return new File([t],"image",{type:t.type,lastModified:Date.now()})},Hn=n=>()=>new Promise((async r=>r(Bn(n))));var Kn,Jn,Qn,Gn,Xn,Yn={},Zn={},nr={},rr={},tr={},er=function(){if(Xn)return Yn;Xn=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.lanczos2=Yn.lanczos=void 0;const n=(Kn||(Kn=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.copy=void 0,Zn.copy=(n,r,t=0,e=0,u=n.width-t,i=n.height-e,o=0,c=0)=>{if(t|=0,e|=0,i|=0,o|=0,c|=0,(u|=0)<=0||i<=0)return;const f=new Uint32Array(n.data.buffer),a=new Uint32Array(r.data.buffer);for(let d=0;d<i;d++){const i=e+d;if(i<0||i>=n.height)continue;const s=c+d;if(!(s<0||s>=r.height))for(let e=0;e<u;e++){const u=t+e;if(u<0||u>=n.width)continue;const c=o+e;c<0||c>=r.width||(a[s*r.width+c]=f[i*n.width+u])}}}),Zn),r=(Jn||(Jn=1,t=nr,Object.defineProperty(t,"__esModule",{value:!0}),t.CreateImageFactory=(n=[0,0,0,0],r=4)=>{if(r=Math.floor(r),isNaN(r)||r<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in n)||n.length<r)throw TypeError(`fill should be iterable with at least ${r} members`);const t=(n=new Uint8ClampedArray(n).slice(0,r)).every((n=>0===n));return(e,u,i)=>{if(void 0===e||void 0===u)throw TypeError("Not enough arguments");if(e=Math.floor(e),u=Math.floor(u),isNaN(e)||e<1||isNaN(u)||u<1)throw TypeError("Index or size is negative or greater than the allowed amount");const o=e*u*r;if(void 0===i&&(i=new Uint8ClampedArray(o)),i instanceof Uint8ClampedArray){if(i.length!==o)throw TypeError("Index or size is negative or greater than the allowed amount");if(!t)for(let t=0;t<u;t++)for(let u=0;u<e;u++){const o=(t*e+u)*r;for(let t=0;t<r;t++)i[o+t]=n[t]}return{get width(){return e},get height(){return u},get data(){return i}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},t.createImage=t.CreateImageFactory()),nr);var t;const e=function(){if(Qn)return rr;Qn=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.filters=void 0;const n=(n,r)=>{if(n<=-r||n>=r)return 0;if(0==n)return 0;const t=n*Math.PI;return Math.sin(t)/t*Math.sin(t/r)/(t/r)},r=n=>Math.round(16383*n);return rr.filters=(t,e,u,i,o)=>{const c=o?2:3,f=1/u,a=Math.min(1,u),d=c/a,s=Math.floor(2*(d+1)),l=new Int16Array((s+2)*e);let v=0;for(let u=0;u<e;u++){const o=(u+.5)*f+i,s=Math.max(0,Math.floor(o-d)),p=Math.min(t-1,Math.ceil(o+d)),h=p-s+1,m=new Float32Array(h),I=new Int16Array(h);let g=0,b=0;for(let r=s;r<=p;r++){const t=n((r+.5-o)*a,c);g+=t,m[b]=t,b++}let R=0;for(let n=0;n<m.length;n++){const t=m[n]/g;R+=t,I[n]=r(t)}I[e>>1]+=r(1-R);let x=0;for(;x<I.length&&0===I[x];)x++;let M=I.length-1;for(;M>0&&0===I[M];)M--;const j=M-x+1;l[v++]=s+x,l[v++]=j,l.set(I.subarray(x,M+1),v),v+=j}return l},rr}(),u=(Gn||(Gn=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.convolve=void 0,tr.convolve=(n,r,t,e,u,i)=>{let o=0,c=0;for(let f=0;f<e;f++){let a=0;for(let t=0;t<u;t++){let t=o+4*i[a++]|0,u=0,f=0,d=0,s=0;for(let r=i[a++];r>0;r--){const r=i[a++];u=u+r*n[t]|0,f=f+r*n[t+1]|0,d=d+r*n[t+2]|0,s=s+r*n[t+3]|0,t=t+4|0}r[c]=u+8192>>14,r[c+1]=f+8192>>14,r[c+2]=d+8192>>14,r[c+3]=s+8192>>14,c=c+4*e|0}c=4*(f+1)|0,o=(f+1)*t*4|0}}),tr),i=(n,r,t=!1)=>{const i=r.height/n.height,o=e.filters(n.width,r.width,r.width/n.width,0,t),c=e.filters(n.height,r.height,i,0,t),f=new Uint8ClampedArray(r.width*n.height*4);u.convolve(n.data,f,n.width,n.height,r.width,o),u.convolve(f,r.data,n.height,r.width,r.height,c)};return Yn.lanczos=(t,e,u=0,o=0,c=t.width-u,f=t.height-o,a=0,d=0,s=e.width-a,l=e.height-d)=>{if(o|=0,f|=0,a|=0,d|=0,s|=0,l|=0,(c|=0)<=0||f<=0||s<=0||l<=0)return;if(0==(u|=0)&&0===o&&c===t.width&&f===t.height&&0===a&&0===d&&s===e.width&&l===e.height)return void i(t,e);const v=r.createImage(c,f),p=r.createImage(s,l);n.copy(t,v,u,o),i(v,p),n.copy(p,e,0,0,p.width,p.height,a,d)},Yn.lanczos2=(t,e,u=0,o=0,c=t.width-u,f=t.height-o,a=0,d=0,s=e.width-a,l=e.height-d)=>{if(o|=0,f|=0,a|=0,d|=0,s|=0,l|=0,(c|=0)<=0||f<=0||s<=0||l<=0)return;if(0==(u|=0)&&0===o&&c===t.width&&f===t.height&&0===a&&0===d&&s===e.width&&l===e.height)return void i(t,e,!0);const v=r.createImage(c,f),p=r.createImage(s,l);n.copy(t,v,u,o),i(v,p,!0),n.copy(p,e,0,0,p.width,p.height,a,d)},Yn}(),ur=tn();const ir=n=>({kind:"height",size:n}),or=f().contramap((n=>n.size))(ur.Ord),cr=on.sort(or),fr=on.sort({equals:(n,r)=>n.kind===r.kind,compare:(n,r)=>n.kind===r.kind?0:"width"===n.kind?-1:1}),ar=(n,r)=>t=>{const e=cr(t),u=(n=>{const[r,t]=n;return r.size/t.size})(e),i=Object.assign(Object.assign({},e[0]),{size:"smallest"===r?n:n*u}),o=Object.assign(Object.assign({},e[1]),{size:"largest"===r?n:n/u});return fr([o,i])},dr=n=>{const{naturalWidth:r,naturalHeight:t}=n;return[(e=r,{kind:"width",size:e}),ir(t)];var e},sr=(n,r)=>{const t=dr(n),e=ar(r,"largest")(t).map((n=>n.size));return[e[0],e[1]]},lr=()=>{const n=document.createElement("canvas"),r=n.getContext("2d");return[n,r]},vr={image:800,highResolutionImage:2e3},pr=(n,r)=>Math.min(n.naturalWidth,n.naturalHeight)>vr[r],hr=(n,r)=>pr(n,r)?((n,r)=>{const t=ar(n,"smallest"),[e,u]=lr(),i=dr(r),[o,c]=t(i).map((n=>n.size)),f=new ImageData(o,c),a=(n=>{const{naturalWidth:r,naturalHeight:t}=n,[e,u]=lr();return e.width=r,e.height=t,u.drawImage(n,0,0),u.getImageData(0,0,r,t)})(r);return e.width=o,e.height=c,er.lanczos(a,f),u.putImageData(f,0,0),e.toDataURL("image/jpeg",.7)})(vr[r],n):(n=>{const r=document.createElement("canvas"),{naturalWidth:t,naturalHeight:e}=n,u=r.getContext("2d");return r.width=t,r.height=e,u.drawImage(n,0,0,t,e),r.toDataURL("image/jpeg")})(n),mr=n=>{const r=(new TextEncoder).encode(n);return btoa(String.fromCharCode.apply(null,r))},Ir="2.217.1",gr={visualSearchId:null,textSearchId:null,textSearchQuery:null,searchType:null,searchStatus:"idle",resultLoaded:!1,resultViewed:!1,image:null,imageBounds:null,searchArea:null,croppedImageUrl:null,visualSearchStarted:!1,requestFilters:[]},br={results:[],sourceProduct:null,dynamicFilters:[],detectedObjects:[],stream:null,redirect:null,autoSuggestCompletions:[]},Rr=Object.assign(Object.assign(Object.assign({},{excluded:null,campaignId:"",campaignIdTextSearch:"",campaignIdVisualSearch:""}),gr),br),xr=yn(Rr),Mr=xr.state,jr=xr.onChange,yr=yn(Rr),Or=yr.state,Ur=yr.onChange,wr=yn(Object.assign({},Rr)).state,Wr=n=>{switch(n){case"widget":return Mr;case"components":return Or;case"shopTheLook":return wr;default:throw new Error(`Unknown store name: ${n}`)}},Sr=(n,r="appStateAndReceivedData",t=[])=>{const e=Wr(n);let u={};switch(r){case"appStateOnly":u=Object.assign({},gr);break;case"receivedDataOnly":u=Object.assign({},br);break;case"appStateAndReceivedData":u=Object.assign(Object.assign({},gr),br);break;case"all":u=Object.assign({},Rr);break;case"manual":for(const n of t)delete e[n];return}for(const n of t)delete u[n];Object.assign(e,u)},Ar=(n,r,t)=>{const e=Object.assign(Object.assign({results:r.results,dynamicFilters:r.dynamicFilters,detectedObjects:r.detectedObjects,requestId:"VPS"===t?r.visualSearchId||"":r.textSearchId||""},vn("query",r.textSearchQuery)),{storeName:n,campaignTypeId:t,campaignTypeName:cn[t],widgetVersion:Ir});document.dispatchEvent(new CustomEvent("vviinnSearchSuccess",{detail:e,bubbles:!0,composed:!0}))},qr=n=>r=>(Sr(n,"receivedDataOnly"),Wr(n).searchStatus="error",r),kr=(n,r,t,e,u=!1)=>p(wn(t,r),_,k,A((n=>V(n,e))),S((r=>(((n,r=!1)=>async t=>{var e,u;const i=Wr(n);if("shopTheLook"===n)return void(i.visualSearchId=t.requestId);const o=t.interactions.suggestedSearchAreas.map((({rectangle:n})=>n));o.length>0&&(i.detectedObjects=o);const c=null!==(e=t.interactions.dynamicFilters)&&void 0!==e?e:[];i.visualSearchId=t.requestId,i.results=t.data.products,i.dynamicFilters=c;const f=Rn(c);0===i.requestFilters.length&&f.length>0&&(i.requestFilters=f),i.stream=null!==(u=null==t?void 0:t.stream)&&void 0!==u?u:null,i.searchStatus="success",r||Ar(n,i,"VPS")})(n,u)(r),r))),W(qr(n))),_r=(n,r,t="image",e,u,i,o=!1)=>c=>{const f=Wr(n);return p(k((n=>O.pipe(U.fromNullable(n),R.fromOption((()=>Dn)),R.chain(Vn)))(c)),F((n=>r=>O.pipe(r,$n,Wn.map((r=>hr(r,n))),Wn.chain(Hn)))(t)),A((r=>(n=>r=>p(w($n(r)),S((r=>(Wr(n).image=r,r))),S((()=>r))))(n)(r))),A((c=>p(C((async()=>Object.assign(Object.assign(Object.assign({query:{[t]:(await Ln(c)).split(",")[1]},objectDetection:{include:"image"===t}},hn("staticFilters",Object.assign({},pn("excluded",f.excluded)))),vn("requestId",e)),pn("campaign",i||f.campaignIdVisualSearch||f.campaignId))),(n=>({kind:"network error",inner:n}))),A((t=>kr(n,t,r,u,o)))))))},Pr=async(n,r,t,e,u)=>{const i=Wr(n),o=Object.assign(Object.assign({query:{url:r},objectDetection:{include:!0}},hn("staticFilters",Object.assign({},pn("excluded",i.excluded)))),pn("campaign",u||i.campaignIdVisualSearch||i.campaignId));return kr(n,o,t,e)()},Tr=(n,r,t,e)=>async u=>{var i;const o=Wr(n);"shopTheLook"!==n&&Object.assign(o,{image:null,detectedObjects:[],textSearchQuery:null,searchType:"image",searchStatus:"loading",visualSearchStarted:!0});const c=await p(_r(n,r,"image",void 0,t,e)(u))();return(null===(i=o.visualSearchId)||void 0===i?void 0:i.length)&&await p(w($n(u)),S((n=>pr(n,"highResolutionImage"))),z((()=>N(!1))))()?(p(_r(n,r,"highResolutionImage",o.visualSearchId,t,e,!0)(u),D((n=>(console.error("Failed to upload hi-res image:",n),N(c)))))(),c):c},Er=async(n,r,t,e,u)=>{const i=Wr(n);i.textSearchQuery=null,i.searchType="image",i.searchStatus="loading",i.visualSearchStarted=!0;let o=null,c=!1;if(i.searchArea){if("shopTheLook"===n)o=i.searchArea;else if(i.searchArea&&i.imageBounds){const n=L(i.imageBounds)(i.searchArea);o={width:n.width,height:n.height,left:n.left,top:n.top}}}else o=null,c=!0;const f=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},vn("requestId",null!=r?r:i.visualSearchId)),pn("campaign",u||i.campaignIdVisualSearch||i.campaignId)),pn("dynamicFilters",i.requestFilters)),{query:Object.assign({},vn("searchArea",o))}),hn("staticFilters",Object.assign({},pn("excluded",i.excluded)))),{objectDetection:{include:c}});return kr(n,f,t,e)()},Cr=(n,r)=>{Wr(n).textSearchQuery=r||null},Fr=async(n,r,t,e,u,i)=>{const o=Wr(n);o.textSearchQuery=r,o.searchType="text",o.searchStatus="loading";const c=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({query:r},vn("requestId",u)),vn("resultsCount",i)),pn("dynamicFilters",o.requestFilters)),pn("campaign",o.campaignIdTextSearch)),hn("staticFilters",Object.assign({},pn("excluded",o.excluded))));return p(wn(t,c),_,k,A((n=>q(n,e))),S((r=>{var t,e,u,i,c,f,a;o.results=null!==(e=null===(t=null==r?void 0:r.data)||void 0===t?void 0:t.products)&&void 0!==e?e:[],o.textSearchId=r.requestId,o.dynamicFilters=null!==(i=null===(u=null==r?void 0:r.interactions)||void 0===u?void 0:u.dynamicFilters)&&void 0!==i?i:[];const d=Rn(null!==(f=null===(c=null==r?void 0:r.interactions)||void 0===c?void 0:c.dynamicFilters)&&void 0!==f?f:[]);return 0===o.requestFilters.length&&d.length>0&&(o.requestFilters=d),o.stream=null!==(a=null==r?void 0:r.stream)&&void 0!==a?a:null,o.searchStatus="success",Ar(n,o,"TPS"),r})),W(qr(n)))()},zr=async(n,r,t,e,u,i,o)=>{const c=Wr("components");c.searchStatus="loading";const f="product_type"===n||"google_product_category"===n?p(r,(n=>n.split(" > ").join(">")),mr,(n=>n.split("=")[0])):r,a=Object.assign(Object.assign({staticFilters:{included:[{column:n,values:[f]}]}},vn("resultsCount",u)),vn("dynamicFilters",i));return await p(wn(t,a),_,k,P((n=>T(n,e))),S((n=>{var r,t,e,u;return o||(c.results=null!==(t=null===(r=null==n?void 0:n.data)||void 0===r?void 0:r.products)&&void 0!==t?t:[],c.dynamicFilters=null!==(u=null===(e=null==n?void 0:n.interactions)||void 0===e?void 0:e.dynamicFilters)&&void 0!==u?u:[],c.searchStatus="success",Ar("components",c,"TPS")),n})),W(qr("components")))()},Nr=n=>n?{state:Mr,onChange:jr,storeName:"widget"}:{state:Or,onChange:Ur,storeName:"components"},Vr=async(n,r,t,e)=>{const u=Wr(n);return p(wn(t,{query:r}),_,k,A((n=>E(n,e))),S((n=>{var t,e;if(n.data.query.trim().toLowerCase()!==(null===(t=u.textSearchQuery)||void 0===t?void 0:t.trim().toLowerCase()))return n;const i=null!==(e=n.data.completions)&&void 0!==e?e:[];u.autoSuggestCompletions=i;const o=i.find((n=>n.suggestion.trim().toLowerCase()===r.trim().toLowerCase()&&(null==n?void 0:n.url)));return u.redirect=(null==o?void 0:o.url)?{url:o.url,query:r}:null,n})),W((n=>n)))()},Dr=n=>{Wr(n).autoSuggestCompletions=[]};export{zr as A,Sn as B,kn as C,an as D,fn as E,on as _,Pr as a,$n as b,Tr as c,Cr as d,Dr as e,Vr as f,Cn as g,cn as h,qn as i,pn as j,Fr as k,Fn as l,Er as m,Mr as n,bn as o,ln as p,gn as q,In as r,wr as s,mn as t,Nr as u,Ir as v,Bn as w,sr as x,Vn as y,Sr as z}
@@ -0,0 +1 @@
1
+ const r={query:"query",searchId:"searchId"},e=e=>{const n=Object.assign({},r);if(!e)return n;const s=new URLSearchParams(e),a=s.get("query"),c=s.get("searchId");return a&&(n.query=a),c&&(n.searchId=c),n},n=r=>new URL(r,window.location.origin),s=r=>r.replace(/\/+$/,"")||"/",a=r=>s(window.location.pathname)===s(n(r).pathname),c=(e,s,a=r.query)=>{const c=n(e);return c.searchParams.set(a,s),c.toString()},t=(e,s,a=r.searchId)=>{const c=n(e);return c.searchParams.set(a,s),c.toString()},o=(e=window.location.search,n=r)=>{const s=new URLSearchParams(e),a=s.get(n.query),c=s.get(n.searchId);return Object.assign(Object.assign({},a&&{query:a}),c&&{searchId:c})};export{o as a,c as b,t as c,a as i,e as p}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as i,H as s,g as o}from"./p-RkvPN2Rk.js";import{_ as r,f as a}from"./p-CrEgr0jU.js";import{d as n,e as h,f as c,v as l,h as d,j as p,k as f,u as g}from"./p-DM6fTGU7.js";import{s as u,f as b}from"./p-DKHkeCw7.js";import{i as x,d as v}from"./p-BJxQCbNV.js";import{i as m,b as y,s as w}from"./p-CPTOq59a.js";import{i as C,b as k,p as S}from"./p-DbOxfJSz.js";const T=()=>t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M20.6 4.57C17.39 4.19 16.88 3.68 16.42 0.37C16.38 0.15 16.22 0 16.01 0C15.8 0 15.63 0.15 15.59 0.37C15.12 3.66 14.63 4.13 11.41 4.57C11.17 4.61 11.01 4.77 11.01 5C11.01 5.23 11.17 5.39 11.41 5.42C14.63 5.81 15.14 6.31 15.59 9.62C15.63 9.84 15.8 10 16.01 10C16.22 10 16.39 9.84 16.42 9.62C16.89 6.31 17.39 5.81 20.6 5.42C20.84 5.38 21 5.22 21 5C21 4.78 20.83 4.6 20.6 4.57Z",fill:"#525252"}),t("path",{d:"M14 12C14 9.24 11.76 7 9 7C6.24 7 4 9.24 4 12C4 14.76 6.24 17 9 17C10.02 17 10.96 16.69 11.75 16.17L16.29 20.71L17.7 19.3L13.16 14.76C13.68 13.97 13.99 13.02 13.99 12.01L14 12ZM9 15C7.35 15 6 13.65 6 12C6 10.35 7.35 9 9 9C10.65 9 12 10.35 12 12C12 13.65 10.65 15 9 15Z",fill:"#525252"})),z=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",width:"24",height:"24","aria-hidden":"true"},t("path",{d:"M12 14C11.1667 14 10.4583 13.7083 9.87501 13.125C9.29168 12.5417 9.00001 11.8333 9.00001 11V5C9.00001 4.16667 9.29168 3.45833 9.87501 2.875C10.4583 2.29167 11.1667 2 12 2C12.8333 2 13.5417 2.29167 14.125 2.875C14.7083 3.45833 15 4.16667 15 5V11C15 11.8333 14.7083 12.5417 14.125 13.125C13.5417 13.7083 12.8333 14 12 14ZM11 20V17.925C9.46668 17.7083 8.15418 17.0583 7.06251 15.975C5.97085 14.8917 5.30835 13.575 5.07501 12.025C5.04168 11.7417 5.11668 11.5 5.30001 11.3C5.48335 11.1 5.71668 11 6.00001 11C6.28335 11 6.52085 11.0958 6.71251 11.2875C6.90418 11.4792 7.03335 11.7167 7.10001 12C7.33335 13.1667 7.91251 14.125 8.83751 14.875C9.76251 15.625 10.8167 16 12 16C13.2 16 14.2583 15.6208 15.175 14.8625C16.0917 14.1042 16.6667 13.15 16.9 12C16.9667 11.7167 17.0958 11.4792 17.2875 11.2875C17.4792 11.0958 17.7167 11 18 11C18.2833 11 18.5167 11.1 18.7 11.3C18.8833 11.5 18.9583 11.7417 18.925 12.025C18.6917 13.5417 18.0333 14.85 16.95 15.95C15.8667 17.05 14.55 17.7083 13 17.925V20C13 20.2833 12.9042 20.5208 12.7125 20.7125C12.5208 20.9042 12.2833 21 12 21C11.7167 21 11.4792 20.9042 11.2875 20.7125C11.0958 20.5208 11 20.2833 11 20Z",fill:"#161616"})),j=()=>{var t;const e=window,i=window.navigator,s=i.vendor,o=[void 0!==e.opr,i.userAgent.indexOf("Firefox")>-1,i.userAgent.indexOf("Edg")>-1].some((t=>!0===t)),r=void 0!==i.userAgentData?"Google Chrome"===(null===(t=i.userAgentData.brands[0])||void 0===t?void 0:t.brand):"Google Inc."===s;return{forbiddenBrowser:o,isChrome:r,isSafari:i.userAgent.indexOf("Safari")>-1&&!r}},I=class{constructor(t){e(this,t),this.vviinnImageUploadFinished=i(this,"vviinnImageUploadFinished"),this.vviinnFilterTriggered=i(this,"vviinnFilterTriggered"),this.vviinnTextSearchStarted=i(this,"vviinnTextSearchStarted"),this.widgetTextSearchFinished=i(this,"widgetTextSearchFinished"),this.vviinnSelectedFiltersReset=i(this,"vviinnSelectedFiltersReset"),this.vviinnNoResult=i(this,"vviinnNoResult"),this.vviinnRedirect=i(this,"vviinnRedirect"),this.mode="basic",this.placeholder="",this.autoSuggestShow=!1,this.showInWidget=!1,this.showOnFirstScreen=!1,this.isRecording=!1,this.showTooltip=!1,this.autoSuggestCompletions=[],this.activeSuggestionIndex=-1,this.originalQuery="",this.searchSubmitted=!1,this.slots=[],this.isShowPreloader=()=>"loading"===this.state.searchStatus&&"text"===this.state.searchType,this.isShowRecording=()=>this.isRecording,this.showRecording=()=>this.isRecording=!0,this.hideRecording=()=>this.isRecording=!1,this.setShowTooltip=t=>{this.showTooltip=t},this.tooltipText=(()=>{const{isSafari:t}=j();return t?"speechRecognition.tooltip.siri":"speechRecognition.tooltip.general"})(),this.getPlaceholderText=()=>this.isShowRecording()?x.t("speechRecognition.placeholder"):this.placeholder.length?this.placeholder:x.t("textSearchPlaceholder"),this.recognition=null,this.trackTextSearch=()=>this.vviinnFilterTriggered.emit({kind:this.state.textSearchQuery,action:"select",customTrigger:"TPS",isTriggeredByVpsWidget:this.showInWidget}),this.getBasicEventData=()=>this.showInWidget&&this.basicEventData?this.basicEventData:Object.assign({campaignTypeId:"TPS",campaignTypeName:d.TPS,widgetVersion:l},p("widgetId",this.el.id)),this.handleSpeech=async()=>{this.recognition&&(this.isRecording?(this.recognition.stop(),this.hideRecording(),this.setShowTooltip(!1)):(this.recognition.start(),n(this.storeName,null),this.triggerTooltipStart=setTimeout((()=>{this.isRecording||(this.setShowTooltip(!0),this.triggerTooltipEnd=setTimeout((()=>{this.setShowTooltip(!1)}),5e3))}),1e3)))},this.hideSuggestions=()=>{h(this.storeName)},this.selectSuggestion=t=>{if(n(this.storeName,t.suggestion),this.hideSuggestions(),t.url)return this.trackTextSearch(),void this.handleTextSearchRedirect(t.url,"auto-suggest",t.suggestion);this.handleTextSearch(!0)},this.handleTextSearch=async(t=!1)=>{var e;const i=this.state.textSearchQuery;if(!i)return;this.searchSubmitted=!0,null===(e=this.autoSuggestHandler)||void 0===e||e.cancelPending(),this.hideSuggestions(),t||(await this.checkAutoSuggest(i),this.hideSuggestions()),this.trackTextSearch();const s=this.state.redirect;if((null==s?void 0:s.url)&&s.query===i)this.handleTextSearchRedirect(s.url,"auto-suggest",i);else if(!this.resultsPageUrl||this.showInWidget||C(this.resultsPageUrl))this.vviinnTextSearchStarted.emit({query:i,isTriggeredByVpsWidget:this.showInWidget}),this.showInWidget&&this.showOnFirstScreen&&r.pipe(await f(this.storeName,i,this.token,this.apiPath),a((()=>{this.vviinnNoResult.emit(this.getBasicEventData())}),(t=>{this.widgetTextSearchFinished.emit({query:i,requestId:t.requestId}),this.vviinnSelectedFiltersReset.emit({isTriggeredByVpsWidget:this.showInWidget})})));else{const t=k(this.resultsPageUrl,i,S(this.resultsPageParams).query);this.handleTextSearchRedirect(t,"text-search",i)}},this.checkAutoSuggest=async t=>{r.pipe(await c(this.storeName,t,this.token,this.apiPath),a((()=>{}),(()=>{})))},this.handleKeyDown=t=>{this.autoSuggestShow?((t,e)=>{const{completions:i,activeSuggestionIndex:s,originalQuery:o,storeName:r,textSearchQuery:a,onActiveIndexChange:h,onOriginalQueryChange:c,onSelectSuggestion:l,onHideSuggestions:d,onSearch:p}=e,f=i.length>0;switch(t.key){case"ArrowDown":if(f){t.preventDefault(),-1===s&&c(a);const e=Math.min(s+1,i.length-1);h(e),n(r,i[e].suggestion)}break;case"ArrowUp":if(f&&s>-1){t.preventDefault();const e=s-1;h(e),n(r,-1===e?o:i[e].suggestion)}break;case"Escape":d();break;case"Enter":f&&s>=0?(t.preventDefault(),l(i[s])):p()}})(t,{completions:this.autoSuggestCompletions,activeSuggestionIndex:this.activeSuggestionIndex,originalQuery:this.originalQuery,storeName:this.storeName,textSearchQuery:this.state.textSearchQuery,onActiveIndexChange:t=>this.activeSuggestionIndex=t,onOriginalQueryChange:t=>this.originalQuery=t,onSelectSuggestion:this.selectSuggestion,onHideSuggestions:this.hideSuggestions,onSearch:this.handleTextSearch}):"Enter"===t.key&&this.handleTextSearch()},this.handleButtonKeyDown=(t,e)=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e())}}connectedCallback(){const{state:t,storeName:e,onChange:i}=g(this.showInWidget);this.state=t,this.storeName=e,this.autoSuggestShow&&(this.disposeOnChange=i("autoSuggestCompletions",(t=>{this.searchSubmitted&&t.length>0||(this.autoSuggestCompletions=t,this.activeSuggestionIndex=-1)})))}disconnectedCallback(){var t,e;clearTimeout(this.triggerTooltipStart),clearTimeout(this.triggerTooltipEnd),null===(t=this.autoSuggestHandler)||void 0===t||t.cleanup(),null===(e=this.disposeOnChange)||void 0===e||e.call(this)}async componentWillLoad(){var t,e,i;await m(this.locale),u(this,this.el),this.slots=b(this.el),this.autoSuggestShow&&(this.autoSuggestHandler=((t,e,i)=>{let s;const o=()=>clearTimeout(s);return{handleInputChange:o=>{n(t,o),clearTimeout(s),o?s=setTimeout((()=>{c(t,o,e,i)}),300):h(t)},cancelPending:o,cleanup:o}})(this.storeName,this.token,this.apiPath)),this.recognition=((t,e,i,s)=>{const o=(()=>{const t=window,e=t.webkitSpeechRecognition||t.SpeechRecognition;if(!e)return;const{forbiddenBrowser:i,isChrome:s,isSafari:o}=j();return i?void 0:s||o?e:void 0})();if(!o)return;const r=new o;let a;return r.interimResults=!1,r.maxAlternatives=1,r.continuous=!1,r.lang=t,r.onstart=()=>{e(),a=setTimeout((()=>{r.stop()}),1e4)},r.onspeechend=()=>{r.stop(),i(),clearTimeout(a)},r.onend=i,r.onresult=t=>{s(t.results[0][0].transcript)},r})(null!==(t=this.locale)&&void 0!==t?t:v.locale,(()=>{this.showRecording(),this.setShowTooltip(!1),clearTimeout(this.triggerTooltipStart)}),this.hideRecording,(t=>{n(this.storeName,t),this.handleTextSearch()})),(null===(e=this.searchQuery)||void 0===e?void 0:e.length)>0&&n(this.storeName,this.searchQuery),!this.showInWidget&&(null===(i=this.searchQuery)||void 0===i?void 0:i.length)>0&&(this.vviinnTextSearchStarted.emit({query:this.searchQuery,isTriggeredByVpsWidget:this.showInWidget}),this.trackTextSearch())}handleInputChange(t){this.searchSubmitted=!1;const e=t.target.value;this.autoSuggestShow?this.autoSuggestHandler.handleInputChange(e):n(this.storeName,e)}handleTextSearchRedirect(t,e,i){const s=Object.assign(Object.assign({},this.getBasicEventData()),{url:t,source:e,query:i});this.vviinnRedirect.emit(s).defaultPrevented?this.state.redirect=null:window.location.href=t}render(){return t(s,{key:"34d054620af49581af6c5038ccb24fc983394d84",exportparts:`${y}, ${w}`},t("div",{key:"b63cd15fffa92ce9f2783107702b293c087350b3",class:"text-search-container",part:"text-search-container"},t("input",Object.assign({key:"dcb2a15f10e3ce65c5e154472179943a8a2732ea",class:"text-search-input",part:"text-search-input",type:"text",placeholder:this.getPlaceholderText(),value:this.state.textSearchQuery||"",onInput:t=>this.handleInputChange(t),onKeyDown:this.handleKeyDown,onBlur:this.autoSuggestShow?this.hideSuggestions:void 0},this.autoSuggestShow&&{role:"combobox","aria-autocomplete":"list","aria-expanded":this.autoSuggestCompletions.length>0&&this.state.textSearchQuery?"true":"false","aria-controls":"suggestions-listbox","aria-activedescendant":this.activeSuggestionIndex>=0?`suggestion-${this.activeSuggestionIndex}`:void 0})),"extended"===this.mode&&t("vviinn-vps-button",Object.assign({key:"0102857f6f6f800687f17ace2d90aee1d14cb3eb",token:this.token,locale:this.locale,apiPath:this.apiPath,addStyle:!1,showResultsInModal:!1,resultsPageUrl:this.resultsPageUrl,resultsPageParams:this.resultsPageParams},this.exampleImageSource&&{exampleImageSource:this.exampleImageSource},null!=this.cssUrl&&{cssUrl:this.cssUrl},this.visualSearchMode&&{mode:this.visualSearchMode},{parentSlots:this.slots})),"basic"===this.mode&&t("slot",{key:"2be782a7f2ec3ec21809c9075f495ca4ed3167e8",name:"vviinn-text-search-actions"}),("extended"===this.mode||this.showInWidget)&&this.recognition&&t("button",{key:"8711e6f5dd1412cef9d9e655f2f9b0e5bebd3272",class:"speech-button",part:"speech-button","aria-label":x.t("a11y.speechButton"),onClick:this.handleSpeech,onKeyDown:t=>this.handleButtonKeyDown(t,this.handleSpeech)},t(z,{key:"66f8b01114ed126495208d6db96050d39a6924f9"}),this.isShowRecording()&&t("span",{key:"afa850af213c41a356aa09dc712e91cf425a4f79",class:"recording-indicator"})),t("button",{key:"8ce59d9f6214e8db235910359069c005066d4a83",class:"text-search-button",part:"text-search-button",onClick:()=>this.handleTextSearch(),onKeyDown:t=>this.handleButtonKeyDown(t,this.handleTextSearch),disabled:"loading"===this.state.searchStatus,"aria-label":x.t("a11y.textSearchButton")},this.isShowPreloader()?t("vviinn-preloader",null):t("slot",{name:"vviinn-text-search-icon"},t(T,null)))),this.autoSuggestShow&&(i=this.state.textSearchQuery,o=this.activeSuggestionIndex,r=this.selectSuggestion,(e=this.autoSuggestCompletions).length&&i?t("ul",{class:"suggestions-container",part:"suggestions-container",role:"listbox",id:"suggestions-listbox"},e.map(((e,s)=>t("li",{id:`suggestion-${s}`,class:{"suggestion-item":!0,"suggestion-item--active":s===o},part:"suggestion-item",role:"option","aria-selected":s===o?"true":"false",onMouseDown:t=>{t.preventDefault(),r(e)}},((e,i)=>{const s=e.toLowerCase(),o=i.toLowerCase(),r=s.indexOf(o);if(-1===r)return e;const a=e.slice(0,r),n=e.slice(r,r+i.length),h=e.slice(r+i.length);return[a,t("span",{class:"suggestion-highlight"},n),h]})(e.suggestion,i))))):null),this.showTooltip&&t("p",{key:"f82df73e88ba1dbf4c86bb1aa56c9a921ab76ee0",class:"text-search-tooltip",part:"text-search-tooltip"},x.t(this.tooltipText)));var e,i,o,r}get el(){return o(this)}};I.style=':host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{display:block;position:relative;width:100%;}.text-search-container{display:flex;align-items:center;gap:var(--spacing-50);width:100%;height:46px;border:1px solid var(--color-border-02);border-radius:8px;transition:border-color 0.2s;overflow:hidden;box-sizing:border-box}.text-search-container:focus-within{border-color:#8d8d8d}.text-search-input,.text-search-tooltip{font-size:16px;font-style:normal;font-weight:400;font-family:var(--font-family, var(--font-family-base))}.text-search-input{height:100%;padding-left:16px;box-sizing:border-box;border:none;outline:none;overflow:hidden;text-overflow:ellipsis;flex-grow:2;width:150px}.text-search-input::-moz-placeholder{color:#a8a8a8}.text-search-input::placeholder{color:#a8a8a8}.text-search-input:focus,.text-search-input:active{border-color:#8d8d8d}vviinn-vps-button{height:100%}.text-search-button,.speech-button,vviinn-vps-button::part(vviinn-button){border:none;height:100%;display:flex;justify-content:center;align-items:center;cursor:pointer}.speech-button,vviinn-vps-button::part(vviinn-button){padding:0 8px}.upload-button-text{display:contents}.text-search-button{background-color:#f4f4f4;transition:background-color 0.2s;aspect-ratio:1 / 1;border-radius:0 7px 7px 0}.speech-button{background-color:transparent;position:relative}@keyframes recordingSpeech{0%{background-color:#ff0000;scale:1}100%{background-color:#ff8888;scale:1.5}}.recording-indicator{border-radius:50%;width:8px;height:8px;left:24px;top:24px;background-color:#ff0000;position:absolute;animation:recordingSpeech 1s infinite alternate ease-in-out}@keyframes fade-out{0%{opacity:0}20%{opacity:1}80%{opacity:1}100%{opacity:0;display:none}}.text-search-tooltip{position:absolute;right:0;top:80%;background:#f4f4f4;animation:fade-out 5s forwards;width:-moz-fit-content;width:fit-content;padding:24px;border-radius:8px;border:1px solid #8d8d8d;box-sizing:border-box}.text-search-button:not(:disabled):hover{background-color:#e0e0e0}.text-search-button:disabled{cursor:unset}vviinn-image-selector,::slotted([slot="vviinn-text-search-actions"]){margin:auto 8px}vviinn-preloader{--preloader-size:16px;display:flex;color:#525252}.suggestions-container{position:absolute;top:100%;left:0;right:0;margin:var(--spacing-50) 0 0;padding:4px;list-style:none;background:#ffffff;border:1px solid #fafafa;border-radius:8px;box-shadow:0px 4px 12px rgba(0, 0, 0, 0.08);box-sizing:border-box;z-index:10}.suggestion-item{padding:4px 8px;border-radius:4px;font-size:16px;line-height:normal;font-weight:400;font-family:var(--font-family, var(--font-family-base));cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.suggestion-item:hover,.suggestion-item--active{background-color:#f4f4f4}.suggestion-highlight{font-weight:500}';export{I as vviinn_text_search}