PageSourceSearch

https://www.buffalojeans.ca/account/login?return_url=%2Faccount

html buffalojeans.ca collected 2026-09-26 12:26:37 UTC 531,183 bytes, 6,571 lines download raw bytes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18<!doctype html>
19
20<html class="no-js" lang="en">
21  <head>
22<!-- Google Consent Mode V2 Consentmo -->
23        <!-- Google Consent Mode V2 Advanced Mode integration script for Consentmo GDPR Compliance App -->
24    
24<script id="consentmo-gcmv2-advanced-mode-integration">
25      const consentOutOfRegion = {
26        analytics: true,
27        marketing: true,
28        functionality: true,
29        adsDataRedaction: false,
30        urlPassthrough: false,
31      };
32
33      window.dataLayer = window.dataLayer || [];
34      function gtag(){dataLayer.push(arguments);}
35
36      gtag('consent', 'default', {
37        ad_storage: 'denied',
38        ad_personalization: 'denied',
39        ad_user_data: 'denied',
40        analytics_storage: 'denied',
41        functionality_storage: 'denied',
42        personalization_storage:'denied',
43        security_storage: 'granted',
44        wait_for_update: 1500
45      });
46
47      document.addEventListener('consentmoSignal_onLoad', function(eventData) {
48        const csmLoadSignal = eventData.detail || {isActive:false};
49        console.log('LIQUID - consentmoSignal_onLoad event', csmLoadSignal);
50
51        if (!csmLoadSignal.isActive) {
52          console.log('LIQUID - isActive false - use consentOutOfRegion');
53          gtag('consent', 'update', {
54            ad_storage: consentOutOfRegion.marketing ? 'granted' : 'denied',
55            ad_personalization: consentOutOfRegion.marketing ? 'granted' : 'denied',
56            ad_user_data: consentOutOfRegion.marketing ? 'granted' : 'denied',
57            analytics_storage: consentOutOfRegion.analytics ? 'granted' : 'denied',
58            functionality_storage: consentOutOfRegion.functionality ? 'granted' : 'denied',
59            personalization_storage: consentOutOfRegion.functionality ? 'granted' : 'denied',
60            security_storage: 'granted',
61          });
62          gtag('set', 'ads_data_redaction', consentOutOfRegion.adsDataRedaction);
63          gtag('set', 'url_passthrough', consentOutOfRegion.urlPassthrough);
64          console.log('LIQUID - dataLayer', window.dataLayer);
65        } else {
66          console.log('LIQUID - set default-consent and subscribe consentmoSignal for consent-update');
67          document.addEventListener('consentmoSignal', function(event) {
68            const csmSignal = event.detail;
69            const consentState = csmSignal.integration?.gcm?.isEnabled ? csmSignal.integration.gcm.state : csmSignal.state;
70            console.log('LIQUID - consentmoSignal event', csmSignal);
71            console.log('LIQUID - dataLayer', window.dataLayer);
72
73            gtag('consent', 'update', consentState);
74            if (csmSignal.integration?.gcm?.isEnabled) {
75              gtag('set', 'ads_data_redaction', csmSignal.integration.gcm.adsDataRedaction);
76              gtag('set', 'url_passthrough', csmSignal.integration.gcm.urlPassthrough);
77            }
78          });
79        }
80      });
81    </script>
81
82
83 
84  
84<script>
85  (function(d) {
86    var e = d.createElement('script');
87    e.src = d.location.protocol + '//tag.wknd.ai/5177/i.js';
88    e.async = true;
89    d.getElementsByTagName("head")[0].appendChild(e);
90}(document));
91  </script>
91
92  <!-- End WKND tag -->
93
94  <!-- Global site tag (gtag.js) - Google Analytics -->
vendor: 64 bytes, lines 94-95
94
95<script async src="https://www.googletagmanager.com/gtag/js?id=
95G-Q352S2WFG4
vendor: 12 bytes, line 95
95"></script>
96<script>
vendor: 128 bytes, lines 97-101
97window.dataLayer = window.dataLayer || [];
98function gtag(){dataLayer.push(arguments);}
99gtag('js', new Date());
100
101gtag('config', '
101G-Q352S2WFG4
vendor: 4 bytes, line 101
101');
102</script>
102<meta charset="utf-8">
103    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
104    <meta name="viewport" content="width=device-width, initial-scale=1.0, height=device-height, minimum-scale=1.0, maximum-scale=1.0">
105    <meta name="theme-color" content="">
106    <meta name="facebook-domain-verification" content="6kzv8xvtskh56xrqvcxjlwcfchi8df" /><title>
107      Account &ndash; Buffalo Jeans CA
108    </title>
109
110    <style>.ProductListWrapper .swatches{display:none;}</style><link rel="canonical" href="https://www.buffalojeans.ca/account/login"><link rel="shortcut icon" href="//www.buffalojeans.ca/cdn/shop/files/favicon_CHECKPATTERNLIBRARY_BuffaloJeans_96x.png?v=1613055402" type="image/png">
110<script type="text/javascript" src="//www.buffalojeans.ca/cdn/shop/t/525/assets/jquery-3.6.0.min.js?v=8324501383853434791790085232"></script>
110
111
112    
113      <!-- Global site tag (gtag.js) - Google Ads: 981987556 -->
vendor: 64 bytes, lines 113-114
113
114<script async src="https://www.googletagmanager.com/gtag/js?id=
114AW-981987556
vendor: 12 bytes, line 114
114"></script>
115<script>
116    
vendor: 143 bytes, lines 116-120
116window.dataLayer = window.dataLayer || [];
117    function gtag() { dataLayer.push(arguments); }
118    gtag('js', new Date());
119
120    gtag('config', '
120AW-981987556
vendor: 4 bytes, line 120
120');
121</script>
121
122
123
124<script>
125    gtag('event', 'page_view', {
126        'send_to': 'AW-981987556',
127        'ecomm_pagetype': 'other'
128    });
129</script>
129
130
131    
132    
133
134    <meta property="og:type" content="website">
135  <meta property="og:title" content="Account"><meta property="og:url" content="https://www.buffalojeans.ca/account/login">
136<meta property="og:site_name" content="Buffalo Jeans CA"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="Account">
137  <meta name="twitter:description" content="Account">
138    <style>
139  @font-face {
140  font-family: Jost;
141  font-weight: 400;
142  font-style: normal;
143  font-display: fallback;
144  src: url("//www.buffalojeans.ca/cdn/fonts/jost/jost_n4.d47a1b6347ce4a4c9f437608011273009d91f2b7.woff2") format("woff2"),
145       url("//www.buffalojeans.ca/cdn/fonts/jost/jost_n4.791c46290e672b3f85c3d1c651ef2efa3819eadd.woff") format("woff");
146}
147
148  @font-face {
149  font-family: Jost;
150  font-weight: 400;
151  font-style: normal;
152  font-display: fallback;
153  src: url("//www.buffalojeans.ca/cdn/fonts/jost/jost_n4.d47a1b6347ce4a4c9f437608011273009d91f2b7.woff2") format("woff2"),
154       url("//www.buffalojeans.ca/cdn/fonts/jost/jost_n4.791c46290e672b3f85c3d1c651ef2efa3819eadd.woff") format("woff");
155}
156
157
158  @font-face {
159  font-family: Jost;
160  font-weight: 700;
161  font-style: normal;
162  font-display: fallback;
163  src: url("//www.buffalojeans.ca/cdn/fonts/jost/jost_n7.921dc18c13fa0b0c94c5e2517ffe06139c3615a3.woff2") format("woff2"),
164       url("//www.buffalojeans.ca/cdn/fonts/jost/jost_n7.cbfc16c98c1e195f46c536e775e4e959c5f2f22b.woff") format("woff");
165}
166
167  @font-face {
168  font-family: Jost;
169  font-weight: 400;
170  font-style: italic;
171  font-display: fallback;
172  src: url("//www.buffalojeans.ca/cdn/fonts/jost/jost_i4.b690098389649750ada222b9763d55796c5283a5.woff2") format("woff2"),
173       url("//www.buffalojeans.ca/cdn/fonts/jost/jost_i4.fd766415a47e50b9e391ae7ec04e2ae25e7e28b0.woff") format("woff");
174}
175
176  @font-face {
177  font-family: Jost;
178  font-weight: 700;
179  font-style: italic;
180  font-display: fallback;
181  src: url("//www.buffalojeans.ca/cdn/fonts/jost/jost_i7.d8201b854e41e19d7ed9b1a31fe4fe71deea6d3f.woff2") format("woff2"),
182       url("//www.buffalojeans.ca/cdn/fonts/jost/jost_i7.eae515c34e26b6c853efddc3fc0c552e0de63757.woff") format("woff");
183}
184
185
186  
187:root {
188    --heading-font-family-bold  : futura-pt-bold, Sans Serif;
189    --heading-font-family-light : futura-pt, Sans Serif;
190    --heading-font-weight       : 400;
191    --heading-font-style        : normal;
192
193    
194    --h1-font-size-heavy: 22px;
195    --h1-font-size-light: 22px;
196    --h1-font-size-desk: 22px;
197    --h1-font-size-pdp: 22px;
198    --h2-font-size: 22px;
199    --h3-font-size: 18px;
200    --h4-font-size: 20px;
201    --h5-font-size: 18px;
202    --h6-font-size: 16px;
203    --h8-font-size: 16px;
204
205    --h1-letter-spacing-heavy: 2.64px;
206    --h1-letter-spacing-light: 0.96px;
207    --h1-letter-spacing-heavy-desk: 2.64px;
208    --h1-letter-spacing-light-desk: 1.6px;
209    --h1-letter-spacing-pdp: 0px;
210    --h2-letter-spacing: 0px;
211    --h3-letter-spacing: 2.2px;
212    --h4-letter-spacing: 0px;
213    --h5-letter-spacing: 0px;
214    --h6-letter-spacing: 0px;
215    --h8-letter-spacing: .32px;
216
217    --h1-text-transform: uppercase;
218    --h2-text-transform: none;
219    --h3-text-transform: uppercase;
220    --h4-text-transform: none;
221    --h5-text-transform: none;
222    --h6-text-transform: none;
223    --h8-text-transform: none;
224
225    --slideshow-banner-font-size: 64px;
226    --image-overlay-heading-font-size: 36px;
227    --image-overlay-subheading-font-size: 20px;
228    --subhead-font-size: 16px;
229    --subhead-letter-spacing: 0.84px;
230    --subhead-text-transform: uppercase;
231
232    --text-font-family : futura-pt, Sans Serif;
233    --text-font-family-bold : futura-pt-bold, Sans Serif;
234    --password-font-family: Futura,Trebuchet MS,Arial,sans-serif;
235    --text-font-weight : 400;
236    --text-font-weight-medium : 500;
237    --text-font-style  : normal;
238
239    --text-line-height-small : 1.13;
240    --text-line-height-middle : 1.18;
241    --text-line-height-big : 1.22;
242    --text-line-height-label : 1.25;
243    --text-line-height-pdp : 1.27;
244    --text-line-height-ph : 1.28;
245    --text-line-height-xbig : 1.3;
246    --text-line-height-alert : 1.38;
247    --text-line-height-tertiary: 1.72;
248
249    --base-text-font-size-banner : 12px;
250    --base-text-font-size   : 14px;
251    --base-text-font-size-alert : 15px;
252    --base-text-font-size-label : 16px;
253    --base-text-letter-spacing   : 0px;
254    --base-text-letter-spacing-btn : 1.68px;
255    --default-text-font-size: 14px;
256
257    
258    --fire        : #cd2428;
259    --black       : #231f20;
260    --black-border : #1e1e1e;
261    --black-input : #221f20;
262    --black-pagination : #242424;
263    --grey-400    : #dedfd5;
264    --grey-300    : #cdb69b;
265    --grey-200    : #8d7141;
266    --grey-100    : var(--grey-200);
267    --grey-50     : #292929;
268    --whitesmoke  : whitesmoke;
269    --white       : #ffffff;
270    --alert-error : #712022;
271    --saxe        : #3C5084;
272    --denim       : #172342;
273    --blue        : #151E4F;
274    --caramel     : #897248;
275    --placeholder : #737373;--background          : var(--white);
276    --background-rgb      : 239, 239, 239;
277    --light-background    : #ffffff;
278    --light-background-rgb: 255, 255, 255;
279    --heading-color       : var(--blue);
280    --heading-color-secondary: var(--caramel);
281    --text-color          : var(--black);
282    --text-color-rgb      : 28, 27, 27;
283    --text-color-light    : var(--caramel);
284    --text-color-light-rgb: 106, 106, 106;
285    --link-color          : var(--grey-200);
286    --link-color-rgb      : 106, 106, 106;
287    --border-color        : #cfcfcf;
288    --border-color-rgb    : 207, 207, 207;
289
290    --button-background    : var(--denim);
291    --button-background-rgb: 28, 27, 27;
292    --button-text-color    : #ffffff;
293
294    --header-background       : #ffffff;
295    --header-heading-color    : #1c1b1b;
296    --header-light-text-color : #6a6a6a;
297    --header-border-color     : #dddddd;
298
299    --footer-background       : #172342;
300    --footer-text-color       : #dedfd5;
301    --footer-text-color-hover : #ffffff;
302    --footer-heading-color    : #dedfd5;
303    --footer-border-color     : #353f58;
304
305    --navigation-background      : var(--background);
306    --navigation-background-rgb  : var(--background);
307    --navigation-text-color      : var(--text-color);
308    --navigation-text-color-light: var(--caramel);
309    --navigation-border-color    : var(--grey-400);
310
311    --newsletter-popup-background     : #1c1b1b;
312    --newsletter-popup-text-color     : #ffffff;
313    --newsletter-popup-text-color-rgb : 255, 255, 255;
314
315    --secondary-elements-background       : #1c1b1b;
316    --secondary-elements-background-rgb   : 255, 255, 255;
317    --secondary-elements-text-color       : #ffffff;
318    --secondary-elements-text-color-light : rgba(255, 255, 255, 0.5);
319    --secondary-elements-border-color     : rgba(255, 255, 255, 0.25);
320
321    --product-sale-price-color    : var(--fire);
322    --product-sale-price-color-rgb: 249, 76, 67;
323
324    /* Products */
325
326    --horizontal-spacing-four-products-per-row: 6px;
327        --horizontal-spacing-two-products-per-row : 60px;
328
329    --vertical-spacing-four-products-per-row: 60px;
330        --vertical-spacing-two-products-per-row : 75px;
331
332    /* Animation */
333    --drawer-transition-timing: cubic-bezier(0.645, 0.045, 0.355, 1);
334    --header-base-height: 80px; /* We set a default for browsers that do not support CSS variables */
335
336    /* Cursors */
337    --cursor-zoom-in-svg    : url(//www.buffalojeans.ca/cdn/shop/t/525/assets/cursor-zoom-in.svg?v=170532930330058140181790085232);
338    --cursor-zoom-in-2x-svg : url(//www.buffalojeans.ca/cdn/shop/t/525/assets/cursor-zoom-in-2x.svg?v=56685658183649387561790085232);
339  }
340</style>
341
342<script>
343  // IE11 does not have support for CSS variables, so we have to polyfill them
344  if (!(((window || {}).CSS || {}).supports && window.CSS.supports('(--a: 0)'))) {
345    const script = document.createElement('script');
346    script.type = 'text/javascript';
347    script.src = 'https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2';
348    script.onload = function() {
349      cssVars({});
350    };
351
352    document.getElementsByTagName('head')[0].appendChild(script);
353  }
354</script>
354
355
356       
356<script>
357/**
358 * FAST SIMON E-COMMERCE ENHANCEMENT SCRIPT
359 * 
360 * This script enhances the functionality of an e-commerce site by:
361 * 1. Adding custom search functionality
362 * 2. Enhancing product collection displays
363 * 3. Managing product badges and swatches
364 * 4. Implementing cart upsell widgets
365 * 5. Supporting multi-language (English/French)
366 */
367
368// ============================================================
369// CONFIGURATION CONSTANTS
370// ============================================================
371
372// General Configuration
373window.__fast_options = window.__fast_options || {};
374window.__fast_options.with_product_attributes =  true;
375window.__fast_options.parse_sub_category_tag_filter = true;
376window.fs_upsell_disable_render_delay = true;
377window.__fast_options.disable_upsell_shadow_root = true;
378
379__fast_options.parseAcProductTitle = function(title, productData) {
380  const attributes = productData?.att || [];
381  
382  const shortTitleAttribute = attributes.find(
383    (attr) => attr[0] === "Custom.site title"
384  );
385
386  if (
387    shortTitleAttribute &&
388    Array.isArray(shortTitleAttribute[1]) &&
389    shortTitleAttribute[1][0]
390  ) {
391    return shortTitleAttribute[1][0];
392  }
393  
394  // fallback to the original title if Toms.product display name does not exist
395  return title;
396
397};
398
399__fast_options.parseProductTitle = function(title, productData) {
400  const attributes = productData?.att || [];  
401  const shortTitleAttribute = attributes.find(
402    (attr) => attr[0] === "Custom.site title"
403  );
404
405  if (
406    shortTitleAttribute &&
407    Array.isArray(shortTitleAttribute[1]) &&
408    shortTitleAttribute[1][0]
409  ) {
410    return shortTitleAttribute[1][0];
411  }
412  
413  // fallback to the original title if Toms.product display name does not exist
414  return title;
415};
416
417// CSS Selectors
418const SELECTORS = {
419  // Cart Selectors
420  CART_COUNT: "span.Header__CartCount",
421  CART_ICON: 'a[href="/cart"]',
422  MINICART: "#sidebar-cart",
423  MINICART_UPSELL_CONTAINER: "#fs-upsell-mini-cart-section",
424  DRAWER_MAIN: '.Drawer__Main',
425  DRAWER__FOOTER: '.Drawer__Footer',
426  
427  // Product Selectors
428  PRODUCT_CARD: '.fs-results-product-card',
429  PRODUCT_IMAGE_LINK: ".fs-product-image-link",
430  INFO_CONTAINER: ".info-container",
431  IMAGE_WRAPPER: ".image-wrapper",
432  IMG_CONTAINER: '.img-container img',
433  PRICE_ELEMENT: ".fs-price.price",
434  COMPARE_ELEMENT: ".compare.fs-compare",
435  
436  
437  // Filter Selectors
438  CATEGORY_ITEMS: ".category-items",
439  FILTER_NAME: ".fs-cur-name",
440  COLLECTION_LINK: '.custom_collection .collection_link',
441  PRODUCT_TITLE: '.ProductItem__Title',
442  SORT_OPTIONS: ".sort-options",
443  SORT_FILTER_TEXT: ".fs-serp-filter-text",
444  CATEGORY_TITLE: ".fs-category-title",
445  
446  // Swatch Selectors
447  COLOR_SWATCHES: ".color-swatch-container.fs-color-swatch-container",
448  COLOR_SWATCH: '.color-swatch',
449  COLOR_NAME: '.color-swatch-color-name',
450  
451  // Badge Selectors
452  BADGES_WRAPPER: '.fs-badges-wrapper',
453  PRODUCT_BADGE: '.fs_product_text_badge_flag',
454  REVIEWS_AVG: '.fs-reviews-avg',
455  TOTAL_COLORS_COUNT: '.fs_total_colors_count',
456  
457  // Tag Selectors
458  REMOVABLE_TAG_CONTAINER: '.removable-tag-container',
459  REMOVABLE_TAG_TEXT: '.removable-tag-text',
460  
461  // Upsell Selectors
462  UPSELL_PRODUCT: ".fs-upsell-cross-sell-product",
463  UPSELL_IMAGE_CONTAINER: ".upsell-cross-sell-image-container",
464  CAROUSEL_CONTAINER: '.carousel-container',
465  UPSELL_PRICE: '.fs-recommendation-product-price',
466  UPSELL_COMPARE_PRICE: '.compare-price.fs-recommendation-product-compare-price'
467};
468
469// CSS Classes
470const CLASSES = {
471  COLLAPSED: 'collapsed',
472  DRAGGING: 'dragging',
473  HAS_TAGS: 'has-tags',
474  PROMO_LABEL: 'fs-promo-label',
475  PRODUCT_MODAL: 'product-modal',
476  CUSTOM_FILTER: 'cstm-filter'
477};
478
479// Text Constants
480const TEXT = {
481  DOLLAR_SIGN: "$",
482  USD: "USD",
483  CAD: "CAD",
484  ON_SALE: {
485    EN: "On sale",
486    FR: "En solde"
487  },
488  COLORS_TEXT: {
489    EN: "Colors",
490    FR: "COULEURS"
491  },
492  FIT_TITLE: "Fit",
493  QUICK_VIEW: {
494    EN: "Quick View",
495    FR: "APERÇU"
496  },
497  SORTING: {
498    EN: "Sorting",
499    FR: "Trier"
500  }
501};
502
503// French translations for sorting options
504const SORT_TRANSLATIONS = {
505  "Newest Arrivals": "Nouveautés",
506  "Best Match": "Pertinence",
507  "Price: Low to High": "Prix croissant",
508  "Price: High to Low": "Prix décroissant"
509};
510
511const translations = {
512    "Men Jeans": "Jeans homme",
513    "Men Shirts": "Chemises homme",
514    "Men Tops": "Hauts homme",
515    "Men Shorts": "Shorts homme",
516    "Men T-Shirts": "T-shirts homme",
517    "Men Sweaters": "Pulls homme",
518    "Men Tanks": "Débardeurs homme",
519    "Men Pants": "Pantalons homme",
520    "Men Jackets": "Vestes homme"
521};
522
523// Upsell Widget Configuration
524const UPSELL_WIDGET_ID = "17573408078118619";
525const UPSELL_WIDGET_ID_EN = "17576100992973045";
526const UPSELL_WIDGET_ID_FR = "1757346048560690";
527const UPSEL_WIDGET_ID_MODAL = "17576095063573349";
528var FAST_UPSELL_WIDGETS_MAPPING  = {"17556080038968737": {"e61aafd9-48c9-4c24-99db-7d62fca2b81f-135177": "17563820503404135","e61aafd9-48c9-4c24-99db-7d62fca2b81f-135178": "17563820523955812"},"1755608359916700": {"e61aafd9-48c9-4c24-99db-7d62fca2b81f-135177": "17563811141484856","e61aafd9-48c9-4c24-99db-7d62fca2b81f-135178": "17563811163556072"},"17556084846506676": {"e61aafd9-48c9-4c24-99db-7d62fca2b81f-135177": "1756382874277503","e61aafd9-48c9-4c24-99db-7d62fca2b81f-135178": "17563828774119760"},"17556123587764281": {"e61aafd9-48c9-4c24-99db-7d62fca2b81f-135177": "17563829008595276","e61aafd9-48c9-4c24-99db-7d62fca2b81f-135178": "17563829029645874"},"17556124363939459": {"e61aafd9-48c9-4c24-99db-7d62fca2b81f-135177": "17563829141467144","e61aafd9-48c9-4c24-99db-7d62fca2b81f-135178": "17563829161677533"},"17556127147342104": {"e61aafd9-48c9-4c24-99db-7d62fca2b81f-135177": "17563801749585007","e61aafd9-48c9-4c24-99db-7d62fca2b81f-135178": "17563801773079192"},"17556127720366667": {"e61aafd9-48c9-4c24-99db-7d62fca2b81f-135177": "17563801884818050","e61aafd9-48c9-4c24-99db-7d62fca2b81f-135178": "17563801900471680"},"17573408078118619": {"e61aafd9-48c9-4c24-99db-7d62fca2b81f-135177": "17573460505033770","e61aafd9-48c9-4c24-99db-7d62fca2b81f-135178": "1757346048560690"},"17576090603221351": {"e61aafd9-48c9-4c24-99db-7d62fca2b81f-135177": "17576095063573349","e61aafd9-48c9-4c24-99db-7d62fca2b81f-135178": "17576095042949474"}}
529
530window.FS_CUSTOM_WIDGET_MAPPINGS = window?.FAST_UPSELL_WIDGETS_MAPPING || {[UPSELL_WIDGET_ID?.toString()]: {
531    "e61aafd9-48c9-4c24-99db-7d62fca2b81f-135177": "17576100992973045",
532    "e61aafd9-48c9-4c24-99db-7d62fca2b81f-135178": "1757346048560690"
533}}
534
535
536window.__fast_options.upsell_widgets_minicart = window.__fast_options.upsell_widgets_minicart || {};
537window.__fast_options.upsell_widgets_minicart[UPSELL_WIDGET_ID] = {
538  get_update_widget_products_list: (update_widget_products_list) => {
539      console.log('upsellWidget_0', update_widget_products_list)
540
541    window.FS_UPDATE_WIDGET_PRODUCT_LIST = window.FS_UPDATE_WIDGET_PRODUCT_LIST || update_widget_products_list;
542        if(window?.langify?.locale?.language_id?.length > 1 && window?.FS_CUSTOM_WIDGET_MAPPINGS) {
543            window.FS_UPSELL_WIDGET_ID_LANGIFY = window?.FS_CUSTOM_WIDGET_MAPPINGS[UPSELL_WIDGET_ID]?.[`e61aafd9-48c9-4c24-99db-7d62fca2b81f-${window?.langify?.locale?.language_id?.slice?.(2,window?.langify?.locale?.language_id?.length)}`]
544        }
545
546  },
547  minicartUpsellContainer: SELECTORS.MINICART_UPSELL_CONTAINER,
548  cartCountSelector: SELECTORS.CART_COUNT,
549  avoidFirstLoad: false,
550  minicartSelector: SELECTORS.MINICART,
551  attributesConfig: {
552    attributes: -1,
553    attributeFilter: ['tabindex']
554  }
555};
556window.__fast_options.upsell_widgets_minicart[UPSELL_WIDGET_ID_EN] = {
557  get_update_widget_products_list: (update_widget_products_list) => {
558      console.log('upsellWidget_0', update_widget_products_list)
559
560    window.FS_UPDATE_WIDGET_PRODUCT_LIST = window.FS_UPDATE_WIDGET_PRODUCT_LIST || update_widget_products_list;
561        if(window?.langify?.locale?.language_id?.length > 1 && window?.FS_CUSTOM_WIDGET_MAPPINGS) {
562            window.FS_UPSELL_WIDGET_ID_LANGIFY = window?.FS_CUSTOM_WIDGET_MAPPINGS[UPSELL_WIDGET_ID]?.[`e61aafd9-48c9-4c24-99db-7d62fca2b81f-${window?.langify?.locale?.language_id?.slice?.(2,window?.langify?.locale?.language_id?.length)}`]
563        }
564
565  },
566  minicartUpsellContainer: SELECTORS.MINICART_UPSELL_CONTAINER,
567  cartCountSelector: SELECTORS.CART_COUNT,
568  avoidFirstLoad: false,
569  minicartSelector: SELECTORS.MINICART,
570  attributesConfig: {
571    attributes: -1,
572    attributeFilter: ['tabindex']
573  }
574};
575window.__fast_options.upsell_widgets_minicart[UPSELL_WIDGET_ID_FR] = {
576  get_update_widget_products_list: (update_widget_products_list) => {
577      console.log('upsellWidget_0', update_widget_products_list)
578
579    window.FS_UPDATE_WIDGET_PRODUCT_LIST = window.FS_UPDATE_WIDGET_PRODUCT_LIST || update_widget_products_list;
580        if(window?.langify?.locale?.language_id?.length > 1 && window?.FS_CUSTOM_WIDGET_MAPPINGS) {
581            window.FS_UPSELL_WIDGET_ID_LANGIFY = window?.FS_CUSTOM_WIDGET_MAPPINGS[UPSELL_WIDGET_ID]?.[`e61aafd9-48c9-4c24-99db-7d62fca2b81f-${window?.langify?.locale?.language_id?.slice?.(2,
581window?.langify?.locale?.language_id?.length)}`]
582        }
583
584  },
585  minicartUpsellContainer: SELECTORS.MINICART_UPSELL_CONTAINER,
586  cartCountSelector: SELECTORS.CART_COUNT,
587  avoidFirstLoad: false,
588  minicartSelector: SELECTORS.MINICART,
589  attributesConfig: {
590    attributes: -1,
591    attributeFilter: ['tabindex']
592  }
593};
594
595// Tag Prefixes
596const TAG_PREFIXES = {
597  PROMO: "promo:",
598  MSRP: "msrpprice:"
599};
600
601// Image Transformation
602const IMAGE_TRANSFORMS = {
603  LARGE_TO_2048: {
604    from: '_large.jpg',
605    to: '_2048x.jpg'
606  }
607};
608
609// Upsell configuration
610window.__fast_options.disable_upsell_shadow_root =  true; // Changed from true to false
611
612// ============================================================
613// UTILITY FUNCTIONS
614// ============================================================
615
616/**
617 * Check if the current page is the French version
618 * @returns {boolean} True if on French page
619 */
620function isFrenchPage() {
621  const url = window.location;
622  const pathname = url.pathname.toLowerCase();
623  const search = url.search.toLowerCase();
624
625  return (
626    pathname.startsWith("/fr") ||              // e.g. /fr or /fr/...
627    pathname.includes("/fr/") ||              // e.g. /something/fr/...
628    search.includes("lang=fr") ||             // optional: handle ?lang=fr
629    search.includes("/fr")                    // handle ?noredirect=yes after /fr
630  );
631}
632
633/**
634 * Helper function to get all product elements from a container
635 * @param {HTMLElement} element - Container element
636 * @returns {Array} Array of product elements
637 */
638function getProductElements(element) {
639  return [...element.querySelectorAll(SELECTORS.PRODUCT_CARD)];
640}
641
642/**
643 * Strip CAD/USD currency text from price elements
644 * @param {HTMLElement} element - Price element
645 */
646/* 
647function stripCurrencyText(element) {
648  if (!element) return;
649  element.textContent = element.textContent
650    .replace(/\s*CAD\b/g, '')
651    .replace(/\s*USD\b/g, '')
652    .trim();
653}
654*/
655function stripCurrencyText(element) {
656  if (!element) return;
657
658  // Find only the text node (not the $ span)
659  const textNode = Array.from(element.childNodes)
660    .find(node => node.nodeType === Node.TEXT_NODE);
661
662  if (!textNode) return;
663
664  textNode.textContent = textNode.textContent
665    .replace(/\s*CAD\b/g, '')
666    .replace(/\s*USD\b/g, '')
667    .trim();
668}
669
670
671/**
672 * Get localized text based on the current page language
673 * @param {Object} textObj - Object containing EN and FR versions
674 * @returns {string} Localized text
675 */
676function getLocalizedText(textObj) {  
677  return isFrenchPage() ? textObj.FR : textObj.EN;
678}
679
680/**
681 * Read a language-suffixed hidden settings input rendered by theme.liquid.
682 * The theme exposes each message setting twice (e.g. #settings_msg_en /
683 * #settings_msg_es); there is no unsuffixed element, so the suffix is required.
684 * @param {string} baseId - Input id without the language suffix, e.g. 'settings_msg'
685 * @returns {string} The setting value, or '' when the input is missing
686 */
687function getLocalizedSetting(baseId) {
688  const suffix = isFrenchPage() ? '_es' : '_en';
689  return document.getElementById(`${baseId}${suffix}`)?.value || '';
690}
691
692/**
693 * Badge management for products
694 */
695const ProductBadges = {
696  /**
697   * Set badges on product element
698   * @param {Object} product - Product data
699   * @param {HTMLElement} productElement - Product element
700   */
701  set: (product, productElement) => {
702    var $badgeWrapper = `<div class="${SELECTORS.BADGES_WRAPPER.substring(1)}"></div>`;
703
704    if (productElement.querySelectorAll(SELECTORS.BADGES_WRAPPER).length === 0) {
705      productElement.querySelector(SELECTORS.IMAGE_WRAPPER).insertAdjacentHTML('afterBegin', $badgeWrapper);
706    }          
707
708    if (ProductBadges.isOnSale(product)) {
709      const label = getLocalizedText(TEXT.ON_SALE);
710      ProductBadges.addLabel(productElement, `<span class="${SELECTORS.PRODUCT_BADGE.substring(1)} sale">${label}</span>`);
711    }
712  },
713  
714  /**
715   * Add a label to product element
716   * @param {HTMLElement} productElement - Product element
717   * @param {string} promoLabel - HTML for promo label
718   */
719  addLabel: (productElement, promoLabel) => {
720    const label = productElement.querySelector(SELECTORS.PRODUCT_BADGE);
721    if (label) {
722      label.remove();
723    }
724    productElement.querySelector(SELECTORS.BADGES_WRAPPER).insertAdjacentHTML('afterBegin', promoLabel);
725  },
726  
727  /**
728   * Check if product is sold out
729   * @param {Object} product - Product data
730   * @returns {boolean} True if sold out
731   */
732  isSoldOut: (product) => {
733    return ("isSoldOut" in product && product.isSoldOut);
734  },
735  
736  /**
737   * Check if product is on sale
738   * @param {Object} product - Product data
739   * @returns {boolean} True if on sale
740   */
741  isOnSale: (product) => {
742    const originalPrice = parseFloat(product.price);
743    const price = parseFloat(product.comparePrice);
744
745    return price && originalPrice && originalPrice > 0 && price > 0 && price > originalPrice;
746  }
747};
748
749/**
750 * Get first image URL for a specific color variant
751 * @param {Object} product - Product data
752 * @param {string} colorName - Color name to find
753 * @returns {string|null} Image URL or null if not found
754 */
755function getFirstImageURLByColor(product, colorName) {
756  if (!Array.isArray(product?.alt)) {
757    return product.imageURL || null;
758  }
759
760  for (const variant of product.alt) {
761    if (variant[0]?.toLowerCase() === colorName.toLowerCase()) {
762      return variant[3]?.t?.[0] || null;
763    }
764  }
765
766  return null; // if color not found
767}
768
769// ============================================================
770// SEARCH AND FILTER HOOKS
771// ============================================================
772
773/**
774 * Register all hooks for search and product display enhancement
775 */
776function registerSearchHooks() {
777  // Currency display in filters
778  window.SerpOptions.registerHook("serp-filters", ({ facets, element }) => {  
779    // Replace "USD"/"CAD" with "$" in filter options
780    const allFilterGroups = element.querySelectorAll(SELECTORS.CATEGORY_ITEMS);      
781    allFilterGroups.forEach(filterGroup => {
782      const options = filterGroup.querySelectorAll(SELECTORS.FILTER_NAME);
783      options.forEach(option => {
784        if (option.textContent.trim() === TEXT.USD || option.textContent.trim() === TEXT.CAD) {
785          option.textContent = TEXT.DOLLAR_SIGN;
786        }
787      });
788    });
789    
790    // Apply French translations to sorting options
791    if (isFrenchPage()) {
792      const sortGroups = element.querySelectorAll(SELECTORS.SORT_OPTIONS);      
793      sortGroups.forEach(sortGroup => {
794        const options = sortGroup.querySelectorAll(SELECTORS.SORT_FILTER_TEXT);
795        options.forEach(option => {
796          const text = option.textContent.trim();
797          if (SORT_TRANSLATIONS[text]) {
798            option.textContent = SORT_TRANSLATIONS[text];
799          }               
800        });
801      });
802
803      const productTypeFilter = element.querySelector('[id="fs_filter_product type"]');
804      if (!productTypeFilter) return;
805
806      productTypeFilter.querySelectorAll(".fs-serp-filter-text").forEach((textEl) => {
807        const originalText = textEl.textContent.trim();
808
809        if (translations[originalText]) {
810          textEl.textContent = translations[originalText];
811        }
812      });
813
814      // Translate "Sorting" to "Trier"
815      element.querySelectorAll(SELECTORS.CATEGORY_TITLE).forEach(el => {
816        const firstSpan = el.querySelector("span");
817        if (firstSpan && firstSpan.textContent.trim() === TEXT.SORTING.EN) {
818          firstSpan.textContent = TEXT.SORTING.FR;
819        }
820      });
821    }
822
823    // Add custom "Fit" filter from collection links
824    const collectionItems = document.querySelectorAll(SELECTORS.COLLECTION_LINK);
825    if (!collectionItems.length) return;
826
827    if (element.querySelector(`.${CLASSES.CUSTOM_FILTER}`)) return;
828
829    // Create custom fit filter container
830    const container = document.createElement('div');
831    container.className = `category-container fs-category-container horizontal-category-container ${CLASSES.CUSTOM_FILTER}`;
832    container.dataset.filterId = 'Fit';
833    container.id = 'fs_filter_fit';
834  
835    container.innerHTML = `
836      <div class="category-title-wrapper fs-category-title-wrapper">
837        <div class="category-title fs-category-title">
838          <span>${TEXT.FIT_TITLE}</span>
839          <span class="title-arrow fs-category-title-arrow">
840            <div>
841              <svg width="14px" height="14px" aria-hidden="true" focusable="false" class="arrow svelte-1n41ehv rotate" style="color:black" data-prefix="fas" data-icon="chevron-down" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
842                <path fill="currentColor" d="M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"></path>
843              </svg>
844            </div>
845          </span>
846        </div>
847      </div>
848      <div class="category-items ${CLASSES.COLLAPSED}"></div>
849    `;
850  
851    const itemsWrapper = container.querySelector('.category-items');
852  
853    // Add collection items as filter options
854    collectionItems.forEach(link => {
855      const title = link.querySelector(SELECTORS.PRODUCT_TITLE)?.innerText?.trim();
856      const url = link.getAttribute('href');
857      if (title && url) {
858        const spanWrapper = document.createElement('span');
859        const filterOption = document.createElement('span');
860        filterOption.className = 'filters-option-text fs-serp-filter-text';
861        filterOption.textContent = title;
862  
863        filterOption.addEventListener('click', () => {
864          window.location.href = url;
865        });
866  
867        spanWrapper.appendChild(filterOption);
868        itemsWrapper.appendChild(spanWrapper);
869      }
870    });      
871
872    // Add toggle functionality
873    const titleWrapper = container.querySelector('.category-title-wrapper');
874    titleWrapper.addEventListener('click', () => {
875      itemsWrapper.classList.toggle(CLASSES.COLLAPSED);
876    });
877
878    // Insert at the beginning of the target container
879    if (element) {
880      element.insertBefore(container, element.firstChild);
881    }
882  });
883
884  // Quick view color swatches
885  window.SerpOptions.registerHook("serp-quick-view", ({product, index, onClose, mode, element}) => {      
886    var allColorSwatches = element.querySelectorAll(SELECTORS.COLOR_SWATCHES);
887
888    if (allColorSwatches.length > 0) {
889      allColorSwatches.forEach(function (swatchContainer) {
890        let colorName = swatchContainer.querySelector(SELECTORS.COLOR_NAME).innerHTML.toLowerCase();
891        let swatch = swatchContainer.querySelector(SELECTORS.COLOR_SWATCH);
892
893        const imageURL = getFirstImageURLByColor(product, colorName);
894                  
895        if (imageURL && swatch.style.backgroundColor === '' || swatch.style.backgroundColor !== swatchContainer.querySelector(SELECTORS.COLOR_NAME).innerHTML.toLowerCase()) {
896          swatch.style.backgroundImage = "url("+imageURL+")";
897        }
898      });
899    }
900  });
901
902  // Product color swatches display
903  window.SerpOptions.registerHook("serp-product-swatches", ({colors, swatchClick, showMoreClick, element}) => { 
904    const parent = element?.closest('.product-content');
905    
906    // Add total colors count
907    if ((colors.length > 1) && (parent.querySelectorAll(SELECTORS.TOTAL_COLORS_COUNT).length === 0)) {
908      const label = getLocalizedText(TEXT.COLORS_TEXT);
909      parent.insertAdjacentHTML(
910        'beforeend', 
911        `<span class="${SELECTORS.TOTAL_COLORS_COUNT.substring(1)}">${colors.length} ${label}</span>`
912      );
913    }
914  });
915  
916  // Filter tags display
917  window.SerpOptions.registerHook("serp-removable-tags", ({ tags, element }) => {      
918    if (element) {
919      const hasTags = element.querySelectorAll(SELECTORS.REMOVABLE_TAG_CONTAINER).length > 0;
920    
921      // Add class if there are tags
922      if (hasTags) {
923        element.classList.add(CLASSES.HAS_TAGS);
924      } else {
925        element.classList.remove(CLASSES.HAS_TAGS);
926      }
927
928      // Replace 'USD'/'CAD' with '$' in tag text
929      const allRemovableTags = element.querySelectorAll(SELECTORS.REMOVABLE_TAG_CONTAINER);
930      allRemovableTags.forEach(container => {
931        const tagText = container.querySelector(SELECTORS.REMOVABLE_TAG_TEXT);
932        if (tagText) {
933          if (tagText.textContent.includes(TEXT.USD)) {
934            tagText.textContent = tagText.textContent.replace(new RegExp(TEXT.USD, 'g'), TEXT.DOLLAR_SIGN);
935          }
936          if (tagText.textContent.includes(TEXT.CAD)) {
937            tagText.textContent = tagText.textContent.replace(new RegExp(TEXT.CAD, 'g'), TEXT.DOLLAR_SIGN);
938          }
939        }
940      });
941    }
942  });
943
944  // Product grid enhancement
945  window.SerpOptions.registerHook("serp-product-grid", ({products, element}) => {
946    
947    // Get settings from hidden inputs
948    const bogoMsg = getLocalizedSetting('settings_msg');
949    const settingsPattern1 = document.getElementById('settings_pattern1')?.value || '';
950    const settingsPattern2 = document.getElementById('settings_pattern2')?.value || '';
951    const settingsMsg1 = getLocalizedSetting('settings_msg1');
952    const settingsMsg2 = getLocalizedSetting('settings_msg2');
953    const msg1Coll = document.getElementById('msg1_coll')?.value || '';
954    const msg2Coll = document.getElementById('msg2_coll')?.value || '';
955    // Only accept real CSS color values (hex/rgb/hsl). Guards against the
956    // translation app rewriting empty settings into text on non-EN locales.
957    const colorRegex = /^(#|rgba?\(|hsla?\()/i;
958    const msg1Color = document.getElementById('msg1_color')?.value || '';
959    const msg1ColorCSS = colorRegex.test(msg1Color) ? msg1Color : 'var(--product-sale-price-color)';
960    const msg2Color = document.getElementById('msg2_color')?.value || '';
961    const msg2ColorCSS = colorRegex.test(msg2Color) ? msg2Color : 'var(--product-sale-price-color)';
962    
963    
964    for (const productElement of getProductElements(element)) {
965      const productID = productElement.dataset.productId;
966      const data = products[productID];               
967      const tags = data.tags;           
968
969      // Improve image quality
970      const img = productElement.querySelector(SELECTORS.IMG_CONTAINER);
971      if (img) {
972        const originalSrc = img.getAttribute('src');
973        const newSrc = originalSrc.replace(IMAGE_TRANSFORMS.LARGE_TO_2048.from, IMAGE_TRANSFORMS.LARGE_TO_2048.to);
974        img.setAttribute('src', newSrc);
975      }
976
977      // Add Quick view button
978      let itemUrl = data ? (data.productURL || '') : '';
979      let separator = itemUrl.includes('?') ? '&' : '?';
980      let quickViewText = getLocalizedText(TEXT.QUICK_VIEW);      
981
982      let quickViewUrl = isFrenchPage() ? `/fr${itemUrl}${separator}view=quick` : `${itemUrl}${separator}view=quick`;
983      
984      var quickBuy = `<a class="${CLASSES.PRODUCT_MODAL} Button Button--primary" href="${quickViewUrl}" role="button">${quickViewText}</a>`;
985                        
986      if (productElement.querySelectorAll(`.${CLASSES.PRODUCT_MODAL}`).length === 0) {
987        productElement.querySelector(SELECTORS.PRODUCT_IMAGE_LINK).insertAdjacentHTML('beforeend', quickBuy);
988        if(typeof $.fancybox == "function") {
989          jQuery(productElement).on( 'click', '.product-modal', function(e) {
990            e.preventDefault();
991            $.fancybox.close( true );
992            var url = jQuery(this).attr('href');
993            $.fancybox.open({
994              href: url,
995              helpers: {
996                overlay: {
997                  locked: true
998                }
999              },
1000              maxWidth: 920,
1001              width: "90%",
1002              minHeight: 525,
1003              height: 575,
1004              autoSize: false,
1005              showCloseButton : true,
1006              type: 'ajax',
1007              hideOnOverlayClick: true,
1008              afterShow: function () {
1009                document.dispatchEvent(new CustomEvent('theme:quickview:opened'));
1010                window.dispatchEvent(new Event('resize'));
1011              }
1012            });
1013          });
1014        }                
1015      }
1016
1017      // Check for messaging tags
1018      let bogoEnable = false;
1019      let msg1Enable = false;
1020      let msg2Enable = false;
1021      let dis1 = '';
1022      let dis2 = '';
1023
1024      if (tags && tags.length > 0) {
1025        for (let i = 0; i < tags.length; i++) {
1026          const tag = tags[i];
1027
1028          // Check for BOGO50 tag
1029          if (tag.indexOf("BOGO50") !== -1 || tag.indexOf("bogo50") !== -1) {
1030            bogoEnable = true;
1031          }
1032
1033          // Check for custom pattern 1
1034          if (settingsPattern1 !== "" && tag.indexOf(settingsPattern1) !== -1) {
1035            msg1Enable = true;
1036            dis1 = tag.replace(settingsPattern1, "");
1037          }
1038
1039          // Check for custom pattern 2
1040          if (settingsPattern2 !== "" && tag.indexOf(settingsPattern2) !== -1) {
1041            msg2Enable = true;
1042            dis2 = tag.replace(settingsPattern2, "");
1043          }
1044        }
1045      }
1046
1047      // Add BOGO message
1048      if (bogoEnable && bogoMsg && productElement.querySelectorAll('.bogomsg').length === 0) {
1049        const infoContainer = productElement.querySelector(SELECTORS.INFO_CONTAINER);
1050        if (infoContainer) {
1051          infoContainer.insertAdjacentHTML('beforeend', `<h2 class="ProductItem__Title Heading bogomsg" style="color: var(--product-sale-price-color) !important; font-size: 12px !important; width: 100%">${bogoMsg}</h2>`);
1052        }
1053      }
1054
1055      // Add custom message 1
1056      if (msg1Coll === "true" && msg1Enable && settingsMsg1 && productElement.querySelectorAll('.message1').length === 0) {
1057        const infoContainer = productElement.querySelector(SELECTORS.INFO_CONTAINER);
1058        if (infoContainer) {
1059          const displayMsg1 = settingsMsg1.replace("%s", dis1);
1060          infoContainer.insertAdjacentHTML('beforeend', `<h2 class="ProductItem__Title Heading message1" style="color: ${msg1ColorCSS} !important; font-size: 12px !important; width: 100%">${displayMsg1}</h2>`);
1061        }
1062      }
1063
1064      // Add custom message 2
1065      if (msg2Coll === "true" && msg2Enable && settingsMsg2 && productElement.querySelectorAll('.message2').length === 0) {
1066        const infoContainer = productElement.querySelector(SELECTORS.INFO_CONTAINER);
1067        if (infoContainer) {
1068          const displayMsg2 = settingsMsg2.replace("%s", dis2);
1069          infoContainer.insertAdjacentHTML('beforeend', `<h2 class="ProductItem__Title Heading message2" style="color: ${msg2ColorCSS} !important; font-size: 12px !important; width: 100%">${displayMsg2}</h2>`);
1070        }
1071      }
1072
1073      // Add promo text (e.g., "25% OFF WITH CODE ONEFAVE")            
1074      const promoTag = tags.find(tag => tag.startsWith(TAG_PREFIXES.PROMO));
1075      const promoValue = promoTag ? promoTag.slice(TAG_PREFIXES.PROMO.length) : null;
1076
1077      if (promoValue) {
1078        if (productElement.querySelectorAll(`.${CLASSES.PROMO_LABEL}`).length === 0) {
1079          productElement.querySelector(SELECTORS.INFO_CONTAINER).insertAdjacentHTML('afterend', `<div class="${CLASSES.PROMO_LABEL}">${promoValue}</div>`);
1080        }
1081      }  
1082
1083      // MSRP price
1084      const msrpTag = tags.find(tag => tag.startsWith(TAG_PREFIXES.MSRP));
1085      const msrpPrice = msrpTag ? msrpTag.slice(TAG_PREFIXES.MSRP.length) : null;
1086
1087      if (msrpPrice) {
1088        const compareElement = productElement.querySelector(".compare-container .compare");
1089        if (compareElement) {
1090          compareElement.textContent = msrpPrice;
1091        }
1092      }  
1093      
1094      // Remove "CAD" from price display
1095      const priceEl = productElement.querySelector(SELECTORS.PRICE_ELEMENT);
1096      if (priceEl) {
1097        stripCurrencyText(priceEl);
1098      }
1099
1100      const comparepriceEl = productElement.querySelector(SELECTORS.COMPARE_ELEMENT);
1101      if (comparepriceEl) {
1102        stripCurrencyText(comparepriceEl);
1103      }
1104
1105      // Reviews: show the total review count instead of the average score
1106      // (Fast Simon renders the score in .fs-reviews-avg; hooks re-fire on every
1107      // update, so this is idempotent - it only rewrites when the text differs)
1108      const reviewsAvg = productElement.querySelector(SELECTORS.REVIEWS_AVG);
1109      const reviewCount = Number(data?.reviewCount);
1110      if (reviewsAvg && Number.isFinite(reviewCount) && reviewCount > 0) {
1111        //const reviewLabel = getLocalizedText(reviewCount === 1 ? TEXT.REVIEW_SINGULAR : TEXT.REVIEW_PLURAL);
1112        //const reviewCountText = `${reviewCount} ${reviewLabel}`;
1113        const reviewCountText = `${reviewCount}`;
1114        if (reviewsAvg.textContent !== reviewCountText) {
1115          reviewsAvg.textContent = reviewCountText;
1116        }
1117      }
1118
1119      
1120
1121      // Add badges
1122      ProductBadges.set(data, productElement);
1123    }
1124  });
1125}
1126
1127// ============================================================
1128// CAROUSEL AND UPSELL FUNCTIONS
1129// ============================================================
1130
1131/**
1132 * Enables horizontal scrolling for carousel elements
1133 * @param {HTMLElement} parent - Parent element containing the carousel
1134 */
1135function horizontalScrollHandler(parent) {
1136  let mouseDown = false;
1137  let startX, scrollLeft;
1138  let dragged = false; // Track if dragging happened
1139  const slider = parent.querySelector(SELECTORS.CAROUSEL_CONTAINER);
1140  
1141  if (!slider) return;
1142  
1143  const startDragging = (e) => {
1144    mouseDown = true;
1145    startX = e.pageX - slider.offsetLeft;
1146    scrollLeft = slider.scrollLeft;
1147    dragged = false; // Reset dragged state
1148    slider.classList.add(CLASSES.DRAGGING); // Add a class during dragging
1149  };
1150  
1151  const stopDragging = (e) => {
1152    if (!mouseDown) return;
1153    mouseDown = false;
1154    slider.classList.remove(CLASSES.DRAGGING); // Remove class after dragging
1155    if (!dragged) {
1156      // Consider it a click if not dragged
1157      e.target.click(); // Simulate a click if needed
1158    }
1159  };
1160  
1161  const move = (e) => {
1162    if (!mouseDown) return;
1163    e.preventDefault();
1164    const x = e.pageX - slider.offsetLeft;
1165    const scroll = x - startX;
1166    if (Math.abs(scroll) > 5) { // Threshold to differentiate drag from click
1167      dragged = true; // Mark as dragged if movement exceeds threshold
1168    }
1169    slider.scrollLeft = scrollLeft - scroll;
1170  };
1171
1172  // Add the event listeners
1173  slider.addEventListener('mousemove', move, false);
1174  slider.addEventListener('mousedown', startDragging, false);
1175  slider.addEventListener('mouseup', stopDragging, false);
1176  slider.addEventListener('mouseleave', stopDragging, false);
1177
1178  // Prevent text selection during dragging
1179  slider.addEventListener('dragstart', (e) => e.preventDefault());
1180  
1181  // Prevent the click event if dragging occurred
1182  slider.addEventListener('click', (e) => {
1183    if (dragged) {
1184      e.preventDefault();
1185      e.stopImmediatePropagation();
1186      dragged = false; // Reset dragged state after handling
1187    }
1188  }, true); // Use capture phase to intercept before other click handlers
1189}
1190
1191function Getattributevalue(att,name) {
1192    if ( typeof(att) !== "undefined" && att !== null ) {
1193       for (let key in att) {
1194            if (att[key][0] === name){
1195                return att[key][1][0];
1196            }
1197        }
1198    }
1199
1200    return "";
1201}
1202
1203/**
1204 * Register hooks for the upsell widget
1205 */
1206function registerUpsellHooks() {
1207
1208  
1209  window.FastRecommendationWidget.registerHook("upsell-product-swatches", ({colors, swatchClick, showMoreClick, element}) => {
1210    const parent = element?.closest('.fs-recommendation-product-info');    
1211    
1212    // Add total colors count
1213    if ((colors.length > 1) && (parent.querySelectorAll('.fs_total_colors_count').length === 0)) {
1214      parent.insertAdjacentHTML('beforeend', `<span class="fs_total_colors_count">${colors.length} Colors</span>`);
1215    }
1216
1217  });
1218
1219  window.FastRecommendationWidget.registerHook('upsell-cross-sell-products', ({products, element}) => {
1220
1221    if(element?.parentElement?.parentElement?.parentElement?.getAttribute('id') !== `fast-simon-new-upsell-${UPSELL_WIDGET_ID}`) {
1222      horizontalScrollHandler(element);
1223      const productElements = [...element.querySelectorAll(SELECTORS.UPSELL_PRODUCT)];
1224      
1225      // Helper: remove trailing "CAD" (with or without preceding space)
1226      const stripCAD = (el) => {
1227        if (!el) return;
1228        stripCurrencyText(el);
1229      };
1230
1231
1232      for (const productElement of productElements) {
1233        const productID = productElement.dataset.id;
1234        const data = products[productID];                    
1235
1236        /* Add Quick view */
1237        let itemUrl = data ? (data.productURL || '') : '';
1238        let separator = itemUrl.includes('?') ? '&' : '?';
1239        let quickViewText = getLocalizedText(TEXT.QUICK_VIEW);
1240        let quickViewUrl = isFrenchPage() ? `/fr${itemUrl}${separator}view=quick` : `${itemUrl}${separator}view=quick`;        
1241        
1242        var quickBuy = `<a class="${CLASSES.PRODUCT_MODAL} Button Button--primary" href="${quickViewUrl}" role="button">${quickViewText}</a>`;
1243                        
1244        if (productElement.querySelectorAll(`.${CLASSES.PRODUCT_MODAL}`).length === 0) {
1245          productElement.querySelector(SELECTORS.UPSELL_IMAGE_CONTAINER).insertAdjacentHTML('afterend', quickBuy);
1246        }
1247
1248        /* set title from a metafield */
1249        var $customtitle = Getattributevalue(data.attributes,"Custom.site title");
1250
1251        if ($customtitle.length > 0) {
1252           const nameElement = productElement.querySelector(".fs-recommendation-product-name-wrapper");
1253
1254          if (nameElement) {
1255            nameElement.textContent = $customtitle;
1256          }
1257        }
1258
1259        /* Remove "CAD" from price elements */
1260        // Regular price
1261        const priceEl = productElement.querySelector(SELECTORS.UPSELL_PRICE);
1262        stripCAD(priceEl);
1263
1264        // Compare price
1265        const compareEl = productElement.querySelector(SELECTORS.UPSELL_COMPARE_PRICE);
1266        stripCAD(compareEl);
1267      }
1268    }
1269  });
1270}
1271
1272// ============================================================
1273// MINI CART MANAGEMENT
1274// ============================================================
1275
1276/**
1277 * Manages the observation and manipulation of a website's mini-cart.
1278 */
1279class MiniCartManager {
1280  /**
1281   * Initializes the manager's state.
1282   */
1283  constructor() {
1284    // Stores active MutationObserver instances, keyed by a unique identifier.
1285    this.observers = new Map();
1286    // Stores the last known count for each observed cart count element.
1287    this.lastCounts = {};
1288  }
1289
1290  /**
1291   * Observes a mini-cart element for visibility changes based on its 'aria-hidden' attribute.
1292   * @param {string} selector - The CSS selector for the element to observe.
1293   * @param {function} [onOpen] - A callback to run when the element becomes visible.
1294   * @param {function} [onClose] - A callback to run when the element becomes hidden.
1295   * @returns {MutationObserver | undefined} The observer instance or undefined if the element isn't found.
1296   */
1297  observeMiniCart(selector, onOpen, onClose) {
1298    const targetNode = document.querySelector(selector);
1299    if (!targetNode) {
1300      console.error(`Element with selector "${selector}" not found.`);
1301      return;
1302    }
1303
1304    const observer = new MutationObserver((mutationsList) => {
1305      for (const mutation of mutationsList) {
1306        if (mutation.type === 'attributes' && mutation.attributeName === 'aria-hidden') {
1307          const isHidden = targetNode.getAttribute('aria-hidden') === 'true';
1308          if (isHidden) {
1309            if (onClose) onClose();
1310          } else {
1311            if (onOpen) onOpen();
1312          }
1313        }
1314      }
1315    });
1316
1317    observer.observe(targetNode, {
1318      attributes: true,
1319      attributeFilter: ['aria-hidden'],
1320    });
1321
1322    const observerKey = `minicart-${selector}`;
1323    this.observers.set(observerKey, observer);
1324    console.log(`Observer started for mini-cart: ${selector}`);
1325    return observer;
1326  }
1327
1328  /**
1329   * Observes a cart count element for changes in its text content.
1330   * @param {string} selector - The CSS selector for the element containing the cart count.
1331   * @param {function} onUpdate - A callback that receives the new count as an argument.
1332   * @returns {MutationObserver | undefined} The observer instance or undefined if the element isn't found.
1333   */
1334  observeCartCount(selector, onUpdate) {
1335    const targetNode = document.querySelector(selector);
1336    if (!targetNode) {
1337      console.error(`Cart count observer failed: Element with selector "${selector}" not found.`);
1338      return;
1339    }
1340
1341    const observer = new MutationObserver(() => {
1342      const textContent = targetNode.textContent || '';
1343      const match = textContent.match(/\d+/); // Extract the first sequence of digits.
1344      const newCount = match ? parseInt(match[0], 10) : 0;
1345
1346      if (!isNaN(newCount) && newCount !== this.lastCounts[selector]) {
1347        this.lastCounts[selector] = newCount;
1348        onUpdate(newCount);
1349      }
1350    });
1351
1352    observer.observe(targetNode, {
1353      childList: true,
1354      subtree: true,
1355      characterData: true,
1356    });
1357
1358    const observerKey = `cartcount-${selector}`;
1359    this.observers.set(observerKey, observer);
1360    console.log(`Observer started for cart count: ${selector}`);
1361    return observer;
1362  }
1363
1364  /**
1365   * Creates and inserts a widget into a target element in the DOM.
1366   * @param {object} options - The options for inserting the widget.
1367   * @returns {HTMLElement | null} The widget element or null if the target is not found.
1368   */
1369  insertWidget({ widgetId, targetSelector, uuid, storeId, updateWidget }) {
1370    const parentElement = document.querySelector(targetSelector);
1371    if (!parentElement) {
1372      console.error(`Error: Could not find target element with selector "${targetSelector}".`);
1373      return null;
1374    }
1375
1376    let widgetElement = document.querySelector(`.fast-simon-new-upsell-${widgetId}`);
1377
1378    if (!widgetElement) {
1379      widgetElement = document.createElement('div');
1380      widgetElement.className = `fast-simon-new-upsell-${widgetId}`;
1381      widgetElement.setAttribute('data-settings', 'FAST_UPSELL_CONFIG');
1382      widgetElement.style.cssText = "display: block;  min-height: 300px;z-index: -2;";
1383
1384      const widgetScript = document.createElement("script");
1385      widgetScript.src = `https://static-recommendations.fastsimon.com/no-code-recommendations/fs-recommendations-init.js?uuid=${uuid}&store_id=${storeId}&widgetId=${widgetId}`;
1386      widgetScript.async = true;
1387
1388      parentElement.appendChild(widgetElement);
1389
1390      setTimeout(() => { document.head.appendChild(widgetScript); }, 300);
1391      if (updateWidget) setTimeout(updateWidget, 500);
1392
1393    } else {
1394      widgetElement.style.display = "block";
1395      parentElement.appendChild(widgetElement);
1396    }
1397
1398    console.log(`Widget ${widgetId} inserted into ${targetSelector}.`);
1399    return widgetElement;
1400  }
1401
1402  /**
1403   * Disconnects a specific observer by its key.
1404   * @param {string} key - The unique key for the observer to disconnect.
1405   */
1406  disconnect(key) {
1407    if (this.observers.has(key)) {
1408      this.observers.get(key).disconnect();
1409      this.observers.delete(key);
1410      console.log(`Observer disconnected: ${key}`);
1411    }
1412  }
1413
1414  /**
1415   * Disconnects all active observers managed by this instance.
1416   */
1417  disconnectAll() {
1418    for (const [key, observer] of this.observers.entries()) {
1419      observer.disconnect();
1420      console.log(`Observer disconnected: ${key}`);
1421    }
1422    this.observers.clear();
1423  }
1424}
1425
1426function applySnippetResponsive(snippetElement) {
1427  let topValue;
1428  console.log('window.innerWidth', window.innerWidth)
1429  if (window.innerWidth <= 360) {
1430    // small mobile
1431    topValue = 'calc(100% - 460px)';
1432  } 
1433  else if (window.innerWidth <= 430) {
1434    // small mobile
1435    topValue = 'calc(100% - 505px)';
1436  } 
1437  else if (window.innerWidth <= 480) {
1438    // small mobile
1439    topValue = 'calc(100% - 505px)';
1440  } else if (window.innerWidth <= 768) {
1441    // larger mobile / small tablet
1442    topValue = 'calc(100% - 505px)';
1443  } else if (window.innerWidth <= 1024) {
1444    // tablet
1445    topValue = 'calc(100% - 487px)';
1446  } else { 
1447    // desktop
1448    topValue = 'calc(100% - 487px)';
1449  }
1450  snippetElement.style.height = "unset"
1451  snippetElement.style.position = 'absolute';
1452  snippetElement.style.left = '0';
1453  snippetElement.style.width = '100%';
1454  snippetElement.style.top = topValue;
1455  snippetElement.style.borderWidth = '1px';
1456  snippetElement.style.borderStyle =  "solid";
1457  snippetElement.style.borderColor = "#dddddd";
1458}
1459function applyDrawerResponsive(drawerContainer) {
1460  let topValue;
1461
1462  if (window.innerWidth <= 360) {
1463    // small mobile
1464    topValue = 'calc(100% - 330px)';
1465  } 
1466  else if (window.innerWidth <= 430) {
1467    // small mobile
1468    topValue = 'calc(100% - 495px)';
1469  } 
1470  else if (window.innerWidth <= 480) {
1471    // small mobile
1472    topValue = 'calc(100% - 485px)';
1473  } else if (window.innerWidth <= 768) {
1474    // larger mobile / small tablet
1475    topValue = 'calc(100% - 455px)';
1476  } else if (window.innerWidth <= 1024) {
1477    // tablet
1478    topValue = 'calc(100% - 420px)';
1479  } else {
1480    // desktop
1481    topValue = 'calc(100% - 420px)';
1482  }
1483  drawerContainer.style.height = topValue;
1484}
1485function applyDrawerFooterResponsive(drawerFooter) {
1486  
1487  drawerFooter.style.paddingBottom = "5px";
1488  drawerFooter.style.paddingTop = "5px";
1489}
1490/**
1491 * Positions the upsell widget below a specified container
1492 * @param {string} containerSelector - Selector for the container element
1493 * @param {HTMLElement} snippetElement - Element to position below the container
1494 */
1495const insertBelowSelector = (containerSelector, snippetElement) => {
1496  // Find the main minicart context
1497  const miniCartElement = document.querySelector(window.__fast_options.upsell_widgets_minicart[UPSELL_WIDGET_ID].minicartSelector);
1498  const drawerContainer = miniCartElement.querySelector(SELECTORS.DRAWER_MAIN);
1499  const drawerFooter = miniCartElement.querySelector(SELECTORS.DRAWER__FOOTER);
1500
1501  applyDrawerResponsive(drawerContainer);
1502  applyDrawerFooterResponsive(drawerFooter);
1503  // Find the container element within the minicart
1504  const containerElement = miniCartElement ? miniCartElement.querySelector(containerSelector) : null;
1505
1506  // Check if both elements were found
1507  if (!containerElement) {
1508    console.error(`Error: Container with selector "${containerSelector}" not found.`);
1509    return;
1510  }
1511  
1512  if (!snippetElement) {
1513    console.error("Error: The snippet element to display was not provided.");
1514    return;
1515  }
1516
1517  // Apply positioning styles
1518  // Make the container a positioning context
1519  containerElement.style.position = 'relative';
1520
1521  // Position the snippet absolutely within the container
1522  applySnippetResponsive(snippetElement)
1523
1524    if (snippetElement) {
1525    snippetElement.style.zIndex = "0";
1526  }
1527  
1528  // Also ensure the snippet is visible
1529  snippetElement.style.display = 'block'; 
1530};
1531
1532/**
1533 * Refreshes the Fast Simon mini cart upsell widget
1534 */
1535
1536// ============================================================
1537// INITIALIZATION
1538// ============================================================
1539
1540/**
1541 * Initialize search and filters functionality
1542 */
1543if (window.SerpOptions) {
1544  registerSearchHooks();
1545} else {
1546  window.addEventListener('fast-serp-ready', function () {
1547    registerSearchHooks();
1548  });
1549}
1550
1551/**
1552 * Initialize upsell widgets functionality
1553 */
1554if (window.FastRecommendationWidget) {
1555  registerUpsellHooks();
1556} else {
1557  window.addEventListener('fast-upsell-cross-sell-ready', function () {
1558    
1559    registerUpsellHooks();
1560  });
1561}
1562
1563/**
1564 * Initialize mini-cart observers
1565 */
1566
1567
1568const refreshFastSimonMiniCart = () =>{
1569  if(window?.langify?.locale?.language_id?.length > 1 && window?.FS_CUSTOM_WIDGET_MAPPINGS) {
1570    window.FS_UPSELL_WIDGET_ID_LANGIFY = window?.FS_CUSTOM_WIDGET_MAPPINGS[UPSELL_WIDGET_ID]?.[`e61aafd9-48c9-4c24-99db-7d62fca2b81f-${window?.langify?.locale?.language_id?.slice?.(2,
1570window?.langify?.locale?.language_id?.length)}`]
1571  }
1572    console.log('upsellWidget_2', window.FS_UPSELL_WIDGET_ID_LANGIFY, window.FS_UPDATE_WIDGET_PRODUCT_LIST)
1573
1574 if(window.FS_UPDATE_WIDGET_PRODUCT_LIST) {
1575  window.FS_UPDATE_WIDGET_PRODUCT_LIST({forceGetProducts: true, widgetIdLangify: FS_UPSELL_WIDGET_ID_LANGIFY});
1576    const upsellWidget = document.querySelector(`.fast-simon-new-upsell-${UPSELL_WIDGET_ID}`);
1577    if(upsellWidget) {
1578    insertBelowSelector('#fs-upsell-mini-cart-section',upsellWidget)
1579    }
1580} else {
1581    const upsellWidget = document.querySelector(`.fast-simon-new-upsell-${UPSELL_WIDGET_ID}`);
1582    if(upsellWidget) {
1583    insertBelowSelector('#fs-upsell-mini-cart-section',upsellWidget)
1584    }
1585}
1586}
1587document.addEventListener("DOMContentLoaded", function() {
1588  // Create an instance of the cart manager
1589  const cartManager = new MiniCartManager();
1590  
1591  // Observe the mini-cart's visibility
1592  cartManager.observeMiniCart(
1593    window.__fast_options.upsell_widgets_minicart[UPSELL_WIDGET_ID].minicartSelector,
1594    () => {setTimeout(refreshFastSimonMiniCart, 400)},
1595    () => console.log('Mini-cart was closed.')
1596  );
1597
1598  // Observe the cart item count
1599  cartManager.observeCartCount(
1600    SELECTORS.CART_ICON,
1601    (newCount) => {
1602      setTimeout(refreshFastSimonMiniCart, 400);
1603    }
1604  );
1605});
1606
1607/**
1608 * Creates and manages a centered modal for the Fast Simon upsell widget.
1609 * This script injects HTML/CSS, waits for the widget to exist, and shows the modal on add-to-cart (not page load).
1610 */
1611document.addEventListener("DOMContentLoaded", function() {
1612
1613  // Store initial cart count to prevent modal from opening on page load
1614  let initialCartCount = Number(document?.querySelector?.(SELECTORS.CART_COUNT)?.innerText ?? -1); 
1615
1616  // --- 1. Dynamically Inject CSS (MODIFIED FOR CENTERING) ---
1617  const injectModalCSS = () => {
1618    const css = `
1619      .upsell-modal-overlay {
1620        display: none;
1621        position: fixed;
1622        top: 0;
1623        left: -200px;
1624        width: 100%;
1625        height: 100%;
1626        background-color: rgba(0, 0, 0, 0.6);
1627        justify-content: center; /* Horizontally center */
1628        align-items: center; /* Vertically center */
1629        z-index: 1000;
1630      }
1631      .upsell-modal-overlay.is-open {
1632        display: flex;
1633      }
1634      .upsell-modal-content {
1635        background-color: #fff;
1636        border-radius: 8px;
1637        position: relative;
1638        
1639        
1640        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
1641        animation: modal-fade-in 0.3s ease; /* Use fade-in animation */
1642        max-height: 90vh; /* Prevent modal from being too tall */
1643        overflow-y: auto; /* Add scroll if content overflows */
1644      }
1645      .upsell-modal-close-button {
1646        position: absolute;
1647        top: 10px;
1648        right: 15px;
1649        background: none;
1650        border: none;
1651        font-size: 28px;
1652        line-height: 1;
1653        cursor: pointer;
1654        color: #333;
1655      }
1656      @keyframes modal-fade-in {
1657        from { opacity: 0; transform: scale(0.95); }
1658        to { opacity: 1; transform: scale(1); }
1659      }
1660      /* Ensure the widget adapts to the modal's size */
1661      #upsell-modal-body > * {
1662        max-width: 100%;
1663      }
1664    `;
1665    const styleSheet = document.createElement("style");
1666    styleSheet.type = "text/css";
1667    styleSheet.innerText = css;
1668    document.head.appendChild(styleSheet);
1669    console.log("DEBUG: Centered Modal CSS injected.");
1670  };
1671
1672  // --- 2. Dynamically Create the Modal HTML ---
1673  // This part remains unchanged
1674  const createModalHTML = () => {
1675    if (document.getElementById('upsell-modal')) return;
1676    const modal = document.createElement('div');
1677    modal.id = 'upsell-modal';
1678    modal.className = 'upsell-modal-overlay';
1679    const content = document.createElement('div');
1680    content.className = 'upsell-modal-content';
1681    const closeButton = document.createElement('button');
1682    closeButton.id = 'upsell-modal-close';
1683    closeButton.className = 'upsell-modal-close-button';
1684    closeButton.setAttribute('aria-label', 'Close modal');
1685    closeButton.innerHTML = '&times;';
1686    const body = document.createElement('div');
1687    body.id = 'upsell-modal-body';
1688    content.appendChild(closeButton);
1689    content.appendChild(body);
1690    modal.appendChild(content);
1691    document.body.appendChild(modal);
1692    console.log("DEBUG: Modal HTML created.");
1693  };
1694
1695  // --- 3. Main Logic to Find Widget and Set Up Modal ---
1696  // This part remains unchanged
1697  const initializeUpsellModal = () => {
1698    const upsellWidgetId = `fast-simon-new-upsell-${UPSEL_WIDGET_ID_MODAL}`;
1699    const modal = document.getElementById('upsell-modal');
1700    
1701    if (!modal) {
1702        console.error("DEBUG: Modal container not found. Cannot proceed.");
1703        return;
1704    }
1705    
1706    const upsellWidget = document.getElementById(upsellWidgetId);
1707    
1708    if (!upsellWidget) {
1709        console.error(`DEBUG: Upsell widget with ID '${upsellWidgetId}' not found in the DOM.`);
1710        return;
1711    }
1712    
1713    console.log("DEBUG: Upsell widget found! Initializing modal logic.");
1714    
1715    const modalBody = document.getElementById('upsell-modal-body');
1716    const closeModalButton = document.getElementById('upsell-modal-close');
1717    modalBody.appendChild(upsellWidget);
1718
1719    const openModal = () => {
1720        console.log("DEBUG: openModal() called.");
1721        document?.getElementById?.(`fast-simon-new-upsell-${UPSEL_WIDGET_ID_MODAL}`)?.querySelector?.(".dotsContainer > div:first-child")?.click()
1722        modal.classList.add('is-open');
1723    };
1724    const closeModal = () => modal.classList.remove('is-open');
1725
1726    closeModalButton.addEventListener('click', closeModal);
1727    modal.addEventListener('click', (event) => {
1728        if (event.target === modal) closeModal();
1729    });
1730
1731    const cartManager = new MiniCartManager();
1732    const cartCountSelector = window.__fast_options.upsell_widgets_minicart[UPSELL_WIDGET_ID].cartCountSelector;
1733
1734    cartManager.observeCartCount(
1735        SELECTORS.CART_ICON,
1736        (newCount) => {
1737          console.log('newCount', initialCartCount,newCount )
1738            if (initialCartCount === -1 && newCount <= 0) {
1739                initialCartCount = newCount;
1740                console.log(`DEBUG: Initial cart count set to ${initialCartCount}. Modal will not open on page load.`);
1741            } else if (newCount > initialCartCount) {
1742                console.log(`DEBUG: Cart count changed from ${initialCartCount} to ${newCount}. Opening upsell modal.`);
1743                if (window?.innerWidth > 768) { 
1744                  openModal();
1745                }
1746                initialCartCount = newCount; // Update count to prevent re-opening for the same item
1747                setTimeout(refreshFastSimonMiniCart, 400);
1748            } else if (newCount < initialCartCount) {
1749                initialCartCount = newCount;
1750            }
1751        }
1752    );
1753
1754    cartManager.observeMiniCart(
1755        window.__fast_options.upsell_widgets_minicart[UPSELL_WIDGET_ID].minicartSelector,
1756        () => { 
1757          console.log("DEBUG: Mini-cart was opened/refreshed.");
1758          setTimeout(refreshFastSimonMiniCart, 400); 
1759        },
1760        () => console.log('DEBUG: Mini-cart was closed.')
1761    );
1762  };
1763  
1764  // --- 4. Execution ---
1765  // This part remains unchanged
1766  injectModalCSS();
1767  createModalHTML();
1768
1769  const upsellWidgetId = `fast-simon-new-upsell-${UPSEL_WIDGET_ID_MODAL}`;
1770  const maxAttempts = 30;
1771  let attempts = 0;
1772  const interval = setInterval(() => {
1773    const upsellWidget = document.getElementById(upsellWidgetId);
1774    if (upsellWidget) {
1775        clearInterval(interval);
1776        initializeUpsellModal();
1777    } else {
1778        attempts++;
1779        if (attempts > maxAttempts) {
1780            clearInterval(interval);
1781            console.error("DEBUG: Timed out waiting for the upsell widget to appear.");
1782        }
1783    }
1784  }, 500);
1785
1786});
1787 </script>
1787
1788    <style>
1789h2.ProductItem__Title.Heading.message2, h2.ProductItem__Title.Heading.message1 {
1790    font-weight: bold !important;
1791    text-transform: capitalize !important;
1792}
1793.PageContent--narrow {
1794  max-width: 100% !important;
1795}
1796.Rte a:not(.Button) {
1797  border-bottom: none !important;
1798}  
1799.ProductList--carousel {
1800  display: none !important;
1801}  
1802.fs-page-title-container {
1803  margin-top: 40px;
1804  margin-bottom: 5px;
1805  font-weight: 700;
1806}  
1807  
1808.divider, .summaryWrapper {
1809  display: none !important;
1810}
1811
1812.fs-product-title {
1813  text-decoration: solid !important;
1814}
1815.fs-product-title {
1816  color: #151E4F !important;
1817  font-family: futura-pt, "Sans Serif" !important;
1818  font-size: 14px !important;
1819  line-height: 17.5px !important;
1820  text-transform: uppercase;  
1821  font-weight: 100 !important;
1822}
1823.fs-price, .fs-compare {
1824  color: #151E4F !important;
1825  font-family: futura-pt, "Sans Serif" !important;
1826  font-size: 16px !important;
1827  line-height: 17.5px !important;
1828  text-transform: uppercase;  
1829  font-weight: 100 !important;
1830}  
1831.fs-compare {
1832  margin-left: 10px;
1833}
1834
1835.fs-product-has-compare .fs-price {
1836  text-align: right !important; 
1837  color: #cd2428 !important;
1838}
1839
1840.fs-product-main-image-wrapper .image-container {
1841  aspect-ratio: 0.72 !important;
1842}
1843
1844.fs-product-has-compare .price {
1845  color: #F94C43;
1846}
1847
1848.classic-quick-view-container {
1849  align-items: flex-end !important;
1850}
1851
1852.classic-quick-view-wrapper {    
1853  background: #172342 !important;
1854  color: #fff !important;    
1855  width: 25%;
1856  min-height: 50px;
1857  padding: 15px;
1858  text-align: center;
1859  margin-bottom: 15px;
1860}
1861
1862.classic-quick-view-wrapper:hover {
1863  background: #3C5084 !important;
1864  color: #fff !important;
1865  border-color: #3C5084 !important;
1866}
1867
1868.classic-quick-view-text {
1869	text-transform: uppercase;
1870	font-family: futura-pt, "Sans Serif" !important;
1871    font-size: 14px !important;
1872    font-weight: 700 !important;
1873	line-height: 34px;
1874} 
1875  
1876.checkbox .checkbox-label {    
1877    line-height: 34px !important;  
1878	font-size: 14px !important;
1879    font-family: futura-pt, "Sans Serif" !important; 	
1880}
1881.checkmark {
1882  background-color: #fff !important;
1883  border: 1px solid #ccc; 
1884}
1885.checkbox .checkmark:after {
1886  border: solid #000 !important;
1887  border-width: 0 2px 2px 0 !important; 
1888}
1889.fs-selected-checkbox .filters-option-text {
1890  font-weight: 700;
1891}
1892  
1893@media screen and (min-width: 641px) {  
1894  .fs-app-content-left-block {
1895    border-top: 1px solid #ccc;
1896  }
1897  .filters-horizontal-container {
1898    justify-content: space-evenly !important;
1899  }
1900  .filters-container {
1901    position: relative;
1902    border-top: 1px solid #ccc !important;
1903    border-bottom: 1px solid #ccc !important;
1904  }
1905  .category-title {
1906    border-bottom: none !important;
1907    gap: 20px !important;
1908  	padding-top: 0px !important;
1909    padding-bottom: 0px !important;
1910    justify-content: center !important; 
1911  }
1912
1913  .horizontal-category-container {
1914    max-width: 100% !important;
1915    padding: 0px !important;
1916    border-right: 1px solid #ccc;
1917    align-items: center;
1918    margin-bottom: 0px !important;
1919	min-height: 60px;
1920  }
1921  .category-title-wrapper {
1922    padding-top: 20px;
1923  }  
1924  .text-badge {
1925    left: 10px !important;
1926    top: 10px !important;
1927    font-size: 12px !important;    
1928    padding: 8px 8px 5px !important;
1929  }
1930  .fs-promo-label {
1931    margin-bottom: 5px !important;
1932    font-size: 14px;
1933    color: black;
1934    text-transform: uppercase;
1935    font-weight: 700;
1936    font-family: futura-pt, "Sans Serif" !important;
1937  }
1938
1939  .horizontal-category-container .category-items:not(.collapsed) {
1940    min-width: 250px;
1941    max-height: fit-content !important;
1942    padding: 20px !important;
1943    border-radius: 8px;
1944    box-shadow: 0 0 6px #0000001f;
1945  }  
1946  .removable-tag-text {
1947    font-family: futura-pt, "Sans Serif" !important;
1948    font-size: 12px !important;
1949  }
1950  .clear-all-button {
1951    margin-bottom: 0px !important;
1952  }  
1953  .removable-tag {
1954      border: none !important;    
1955      opacity: 1 !important;
1956      background-color: #eaeaea !important;
1957      border-radius: 8px !important;
1958      margin-bottom: 0px !important;
1959      padding: 0px 5px !important;
1960  }  
1961  .removable-tags-wrapper {
1962      align-items: center;
1963  }
1964  .removable-tags-wrapper::before {
1965    content: "";
1966    visibility: hidden;
1967  }
1968  .removable-tags-wrapper.has-tags::before {
1969    visibility: visible;
1970    content: "REFINE BY ";
1971    font-weight: 700;
1972    color: #151E4F;
1973    margin-left: 15px;
1974    margin-right: 30px;
1975  }
1976}  
1977.text-badge {
1978    text-align: center;
1979    font-family: Inter !important;
1980    font-weight: 400 !important;
1981    font-style: normal;
1982    z-index: 1;
1983    color: #151E4F !important;
1984    background-color: #fff;
1985    text-transform: none;    
1986}
1987.fs-promo-label {    
1988  width: 100%;
1989  text-align: center;
1990}     
1991.results-query-wrapper {
1992  display: none !important; 
1993}
1994.info-container {
1995  align-items: start !important;  
1996  align-content: start !important;
1997}  
1998
1999@media (max-width: 575px) {  
2000  .fs-top-container-mobile {
2001    position: sticky;
2002    top: 50px;
2003    z-index: 9;
2004    background: #fff;
2005  }
2006  .text-badge {
2007    left: 5px !important;
2008    top: 5px !important;
2009    font-size: 10px !important;
2010    padding: 3px !important;
2011  }
2012  .fs-promo-label {
2013    margin-bottom: 5px !important;
2014    font-size: 12px;
2015    color: black;
2016    text-transform: uppercase;
2017    font-weight: 700;
2018    font-family: futura-pt, "Sans Serif" !important;
2019  }
2020  .buttons-block {    
2021    display: grid !important;
2022    grid-template-columns: repeat(2, 1fr);
2023    border: 1px solid #ccc;
2024  }
2025  .fs-top-bottom-right-block {
2026    justify-content: center;
2027  	border-left: 1px solid #ccc;
2028  }
2029  .category-title {    
2030    font-weight: 400 !important;
2031    padding-top: 10px !important;
2032    padding-bottom: 10px !important;
2033    margin-bottom: 10px !important;
2034  }
2035  .filters-button-wrapper, .selected-option {
2036    border: none !important;    
2037    font-size: 14px !important;
2038    letter-spacing: 1px !important;
2039    text-transform: uppercase;
2040    line-height: 1 !important;
2041    color: #1c1b1b !important;
2042  	font-weight: 500 !important;;
2043  	font-family: futura-pt, "Sans Serif" !important;
2044  }
2045
2046  .fs-product-title {
2047    font-size: 12px !important;
2048    text-align: left !important;
2049  }
2050
2051  .fs-top-container-mobile .removable-tags-wrapper {
2052    display: none !important;
2053  }
2054
2055  .removable-tag {
2056    border: none  !important;
2057  }
2058}  
2059
2060@media (min-width: 600px) {
2061  .product-container:hover .product-modal {
2062    display: flex !important;
2063    justify-content: center !important;
2064  }    
2065  .product-container .product-modal {
2066      position: absolute !important;      
2067      left: 50%;
2068      transform: translateX(-50%);
2069      display: none;
2070      z-index: 2;      
2071      width: 50% !important;
2072      margin-left: auto;
2073      margin-right: auto;
2074      color: white !important;
2075      background-color: #151E4F !important;
2076      border-color: #151E4F !important;
2077      align-items: center;
2078  }  
2079  .Button--primary:hover {
2080      color: #fff !important;
2081      background-color: #151E4F !important;
2082      border-color: #151E4F !important;
2083  }  
2084  .product-container {
2085      justify-content: unset !important;
2086  }    
2087  .fs-recommendation-product-container .product-modal {
2088    bottom: 20px;
2089  } 
2090  .fs-product-image-link {
2091  	position: relative;
2092  }
2093  .product-container-visibility-hidden .product-modal{
2094    bottom: 20px !important;
2095  }  
2096}
2097
2098/* Quick view end */   
2099
2100/* Size filter start */  
2101#fs_filter_size .category-items {
2102	outline: 2px solid transparent !important;
2103}
2104
2105#fs_filter_size .category-items {
2106  display: flex;
2107  justify-content: space-between;
2108  flex-wrap: wrap;
2109  overflow: hidden;  
2110}
2111
2112#fs_filter_size .category-items > span {
2113  width: 45% !important;
2114  border: 0;
2115  display: inline-block;
2116  margin-bottom: 5px;
2117  padding: 0;
2118  min-width: 22%;
2119  text-align: center;
2120}
2121
2122#fs_filter_size .fs-checkbox {
2123  background-color: #fff;
2124  border: 1px solid #000;
2125  padding-right: 0px !important;
2126  justify-content: center !important;
2127}
2128
2129#fs_filter_size .checkmark, #fs_filter_size .fs-serp-filter-count {
2130  display: none !important;
2131}
2132
2133#fs_filter_size .fs-checkbox-label {
2134  justify-content: center !important;
2135}
2136
2137#fs_filter_size .filters-option-text {
2138  font-size: 10px;
2139}
2140#fs_filter_size .fs-checkbox.fs-selected-checkbox {
2141  border: 1px solid black;
2142  background-color: #000;
2143}
2144#fs_filter_size .fs-checkbox.fs-selected-checkbox .fs-serp-filter-text {
2145	color: #fff !important;
2146}
2147
2148/* Size filter end */  
2149
2150/* Color filter start */ 
2151@media (min-width: 600px) {  
2152  #fs_filter_color .swatches {
2153      display: block;
2154  }
2155  
2156  #fs_filter_color .color-swatch-container {
2157  	display: contents;
2158  }
2159  
2160  #fs_filter_color .color-swatch-color-name {
2161      display: block;
2162  }
2163  
2164  #fs_filter_color .fs-color-swatch-count {
2165      display: block;
2166  }
2167}
2168/* Color filter end */
2169
2170  
2171.fs_product_text_badge_flag {
2172  font-weight: 400;
2173  font-style: normal;
2174  Font-size: 14px;
2175  line-height: 17.5px;
2176  transform: none;
2177  font-family: futura-pt, "Sans Serif" !important;
2178  transform-origin: unset;
2179  padding: 2px 6px !important;
2180  letter-spacing: normal;
2181  text-align: center;
2182  position: absolute;
2183  left: 10px;
2184  top: 10px;
2185  z-index: 4;
2186}
2187.fs_product_text_badge_flag.sale {
2188 background-color: #fff;
2189 color: #cd2428;
2190}
2191.swatches-container {
2192  display: none !important;    
2193}
2194.product-image {    
2195  animation: none !important;
2196} 
2197.fs_total_colors_count   {  
2198  display: block;
2199  font-weight: 100 !important;
2200  text-transform: uppercase;
2201  opacity: 70%;
2202  font-size: 14px !important;
2203  color: #231f20 !important;  
2204  width: 100%;
2205  text-align: center;
2206}
2207@media (min-width: 600px) {
2208  .markers {
2209    display: none !important;  
2210  }  
2211}
2212
2213.reviews-container {
2214  margin-top: 5px;
2215  justify-content: flex-start !important;
2216  width: 100% !important;
2217}
2218
2219@media (max-width: 575px) {
2220  .fs-filters-title-text {
2221    text-transform: capitalize !important;
2222    font-weight: 500 !important;
2223    font-size: 20px !important;
2224    color: #292929 !important;
2225  }
2226  .category-title {    
2227    border-bottom: none !important;
2228  }
2229  .category-container {    
2230    border-bottom: 1px solid #ccc;
2231  } 
2232  .filters-modal {    
2233    width: 80%  !important;
2234  }
2235  .category-items {    
2236    margin-bottom: 10px;
2237  }
2238  #fs_filter_size .category-items {
2239    display: grid !important;
2240    grid-template-columns: repeat(3, 1fr);
2241  }
2242  #fs_filter_size .category-items > span {
2243    width: 70% !important;    
2244  }
2245}
2246
2247
2248
2249
2250/* FIT custom filter start */  
2251  .cstm-filter {
2252	flex: 1 0 auto;
2253	transition: .3s opacity ease-in-out;
2254    opacity: 1;
2255}
2256
2257
2258.cstm-filter .category-title-wrapper {
2259    background-color: unset;
2260    padding-left: 5px;
2261    padding-right: 5px;
2262}
2263
2264.cstm-filter .category-title {
2265    color: #231f20;
2266    font-size: 16px;
2267    font-family: futura-pt, Sans Serif;
2268    font-weight: 400;
2269    letter-spacing: 0.25px;
2270    text-align: left;
2271    border-bottom: 1px solid #ccc;
2272    display: flex;
2273    justify-content: space-between;
2274    padding-top: 10px;
2275    padding-bottom: 6px;
2276    cursor: pointer;
2277    margin-bottom: 6px;
2278}
2279
2280
2281.cstm-filter  .category-items.collapsed {
2282    max-height: 0;
2283}
2284
2285.cstm-filter .category-items {
2286    position: absolute;
2287    z-index: 5;
2288    background: #fff;
2289    margin-top: -6px;
2290    border-top: unset !important;
2291    border: 1px solid transparent;
2292    margin-left: 5px;
2293}
2294
2295.cstm-filter .category-items {
2296    padding: 0 8px;
2297    max-height: 260px;
2298    overflow: auto;
2299    transition: .2s all ease-in-out;
2300    scroll-behavior: smooth;
2301    overflow-x: hidden;
2302    display: grid;
2303    gap: 20px;
2304}
2305/* FIT custom filter end */ 
2306
2307.fs-color-swatch-with-count {
2308  background: transparent  !important;
2309}
2310
2311.fs-page-title-container .title {    
2312  text-transform: capitalize !important;
2313}
2314
2315.PageHeader .SectionHeader.SectionHeader--center {
2316  display: none !important;
2317}
2318
2319.product-info {
2320  justify-content: flex-start !important;
2321}
2322
2323.fs-app-content a {
2324  width: 100%;
2325}
2326
2327.title-container {
2328  align-items: flex-start;
2329}
2330.fs-results-product-card .info-container .price-is-compare, .fs-results-product-card .info-container .price-is-compare + .compare-container {
2331  width: auto !important;
2332  margin-right: 20px;
2333}
2334
2335@media (max-width: 575px) {  
2336  .fs-results-product-card .info-container .price-is-compare, .fs-results-product-card .info-container .price-is-compare + .compare-container {
2337    width: auto !important;
2338    margin-right: 20px;
2339  } 
2340}
2341
2342
2343.fs-product-has-compare .fs-price {
2344  text-align: left !important; 
2345}
2346.fs-compare {
2347  margin-left: 0px !important;
2348}
2349
2350.fs-results-product-card .fs-reviews-count {
2351  display: none !important;
2352}
2353
2354.fs_total_colors_count {    
2355  text-align: left;
2356  min-width: max-content;
2357}
2358
2359.fs-results-product-card .info-container {
2360  display: flex !important;
2361  flex-direction: row !important;
2362  justify-content: flex-start !important;
2363  align-content: flex-start !important;
2364  align-items: center !important;
2365  flex-wrap: wrap !important;
2366  height: auto !important;
2367}
2368
2369.fs-results-product-card .product-content {    
2370  justify-content: flex-start !important;    
2371}
2372
2373
2374.fast-swatch-color-light_blue{ background:#E1F1F6 !important; }
2375
2376.fast-swatch-color-color_black{ background:#000000 !important; }
2377
2378.fast-swatch-color-color_grey{ background:#999999 !important; }
2379
2380.fast-swatch-color-color_white{ background:#FFFFFF !important; }
2381
2382.fast-swatch-color-color_brown{ background:#54391D !important; }
2383
2384.fast-swatch-color-color_beige{ background:#C8b6A1 !important; }
2385
2386.fast-swatch-color-color_green{ background:#38471F !important; }
2387
2388.fast-swatch-color-color_blue{ background:#000082 !important; }
2389
2390.fast-swatch-color-color_navy{ background:#0D0D3F !important; }
2391
2392.fast-swatch-color-color_light_blue{ background:#E1F1F6 !important; }
2393
2394.fast-swatch-color-color_purple{ background:#4b0082 !important; }
2395
2396.fast-swatch-color-color_red{ background:#9E0101 !important; }
2397
2398.fast-swatch-color-color_pink{ background:#FFC0Cb !important; }
2399
2400.fast-swatch-color-color_yellow{ background:#FCF37D !important; }
2401
2402.fast-swatch-color-color_orange{ background:#cc3300 !important; }
2403
2404.fast-swatch-color-black{ background:#000000 !important; }
2405
2406.fast-swatch-color-grey{ background:#999999 !important; }
2407
2408.fast-swatch-color-white{ background:#FFFFFF !important; }
2409
2410.fast-swatch-color-brown{ background:#54391D !important; }
2411
2412.fast-swatch-color-beige{ background:#C8b6A1 !important; }
2413
2414.fast-swatch-color-green{ background:#38471F !important; }
2415
2416.fast-swatch-color-blue{ background:#000082 !important; }
2417
2418.fast-swatch-color-navy{ background:#0D0D3F !important; }
2419
2420.fast-swatch-color-purple{ background:#4b0082 !important; }
2421
2422.fast-swatch-color-red{ background:#9E0101 !important; }
2423
2424.fast-swatch-color-pink{ background:#FFC0Cb !important; }
2425
2426.fast-swatch-color-yellow{ background:#FCF37D !important; }
2427
2428.fast-swatch-color-orange{ background:#cc3300 !important; }
2429
2430</style>
2431
2432
2433<style id="fast-simon-new-upsell-cross-sell-css">
2434
2435
2436  .fs-recommendation-product-info {
2437    justify-content: normal !important;
2438    grid-template-columns: 0 auto auto 1fr !important;
2439    justify-items: start !important;
2440    text-align: left !important;
2441	  align-content: space-between !important;
2442  }
2443
2444  .fs-product-has-compare-price .fs-recommendation-price-container {
2445    justify-content: flex-start !important;    
2446  }
2447  
2448  .fs-recommendation-product-info .price-container {
2449    align-items: flex-start !important;    
2450  }
2451
2452  .fs-recommendation-product-info .title-container {
2453    text-align: left !important;
2454  }
2455
2456  .fs-upsell-cross-sell-product  .fs-recommendation-compare-price-container {
2457    margin-left: 0px !important;
2458  }
2459
2460  .fs-recommendation-product-info .color-swatches-wrapper {
2461    display: none !important;
2462  }
2463  .fs-recommendation-product-name-wrapper{
2464        white-space: nowrap;
2465      overflow: hidden;
2466      text-overflow: ellipsis;
2467      width: 90%;
2468      display: block !important;
2469  }
2470</style>
2471    
2472  
2472<script>window.performance && window.performance.mark && window.performance.mark('shopify.content_for_header.start');</script>
2472<meta name="google-site-verification" content="EyBp_xZ09gPHJZYAe08lKxcPopvblhs1vW1XipMOS9c">
2473<meta id="shopify-digital-wallet" name="shopify-digital-wallet" content="/51674742957/digital_wallets/dialog">
2474<meta id="in-context-paypal-metadata" data-shop-id="51674742957" data-venmo-supported="false" data-environment="production" data-locale="en_US" data-paypal-v4="true" data-currency="CAD">
2475<link rel="ucp" href="/.well-known/ucp" version="2026-08-25"><link rel="alternate" hreflang="x-default" href="https://www.buffalojeans.ca/account/login">
2476<link rel="alternate" hreflang="en" href="https://www.buffalojeans.ca/account/login">
2477<link rel="alternate" hreflang="fr" href="https://www.buffalojeans.ca/fr/account/login">
2478<script async="async" src="/checkouts/internal/preloads.js?locale=en-CA&default_configuration_id=2101641389"></script>
2478
2479<link rel="preconnect" href="https://shop.app" crossorigin="anonymous">
2480<script async="async" src="https://shop.app/checkouts/internal/preloads.js?locale=en-CA&default_configuration_id=2101641389&shop_id=51674742957" crossorigin="anonymous"></script>
vendor: 1 bytes, line 2480
2480
2481<script id="apple-pay-shop-capabilities" type="application/json">{"shopId":51674742957,"countryCode":"CA","currencyCode":"CAD","merchantCapabilities":["supports3DS"],"merchantId":"gid:\/\/shopify\/Shop\/51674742957","merchantName":"Buffalo Jeans CA","requiredBillingContactFields":["postalAddress","email"],"requiredShippingContactFields":["postalAddress","email"],"shippingType":"shipping","supportedNetworks":["visa","masterCard","amex","discover","interac","jcb"],"total":{"type":"pending","label":"Buffalo Jeans CA","amount":"1.00"},"shopifyPaymentsEnabled":true,"supportsSubscriptions":true}</script>
vendor: 1 bytes, line 2481
2481
2482<script id="shopify-features" type="application/json">{"accessToken":"b0fb75d48fca193643f8bd9438374a5a","betas":["rich-media-storefront-analytics"],"domain":"www.buffalojeans.ca","predictiveSearch":true,"shopId":51674742957,"locale":"en"}</script>
vendor: 1 bytes, line 2482
2482
2483<script>var Shopify = Shopify || {};
2484Shopify.shop = "buffalo-jeans-ca.myshopify.com";
2485Shopify.locale = "en";
2486Shopify.currency = {"active":"CAD","rate":"1.0"};
2487Shopify.country = "CA";
2488Shopify.theme = {"name":"DUPLICATE_promotion_2026.09.24-2026.09.27","id":166960070829,"schema_name":"Prestige","schema_version":"4.9.1","theme_store_id":null,"role":"main"};
2489Shopify.theme.handle = "null";
2490Shopify.theme.style = {"id":null,"handle":null};
2491Shopify.cdnHost = "www.buffalojeans.ca/cdn";
2492Shopify.routes = Shopify.routes || {};
2493Shopify.routes.root = "/";
2494Shopify.shopJsCdnBaseUrl = "https://cdn.shopify.com/shopifycloud/shop-js";
2495Shopify.SignInWithShop = Shopify.SignInWithShop || {};
2496Shopify.SignInWithShop.User = Shopify.SignInWithShop.User || {};
2497Shopify.SignInWithShop.User.recognized = false;</script>
vendor: 1 bytes, line 2497
2497
2498<script type="module">!function(o){(o.Shopify=o.Shopify||{}).modules=!0}(window);</script>
vendor: 1 bytes, line 2498
2498
2499<script>!function(o){function n(){var o=[];function n(){o.push(Array.prototype.slice.apply(arguments))}return n.q=o,n}var t=o.Shopify=o.Shopify||{};t.loadFeatures=n(),t.autoloadFeatures=n()}(window);</script>
vendor: 1 bytes, line 2499
2499
2500<script>
2501  window.ShopifyPay = window.ShopifyPay || {};
2502  window.ShopifyPay.apiHost = "shop.app\/pay";
2503  window.ShopifyPay.redirectState = null;
2504</script>
vendor: 1 bytes, line 2504
2504
2505<script>
2506  window.Shopify = window.Shopify || {};
2507  window.Shopify.SignInWithShop = window.Shopify.SignInWithShop || {};
2508  window.Shopify.SignInWithShop.assetMetrics = { sampleRate: 0.25 };
2509  window.Shopify.SignInWithShop.eligible = true;
2510</script>
vendor: 1 bytes, line 2510
2510
2511<script id="shop-js-analytics" type="application/json">{"pageType":"customers/login"}</script>
vendor: 1 bytes, line 2511
2511
2512<script defer="defer" async type="module" src="https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-customer-accounts.en.esm.js"></script>
vendor: 1 bytes, line 2512
2512
2513<script defer="defer" async type="module" src="https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-customer-accounts-sign-up.en.esm.js"></script>
vendor: 1 bytes, line 2513
2513
2514<script type="module">
2515  await import("https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-customer-accounts.en.esm.js");
2516await import("https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-customer-accounts-sign-up.en.esm.js");
2517
2518  window.Shopify.SignInWithShop?.initCustomerAccounts?.(true, {"fedCMEnabled":true,"windoidEnabled":true});
2519window.Shopify.SignInWithShop?.initCustomerAccountsSignUp?.({"fedCMEnabled":true,"windoidEnabled":true});
2520
2521</script>
vendor: 1 bytes, line 2521
2521
2522<script defer="defer" async type="module" src="https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-shop-cart-sync.en.esm.js"></script>
vendor: 1 bytes, line 2522
2522
2523<script type="module">
2524  await import("https://cdn.shopify.com/shopifycloud/shop-js/modules/v2/loader.init-shop-cart-sync.en.esm.js");
2525
2526  window.Shopify.SignInWithShop?.initShopCartSync?.({"fedCMEnabled":true,"windoidEnabled":true});
2527
2528</script>
vendor: 1 bytes, line 2528
2528
2529<script>
2530  window.Shopify = window.Shopify || {};
2531  if (!window.Shopify.featureAssets) window.Shopify.featureAssets = {};
2532  window.Shopify.featureAssets['shop-js'] = {"avatar":["modules/v2/loader.avatar.en.esm.js"],"checkout-modal":["modules/v2/loader.checkout-modal.en.esm.js"],"init-customer-accounts-sign-up":["modules/v2/loader.init-customer-accounts-sign-up.en.esm.js"],"init-customer-accounts":["modules/v2/loader.init-customer-accounts.en.esm.js"],"init-fed-cm":["modules/v2/loader.init-fed-cm.en.esm.js"],"init-shop-cart-sync":["modules/v2/loader.init-shop-cart-sync.en.esm.js"],"init-shop-email-lookup-coordinator":["modules/v2/loader.init-shop-email-lookup-coordinator.en.esm.js"],"init-shop-for-new-customer-accounts":["modules/v2/loader.init-shop-for-new-customer-accounts.en.esm.js"],"init-shop-user-recognition":["modules/v2/loader.init-shop-user-recognition.en.esm.js"],"init-windoid":["modules/v2/loader.init-windoid.en.esm.js"],"lead-capture":["modules/v2/loader.lead-capture.en.esm.js"],"listener":["modules/v2/loader.listener.en.esm.js"],"pay-button":["modules/v2/loader.pay-button.en.esm.js"],"payment-terms":["modules/v2/loader.payment-terms.en.esm.js"],"shop-button":["modules/v2/loader.shop-button.en.esm.js"],"shop-cart-sync":["modules/v2/loader.shop-cart-sync.en.esm.js"],"shop-cash-offers":["modules/v2/loader.shop-cash-offers.en.esm.js"],"shop-follow-button":["modules/v2/loader.shop-follow-button.en.esm.js"],"shop-login-button":["modules/v2/loader.shop-login-button.en.esm.js"],"shop-login":["modules/v2/loader.shop-login.en.esm.js"],"shop-toast-manager":["modules/v2/loader.shop-toast-manager.en.esm.js"],"shop-user-recognition":["modules/v2/loader.shop-user-recognition.en.esm.js"]};
2533</script>
vendor: 1 bytes, line 2533
2533
2534<script>(function() {
2535  var isLoaded = false;
2536  function asyncLoad() {
2537    if (isLoaded) return;
2538    isLoaded = true;
2539    var urls = ["https:\/\/d23dclunsivw3h.cloudfront.net\/redirect-app.js?shop=buffalo-jeans-ca.myshopify.com","https:\/\/cdn-loyalty.yotpo.com\/loader\/dVrkoswlhwlP1NgEFnsPVg.js?shop=buffalo-jeans-ca.myshopify.com","https:\/\/d26ky332zktp97.cloudfront.net\/shops\/n7mhpBwwpfrS56wg5\/colibrius-m.js?shop=buffalo-jeans-ca.myshopify.com","https:\/\/cdn.shopify.com\/s\/files\/1\/0597\/3783\/3627\/files\/tptinstall.min.js?v=1718591634\u0026t=tapita-seo-script-tags\u0026shop=buffalo-jeans-ca.myshopify.com","\/\/staticw2.yotpo.com\/Jt5koLhjn8dSxUKx7PDCcMhn2M05D8XsiG7b8KV9\/widget.js?shop=buffalo-jeans-ca.myshopify.com","https:\/\/connect.nosto.com\/script\/shopify\/market\/init.js?merchant=shopify-51674742957\u0026shop=buffalo-jeans-ca.myshopify.com","https:\/\/api.bluecore.com\/triggermail.js\/centric_buffalo_jeans_ca.js?shop=buffalo-jeans-ca.myshopify.com","https:\/\/cdn.attn.tv\/buffalojeansca\/dtag.js?shop=buffalo-jeans-ca.myshopify.com","https:\/\/na.shgcdn3.com\/pixel-collector.js?shop=buffalo-jeans-ca.myshopify.com","https:\/\/size-guides-prod.esc-apps-cdn.com\/1773850972-app.buffalo-jeans-ca.myshopify.com.js?shop=buffalo-jeans-ca.myshopify.com","https:\/\/cdn.rebuyengine.com\/onsite\/js\/rebuy.js?shop=buffalo-jeans-ca.myshopify.com","https:\/\/s3.eu-west-1.amazonaws.com\/production-klarna-il-shopify-osm\/9b281ea3896e823dc21a80a7781a2a2c53b8ecc2\/buffalo-jeans-ca.myshopify.com-1790236805785.js?shop=buffalo-jeans-ca.myshopify.com"];
2540    for (var i = 0; i < urls.length; i++) {
2541      var s = document.createElement('script');
2542      s.type = 'text/javascript';
2543      s.async = true;
2544      s.src = urls[i];
2545      var x = document.getElementsByTagName('script')[0];
2546      x.parentNode.insertBefore(s, x);
2547    }
2548  };
2549  if(window.attachEvent) {
2550    window.attachEvent('onload', asyncLoad);
2551  } else {
2552    window.addEventListener('load', asyncLoad, false);
2553  }
2554})();</script>
vendor: 1 bytes, line 2554
2554
2555<script id="__st">var __st={"a":51674742957,"offset":-14400,"reqid":"319add45-ea9b-44cb-b904-13336d6bccb7-1790425597","pageurl":"www.buffalojeans.ca\/account\/login?return_url=%2Faccount","u":"ad8fbc9bedf8"};</script>
vendor: 1 bytes, line 2555
2555
2556<script>window.ShopifyPaypalV4VisibilityTracking = true;</script>
vendor: 1 bytes, line 2556
2556
2557<script id="form-persister">!function(){'use strict';const t='contact',e='new_comment',n=[[t,t],['blogs',e],['comments',e],[t,'customer']],o='password',r='form_key',c=['recaptcha-v3-token','g-recaptcha-response','h-captcha-response',o],s=()=>{try{return window.sessionStorage}catch{return}},i='__shopify_v',u=t=>t.elements[r],a=function(){const t=[...n].map((([t,e])=>`form[action*='/${t}']:not([data-nocaptcha='true']) input[name='form_type'][value='${e}']`)).join(',');var e;return e=t,()=>e?[...document.querySelectorAll(e)].map((t=>t.form)):[]}();function m(t){const e=u(t);a().includes(t)&&(!e||!e.value)&&function(t){try{if(!s())return;!function(t){const e=s();if(!e)return;const n=u(t);if(!n)return;const o=n.value;o&&e.removeItem(o)}(t);const e=Array.from(Array(32),(()=>Math.random().toString(36)[2])).join('');!function(t,e){u(t)||t.append(Object.assign(document.createElement('input'),{type:'hidden',name:r})),t.elements[r].value=e}(t,e),function(t,e){const n=s();if(!n)return;const r=[...t.querySelectorAll(`input[type='${o}']`)].map((({name:t})=>t)),u=[...c,...r],a={};for(const[o,c]of new FormData(t).entries())u.includes(o)||(a[o]=c);n.setItem(e,JSON.stringify({[i]:1,action:t.action,data:a}))}(t,e)}catch(e){console.error('failed to persist form',e)}}(t)}const f=t=>{if('true'===t.dataset.persistBound)return;const e=function(t,e){const n=function(t){return'function'==typeof t.submit?t.submit:HTMLFormElement.prototype.submit}(t).bind(t);return function(){let t;return()=>{t||(t=!0,(()=>{try{e(),n()}catch(t){(t=>{console.error('form submit failed',t)})(t)}})(),setTimeout((()=>t=!1),250))}}()}(t,(()=>{m(t)}));!function(t,e){if('function'==typeof t.submit&&'function'==typeof e)try{t.submit=e}catch{}}(t,e),t.addEventListener('submit',(t=>{t.preventDefault(),e()})),t.dataset.persistBound='true'};!function(){function t(t){const e=(t=>{const e=t.target;return e instanceof HTMLFormElement?e:e&&e.form})(t);e&&m(e)}document.addEventListener('submit',t),document.addEventListener('DOMContentLoaded',(()=>{const e=a();for(const t of e)f(t);var n;n=document.body,new window.MutationObserver((t=>{for(const e of t)if('childList'===e.type&&e.addedNodes.length)for(const t of e.addedNodes)1===t.nodeType&&'FORM'===t.tagName&&a().includes(t)&&f(t)})).observe(n,{childList:!0,subtree:!0,attributes:!1}),document.removeEventListener('submit',t)}))}()}();</script>
vendor: 1 bytes, line 2557
2557
2558<script integrity="sha256-JjoPp5ZfB1sSAs5SQaol1x1GgvveM+BgmRzyDexInEQ=" data-source-attribution="shopify.loadfeatures" defer="defer" src="//www.buffalojeans.ca/cdn/shopifycloud/storefront/assets/storefront/load_feature-1bd60354.js" crossorigin="anonymous"></script>
vendor: 1 bytes, line 2558
2558
2559<script>(function () {var userAgent = navigator.userAgent;var platform = navigator.platform;var maxTouchPoints = navigator.maxTouchPoints || 0;var isIOS = /iPad|iPhone|iPod/.test(platform) || (platform === 'MacIntel' && maxTouchPoints > 1);var isMacSafari = platform.indexOf('Mac') === 0 && /Safari/.test(userAgent) && !/Chrome|Chromium|CriOS|FxiOS|Edg|OPR|Android/.test(userAgent);var isAppleSafari = isIOS || isMacSafari;if (isAppleSafari) {fetch('/sf_private_access_tokens' + location.search).catch(function () {});}function browserMajorVersion(pattern) {var match = userAgent.match(pattern);return match ? parseInt(match[1], 10) : null;}function shouldLoadAutosizesPolyfill() {if (!window.PerformanceObserver?.supportedEntryTypes?.includes('paint')) {return false;}var chromeVersion = browserMajorVersion(/Chrome\/(\d+)/);if (chromeVersion !== null) {return chromeVersion < 126;}var firefoxVersion = browserMajorVersion(/Firefox\/(\d+)/);if (firefoxVersion !== null) {return firefoxVersion < 150;}var safariVersion = isAppleSafari ? browserMajorVersion(/Version\/(\d+).*Safari\//) : null;if (safariVersion !== null) {return safariVersion < 27;}return true;}if (shouldLoadAutosizesPolyfill()) {var autosizesScript = document.createElement('script');autosizesScript.async = true;autosizesScript.crossOrigin = 'anonymous';autosizesScript.src = "//www.buffalojeans.ca/cdn/shopifycloud/storefront/assets/storefront/autosizes-84416378.js";(document.head || document.documentElement).appendChild(autosizesScript);}window.ShopifyAnalytics = window.ShopifyAnalytics || {};window.ShopifyAnalytics.performance = window.ShopifyAnalytics.performance || {};(function () {var LONG_FRAME_THRESHOLD = 50;var longAnimationFrames = [];var activeRafId = null;function collectLongFrames() {var previousTime = null;function rafMonitor(now) {if (activeRafId === null) {return;}var delta = now - previousTime;if (delta > LONG_FRAME_THRESHOLD) {longAnimationFrames.push({startTime: previousTime,endTime: now,});}previousTime = now;activeRafId = requestAnimationFrame(rafMonitor);}previousTime = performance.now();activeRafId = requestAnimationFrame(rafMonitor);}if (!window.PerformanceObserver?.supportedEntryTypes?.includes('long-animation-frame')) {collectLongFrames();var timeoutId = setTimeout(function () {cancelAnimationFrame(activeRafId);}, 10000);window.ShopifyAnalytics.performance.getLongAnimationFrames = function (stopCollection) {if (stopCollection === undefined) {stopCollection = false;}if (stopCollection) {clearTimeout(timeoutId);cancelAnimationFrame(activeRafId);}return longAnimationFrames;};}})();})();</script>
2559<script crossorigin="anonymous" defer="defer" src="//www.buffalojeans.ca/cdn/shopifycloud/storefront/assets/shopify_pay/storefront-616277c7.js?v=20250812"></script>
vendor: 1 bytes, line 2559
2559
2560<script id="shopify-origin-trials" async="async" integrity="sha256-qJbe/jEZBHtr5W/BlA2cKAz3vkXu6vJQyLjgvgCC86g=" src="//cdn.shopify.com/shopifycloud/storefront/assets/storefront/origin_trials-318ab40a.js" crossorigin="anonymous" onload="window.__shopifyOriginTrialsDone = true" onerror="window.__shopifyOriginTrialsDone = true"></script>
vendor: 1 bytes, line 2560
2560
2561<script>
2562  window.Shopify = window.Shopify || {};
2563  window.Shopify.MCP = window.Shopify.MCP || {};
2564  window.Shopify.MCP.enabled = true;
2565  window.Shopify.MCP.shop = "buffalo-jeans-ca.myshopify.com";
2566  window.Shopify.MCP.mcpEndpoint = "https:\/\/www.buffalojeans.ca\/api\/mcp";
2567  window.Shopify.MCP.tools = [{"name":"search_shop_policies_and_faqs","description":"Used to get facts about the stores policies, products, or services.\nSome examples of questions you can ask are:\n  - What is your return policy?\n  - What is your shipping policy?\n  - What is your phone number?\n  - What are your hours of operation?\"\n","inputSchema":{"$schema":"https:\/\/json-schema.org\/draft\/2020-12\/schema","type":"object","properties":{"query":{"type":"string","description":"A natural language query."},"context":{"type":"string","description":"Additional information about the request such as user demographics, mood, location, or other relevant details that could help in tailoring the response appropriately."}},"required":["query"]}}];
2568</script>
vendor: 1 bytes, line 2568
2568
2569<script>(()=>{var d="shopify:webmcp_adapter_loaded",n=Symbol.for("shopify.webmcp_adapter_loading");function s(c,a,{win:r=window,doc:o=document}={}){function p(){try{return r.localStorage.getItem(d)==="true"}catch{return!1}}function l(){try{r.localStorage.setItem(d,"true")}catch{}}function u(){return typeof(o.modelContext||r.navigator?.modelContext)?.registerTool=="function"}function f(){if(r[n]||!u())return;let t=o.head||o.getElementsByTagName("head")[0];if(!t)return;let e=o.createElement("script");e.type="module",e.crossOrigin="anonymous",a&&(e.integrity=a),e.src=c,e.addEventListener("load",l,{once:!0}),e.addEventListener("error",()=>{r[n]=!1},{once:!0}),t.appendChild(e),r[n]=!0}function _(t){let e=o.getElementById("shopify-origin-trials");if(!e||r.__shopifyOriginTrialsDone){t();return}e.addEventListener("load",t,{once:!0}),e.addEventListener("error",t,{once:!0})}function i(){_(()=>r.setTimeout(f,0))}function m(){o.addEventListener("DOMContentLoaded",i,{once:!0})}p()?i():m()}s("\/\/www.buffalojeans.ca\/cdn\/shopifycloud\/storefront\/assets\/storefront\/webmcp-c6b62ece.js","sha256-ke4DDuBjdvea3vxLWxHc9E9nq8zihuG4IfYEGbb77ys=");})();
2570</script>
vendor: 1 bytes, line 2570
2570
2571<script data-source-attribution="shopify.dynamic_checkout.dynamic.init">var Shopify=Shopify||{};Shopify.PaymentButton=Shopify.PaymentButton||{isStorefrontPortableWallets:!0,init:function(){window.Shopify.PaymentButton.init=function(){};var t=document.createElement("script");t.src="https://www.buffalojeans.ca/cdn/shopifycloud/portable-wallets/latest/portable-wallets.en.js",t.type="module",document.head.appendChild(t)}};
2572</script>
vendor: 1 bytes, line 2572
2572
2573<script data-source-attribution="shopify.dynamic_checkout.buyer_consent">
2574  function portableWalletsHideBuyerConsent(e){var t=document.getElementById("shopify-buyer-consent"),n=document.getElementById("shopify-subscription-policy-button");t&&n&&(t.classList.add("hidden"),t.setAttribute("aria-hidden","true"),n.removeEventListener("click",e))}function portableWalletsShowBuyerConsent(e){var t=document.getElementById("shopify-buyer-consent"),n=document.getElementById("shopify-subscription-policy-button");t&&n&&(t.classList.remove("hidden"),t.removeAttribute("aria-hidden"),n.addEventListener("click",e))}window.Shopify?.PaymentButton&&(window.Shopify.PaymentButton.hideBuyerConsent=portableWalletsHideBuyerConsent,window.Shopify.PaymentButton.showBuyerConsent=portableWalletsShowBuyerConsent);
2575</script>
vendor: 1 bytes, line 2575
2575
2576<script data-source-attribution="shopify.dynamic_checkout.cart.bootstrap">document.addEventListener("DOMContentLoaded",(function(){function t(){return document.querySelector("shopify-accelerated-checkout-cart, shopify-accelerated-checkout")}if(t())Shopify.PaymentButton.init();else{new MutationObserver((function(e,n){t()&&(Shopify.PaymentButton.init(),n.disconnect())})).observe(document.body,{childList:!0,subtree:!0})}}));
2577</script>
2577
2578<link id="shopify-accelerated-checkout-styles" rel="stylesheet" media="screen" href="https://www.buffalojeans.ca/cdn/shopifycloud/portable-wallets/latest/accelerated-checkout-backwards-compat.css" crossorigin="anonymous">
2579<style id="shopify-accelerated-checkout-cart">
2580        #shopify-buyer-consent {
2581  margin-top: 1em;
2582  display: inline-block;
2583  width: 100%;
2584}
2585
2586#shopify-buyer-consent.hidden {
2587  display: none;
2588}
2589
2590#shopify-subscription-policy-button {
2591  background: none;
2592  border: none;
2593  padding: 0;
2594  text-decoration: underline;
2595  font-size: inherit;
2596  cursor: pointer;
2597}
2598
2599#shopify-subscription-policy-button::before {
2600  box-shadow: none;
2601}
2602
2603      </style>
2604
2605<script id="shopify-cfh-end">window.performance && window.performance.mark && window.performance.mark('shopify.content_for_header.end');</script>
2605
2606  
2607
2608
2609
2610
2611
2612  
2612<script type="text/javascript">
2613    
2614      window.__shgMoneyFormat = window.__shgMoneyFormat || {"CAD":{"currency":"CAD","currency_symbol":"$","currency_symbol_location":"left","decimal_places":2,"decimal_separator":".","thousands_separator":","}};
2615    
2616    window.__shgCurrentCurrencyCode = window.__shgCurrentCurrencyCode || {
2617      currency: "CAD",
2618      currency_symbol: "$",
2619      decimal_separator: ".",
2620      thousands_separator: ",",
2621      decimal_places: 2,
2622      currency_symbol_location: "left"
2623    };
2624  </script>
2624
2625
2626
2627
2628
2629    <link rel="stylesheet" href="//www.buffalojeans.ca/cdn/shop/t/525/assets/jquery.fancybox.css?v=137092036291199092101790085232" media="print" onload="this.media='all'">
2630    <link rel="stylesheet" href="//www.buffalojeans.ca/cdn/shop/t/525/assets/theme.css?v=168873157472934892031790259085">
2631    <link rel="stylesheet" href="//www.buffalojeans.ca/cdn/shop/t/525/assets/custom.css?v=140805703461080484721790085232">
2632    <link rel="stylesheet" href="//www.buffalojeans.ca/cdn/shop/t/525/assets/flickity.css?v=53363370240642993241790085232">
2633    <link rel="stylesheet" href="//www.buffalojeans.ca/cdn/shop/t/525/assets/slick.min.css?v=10541884051976483521790085232">
2634    
2634<script src="https://kit.fontawesome.com/190af635c8.js" crossorigin="anonymous"></script>
2634
2635
2636    <link rel="stylesheet" href="https://use.typekit.net/lzc3gzi.css" media="print" onload="this.media='all'">
2637    <link rel="stylesheet" href="https://use.typekit.net/chk2oub.css" media="print" onload="this.media='all'">
2638    <noscript>
2639      <link rel="stylesheet" href="//www.buffalojeans.ca/cdn/shop/t/525/assets/jquery.fancybox.css?v=137092036291199092101790085232">
2640      <link rel="stylesheet" href="https://use.typekit.net/lzc3gzi.css">
2641      <link rel="stylesheet" href="https://use.typekit.net/chk2oub.css">
2642    </noscript>
2643
2644    
2644<script>
2645      // This allows to expose several variables to the global scope, to be used in scripts
2646      window.theme = {
2647        pageType: "customers\/login",
2648        moneyFormat: "${{amount}}",
2649        moneyWithCurrencyFormat: "${{amount}} CAD",
2650        productImageSize: "natural",
2651        searchMode: "product,article",
2652        showPageTransition: false,
2653        showElementStaggering: true,
2654        showImageZooming: false
2655      };
2656
2657      window.routes = {
2658        rootUrl: "\/",
2659        cartUrl: "\/cart",
2660        cartAddUrl: "\/cart\/add",
2661        cartChangeUrl: "\/cart\/change",
2662        searchUrl: "\/search",
2663        productRecommendationsUrl: "\/recommendations\/products"
2664      };
2665
2666      window.languages = {
2667        cartAddNote: "Add Order Note",
2668        cartEditNote: "Edit Order Note",
2669        productImageLoadingError: "This image could not be loaded. Please try to reload the page.",
2670        productFormAddToCart: "Add to cart",
2671        productFormUnavailable: "Unavailable",
2672        productFormSoldOut: "Sold Out",
2673        shippingEstimatorOneResult: "1 option available:",
2674        shippingEstimatorMoreResults: "{{count}} options available:",
2675        shippingEstimatorNoResults: "No shipping could be found"
2676      };
2677
2678      window.lazySizesConfig = {
2679        loadHidden: false,
2680        hFac: 0.5,
2681        expFactor: 2,
2682        ricTimeout: 150,
2683        lazyClass: 'Image--lazyLoad',
2684        loadingClass: 'Image--lazyLoading',
2685        loadedClass: 'Image--lazyLoaded'
2686      };
2687
2688      document.documentElement.className = document.documentElement.className.replace('no-js', 'js');
2689      document.documentElement.style.setProperty('--window-height', window.innerHeight + 'px');
2690
2691      var images_preload = new Array();
2692      function preload_images( $data = [] ) {
2693        if ( $data.length > 0 ) {
2694          for (i = 0; i < $data.length; i++) {
2695            images_preload[i] = new Image();
2696            images_preload[i].src = $data[i];
2697          }
2698        }
2699      }
2700
2701      // We do a quick detection of some features (we could use Modernizr but for so little...)
2702      (function() {
2703        document.documentElement.className += ((window.CSS && window.CSS.supports('(position: sticky) or (position: -webkit-sticky)')) ? ' supports-sticky' : ' no-supports-sticky');
2704        document.documentElement.className += (window.matchMedia('(-moz-touch-enabled: 1), (hover: none)')).matches ? ' no-supports-hover' : ' supports-hover';
2705      }());
2706    </script>
2706
2707
2708    
2708<script src="//www.buffalojeans.ca/cdn/shop/t/525/assets/lazysizes.min.js?v=174358363404432586981790085232" async></script>
2708<script src="https://polyfill-fastly.net/v3/polyfill.min.js?unknown=polyfill&features=fetch,Element.prototype.closest,Element.prototype.remove,Element.prototype.classList,Array.prototype.includes,Array.prototype.fill,Object.assign,CustomEvent,IntersectionObserver,IntersectionObserverEntry,URL" defer></script>
2708
2709    
2709<script src="//www.buffalojeans.ca/cdn/shop/t/525/assets/libs.min.js?v=166133353058348958031790085232" defer></script>
2709
2710    
2710<script src="//www.buffalojeans.ca/cdn/shop/t/525/assets/theme.js?v=179353344942813316111790085232" defer></script>
2710
2711    
2711<script src="//www.buffalojeans.ca/cdn/shop/t/525/assets/slick.min.js?v=119177116428520753221790085232" defer></script>
2711
2712    
2712<script src="//www.buffalojeans.ca/cdn/shop/t/525/assets/jquery.fancybox.js?v=47127440494666976191790085232" defer></script>
2712
2713    
2713<script src="//www.buffalojeans.ca/cdn/shop/t/525/assets/custom.js?v=58371560128214536521790085232" defer></script>
2713
2714    
2715      
2715<script type="text/javascript" src="https://cdn.iintf.co/buffalo/js/app.js"></script>
2715
2716    
2717
2718    
2718<script>
2719      (function () {
2720        window.onpageshow = function() {
2721          if (window.theme.showPageTransition) {
2722            var pageTransition = document.querySelector('.PageTransition');
2723
2724            if (pageTransition) {
2725              pageTransition.style.visibility = 'visible';
2726              pageTransition.style.opacity = '0';
2727            }
2728          }
2729
2730          // When the page is loaded from the cache, we have to reload the cart content
2731          document.documentElement.dispatchEvent(new CustomEvent('cart:refresh', {
2732            bubbles: true
2733          }));
2734        };
2735      })();
2736    </script>
2736
2737
2738    
2739
2740
2741  
2741<script type="application/ld+json">
2742  {
2743    "@context": "http://schema.org",
2744    "@type": "BreadcrumbList",
2745  "itemListElement": [
2746    {
2747      "@type": "ListItem",
2748      "position": 1,
2749      "name": "Home",
2750      "item": "https://www.buffalojeans.ca"
2751    }]
2752  }
2753  </script>
2753
2754
2755
2756
2757    
2758
2759<script type="text/javascript">
2760  
2761    window.SHG_CUSTOMER = null;
2762  
2763</script>
2763
2764
2765
2766
2767
2768
2769
2770
2771    
2771<script type="text/javascript" src="//connect.nosto.com/include/shopify-51674742957" async></script>
2771
2772    
2773      
2773<script type="text/javascript">(function e(){var e=document.createElement("script");e.type="text/javascript",e.async=true,e.src="//staticw2.yotpo.com/Jt5koLhjn8dSxUKx7PDCcMhn2M05D8XsiG7b8KV9/widget.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})();</script>
2773
2774    
2775    <input type="hidden" id="settings_msg_en" value="">
2776<input type="hidden" id="settings_msg_es" value="">
2777<input type="hidden" id="settings_msg1_en" value="New Fit, Zero Risk. Free returns">
2778<input type="hidden" id="settings_msg1_es" value="Nouvelle Coupe, Aucun Risque. Retours gratuits">
2779<input type="hidden" id="settings_msg2_en" value="Buy 3 Get 20% Off. Use code NEW">
2780<input type="hidden" id="settings_msg2_es" value="Achetez 3, Obtenez 20% de Rabais. Utilisez le code NEW">
2781<input type="hidden" id="settings_pattern1" value="FitGroup_ruffer">
2782<input type="hidden" id="settings_pattern2" value="NEW">
2783<input type="hidden" id="msg1_coll" value="true">
2784<input type="hidden" id="msg2_coll" value="true">
2785<input type="hidden" id="msg1_color" value="#172342">
2786<input type="hidden" id="msg2_color" value="#172342">
2787    <!--begin-boost-pfs-filter-css-->
2788      <link rel="preload stylesheet" href="//www.buffalojeans.ca/cdn/shop/t/525/assets/boost-pfs-instant-search.css?v=37833536584309821091790085232" as="style"><link href="//www.buffalojeans.ca/cdn/shop/t/525/assets/boost-pfs-custom.css?v=46912397953893239731790085232" rel="stylesheet" type="text/css" media="all" />
2789<style data-id="boost-pfs-style" type="text/css">
2790    .boost-pfs-filter-option-title-text {}
2791
2792   .boost-pfs-filter-tree-v .boost-pfs-filter-option-title-text:before {}
2793    .boost-pfs-filter-tree-v .boost-pfs-filter-option.boost-pfs-filter-option-collapsed .boost-pfs-filter-option-title-text:before {}
2794    .boost-pfs-filter-tree-h .boost-pfs-filter-option-title-heading:before {}
2795
2796    .boost-pfs-filter-refine-by .boost-pfs-filter-option-title h3 {}
2797
2798    .boost-pfs-filter-option-content .boost-pfs-filter-option-item-list .boost-pfs-filter-option-item button,
2799    .boost-pfs-filter-option-content .boost-pfs-filter-option-item-list .boost-pfs-filter-option-item .boost-pfs-filter-button,
2800    .boost-pfs-filter-option-range-amount input,
2801    .boost-pfs-filter-tree-v .boost-pfs-filter-refine-by .boost-pfs-filter-refine-by-items .refine-by-item,
2802    .boost-pfs-filter-refine-by-wrapper-v .boost-pfs-filter-refine-by .boost-pfs-filter-refine-by-items .refine-by-item,
2803    .boost-pfs-filter-refine-by .boost-pfs-filter-option-title,
2804    .boost-pfs-filter-refine-by .boost-pfs-filter-refine-by-items .refine-by-item>a,
2805    .boost-pfs-filter-refine-by>span,
2806    .boost-pfs-filter-clear,
2807    .boost-pfs-filter-clear-all{}
2808    .boost-pfs-filter-tree-h .boost-pfs-filter-pc .boost-pfs-filter-refine-by-items .refine-by-item .boost-pfs-filter-clear .refine-by-type, 
2809    .boost-pfs-filter-refine-by-wrapper-h .boost-pfs-filter-pc .boost-pfs-filter-refine-by-items .refine-by-item .boost-pfs-filter-clear .refine-by-type {}
2810
2811    .boost-pfs-filter-option-multi-level-collections .boost-pfs-filter-option-multi-level-list .boost-pfs-filter-option-item .boost-pfs-filter-button-arrow .boost-pfs-arrow:before,
2812    .boost-pfs-filter-option-multi-level-tag .boost-pfs-filter-option-multi-level-list .boost-pfs-filter-option-item .boost-pfs-filter-button-arrow .boost-pfs-arrow:before {}
2813
2814    .boost-pfs-filter-refine-by-wrapper-v .boost-pfs-filter-refine-by .boost-pfs-filter-refine-by-items .refine-by-item .boost-pfs-filter-clear:after, 
2815    .boost-pfs-filter-refine-by-wrapper-v .boost-pfs-filter-refine-by .boost-pfs-filter-refine-by-items .refine-by-item .boost-pfs-filter-clear:before, 
2816    .boost-pfs-filter-tree-v .boost-pfs-filter-refine-by .boost-pfs-filter-refine-by-items .refine-by-item .boost-pfs-filter-clear:after, 
2817    .boost-pfs-filter-tree-v .boost-pfs-filter-refine-by .boost-pfs-filter-refine-by-items .refine-by-item .boost-pfs-filter-clear:before,
2818    .boost-pfs-filter-refine-by-wrapper-h .boost-pfs-filter-pc .boost-pfs-filter-refine-by-items .refine-by-item .boost-pfs-filter-clear:after, 
2819    .boost-pfs-filter-refine-by-wrapper-h .boost-pfs-filter-pc .boost-pfs-filter-refine-by-items .refine-by-item .boost-pfs-filter-clear:before, 
2820    .boost-pfs-filter-tree-h .boost-pfs-filter-pc .boost-pfs-filter-refine-by-items .refine-by-item .boost-pfs-filter-clear:after, 
2821    .boost-pfs-filter-tree-h .boost-pfs-filter-pc .boost-pfs-filter-refine-by-items .refine-by-item .boost-pfs-filter-clear:before {}
2822    .boost-pfs-filter-option-range-slider .noUi-value-horizontal {}
2823
2824    .boost-pfs-filter-tree-mobile-button button,
2825    .boost-pfs-filter-top-sorting-mobile button {}
2826    .boost-pfs-filter-top-sorting-mobile button>span:after {}
2827  </style>
2828    <!--end-boost-pfs-filter-css-->
2829<style>
2830.CartItem__PropertyList{display: block !important; list-style: none;}
2831</style>
2832    
2832<script src="https://cdn-widgetsrepository.yotpo.com/v1/loader/dVrkoswlhwlP1NgEFnsPVg" async></script>
2832
2833
2834    <link rel="stylesheet" href="//www.buffalojeans.ca/cdn/shop/t/525/assets/swatches.css?v=71222774114418930541790085232" media="print" onload="this.media='all'">
2835    <noscript>
2836      <link rel="stylesheet" href="//www.buffalojeans.ca/cdn/shop/t/525/assets/swatches.css?v=71222774114418930541790085232">
2837    </noscript>
2838    <style>.ProductListWrapper .swatches{display:none;}</style>
2839
2840    
2841<script>
2842     window.addEventListener('load', (event) => {
2843      jQuery(".yotpo-stars").css("margin-right","10px");
2844      });
2845    </script>
2845
2846    
2846<script src="https://cdn-widgetsrepository.yotpo.com/v1/loader/dVrkoswlhwlP1NgEFnsPVg" async></script>
2846
2847    
2847<script src="https://cdn-widgetsrepository.yotpo.com/v1/loader/Jt5koLhjn8dSxUKx7PDCcMhn2M05D8XsiG7b8KV9?languageCode=en" async></script>
2847<!-- BEGIN app block: shopify://apps/consentmo-gdpr/blocks/gdpr_cookie_consent/4fbe573f-a377-4fea-9801-3ee0858cae41 -->
2848<link rel="preconnect" href="https://app.consentmo.com" crossorigin data-csm-preconnect="app">
2849<link rel="dns-prefetch" href="https://workers.consentmo.com" data-csm-preconnect="workers">
2850<link rel="dns-prefetch" href="https://storage.consentmo.com" data-csm-preconnect="storage">
2851<link rel="preconnect" href="https://cdn.consentmo.com" crossorigin data-csm-preconnect="cdn"><link rel="prefetch" href="https://cdn.shopify.com/extensions/01a0d7a2-a36b-73ee-b8cb-ead3ca4862c3/gdpr-backpack-896/assets/layout-cookie-bar.consentmo.js" crossorigin data-csm-layout-prefetch="banner">
2852  <link rel="prefetch" href="https://cdn.shopify.com/extensions/01a0d7a2-a36b-73ee-b8cb-ead3ca4862c3/gdpr-backpack-896/assets/layout-cookie-dialog.consentmo.js" crossorigin data-csm-layout-prefetch="dialog">
2853  <link rel="prefetch" href="https://cdn.shopify.com/extensions/01a0d7a2-a36b-73ee-b8cb-ead3ca4862c3/gdpr-backpack-896/assets/layout-cookie-box.consentmo.js" crossorigin data-csm-layout-prefetch="box">
2854  <link rel="prefetch" href="https://cdn.shopify.com/extensions/01a0d7a2-a36b-73ee-b8cb-ead3ca4862c3/gdpr-backpack-896/assets/layout-cookie-smart-banner.consentmo.js" crossorigin data-csm-layout-prefetch="smart">
2855  <link rel="prefetch" href="https://cdn.shopify.com/extensions/01a0d7a2-a36b-73ee-b8cb-ead3ca4862c3/gdpr-backpack-896/assets/layout-mobile-cookie-bar.consentmo.js" crossorigin data-csm-layout-prefetch="mobile">
2855<script>
2856(function () {
2857  try {
2858    document.documentElement.classList.add('csm-cookie-embed');
2859  } catch (e) {}
2860})();
2861</script>
2861<script data-consentmo-data-src-bootstrap>
2862(function () {
2863  'use strict';
2864  if (window.__consentmoDataSrcBootstrapInit) return;
2865  window.__consentmoDataSrcBootstrapInit = true;
2866
2867  var DATA_SRC_SELECTOR = [
2868    'script[data-src*="consentmo_cookie_consent"]',
2869    'script[data-src*="gdpr_cookie_consent.min"]',
2870    'script[data-src*="gdrp_cookie_consent_unlimited"]'
2871  ].join(',');
2872
2873  function activateConsentmoDataSrcScripts() {
2874    if (!window.Shopify || !window.Shopify.shop) return;
2875    document.querySelectorAll(DATA_SRC_SELECTOR).forEach(function (scriptEl) {
2876      // getAttribute: src="" must not count as "already has src" (.src === page URL).
2877      if (scriptEl.getAttribute('src')) return;
2878      var url = scriptEl.getAttribute('data-src');
2879      if (!url) return;
2880      if (scriptEl.getAttribute('type') === 'text/plain') {
2881        scriptEl.removeAttribute('type');
2882      }
2883      scriptEl.src = url;
2884    });
2885  }
2886  function scheduleActivation() {
2887    activateConsentmoDataSrcScripts();
2888    // Retry on next task so other DCL handlers (lazy-loaders) can finish setting Shopify.shop / data-src first.
2889    setTimeout(activateConsentmoDataSrcScripts, 0);
2890  }
2891  if (document.readyState === 'loading') {
2892    document.addEventListener('DOMContentLoaded', scheduleActivation, { once: true });
2893  } else {
2894    scheduleActivation();
2895  }
2896})();
2897</script>
2897
2898
2899
2900<!-- END app block --><!-- BEGIN app block: shopify://apps/klaviyo-email-marketing-sms/blocks/klaviyo-onsite-embed/2632fe16-c075-4321-a88b-50b567f42507 -->
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913  
2913<script async src="https://static.klaviyo.com/onsite/js/Sm9a5a/klaviyo.js?company_id=Sm9a5a"></script>
2913
2914  
2914<script>!function(){if(!window.klaviyo){window._klOnsite=window._klOnsite||[];try{window.klaviyo=new Proxy({},{get:function(n,i){return"push"===i?function(){var n;(n=window._klOnsite).push.apply(n,arguments)}:function(){for(var n=arguments.length,o=new Array(n),w=0;w<n;w++)o[w]=arguments[w];var t="function"==typeof o[o.length-1]?o.pop():void 0,e=new Promise((function(n){window._klOnsite.push([i].concat(o,[function(i){t&&t(i),n(i)}]))}));return e}}})}catch(n){window.klaviyo=window.klaviyo||[],window.klaviyo.push=function(){var n;(n=window._klOnsite).push.apply(n,arguments)}}}}();</script>
2914
2915
2916  
2917
2918
2919
2920
2921  
2921<script>
2922    window.klaviyoReviewsProductDesignMode = false
2923  </script>
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933<!-- END app block --><!-- BEGIN app block: shopify://apps/yotpo-loyalty-rewards/blocks/loader-app-embed-block/2f9660df-5018-4e02-9868-ee1fb88d6ccd -->
2934    
2934<script src="https://cdn-widgetsrepository.yotpo.com/v1/loader/dVrkoswlhwlP1NgEFnsPVg" async></script>
2934
2935
2936
2937
2938
2939<!-- END app block --><!-- BEGIN app block: shopify://apps/attentive/blocks/attn-tag/8df62c72-8fe4-407e-a5b3-72132be30a0d -->
2939<script type="text/javascript" src="https://vinff.buffalojeans.ca/providers/atLabel/load" onerror=" var fallbackScript = document.createElement('script'); fallbackScript.src = 'https://cdn.attn.tv/buffalojeansca/dtag.js'; document.head.appendChild(fallbackScript);" data-source="loaded?source=app-embed" defer="defer"></script>
2939
2940
2941
2942<!-- END app block --><!-- BEGIN app block: shopify://apps/littledata-the-data-layer/blocks/LittledataLayer/45a35ed8-a2b2-46c3-84fa-6f58497c5345 -->
2943    
2943<script type="application/javascript">
2944      try {
2945        var layer = {"env":"production","ecommerce":{"impressions":[]},"debug":false,"hideBranding":false,"pageType":null,"productClicks":true,"productListLinksHaveImages":false,"productListLinksHavePrices":false,"productPageClicks":true,"referralExclusion":null,"sendNoteAttributes":true,"googleAnalytics4":{"disabledEvents":["refund"],"doNotTrackReplaceState":false,"productIdentifier":"PRODUCT_ID","uniqueIdentifierForOrders":"orderId","measurementId":"G-QJ38KPW2D3","usePageTypeForListName":false,"respectUserTrackingConsent":true},"featureType":"standardApp"};
2946        var currentMarketId = 4849837;
2947        
2948        var marketOverwrites = null;
2949        
2950        
2951        
2952        if (marketOverwrites) {
2953          Object.keys(marketOverwrites).forEach(function(connectionName) {
2954            var overwrites = marketOverwrites[connectionName];
2955            if (overwrites) {
2956              layer[connectionName] = Object.assign({}, layer[connectionName], overwrites);
2957            }
2958          });
2959        } else if (!currentMarketId) {
2960          
2961        }
2962        
2963        window.LittledataLayer = {
2964          ...layer,
2965          country: "CA",
2966          language: "en",
2967          market: {
2968            id: 4849837,
2969            handle: "ca"
2970          }
2971        }
2972        
2973        try {
2974          sessionStorage.setItem('_ldmk', JSON.stringify({
2975            id: 4849837,
2976            handle: "ca"
2977          }));
2978        } catch(e) {}
2979      } catch {}
2980
2981      
2982      console.log(`%cThis store uses Littledata 🚀 to automate its Google Analytics setup and make better, data-driven decisions. Learn more at https://apps.shopify.com/littledata`,'color: #088f87;');
2983      
2984    </script>
2984
2985    
2986        
2986<script async type="text/javascript" src="https://cdn.shopify.com/extensions/01a0d8df-5f13-747e-8dcc-977cb6b3debe/littledata-146/assets/colibrius-g.js"></script>
2986
2987    
2988    
2989    
2990    
2991    
2992    
2993    
2994    
2995    
2996
2997
2998<!-- END app block --><!-- BEGIN app block: shopify://apps/product-filters-search/blocks/autocomplete/95672d06-1c4e-4e1b-9368-e84ce1ad6886 -->
2998<script>
2999    var fast_dawn_theme_action = "/pages/search-results";
3000    var __isp_new_jquery = "true" === "true";
3001</script>
3001
3002
3003
3004
3005
3006    
3007
3008    
3008<script>var _isp_injected_already = true</script>
3008
3009    <!-- BEGIN app snippet: fast-simon-autocomplete-init -->
3009<script id="autocomplete-initilizer"
3010        src="https://static-autocomplete.fastsimon.com/fast-simon-autocomplete-init.umd.js?mode=shopify&UUID=e61aafd9-48c9-4c24-99db-7d62fca2b81f&store=135177"
3011        async>
3012</script>
3012
3013<!-- END app snippet -->
3014�<!-- END app block --><!-- BEGIN app block: shopify://apps/tapita-seo-speed/blocks/app-embed/cd37ca7a-40ad-4fdc-afd3-768701482209 -->
3015
3016
3017
3018<script class="tpt-seo-schema">
3019    var tapitaSeoVer = 1233;
3020    var tptAddedSchemas = [];
3021</script>
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033<!-- BEGIN app snippet: alter-schemas -->
3034
3035
3036
3037
3038<!-- END app snippet -->
3039
3040
3041<script class="tpt-seo-schema">
3042    var instantPageUrl = "https://cdn.shopify.com/extensions/01a0c70f-2479-740f-8e84-db96f99559c4/tapita-seo-speed-243/assets/instantpage.js";
3043    var tptMetaDataConfigUrl = 'https://cdn.shopify.com/s/files/1/0516/7474/2957/t/525/assets/tapita-meta-data.json?v=1790085232';
3044    // ADD META TITLE / DESCRIPTION WHEN tptMetaDataConfigUrl valid
3045    const createMetaTag = (descriptionValue) => {
3046        const metaTag = document.createElement('meta');
3047        metaTag.setAttribute('name', 'description');
3048        metaTag.setAttribute('content', descriptionValue);
3049        const headTag = document.querySelector('head');
3050        headTag.appendChild(metaTag);
3051    }
3052    const replaceMetaTagContent = (titleValueInput, descriptionValueInput, needReplaceVar) => {
3053        const titleValue = titleValueInput.replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&apos;/g, "'").replace(/&cent;/g, "¢").replace(/&pound;/g, "£").replace(/&yen;/g, "¥").replace(/&euro;/g, "€").replace(/&copy;/g, "©").replace(/&reg;/g, "®").replace(/&trade;/g, "™").replace(/&mdash;/g, "—").replace(/&ndash;/g, "–").replace(/&hellip;/g, "…").replace(/&rsquo;/g, "'").replace(/&lsquo;/g, "'").replace(/&rdquo;/g, '"').replace(/&ldquo;/g, '"');
3054        const descriptionValue = descriptionValueInput.replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&apos;/g, "'").replace(/&cent;/g, "¢").replace(/&pound;/g, "£").replace(/&yen;/g, "¥").replace(/&euro;/g, "€").replace(/&copy;/g, "©").replace(/&reg;/g, "®").replace(/&trade;/g, "™").replace(/&mdash;/g, "—").replace(/&ndash;/g, "–").replace(/&hellip;/g, "…").replace(/&rsquo;/g, "'").replace(/&lsquo;/g, "'").replace(/&rdquo;/g, '"').replace(/&ldquo;/g, '"');
3055        const disableReplacingTitle = !!window._tpt_no_replacing_plain_title
3056        const disableReplacingDescription = !!window._tpt_no_replacing_plain_desc
3057        const config = { attributes: true, childList: true, subtree: true};
3058        const header = document.getElementsByTagName('head')[0];
3059        let i = 0;
3060        const callback = (mutationList, observer) => {
3061            i++;
3062            const title = document.getElementsByTagName('title')[0];
3063            const ogTitle = document.querySelector('meta[property="og:title"]');
3064            const twitterTitle = document.querySelector('meta[name="twitter:title"]');
3065            const newTitle = needReplaceVar ? replaceVar(titleValue) : titleValue;
3066            const newDescription = needReplaceVar ? replaceVar(descriptionValue) : descriptionValue;
3067            if(titleValue && document && document.title != newTitle && !disableReplacingTitle){
3068                document.title = newTitle;
3069            }
3070            if(ogTitle && (ogTitle?.content != newTitle)){
3071                ogTitle?.setAttribute('content', newTitle);
3072            }
3073            if(twitterTitle && (twitterTitle?.content != newTitle)){
3074                twitterTitle?.setAttribute('content', newTitle);
3075            }
3076            const metaDescriptionTagList = document.querySelectorAll('meta[name="description"]');
3077            const ogDescriptionTagList = document.querySelector('meta[property="og:description"]');
3078            const twitterDescriptionTagList = document.querySelector('meta[name="twitter:description"]');
3079            try {
3080                if(ogDescriptionTagList && newDescription && (ogDescriptionTagList?.content != newDescription)) {
3081                    ogDescriptionTagList?.setAttribute('content', newDescription);
3082                }
3083                if(twitterDescriptionTagList && newDescription && (twitterDescriptionTagList?.content != newDescription)){
3084                    twitterDescriptionTagList?.setAttribute('content', newDescription);
3085                }
3086            } catch (err) {
3087
3088            }
3089            if (descriptionValue) {
3090                if(metaDescriptionTagList?.length == 0){
3091                    try {
3092                    createMetaTag(newDescription);
3093                    } catch (err) {
3094                    //
3095                    }
3096                }
3097                metaDescriptionTagList?.forEach(metaDescriptionTag=>{
3098                    if(metaDescriptionTag.content != newDescription && !disableReplacingDescription){
3099                    metaDescriptionTag.content = newDescription;
3100                    }
3101                })
3102            }
3103            if(observer && i > 1000){
3104                observer.disconnect();
3105            }
3106        };
3107        callback();
3108        setTimeout(callback, 100);
3109        const observer = new MutationObserver(callback);
3110        if(observer){
3111            observer.observe(header, config);
3112        }
3113    }
3114    if (tptMetaDataConfigUrl) {
3115        fetch(tptMetaDataConfigUrl)
3116        .then(response => response.json())
3117        .then((data) => {
3118            if(!data) return;
3119            const instantPage = data?.instantPage || false;
3120            const excludedPaths = [
3121                '/cart',
3122                '/checkout',
3123                '/account',
3124                '/search',
3125                'logout',
3126                'login',
3127                'customer'
3128            ];
3129            if (!window.FPConfig || !window.FPConfig.ignoreKeywords || !Array.isArray(window.FPConfig.ignoreKeywords)) {
3130                window.FPConfig = { ignoreKeywords : excludedPaths };
3131            } else {
3132                window.FPConfig.ignoreKeywords = window.FPConfig.ignoreKeywords.concat(excludedPaths);
3133            }
3134            var toEnableInstantPageByPath = true;
3135            if (window.location.pathname && window.location.pathname.includes) {
3136                excludedPaths.forEach(excludedPath => {
3137                    if (window.location.pathname.includes(excludedPath)) {
3138                        toEnableInstantPageByPath = false;
3139                    }
3140                });
3141            }
3142            const spcBar = document ? document.getElementById('shopify-pc__banner') : null;
3143            if (spcBar)
3144                toEnableInstantPageByPath = false;
3145            if (window.document &&
3146                window.document.location &&
3147                window.document.location.pathname &&
3148                window.document.location.pathname.includes) {
3149                excludedPaths.forEach(excludedPath => {
3150                    if (window.document.location.pathname.includes(excludedPath)) {
3151                        toEnableInstantPageByPath = false;
3152                    }
3153                });
3154            }
3155            if(instantPage && toEnableInstantPageByPath){
3156                const tptAddInstantPage =  setInterval(function () {
3157                    try {
3158                        if(document && document.body && (window.top === window.self)){
3159                            var instantScript = document.createElement('script');
3160                            instantScript.src = instantPageUrl;
3161                            document.body.appendChild(instantScript);
3162                            clearInterval(tptAddInstantPage);
3163                        }
3164                    } catch (err) {
3165                        //
3166                    }
3167                }, 500);
3168            }
3169        });
3170    }
3171    if (window.tapita_meta_page_title || window.tapita_meta_page_description) {
3172        replaceMetaTagContent(window.tapita_meta_page_title, window.tapita_meta_page_description, false);
3173    }
3174</script>
3174
3175
3176
3177
3178<!-- END app block -->
3178<script src="https://cdn.shopify.com/extensions/01a0d7a2-a36b-73ee-b8cb-ead3ca4862c3/gdpr-backpack-896/assets/consentmo_cookie_consent.js" type="text/javascript" defer="defer"></script>
3178
3179<meta property="og:image" content="https://cdn.shopify.com/s/files/1/0516/7474/2957/files/Logo_Color_BuffaloJeans.png?height=628&pad_color=ffffff&v=1613719929&width=1200" />
3180<meta property="og:image:secure_url" content="https://cdn.shopify.com/s/files/1/0516/7474/2957/files/Logo_Color_BuffaloJeans.png?height=628&pad_color=ffffff&v=1613719929&width=1200" />
3181<meta property="og:image:width" content="1200" />
3182<meta property="og:image:height" content="628" />
3183<link href="https://monorail-edge.shopifysvc.com" rel="dns-prefetch">
3184<script>(function(){if ("sendBeacon" in navigator && "performance" in window) {try {var session_token_from_headers = performance.getEntriesByType('navigation')[0].serverTiming.find(x => x.name == '_s').description;} catch {var session_token_from_headers = undefined;}var session_cookie_matches = document.cookie.match(/_shopify_s=([^;]*)/);var session_token_from_cookie = session_cookie_matches && session_cookie_matches.length === 2 ? session_cookie_matches[1] : "";var session_token = session_token_from_headers || session_token_from_cookie || "";function handle_abandonment_event(e) {var entries = performance.getEntries().filter(function(entry) {return /monorail-edge.shopifysvc.com/.test(entry.name);});if (!window.abandonment_tracked && entries.length === 0) {window.abandonment_tracked = true;var currentMs = Date.now();var navigation_start = performance.timing.navigationStart;var payload = {shop_id: 51674742957,url: window.location.href,navigation_start,duration: currentMs - navigation_start,session_token,page_type: "customers/login"};window.navigator.sendBeacon("https://monorail-edge.shopifysvc.com/v1/produce", JSON.stringify({schema_id: "online_store_buyer_site_abandonment/1.1",payload: payload,metadata: {event_created_at_ms: currentMs,event_sent_at_ms: currentMs}}));}}window.addEventListener('pagehide', handle_abandonment_event);}}());</script>
vendor: 1 bytes, line 3184
3184
3185<script>
3186  window.__TREKKIE_SHIM_QUEUE = window.__TREKKIE_SHIM_QUEUE || [];
3187</script>
vendor: 1 bytes, line 3187
3187
3188<script>(function(){var wpmLoader=function(){"use strict";var e=/Googlebot|Storebot-Google|bingbot|Baiduspider|YandexBot|DuckDuckBot|Slurp|facebookexternalhit|Twitterbot|LinkedInBot|Applebot|AdsBot-Google|Mediapartners-Google|APIs-Google|PetalBot|SemrushBot|AhrefsBot|MJ12bot|DotBot|Acunetix|PerplexityBot|Perplexity-User/i,t=/bytedance/i;function i(){try{var e=document.cookie;if(!e||"string"!=typeof e)return;for(var t=0,i=e.split(";");t<i.length;t++){var n=i[t],r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r).trim();if(o){var a=void 0;try{a=decodeURIComponent(o)}catch(e){a=o}if("_shopify_s"===a){var d=n.slice(r+1).trim();try{return decodeURIComponent(d)}catch(e){return d}}}}}return}catch(e){return}}function n(e){try{"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e)}catch(e){}}function r(e,t){return"string"==typeof e&&e.length>0&&e.length<=t?e:void 0}function o(e){var t;switch(null==(t=null==e?void 0:e.navigation)?void 0:t.type){case 0:return"navigate";case 1:return"reload";case 2:return"back_forward";default:return}}function a(){var e,t,i;try{var n=null==(i=null==(t=null==(e=self.ShopifyAnalytics)?void 0:e.lib)?void 0:t.trekkie)?void 0:i.state;return"awaiting-consent"===n||"initialized"===n?n:void 0}catch(e){return}}return function(d,s,u,l){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};try{var p=c.trekkieShim;!0!==p&&"true"!==p||null!=window.__TREKKIE_SHIM_QUEUE||(window.__TREKKIE_SHIM_QUEUE=[])}catch(e){}var f,v,h,y,g=(v=(f={modern:/Edge?\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Firefox\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Chrom(ium|e)\/(9{2}|\d{3,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(15\.\d+|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(9{2}|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]\d+|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Android.+Firefox\/(15\d|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|SamsungBrowser\/([2-9]\d|\d{3,})\.\d+/,legacy:/Edge?\/(1[6-9]|[2-9]\d|\d{3,})\.\d+(\.\d+|)|Firefox\/(5[4-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)|Chrom(ium|e)\/(5[1-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))|(Maci|X1{2}).+ Version\/(10\.\d+|(1[1-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(3[89]|[4-9]\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(10[._]\d+|(1[1-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(15\d|1[6-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(14[89]|1[5-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(5\.\d+|([6-9]|\d{2,})\.\d+)|Android.+MQ{2}Browser\/(14(\.(9|\d{2,})|)|(1[5-9]|[2-9]\d|\d{3,})(\.\d+|))(\.\d+|)|K[Aa][Ii]OS\/(3\.\d+|([4-9]|\d{2,})\.\d+)(\.\d+|)/}).modern,h=f.legacy,(y=navigator.userAgent).match(e)?"bot":y.match(v)?"modern":y.match(h)?"legacy":y.match(t)?"bot":"unknown"),m=function(e){var t,i,n=r(e,128);try{var a=window.performance,d=null==(t=null==a?void 0:a.getEntriesByType)?void 0:t.call(a,"navigation")[0];if(!d)return{requestId:n,navigationType:o(a)};var s="type"in d?r(d.type,64):void 0,u="serverTiming"in d&&Array.isArray(d.serverTiming)?d.serverTiming:[];return{requestId:null!=n?n:r(null==(i=u.find(function(e){return"requestID"===e.name}))?void 0:i.description,128),navigationType:s}}catch(e){return{requestId:n}}}(c.requestId),w=function(e){var t=e.version,r=e.browserTarget,o=e.surface,a=e.shopId,d=e.monorailEndpoint,s=window.location.href;return{emit:function(e){var u=e.status,l=e.errorMsg,c=e.failureReason,p=e.useKeepaliveFallback,f=void 0!==p&&p,v=e.navigationType,h=e.pagehidePersisted,y=e.requestId,g=e.trekkieState;if(d){var m,w;try{var b=(new Date).getTime();m=JSON.stringify({metadata:{event_sent_at_ms:b},events:[{schema_id:"web_pixels_manager_load/3.3",payload:{version:t,bundle_target:r,page_url:s,status:u,surface:o,error_msg:l,failure_reason:c,navigation_type:v,pagehide_persisted:h,request_id:y,trekkie_state:g,shop_id:a,visit_token:i()},metadata:{event_created_at_ms:b}}]})}catch(e){return}try{if("function"==typeof window.navigator.sendBeacon&&-1===(w=window.navigator.userAgent).indexOf("iPhone; CPU iPhone OS 12_")&&-1===w.indexOf("iPad; CPU OS 12_")&&-1===w.indexOf("iPod touch; CPU iPhone OS 12_")&&window.navigator.sendBeacon.bind(window.navigator)(d,m))return}catch(e){}if(f)try{"function"==typeof window.fetch&&window.fetch(d,{method:"POST",headers:{"Content-Type":"text/plain"},body:m,keepalive:!0}
3188).catch(function(){})}catch(e){}else try{var _=new XMLHttpRequest;_.open("POST",d,!0),_.setRequestHeader("Content-Type","text/plain"),_.send(m)}catch(e){n("[Web Pixels Manager] Got an unhandled error while logging to Monorail.")}}else n("[Web Pixels Manager] No Monorail endpoint provided, skipping logging.")}}}({version:u,browserTarget:g,surface:d.surface,shopId:d.shopId,monorailEndpoint:d.monorailEndpoint});if(Boolean(null==(_=null==(b=window.Shopify)?void 0:b.analytics)?void 0:_.replayQueue))w.emit({status:"setup-skipped",errorMsg:"replay queue already initialized."});else{var b,_;w.emit({status:"setup-started"}),window.Shopify=window.Shopify||{};var S=window.Shopify;S.analytics=S.analytics||{};var P=S.analytics;P.replayQueue=[],P.publish=function(e,t,i){return P.replayQueue.push([e,t,i]),!0};try{self.performance.mark("wpm:start")}catch(e){}var k,C="modern"===g?"modern":"legacy",E=(null!=l?l:{modern:"",legacy:""})[C],I=[(k={baseUrl:s,hashVersion:u,buildTarget:C}).baseUrl,"/wpm","/b",k.hashVersion,"modern"===k.buildTarget?"m":"l",".js"].join(""),O=!1,T=!1;try{c.browserTarget=g,function(){O=!0;try{window.addEventListener("pagehide",M)}catch(e){O=!1}}(),R(function(){try{R(x)}catch(e){D(e)}}),w.emit({status:"loading",requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()})}catch(e){D(e)}}function U(){var e;if(q(),!function(){var e,t;return Boolean(null==(t=null==(e=window.Shopify)?void 0:e.analytics)?void 0:t.initialized)}()){var t,i,n;try{if("function"!=typeof(null==(e=window.webPixelsManager)?void 0:e.init))return void A();if(!(null!==(n=i=t=window.webPixelsManager.init(d))&&"function"!=typeof n&&Object(n)===n&&"publish"in i&&"function"==typeof i.publish&&"publishCustomEvent"in i&&"function"==typeof i.publishCustomEvent&&"visitor"in i&&"function"==typeof i.visitor))return void A()}catch(e){return void A(e)}var r=window.Shopify.analytics;r.replayQueue.forEach(function(e){var i=e[0],n=e[1],r=e[2];t.publishCustomEvent(i,n,r)}),r.replayQueue=[],r.publish=t.publishCustomEvent,r.visitor=t.visitor,r.initialized=!0}}function A(e){B("manager_api_unavailable",void 0===e?void 0:Q(e))}function x(){B("script_load_failed","".concat(I," has failed to load"))}function B(e,t){T||(T=!0,q(),w.emit({status:"failed",errorMsg:t,failureReason:e,requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()}))}function M(e){O&&(q(),w.emit({status:"pagehide-while-loading",useKeepaliveFallback:!0,pagehidePersisted:e.persisted,requestId:m.requestId,navigationType:m.navigationType,trekkieState:a()}))}function q(){O=!1;try{window.removeEventListener("pagehide",M)}catch(e){}}function R(e){var t;!function(e){var t=e.src,i=e.async,n=void 0===i||i,r=e.onload,o=e.onerror,a=e.sri,d=e.scriptDataAttributes,s=void 0===d?{}:d,u=document.createElement("script"),l=document.querySelector("head"),c=document.querySelector("body");if(u.async=n,u.src=t,a&&(u.integrity=a,u.crossOrigin="anonymous"),s)for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))try{u.dataset[p]=String(s[p])}catch(e){}if(r&&u.addEventListener("load",r),o&&u.addEventListener("error",o),l)l.appendChild(u);else{if(!c)throw new Error("Did not find a head or body element to append the script");c.appendChild(u)}}({src:I,async:!0,onload:U,onerror:e,sri:(t=E,"string"==typeof t&&/^sha384-[A-Za-z0-9+/=]+$/.test(t)?E:""),scriptDataAttributes:c})}function D(e){B("script_append_failed",Q(e))}function Q(e){return e instanceof Error?e.message:"Unknown error"}}}();wpmLoader({shopId: 51674742957,storefrontBaseUrl: "https://www.buffalojeans.ca",extensionsBaseUrl: "https://extensions.shopifycdn.com/cdn/shopifycloud/web-pixels-manager",monorailEndpoint: "https://www.buffalojeans.ca/.well-known/shopify/monorail/unstable/produce_batch",surface: "storefront-renderer",enabledBetaFlags: ["16072cab","8450a54b","7ee89bf1"],webPixelsConfigList: [{"id":"2400157869","configuration":"{\"accountID\":\"123\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"848c306667aa9461e745ee85952411fb","type":"APP","apiClientId":4415147,"privacyPurposes":["ANALYTICS","MARKETING"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_personal_data"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized"}
3188,{"id":"2393211053","configuration":"{\"yotpoStoreId\":\"Jt5koLhjn8dSxUKx7PDCcMhn2M05D8XsiG7b8KV9\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"c5c2579aac465eb24ca7bc0501a6000d","type":"APP","apiClientId":70132,"privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized"},{"id":"1952579757","configuration":"{\"accountID\":\"Sm9a5a\",\"webPixelConfig\":\"eyJlbmFibGVBZGRlZFRvQ2FydEV2ZW50cyI6IHRydWV9\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"c63c5b72c8d77be5f2d27d14c081da38","type":"APP","apiClientId":123074,"privacyPurposes":["ANALYTICS","MARKETING"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized","enabledFlags":["9a3ed68a"]},{"id":"1456439469","configuration":"{\"base_url\": \"https:\/\/p.bluecore.com\/api\/shopify\/pixel\/events\", \"namespace\": \"centric_buffalo_jeans_ca\", \"shop_domain\": \"buffalo-jeans-ca.myshopify.com\", \"events_enabled\": \"{\\\"standard_events\\\": [\\\"checkout_completed\\\"]}\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"0334cb0ef2095de006d16a56ef7e4490","type":"APP","apiClientId":4303617,"privacyPurposes":["ANALYTICS","MARKETING"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized"},{"id":"1280540845","configuration":"{\"config\":\"{\\\"google_tag_ids\\\":[\\\"AW-575494857\\\",\\\"GT-TWQTVSL2\\\"],\\\"target_country\\\":\\\"ZZ\\\",\\\"gtag_events\\\":[{\\\"type\\\":\\\"begin_checkout\\\",\\\"action_label\\\":\\\"AW-575494857\\\/DTD3CO-838MbEMm1tZIC\\\"},{\\\"type\\\":\\\"search\\\",\\\"action_label\\\":\\\"AW-575494857\\\/fJtECPu838MbEMm1tZIC\\\"},{\\\"type\\\":\\\"view_item\\\",\\\"action_label\\\":[\\\"AW-575494857\\\/s-y9CPi838MbEMm1tZIC\\\",\\\"MC-WGEWZZ22E7\\\"]},{\\\"type\\\":\\\"purchase\\\",\\\"action_label\\\":[\\\"AW-575494857\\\/o3qwCOy838MbEMm1tZIC\\\",\\\"MC-WGEWZZ22E7\\\"]},{\\\"type\\\":\\\"page_view\\\",\\\"action_label\\\":[\\\"AW-575494857\\\/O14cCPW838MbEMm1tZIC\\\",\\\"MC-WGEWZZ22E7\\\"]},{\\\"type\\\":\\\"add_payment_info\\\",\\\"action_label\\\":\\\"AW-575494857\\\/EeA0CKaW5cMbEMm1tZIC\\\"},{\\\"type\\\":\\\"add_to_cart\\\",\\\"action_label\\\":\\\"AW-575494857\\\/RHCOCPK838MbEMm1tZIC\\\"}],\\\"enable_monitoring_mode\\\":false}\"}","eventPayloadVersion":"v1","runtimeContext":"OPEN","scriptVersion":"a3321ca85cf5aaf6b57585fcd8d67b3a","type":"APP","apiClientId":1780363,"privacyPurposes":[],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized","enabledFlags":["9a3ed68a"]},{"id":"1094254765","configuration":"{\"accountID\":\"e61aafd9-48c9-4c24-99db-7d62fca2b81f\",\"customCartAddEventNames\":\",\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"8a1c0ad0b207d676b4a622ea95a64a58","type":"APP","apiClientId":159457,"privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized"},{"id":"983171245","configuration":"{\"site_id\":\"9cc1f327-5097-4fae-9f0f-8ddd1665495a\",\"analytics_endpoint\":\"https:\\\/\\\/na.shgcdn3.com\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"695709fc3f146fa50a25299517a954f2","type":"APP","apiClientId":1158168,"privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_personal_data"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized"},{"id":"770900141","configuration":"{\"env\":\"prod\"}","eventPayloadVersion":"v1","runtimeContext":"LAX","scriptVersion":"8a9a175b11d15038a70fe78d09c59720","type":"APP","apiClientId":397
31887633,"privacyPurposes":["ANALYTICS","MARKETING"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized","enabledFlags":["9a3ed68a"]},{"id":"307658925","configuration":"{\"accountID\":\"shopify-51674742957\", \"endpoint\":\"https:\/\/connect.nosto.com\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"85848493c2a1c7a4bbf22728b6f9f31f","type":"APP","apiClientId":272825,"privacyPurposes":["ANALYTICS","MARKETING"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_email","read_customer_name","read_customer_personal_data"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized"},{"id":"293765293","configuration":"{\"shopId\":\"68ffb4e97ab8c9ae05c09e7a\",\"env\":\"production\",\"featureType\":\"standardApp\",\"productViewEnabled\":\"false\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"8ce820d1e5196611b67f5869534b3cca","type":"APP","apiClientId":1464241,"privacyPurposes":["ANALYTICS"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"unrestricted"},{"id":"234356909","configuration":"{\"pixel_id\":\"1620653158231144\",\"pixel_type\":\"facebook_pixel\",\"metaapp_system_user_token\":\"-\"}","eventPayloadVersion":"v1","runtimeContext":"OPEN","scriptVersion":"96420dbe9ea96c426a1b7f364f977719","type":"APP","apiClientId":2329312,"privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_personal_data","read_customer_phone"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized","enabledFlags":["9a3ed68a"]},{"id":"15106221","configuration":"{\"myshopifyDomain\":\"buffalo-jeans-ca.myshopify.com\"}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"23b97d18e2aa74363140dc29c9284e87","type":"APP","apiClientId":2775569,"privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"dataSharingAdjustments":{"protectedCustomerApprovalScopes":["read_customer_address","read_customer_email","read_customer_name","read_customer_phone","read_customer_personal_data"],"dataSharingControls":["share_all_events"]},"dataSharingState":"optimized"},{"id":"58884269","eventPayloadVersion":"1","runtimeContext":"LAX","scriptVersion":"1","type":"CUSTOM","privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"name":"CJ Integration"},{"id":"73498797","eventPayloadVersion":"1","runtimeContext":"LAX","scriptVersion":"1","type":"CUSTOM","privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"name":"Bluecore "},{"id":"156303533","eventPayloadVersion":"1","runtimeContext":"LAX","scriptVersion":"1","type":"CUSTOM","privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"name":"EngageX Pixel"},{"id":"169836717","eventPayloadVersion":"1","runtimeContext":"LAX","scriptVersion":"1","type":"CUSTOM","privacyPurposes":["ANALYTICS","MARKETING","SALE_OF_DATA"],"name":"Floodlight CA"},{"id":"178454701","eventPayloadVersion":"1","runtimeContext":"LAX","scriptVersion":"1","type":"CUSTOM","privacyPurposes":["SALE_OF_DATA"],"name":"Microsoft Purch Conv Consentmo"},{"id":"shopify-app-pixel","configuration":"{}","eventPayloadVersion":"v1","runtimeContext":"STRICT","scriptVersion":"0530","apiClientId":"shopify-pixel","type":"APP","privacyPurposes":["ANALYTICS","MARKETING"]},{"id":"shopify-custom-pixel","eventPayloadVersion":"v1","runtimeContext":"LAX","scriptVersion":"0530","apiClientId":"shopify-pixel","type":"CUSTOM","privacyPurposes":["ANALYTICS","MARKETING"]}],isMerchantRequest: false,initData: {"shop":{"name":"Buffalo Jeans CA","paymentSettings":{"currencyCode":"CAD"},"myshopifyDomain":"buffalo-jeans-ca.myshopify.com","countryCode":"CA","storefrontUrl":"https:\/\/www.buffalojeans.ca"},"customer":null,"cart":null,"checkout":null,"productVariants":[],"products":[],"purchasingCompany":null},},"https://www.buffalojeans.ca/cdn","c8540278we853e1abpb62b2c4amde256306",{"modern":"","legacy":""},{"trekkieShim":true,"agentContext":true,"apiClientId":"580111","facebookCapiEnabled":"true","themeId":"166960070829","themePublished":"true","eventMetadataId":"31a0afc1-a776-496c-babd-520465aa3296","shopId":"51674742957","storefrontBaseUrl":"https:\/\/www.buffalojeans.ca","extensionBaseUrl":"https:\/\/extensions.shopifycdn.com\/cdn\/shopifycloud\/web-pixels-manager","surface":"storefront-renderer","enabledBetaFlags":"[\"16072cab\", \"8450a54b\", \"7ee89bf1\"]","isMerchantRequest":"false","hashVersion":"c8540278we853e1abpb62b2c4amde256306","publish":"custom","events":"[[\"page_viewed\",{}]]"});})();</script>
3188<script>
3189  window.ShopifyAnalytics = window.ShopifyAnalytics || {};
3190  window.ShopifyAnalytics.meta = window.ShopifyAnalytics.meta || {};
3191  window.ShopifyAnalytics.meta.currency = 'CAD';
3192  var meta = {"page":{"requestId":"319add45-ea9b-44cb-b904-13336d6bccb7-1790425597"}};
3193  for (var attr in meta) {
3194    window.ShopifyAnalytics.meta[attr] = meta[attr];
3195  }
3196</script>
vendor: 1 bytes, line 3196
3196
3197<script class="analytics">
3198  (function () {
3199    var customDocumentWrite = function(content) {
3200      var jquery = null;
3201
3202      if (window.jQuery) {
3203        jquery = window.jQuery;
3204      } else if (window.Checkout && window.Checkout.$) {
3205        jquery = window.Checkout.$;
3206      }
3207
3208      if (jquery) {
3209        jquery('body').append(content);
3210      }
3211    };
3212
3213    var hasLoggedConversion = function(token) {
3214      if (token) {
3215        return document.cookie.indexOf('loggedConversion=' + token) !== -1;
3216      }
3217      return false;
3218    }
3219
3220    var setCookieIfConversion = function(token) {
3221      if (token) {
3222        var twoMonthsFromNow = new Date(Date.now());
3223        twoMonthsFromNow.setMonth(twoMonthsFromNow.getMonth() + 2);
3224
3225        document.cookie = 'loggedConversion=' + token + '; expires=' + twoMonthsFromNow;
3226      }
3227    }
3228
3229    var trekkie = window.ShopifyAnalytics.lib = window.trekkie = window.trekkie || [];
3230    window.ShopifyAnalytics.lib.trekkie = window.trekkie;
3231    if (trekkie.integrations) {
3232      return;
3233    }
3234    trekkie.methods = [
3235      'identify',
3236      'page',
3237      'ready',
3238      'track',
3239      'trackForm',
3240      'trackLink'
3241    ];
3242    trekkie.factory = function(method) {
3243      return function() {
3244        var args = Array.prototype.slice.call(arguments);
3245        args.unshift(method);
3246        trekkie.push(args);
3247        if (method == 'track' || method == 'page') {
3248          var pageUrl;
3249          try {
3250            pageUrl = window.location.href;
3251          } catch (e) {}
3252          var pageReferrer;
3253          try {
3254            pageReferrer = document.referrer;
3255          } catch (e) {}
3256          try {
3257            if (window.__TREKKIE_SHIM_QUEUE == null) {
3258              window.__TREKKIE_SHIM_QUEUE = [];
3259            }
3260            window.__TREKKIE_SHIM_QUEUE.push({
3261              from: 'trekkie-stub',
3262              method: method,
3263              args: args.slice(1),
3264              pageContext: {
3265                url: pageUrl,
3266                referrer: pageReferrer
3267              }
3268            });
3269          } catch (e) {
3270            // no-op
3271          }
3272        }
3273        return trekkie;
3274      };
3275    };
3276    for (var i = 0; i < trekkie.methods.length; i++) {
3277      var key = trekkie.methods[i];
3278      trekkie[key] = trekkie.factory(key);
3279    }
3280    trekkie.load = function(config) {
3281      trekkie.config = config || {};
3282      trekkie.config.initialDocumentCookie = document.cookie;
3283      var first = document.getElementsByTagName('script')[0];
3284var script = document.createElement('script');
3285script.type = 'text/javascript';
3286script.onerror = function(e) {
3287  var scriptFallback = document.createElement('script');
3288  scriptFallback.type = 'text/javascript';
3289  scriptFallback.onerror = function(error) {
3290          var Monorail = {
3291      produce: function produce(monorailDomain, schemaId, payload) {
3292        var currentMs = new Date().getTime();
3293        var event = {
3294          schema_id: schemaId,
3295          payload: payload,
3296          metadata: {
3297            event_created_at_ms: currentMs,
3298            event_sent_at_ms: currentMs
3299          }
3300        };
3301        return Monorail.sendRequest("https://" + monorailDomain + "/v1/produce", JSON.stringify(event));
3302      },
3303      sendRequest: function sendRequest(endpointUrl, payload) {
3304        // Try the sendBeacon API
3305        if (window && window.navigator && typeof window.navigator.sendBeacon === 'function' && typeof window.Blob === 'function' && !Monorail.isIos12()) {
3306          var blobData = new window.Blob([payload], {
3307            type: 'text/plain'
3308          });
3309
3310          if (window.navigator.sendBeacon(endpointUrl, blobData)) {
3311            return true;
3312          } // sendBeacon was not successful
3313
3314        } // XHR beacon
3315
3316        var xhr = new XMLHttpRequest();
3317
3318        try {
3319          xhr.open('POST', endpointUrl);
3320          xhr.setRequestHeader('Content-Type', 'text/plain');
3321          xhr.send(payload);
3322        } catch (e) {
3323          console.log(e);
3324        }
3325
3326        return false;
3327      },
3328      isIos12: function isIos12() {
3329        return window.navigator.userAgent.lastIndexOf('iPhone; CPU iPhone OS 12_') !== -1 || window.navigator.userAgent.lastIndexOf('iPad; CPU OS 12_') !== -1;
3330      }
3331    };
3332    Monorail.produce('monorail-edge.shopifysvc.com',
3333      'trekkie_storefront_load_errors/1.1',
3334      {shop_id: 51674742957,
3335      theme_id: 166960070829,
3336      app_name: "storefront",
3337      context_url: window.location.href,
3338      source_url: "//www.buffalojeans.ca/cdn/s/trekkie.storefront.f1ba865b3fecd812ad617f74ac079261075e9edb.min.js"});
3339
3340  };
3341  scriptFallback.async = true;
3342  scriptFallback.src = '//www.buffalojeans.ca/cdn/s/trekkie.storefront.f1ba865b3fecd812ad617f74ac079261075e9edb.min.js';
3343  first.parentNode.insertBefore(scriptFallback, first);
3344};
3345script.async = true;
3346script.src = '//www.buffalojeans.ca/cdn/s/trekkie.storefront.f1ba865b3fecd812ad617f74ac079261075e9edb.min.js';
3347first.parentNode.insertBefore(script, first);
3348
3349    };
3350    trekkie.load(
3351      {"Trekkie":{"appName":"storefront","development":false,"defaultAttributes":{"shopId":51674742957,"isMerchantRequest":null,"themeId":166960070829,"themeCityHash":"11251963751612737350","contentLanguage":"en","currency":"CAD","eventMetadataId":"31a0afc1-a776-496c-babd-520465aa3296"},"isServerSideCookieWritingEnabled":true,"monorailRegion":"shop_domain","enabledBetaFlags":["764d78cb","8450a54b","7ee89bf1"]},"Session Attribution":{},"S2S":{"facebookCapiEnabled":true,"source":"trekkie-storefront-renderer","apiClientId":580111}}
3352    );
3353
3354    var loaded = false;
3355    trekkie.ready(function() {
3356      if (loaded) return;
3357      loaded = true;
3358
3359      window.ShopifyAnalytics.lib = window.trekkie;
3360
3361      var originalDocumentWrite = document.write;
3362      document.write = customDocumentWrite;
3363      try { window.ShopifyAnalytics.merchantGoogleAnalytics.call(this); } catch(error) {};
3364      document.write = originalDocumentWrite;
3365
3366      var match = window.location.pathname.match(/checkouts\/(.+)\/(thank_you|post_purchase)/)
3367      var token = match? match[1]: undefined;
3368      if (!hasLoggedConversion(token)) {
3369        setCookieIfConversion(token);
3370        
3371      }
3372    });
3373
3374    window.ShopifyAnalytics.lib.page(null,{"requestId":"319add45-ea9b-44cb-b904-13336d6bccb7-1790425597","shopifyEmitted":true});
3375
3376    var eventsListenerScript = document.createElement('script');
3377    eventsListenerScript.async = true;
3378    eventsListenerScript.src = "//www.buffalojeans.ca/cdn/shopifycloud/storefront/assets/shop_events_listener-4e26a9ce.js";
3379    document.getElementsByTagName('head')[0].appendChild(eventsListenerScript);
3380})();</script>
3380
3381  
3381<script>
3382  if (!window.ga || (window.ga && typeof window.ga !== 'function')) {
3383    window.ga = function ga() {
3384      (window.ga.q = window.ga.q || []).push(arguments);
3385      if (window.Shopify && window.Shopify.analytics && typeof window.Shopify.analytics.publish === 'function') {
3386        window.Shopify.analytics.publish("ga_stub_called", {}, {sendTo: "google_osp_migration"});
3387      }
3388      console.error("Shopify's Google Analytics stub called with:", Array.from(arguments), "\nSee https://help.shopify.com/manual/promoting-marketing/pixels/pixel-migration#google for more information.");
3389    };
3390    if (window.Shopify && window.Shopify.analytics && typeof window.Shopify.analytics.publish === 'function') {
3391      window.Shopify.analytics.publish("ga_stub_initialized", {}, {sendTo: "google_osp_migration"});
3392    }
3393  }
3394</script>
vendor: 1 bytes, line 3394
3394
3395<script
3396  defer
3397  src="https://www.buffalojeans.ca/cdn/shopifycloud/perf-kit/shopify-perf-kit-3.9.4.min.js"
3398  data-application="storefront-renderer"
3399  data-shop-id="51674742957"
3400  data-render-region="gcp-us-central1"
3401  data-page-type="customers/login"
3402  data-theme-instance-id="166960070829"
3403  data-theme-name="Prestige"
3404  data-theme-version="4.9.1"
3405  data-monorail-region="shop_domain"
3406  data-resource-timing-sampling-rate="10"
3407  data-shs="true"
3408  data-shs-beacon="true"
3409  data-shs-export-with-fetch="true"
3410  data-shs-logs-sample-rate="1"
3411  data-shs-beacon-endpoint="https://www.buffalojeans.ca/api/collect"
3412></script>
3412
3413<meta name="shopify-y" content="844ddd19-8686-4b4f-9aa0-98efbf6a36a5" data-expiration="1821983197000"><meta name="shopify-s" content="bb97063e-91af-446f-8f11-eaf693403f08" data-expiration="1790427397000"><meta name="new-cookie-storage-activated" content="t">
3414</head><body id="account" class="prestige--v4 features--heading-small features--heading-uppercase features--show-element-staggering template-customers template-login template--customers/login">
3415    <a class="PageSkipLink u-visually-hidden" href="#main">Skip to content</a>
3416    <span class="LoadingBar"></span><div id="shopify-section-popup" class="shopify-section"></div>
3417    <div id="shopify-section-sidebar-menu" class="shopify-section"><section id="sidebar-menu" class="SidebarMenu Drawer Drawer--small Drawer--fromLeft" aria-hidden="true" data-section-id="sidebar-menu" data-section-type="sidebar-menu">
3418  <header class="Drawer__Header" data-drawer-animated-left>
3419    <button class="Drawer__Close Icon-Wrapper--clickable" data-action="close-drawer" data-drawer-id="sidebar-menu" aria-label="Close navigation"><svg class="Icon Icon--close" role="presentation" viewBox="0 0 16 14">
3420      <path d="M15 0L1 14m14 0L1 0" stroke="currentColor" fill="none" fill-rule="evenodd"></path>
3421    </svg></button>
3422  </header>
3423
3424  <div class="Drawer__Content">
3425    <div class="Drawer__Main" data-drawer-animated-left data-scrollable>
3426      <div class="Drawer__Container">
3427        <nav class="SidebarMenu__Nav SidebarMenu__Nav--primary" aria-label="Sidebar navigation"><div class="Collapsible"><button class="Collapsible__Button u-h6 mob-nav--new" data-action="toggle-collapsible" aria-expanded="false">New<span class="Collapsible__Plus"></span>
3428                </button>
3429
3430                <div class="Collapsible__Inner">
3431                  <div class="Collapsible__Content"><div class="Collapsible"><a href="/collections/men-new-arrivals" class="Collapsible__Button Text--subdued Link Link--primary u-h7 mob-sub-nav--mens-new-arrivals">Men&#39;s New Arrivals</a></div><div class="Collapsible"><a href="/collections/women-new-arrivals" class="Collapsible__Button Text--subdued Link Link--primary u-h7 mob-sub-nav--womens-new-arrivals">Women&#39;s New Arrivals</a></div></div>
3432                </div></div><div class="Collapsible"><button class="Collapsible__Button u-h6 mob-nav--men" data-action="toggle-collapsible" aria-expanded="false">Men<span class="Collapsible__Plus"></span>
3433                </button>
3434
3435                <div class="Collapsible__Inner">
3436                  <div class="Collapsible__Content"><div class="Collapsible"><button class="Collapsible__Button Text--subdued Link--primary u-h7" data-action="toggle-collapsible" aria-expanded="false">Jeans<span class="Collapsible__Plus"></span>
3437                          </button>
3438
3439                          <div class="Collapsible__Inner">
3440                            <div class="Collapsible__Content">
3441                              <ul class="Linklist Linklist--bordered Linklist--spacingLoose"><li class="Linklist__Item">
3442                                    <a href="/collections/mens-straight-fit-jeans" class="Text--subdued Link Link--primary mob-sub-nav--straight">Straight</a>
3443                                  </li><li class="Linklist__Item">
3444                                    <a href="/collections/mens-loose-fit-jeans" class="Text--subdued Link Link--primary mob-sub-nav--relaxed">Relaxed</a>
3445                                  </li><li class="Linklist__Item">
3446                                    <a href="/collections/mens-baggy-jeans" class="Text--subdued Link Link--primary mob-sub-nav--baggy-loose">Baggy &amp; Loose</a>
3447                                  </li><li class="Linklist__Item">
3448                                    <a href="/collections/mens-bootcut-jeans" class="Text--subdued Link Link--primary mob-sub-nav--bootcut">Bootcut</a>
3449                                  </li><li class="Linklist__Item">
3450                                    <a href="/collections/mens-slim-fit-jeans" class="Text--subdued Link Link--primary mob-sub-nav--slim">Slim</a>
3451                                  </li><li class="Linklist__Item">
3452                                    <a href="/collections/mens-skinny-jeans" class="Text--subdued Link Link--primary mob-sub-nav--skinny">Skinny</a>
3453                                  </li><li class="Linklist__Item">
3454                                    <a href="/collections/mens-jeans" class="Text--subdued Link Link--primary mob-sub-nav--shop-all-fits">Shop All Fits</a>
3455                                  </li><li class="Linklist__Item">
3456                                    <a href="/pages/fitguide-men" class="Text--subdued Link Link--primary mob-sub-nav--fit-guide">Fit Guide</a>
3457                                  </li></ul>
3458                            </div>
3459                          </div></div><div class="Collapsible"><button class="Collapsible__Button Text--subdued Link--primary u-h7" data-action="toggle-collapsible" aria-expanded="false">Fits We Love<span class="Collapsible__Plus"></span>
3460                          </button>
3461
3462                          <div class="Collapsible__Inner">
3463                            <div class="Collapsible__Content">
3464                              <ul class="Linklist Linklist--bordered Linklist--spacingLoose"><li class="Linklist__Item">
3465                                    <a href="/collections/mens-straight-fit-jeans" class="Text--subdued Link Link--primary mob-sub-nav--straight-six">Straight Six </a>
3466                                  </li><li class="Linklist__Item">
3467                                    <a href="/collections/mens-slim-fit-jeans" class="Text--subdued Link Link--primary mob-sub-nav--slim-ash">Slim Ash</a>
3468                                  </li><li class="Linklist__Item">
3469                                    <a href="/collections/mens-easy-fit-jeans" class="Text--subdued Link Link--primary mob-sub-nav--easy-fit-ruffer">Easy Fit Ruffer</a>
3470                                  </li></ul>
3471                            </div>
3472                          </div></div><div class="Collapsible"><button class="Collapsible__Button Text--subdued Link--primary u-h7" data-action="toggle-collapsible" aria-expanded="false">Clothing<span class="Collapsible__Plus"></span>
3473                          </button>
3474
3475                          <div class="Collapsible__Inner">
3476                            <div class="Collapsible__Content">
3477                              <ul class="Linklist Linklist--bordered Linklist--spacingLoose"><li class="Linklist__Item">
3478                                    <a href="/collections/mens-jeans" class="Text--subdued Link Link--primary mob-sub-nav--jeans">Jeans</a>
3479                                  </li><li class="Linklist__Item">
3480                                    <a href="/collections/mens-pants" class="Text--subdued Link Link--primary mob-sub-nav--pants">Pants</a>
3481                                  </li><li class="Linklist__Item">
3482                                    <a href="/collections/mens-shorts" class="Text--subdued Link Link--primary mob-sub-nav--shorts">Shorts</a>
3483                                  </li><li class="Linklist__Item">
3484                                    <a href="/collections/mens-tshirts" class="Text--subdued Link Link--primary mob-sub-nav--tops-tees">Tops &amp; Tees</a>
3485                                  </li><li class="Linklist__Item">
3486                                    <a href="/collections/mens-shirts" class="Text--subdued Link Link--primary mob-sub-nav--shirts">Shirts</a>
3487                                  </li><li class="Linklist__Item">
3488                                    <a href="/collections/mens-sweaters" class="Text--subdued Link Link--primary mob-sub-nav--sweaters">Sweaters</a>
3489                                  </li><li class="Linklist__Item">
3490                                    <a href="/collections/mens-sweatshirts-hoodies" class="Text--subdued Link Link--primary mob-sub-nav--sweatshirts">Sweatshirts</a>
3491                                  </li><li class="Linklist__Item">
3492                                    <a href="/collections/mens-hoodies" class="Text--subdued Link Link--primary mob-sub-nav--hoodies">Hoodies</a>
3493                                  </li><li class="Linklist__Item">
3494                                    <a href="/collections/mens-jackets" class="Text--subdued Link Link--primary mob-sub-nav--jackets">Jackets</a>
3495                                  </li><li class="Linklist__Item">
3496                                    <a href="/collections/mens-underwear-accessories" class="Text--subdued Link Link--primary mob-sub-nav--belts-accessories">Belts &amp; Accessories</a>
3497                                  </li><li class="Linklist__Item">
3498                                    <a href="/collections/mens-clothing" class="Text--subdued Link Link--primary mob-sub-nav--shop-all">Shop All</a>
3499                                  </li></ul>
3500                            </div>
3501                          </div></div><div class="Collapsible"><button class="Collapsible__Button Text--subdued Link--primary u-h7" data-action="toggle-collapsible" aria-expanded="false">Featured<span class="Collapsible__Plus"></span>
3502                          </button>
3503
3504                          <div class="Collapsible__Inner">
3505                            <div class="Collapsible__Content">
3506                              <ul class="Linklist Linklist--bordered Linklist--spacingLoose"><li class="Linklist__Item">
3507                                    <a href="/collections/men-best-sellers" class="Text--subdued Link Link--primary mob-sub-nav--best-sellers">Best Sellers</a>
3508                                  </li><li class="Linklist__Item">
3509                                    <a href="/collections/freedom-flex-fleece-jeans" class="Text--subdued Link Link--primary mob-sub-nav--freedom-flex-fleece-jeans">Freedom Flex - Fleece Jeans</a>
3510                                  </li><li class="Linklist__Item">
3511                                    <a href="/collections/wardrobe-essentials-men" class="Text--subdued Link Link--primary mob-sub-nav--wardrobe-essentials">Wardrobe Essentials</a>
3512                                  </li><li class="Linklist__Item">
3513                                    <a href="/collections/mens-destination-cozy" class="Text--subdued Link Link--primary mob-sub-nav--destination-cozy">Destination Cozy</a>
3514                                  </li><li class="Linklist__Item">
3515                                    <a href="/collections/men-sale" class="Text--subdued Link Link--primary mob-sub-nav--sale">SALE</a>
3516                                  </li></ul>
3517                            </div>
3518                          </div></div></div>
3519                </div></div><div class="Collapsible"><button class="Collapsible__Button u-h6 mob-nav--women" data-action="toggle-collapsible" aria-expanded="false">Women<span class="Collapsible__Plus"></span>
3520                </button>
3521
3522                <div class="Collapsible__Inner">
3523                  <div class="Collapsible__Content"><div class="Collapsible"><button class="Collapsible__Button Text--subdued Link--primary u-h7" data-action="toggle-collapsible" aria-expanded="false">Jeans<span class="Collapsible__Plus"></span>
3524                          </button>
3525
3526                          <div class="Collapsible__Inner">
3527                            <div class="Collapsible__Content">
3528                              <ul class="Linklist Linklist--bordered Linklist--spacingLoose"><li class="Linklist__Item">
3529                                    <a href="/collections/womens-wide-leg-jeans" class="Text--subdued Link Link--primary mob-sub-nav--loose-wide">Loose &amp; Wide</a>
3530                                  </li><li class="Linklist__Item">
3531                                    <a href="/collections/womens-straight-leg-jeans" class="Text--subdued Link Link--primary mob-sub-nav--slim-straight">Slim &amp; Straight</a>
3532                                  </li><li class="Linklist__Item">
3533                                    <a href="/collections/womens-bootcut-jeans" class="Text--subdued Link Link--primary mob-sub-nav--bootcut-flare">Bootcut &amp; Flare</a>
3534                                  </li><li class="Linklist__Item">
3535                                    <a href="/collections/womens-skinny-jeans" class="Text--subdued Link Link--primary mob-sub-nav--skinny">Skinny</a>
3536                                  </li><li class="Linklist__Item">
3537                                    <a href="/collections/womens-jeans" class="Text--subdued Link Link--primary mob-sub-nav--shop-all-fits">Shop All Fits</a>
3538                                  </li><li class="Linklist__Item">
3539                                    <a href="/pages/fitguide-women" class="Text--subdued Link Link--primary mob-sub-nav--fit-guide">Fit Guide</a>
3540                                  </li></ul>
3541                            </div>
3542                          </div></div><div class="Collapsible"><button class="Collapsible__Button Text--subdued Link--primary u-h7" data-action="toggle-collapsible" aria-expanded="false">Fits We Love<span class="Collapsible__Plus"></span>
3543                          </button>
3544
3545                          <div class="Collapsible__Inner">
3546                            <div class="Collapsible__Content">
3547                              <ul class="Linklist Linklist--bordered Linklist--spacingLoose"><li class="Linklist__Item">
3548                                    <a href="/collections/womens-bella-barrel-fit-jeans" class="Text--subdued Link Link--primary mob-sub-nav--bella-barrel">Bella Barrel</a>
3549                                  </li><li class="Linklist__Item">
3550                                    <a href="/collections/womens-amelia-wide-leg-jeans" class="Text--subdued Link Link--primary mob-sub-nav--amelia-wide-leg">Amelia Wide Leg</a>
3551                                  </li><li class="Linklist__Item">
3552                                    <a href="/collections/womens-mariah-straight-fit-jeans" class="Text--subdued Link Link--primary mob-sub-nav--mariah-straight">Mariah Straight</a>
3553                                  </li></ul>
3554                            </div>
3555                          </div></div><div class="Collapsible"><button class="Collapsible__Button Text--subdued Link--primary u-h7" data-action="toggle-collapsible" aria-expanded="false">Clothing<span class="Collapsible__Plus"></span>
3556                          </button>
3557
3558                          <div class="Collapsible__Inner">
3559                            <div class="Collapsible__Content">
3560                              <ul class="Linklist Linklist--bordered Linklist--spacingLoose"><li class="Linklist__Item">
3561                                    <a href="/collections/womens-jeans" class="Text--subdued Link Link--primary mob-sub-nav--jeans">Jeans</a>
3562                                  </li><li class="Linklist__Item">
3563                                    <a href="/collections/womens-pants" class="Text--subdued Link Link--primary mob-sub-nav--pants">Pants</a>
3564                                  </li><li class="Linklist__Item">
3565                                    <a href="/collections/womens-shorts-skirts" class="Text--subdued Link Link--primary mob-sub-nav--shorts-skirts">Shorts &amp; Skirts</a>
3566                                  </li><li class="Linklist__Item">
3567                                    <a href="/collections/womens-tops" class="Text--subdued Link Link--primary mob-sub-nav--tops-tees">Tops &amp; Tees</a>
3568                                  </li><li class="Linklist__Item">
3569                                    <a href="/collections/womens-blouses" class="Text--subdued Link Link--primary mob-sub-nav--blouses-shirts">Blouses &amp; Shirts</a>
3570                                  </li><li class="Linklist__Item">
3571                                    <a href="/collections/womens-sweaters" class="Text--subdued Link Link--primary mob-sub-nav--sweaters">Sweaters</a>
3572                                  </li><li class="Linklist__Item">
3573                                    <a href="/collections/womens-dresses" class="Text--subdued Link Link--primary mob-sub-nav--dresses">Dresses</a>
3574                                  </li><li class="Linklist__Item">
3575                                    <a href="/collections/womens-jackets" class="Text--subdued Link Link--primary mob-sub-nav--jackets">Jackets</a>
3576                                  </li><li class="Linklist__Item">
3577                                    <a href="/collections/womens-clothing" class="Text--subdued Link Link--primary mob-sub-nav--shop-all">Shop All</a>
3578                                  </li></ul>
3579                            </div>
3580                          </div></div><div class="Collapsible"><button class="Collapsible__Button Text--subdued Link--primary u-h7" data-action="toggle-collapsible" aria-expanded="false">Featured<span class="Collapsible__Plus"></span>
3581                          </button>
3582
3583                          <div class="Collapsible__Inner">
3584                            <div class="Collapsible__Content">
3585                              <ul class="Linklist Linklist--bordered Linklist--spacingLoose"><li class="Linklist__Item">
3586                                    <a href="/collections/women-best-sellers" class="Text--subdued Link Link--primary mob-sub-nav--best-sellers">Best Sellers</a>
3587                                  </li><li class="Linklist__Item">
3588                                    <a href="/collections/wardrobe-essentials-women" class="Text--subdued Link Link--primary mob-sub-nav--wardrobe-essentials">Wardrobe essentials</a>
3589                                  </li><li class="Linklist__Item">
3590                                    <a href="/collections/womens-destination-cozy" class="Text--subdued Link Link--primary mob-sub-nav--destination-cozy">Destination Cozy</a>
3591                                  </li><li class="Linklist__Item">
3592                                    <a href="/collections/women-sale" class="Text--subdued Link Link--primary mob-sub-nav--sale">SALE</a>
3593                                  </li></ul>
3594                            </div>
3595                          </div></div></div>
3596                </div></div><div class="Collapsible"><button class="Collapsible__Button u-h6 mob-nav--sale" data-action="toggle-collapsible" aria-expanded="false">Sale<span class="Collapsible__Plus"></span>
3597                </button>
3598
3599                <div class="Collapsible__Inner">
3600                  <div class="Collapsible__Content"><div class="Collapsible"><button class="Collapsible__Button Text--subdued Link--primary u-h7" data-action="toggle-collapsible" aria-expanded="false">Men<span class="Collapsible__Plus"></span>
3601                          </button>
3602
3603                          <div class="Collapsible__Inner">
3604                            <div class="Collapsible__Content">
3605                              <ul class="Linklist Linklist--bordered Linklist--spacingLoose"><li class="Linklist__Item">
3606                                    <a href="/collections/men-sale" class="Text--subdued Link Link--primary mob-sub-nav--shop-all">Shop All</a>
3607                                  </li><li class="Linklist__Item">
3608                                    <a href="/collections/mens-sale-fall-winter" class="Text--subdued Link Link--primary mob-sub-nav--fall-winter">Fall &amp; Winter</a>
3609                                  </li><li class="Linklist__Item">
3610                                    <a href="/collections/mens-sale-spring-summer" class="Text--subdued Link Link--primary mob-sub-nav--spring-summer">Spring &amp; Summer</a>
3611                                  </li><li class="Linklist__Item">
3612                                    <a href="/collections/sale-men-jeans" class="Text--subdued Link Link--primary mob-sub-nav--jeans-pants">Jeans &amp; Pants</a>
3613                                  </li><li class="Linklist__Item">
3614                                    <a href="/collections/men-sale-tops" class="Text--subdued Link Link--primary mob-sub-nav--tops">Tops</a>
3615                                  </li><li class="Linklist__Item">
3616                                    <a href="/collections/mens-doorcrashers" class="Text--subdued Link Link--primary mob-sub-nav--doorcrashers">Doorcrashers</a>
3617                                  </li><li class="Linklist__Item">
3618                                    <a href="/collections/men-final-sale" class="Text--subdued Link Link--primary mob-sub-nav--last-chance">Last Chance</a>
3619                                  </li></ul>
3620                            </div>
3621                          </div></div><div class="Collapsible"><button class="Collapsible__Button Text--subdued Link--primary u-h7" data-action="toggle-collapsible" aria-expanded="false">Women<span class="Collapsible__Plus"></span>
3622                          </button>
3623
3624                          <div class="Collapsible__Inner">
3625                            <div class="Collapsible__Content">
3626                              <ul class="Linklist Linklist--bordered Linklist--spacingLoose"><li class="Linklist__Item">
3627                                    <a href="/collections/women-sale" class="Text--subdued Link Link--primary mob-sub-nav--shop-all">Shop All</a>
3628                                  </li><li class="Linklist__Item">
3629                                    <a href="/collections/womens-sale-fall-winter" class="Text--subdued Link Link--primary mob-sub-nav--fall-winter">Fall &amp; Winter</a>
3630                                  </li><li class="Linklist__Item">
3631                                    <a href="/collections/womens-sale-spring-summer" class="Text--subdued Link Link--primary mob-sub-nav--spring-summer">Spring &amp; Summer</a>
3632                                  </li><li class="Linklist__Item">
3633                                    <a href="/collections/sale-women-jeans" class="Text--subdued Link Link--primary mob-sub-nav--jeans-pants">Jeans &amp; Pants</a>
3634                                  </li><li class="Linklist__Item">
3635                                    <a href="/collections/women-sale-tops-dresses" class="Text--subdued Link Link--primary mob-sub-nav--tops-dresses">Tops &amp; Dresses</a>
3636                                  </li><li class="Linklist__Item">
3637                                    <a href="/collections/womens-final-sale" class="Text--subdued Link Link--primary mob-sub-nav--last-chance">Last Chance </a>
3638                                  </li></ul>
3639                            </div>
3640                          </div></div></div>
3641                </div></div></nav><nav class="SidebarMenu__Nav SidebarMenu__Nav--secondary">
3642          <ul class="Linklist Linklist--spacingLoose"><li class="Linklist__Item">
3643                <a href="/account" class="Link Link--primary">Account</a>
3644              </li>
3645            
3646              <li class="Linklist__Item">
3647                <a href="https://www.buffalojeans.ca/pages/loyalty-rewards">VIP Rewards</a>
3648              </li></ul>
3649
3650          
3651<div class="Country__SwitchTop HorizontalList__Item">
3652  <input type="hidden" name="locale_code" value="">
3653  <span class="u-visually-hidden">Language</span>
3654
3655  
3656<svg class="Icon Icon--canada locale__Icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><circle cx="256" cy="256" r="256" fill="#f0f0f0"/><g fill="#d80027">
3657      <path d="M512 256c0-101.494-59.065-189.19-144.696-230.598v461.195C452.935 445.19 512 357.494 512 256zM0 256c0 101.494 59.065 189.19 144.696 230.598V25.402C59.065 66.81 0 154.506 0 256zM300.522 289.391l44.521-22.261-22.26-11.13v-22.261L278.261 256l22.261-44.522h-22.261L256 178.087l-22.261 33.391h-22.261L233.739 256l-44.522
3657-22.261V256l-22.26 11.13 44.521 22.261-11.13 22.261h44.522v33.391h22.26v-33.391h44.522z"/></g>
3658    </svg>
3659  
3660  <button type="button" class="SelectButton Link Link--primary u-h8" aria-haspopup="true" aria-expanded="false" aria-controls="header-locale-popover">
3661    CA/en
3662<svg class="Icon Icon--select-arrow" role="presentation" viewBox="0 0 19 12">
3663      <polyline fill="none" stroke="currentColor" points="17 2 9.5 10 2 2" fill-rule="evenodd" stroke-width="2" stroke-linecap="square"></polyline>
3664    </svg></button>
3665
3666  <div id="header-locale-popover" class="Popover Popover--small Popover--noWrap" aria-hidden="true">
3667    <header class="Popover__Header">
3668      <button type="button" class="Popover__Close Icon-Wrapper--clickable" data-action="close-popover"><svg class="Icon Icon--close" role="presentation" viewBox="0 0 16 14">
3669      <path d="M15 0L1 14m14 0L1 0" stroke="currentColor" fill="none" fill-rule="evenodd"></path>
3670    </svg></button>
3671      <span class="Popover__Title Heading u-h4">Language</span>
3672    </header>
3673
3674    <div class="Popover__Content">
3675      <div class="Locale__CountryList Popover__ValueList Popover__ValueList--center" data-scrollable>
3676        <li class="Locale__Country"><svg class="Icon Icon--united-states locale__Icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><circle cx="256" cy="256" r="256" fill="#f0f0f0"/><g fill="#d80027">
3677      <path d="M244.87 256H512c0-23.106-3.08-45.49-8.819-66.783H244.87V256zM244.87 122.435h229.556a257.35 257.35 0 00-59.07-66.783H244.87v66.783zM256 512c60.249 0 115.626-20.824 159.356-55.652H96.644C140.374 491.176 195.751 512 256 512zM37.574 389.565h436.852a254.474 254.474 0 0028.755-66.783H8.819a254.474 254.474 0 0028.755 66.783z"/></g><path d="M118.584 39.978h23.329l-21.7 15.765 8.289 25.509-21.699-15.765-21.699 15.765 7.16-22.037a257.407 257.407 0 00-49.652 55.337h7.475l-13.813 10.035a255.58 255.58 0 00-6.194 10.938l6.596 20.301-12.306-8.941a253.567 253.567 0 00-8.372 19.873l7.267 22.368h26.822l-21.7 15.765 8.289 25.509-21.699-15.765-12.998 9.444A258.468 258.468 0 000 256h256V0c-50.572 0-97.715 14.67-137.416 39.978zm9.918 190.422l-21.699-15.765L85.104 230.4l8.289-25.509-21.7-15.765h26.822l8.288-25.509 8.288 25.509h26.822l-21.7 15.765 8.289 25.509zm-8.289-100.083l8.289 25.509-21.699-15.765-21.699 15.765 8.289-25.509-21.7-15.765h26.822l8.288-25.509 8.288 25.509h26.822l-21.7 15.765zM220.328 230.4l-21.699-15.765L176.93 230.4l8.289-25.509-21.7-15.765h26.822l8.288-25.509 8.288 25.509h26.822l-21.7 15.765 8.289 25.509zm-8.289-100.083l8.289 25.509-21.699-15.765-21.699 15.765 8.289-25.509-21.7-15.765h26.822l8.288-25.509 8.288 25.509h26.822l-21.7 15.765zm0-74.574l8.289 25.509-21.699-15.765-21.699 15.765 8.289-25.509-21.7-15.765h26.822l8.288-25.509 8.288 25.509h26.822l-21.7 15.765z" fill="#0052b4"/>
3678    </svg><a data-ly-locked href="https://www.buffalojeans.com/account/login?noredirect=yes" class="Link u-h8">United States</a>
3679        </li>
3680        <li class="Locale__Country"><svg class="Icon Icon--canada locale__Icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><circle cx="256" cy="256" r="256" fill="#f0f0f0"/><g fill="#d80027">
3681      <path d="M512 256c0-101.494-59.065-189.19-144.696-230.598v461.195C452.935 445.19 512 357.494 512 256zM0 256c0 101.494 59.065 189.19 144.696 230.598V25.402C59.065 66.81 0 154.506 0 256zM300.522 289.391l44.521-22.261-22.26-11.13v-22.261L278.261 256l22.261-44.522h-22.261L256 178.087l-22.261 33.391h-22.261L233.739 256l-44.522-22.261V256l-22.26 11.13 44.521 22.261-11.13 22.261h44.522v33.391h22.26v-33.391h44.522z"/></g>
3682    </svg><a data-ly-locked href="https://www.buffalojeans.ca/account/login?noredirect=yes" class="Link u-h8">Canada</a>
3683          <ul class="Locale__LangCA">
3684            <li><a data-ly-locked href="https://www.buffalojeans.ca/account/login?noredirect=yes">English</a></li>
3685            <li><a data-ly-locked href="https://www.buffalojeans.ca/fr/account/login?noredirect=yes">Français</a></li>
3686          </ul>
3687        </li>
3688      </div>
3689    </div>
3690  </div>
3691</div>
3692
3693
3694        </nav>
3695      </div>
3696    </div></div>
3697</section>
3698
3699</div>
3700<div id="sidebar-cart" class="Drawer Drawer--fromRight" aria-hidden="true" data-section-id="cart" data-section-type="cart" data-section-settings='{
3701  "type": "drawer",
3702  "itemCount": 0,
3703  "drawer": true,
3704  "hasShippingEstimator": false
3705}'>
3706  <div class="Drawer__Header Drawer__Header--bordered Drawer__Container">
3707      <span class="Drawer__Title Heading u-h4">Cart</span>
3708
3709      <button class="Drawer__Close Icon-Wrapper--clickable" data-action="close-drawer" data-drawer-id="sidebar-cart" aria-label="Close cart"><svg class="Icon Icon--close" role="presentation" viewBox="0 0 16 14">
3710      <path d="M15 0L1 14m14 0L1 0" stroke="currentColor" fill="none" fill-rule="evenodd"></path>
3711    </svg></button>
3712  </div>
3713
3714  <form class="Cart Drawer__Content" action="/cart" method="POST" novalidate>
3715    <div class="Drawer__Main" data-scrollable>
3716
3717
3718        
3719
3720        <div class="Cart__ShippingNotice free-shipping-notice Text--subdued">
3721          <div class="Drawer__Container">
3722            
3723<p>Spend <span>$99.00</span> more and get free shipping!</p>
3724</div>
3725        </div><p class="Cart__Empty Heading u-h5">Your cart is empty</p></div>
3726
3727    <div id="fs-upsell-mini-cart-section" style="height: 220px;"></div></form>
3728  
3729  <!-- Fast Simon Product Recommendation Widget START -->
3729<script id="fast-simon-upsell-config"> var FAST_UPSELL_CONFIG={"badges": null,"badgesCornerGap": 5,"badgesLimit": 4,"badgesLimitPerCorner": 2,"customCSS": "#fast-simon-new-upsell-17573408078118619>#fs-recommendation-widget-main>h2{\n  margin-top: 15px!important;\n  margin-bottom: 15px!important;\n}\n#fast-simon-new-upsell-17573408078118619>div>div{\n  width:100%!important;\n}\n#fs-recommendation-widget-main .fs-recommendation-product-name-wrapper {\n  text-transform: uppercase;\n}\n#fs-recommendation-widget-main .fs-product-has-compare-price .fs-recommendation-price-container {\n  justify-content: flex-end;\n  display: flex;\n  flex-direction: row;\n}\n#fs-recommendation-widget-main .fs-recommendation-compare-price-container {\n  display: flex;\n  align-items: flex-start;\n  margin-left: 10px;\n}\n.fs-recommendation-product-info {\n  margin-top: 15px;\n}\n.fs-recommendation-button {\n  border: none;\n  border-radius: 50%;\n  background: var(--button-text-color);\n  color: var(--button-background);\n  cursor: pointer;\n  text-align: center;\n  z-index: 1;\n  box-shadow: 0 2px 10px #36363626;\n  vertical-align: middle; \n  line-height: 0;\n  transform: scale(1.001);\n  transition: background .15s ease-in-out, opacity .15s ease-in-out, transform .2s ease-in-out, color .2s ease-in-out;\n  overflow: hidden;\n  width: 45px;\n  height: 43px;\n  display: flex;\n  flex-direction: column;\n  align-content: center;\n  align-items: center;\n  justify-content: center;\n}\n[aria-label=\"Previous Slide\"] {\n  margin-left: 10px;\n}\n[aria-label=\"Next Slide\"] {\n  margin-right: 10px;\n}\n[aria-label=\"Next Slide\"]:hover svg {\n  animation: buttonFromLeftToRight .5s ease-in-out forwards;\n}\n[aria-label=\"Previous Slide\"]:hover svg {\n  animation: buttonFromLeftToRight .5s ease-in-out forwards;\n}\n/* Animation states */\n@-webkit-keyframes buttonFromLeftToRight {\n  0% {\n    transform: translateX(0%);\n  }\n\n  25% {\n    opacity: 0;\n    transform: translateX(100%);\n  }\n\n  50% {\n    opacity: 0;\n    transform: translateX(-100%);\n  }\n\n  75% {\n    opacity: 1;\n    transform: translateX(0%);\n  }\n}\n@keyframes buttonFromLeftToRight {\n  0% {\n    transform: translateX(0%);\n  }\n\n  25% {\n    opacity: 0;\n    transform: translateX(100%);\n  }\n\n  50% {\n    opacity: 0;\n    transform: translateX(-100%);\n  }\n\n  75% {\n    opacity: 1;\n    transform: translateX(0%);\n  }\n}  \n.fs-recommendation-widget-title {\n  text-transform: uppercase;\n}\n#fs-recommendation-widget-main .fs-recommendation-widget-title {\n  margin-bottom: 60px;\n  letter-spacing: 0.84px !important;\n  margin-top: 20px;\n}\n#fs-recommendation-widget-main  .dotsContainer {\n  display: none;\n}\n#fs-recommendation-widget-main .fs-recommendation-widget-container {\n  width: 87vw;\n}\n@media (min-width: 600px) {\n    .product-modal {\n        width: fit-content;\n        position: absolute;\n    }\n    .image-wrapper {\n      display: flex;\n      justify-content: center;\n    }\n}\n@media (max-width: 770px) {\n  #fs-recommendation-widget-main .fs-recommendation-button {\n    display: none;\n  }\n  #fs-recommendation-widget-main .fs-recommendation-widget-title {\n    margin-bottom: 40px;\n    letter-spacing: 0.84px !important;\n    margin-top: 20px;\n  }\n  .upsell-cross-sell-product-grid .fs-recommendation-product-container:last-of-type {\n    margin-right: 25vw;\n  }\n  .upsell-cross-sell-product-grid .fs-recommendation-product-container:first-of-type {\n    /*margin-left: 25vw;*/\n  }\n  .product-modal.Button.Button--primary {\n    display: none;\n  }\n}\n\n/*Complete the look*/\n.fs-widget-style-complete-the-look#fs-recommendation-widget-main .fs-recommendation-widget-title {\n    margin-bottom: 10px;\n    letter-spacing: 0.84px !important;\n    margin-top: 10px;\n}\n.fs-widget-style-complete-the-look#fs-recommendation-widget-main .fs-recommendation-widget-container {\n  width: 100%;\n}\n.fs-widget-style-complete-the-look#fs-recommendation-widget-main [aria-label=\"Next Slide\"]:hover svg {\n  animation: none;\n}\n.fs-widget-style-complete-the-look#fs-recommendation-widget-main [aria-label=\"Previous Slide\"]:hover svg {\n  animation: none;\n} \n@media (min-width: 770px) {\n\n  .fs-widget-style-complete-the-look#fs-recommendation-widget-main [aria-label=\"Next Slide\"] {\n    box-shadow: none;\n    position: absolute;\n    left: 100%;\n  }\n  .fs-widget-style-complete-the-look#fs-recommendation-widget-main [aria-label=\"Previous Slide\"] {\n    box-shadow: none;\n    position: absolute;\n    right: 100%;\n  }\n  .fs-widget-style-complete-the-look#fs-recommendation-widget-main .product-modal {\n    position: absolute!important;\n    font-size: 14px;\n    white-space: nowrap;\n    width: 80%!important;\n    text-align: center;\n    padding: 0;
3729\n    align-items: center;\n    justify-content: center;\n  }\n}\n@media (max-width: 770px) {\n  .fs-widget-style-complete-the-look#fs-recommendation-widget-main .upsell-cross-sell-product-grid .fs-recommendation-product-container:last-of-type {\n    margin-right: 10px;\n  }\n  .fs-widget-style-complete-the-look#fs-recommendation-widget-main .upsell-cross-sell-product-grid .fs-recommendation-product-container:first-of-type {\n    margin-left: 10px;\n  }\n  .fs-widget-style-complete-the-look#fs-recommendation-widget-main .fs-recommendation-button {\n    display: flex;\n  }\n  .fs-widget-style-complete-the-look#fs-recommendation-widget-main [aria-label=\"Next Slide\"] {\n    box-shadow: none;\n  }\n  .fs-widget-style-complete-the-look#fs-recommendation-widget-main [aria-label=\"Previous Slide\"] {\n    box-shadow: none;\n  }\n  .fs-widget-style-complete-the-look#fs-recommendation-widget-main .fs-recommendation-button {\n    width: 15px;\n  }\n}\n\n/*Mini cart*/\n.PageOverlay  .fs-widget-style-mini-cart#fs-recommendation-widget-main {\n  display: none;\n}\n.PageOverlay.is-visible .fs-widget-style-mini-cart#fs-recommendation-widget-main {\n  display: block;\n  position: fixed;\n  z-index: 10;\n  width: calc(100% - 400px);\n}\n.fs-widget-style-mini-cart#fs-recommendation-widget-main .fs-recommendation-widget-container {\n  width: 100%;\n}\n.fs-widget-style-mini-cart#fs-recommendation-widget-main .fs-recommendation-button {\n  background-color: #fff;\n}\n@media (max-width: 770px) {\n  .fs-widget-style-mini-cart#fs-recommendation-widget-main {\n    display: none !important;\n  }\n}\n\n#fast-simon-new-upsell-17527611229432250 .fs-recommendation-product-container .product-modal {\n  display: none !important;\n}\n\n\n#fast-simon-new-upsell-1753864871776706 .fs-recommendation-widget-title,  #fast-simon-new-upsell-17538649228604557 .fs-recommendation-widget-title    {\n  display: none !important;\n}\n\n\n.fs-recommendation-product-image {\n  aspect-ratio: unset !important;\n}\n","customIcons": {"left arrow": "<svg viewBox=\"0 0 100 100\" role=\"presentation\" aria-hidden=\"true\" tabindex=\"-1\" disabled=\"disabled\" clickable=\"false\"><path d=\"M 20,50 L 60,90 L 60,85 L 25,50  L 60,15 L 60,10 Z\" class=\"arrow\"></path></svg>","right arrow": "<svg viewBox=\"0 0 100 100\" role=\"presentation\" aria-hidden=\"true\" tabindex=\"-1\" disabled=\"disabled\" clickable=\"false\"><path d=\"M 20,50 L 60,90 L 60,85 L 25,50  L 60,15 L 60,10 Z\" class=\"arrow\" transform=\"translate(100, 100) rotate(180) \"></path></svg>"},"customSwatchesCss": {},"domain": "www.buffalojeans.ca","kind": "Shopify","language": "en","personalization": {"17556080038968737": {"hasPersonalization": true,"widgetOrVariationHasPersonalization": true},"1755608289506371": {"hasPersonalization": true,"widgetOrVariationHasPersonalization": true},"1755608359916700": {"hasPersonalization": true,"widgetOrVariationHasPersonalization": true},"17556084846506676": {"hasPersonalization": true,"widgetOrVariationHasPersonalization": true},"17556123587764281": {"hasPersonalization": true,"widgetOrVariationHasPersonalization": true},"17556124363939459": {"hasPersonalization": true,"widgetOrVariationHasPersonalization": true},"17556125270353361": {"hasPersonalization": true,"widgetOrVariationHasPersonalization": true},"17556127147342104": {"hasPersonalization": true,"widgetOrVariationHasPersonalization": true},"17556127720366667": {"hasPersonalization": true,"widgetOrVariationHasPersonalization": true},"17573408078118619": {"hasPersonalization": true,"widgetOrVariationHasPersonalization": true},"17576090603221351": {"hasPersonalization": true,"widgetOrVariationHasPersonalization": true},"17611633461844886": {"hasPersonalization": true,"widgetOrVariationHasPersonalization": true}},"pricing": {"avoidPricesForNonLoginUsers": false,"currencyConversionRate": "1.00","currencySymbolPosition": "auto","priceRangeFormat": "price_range","showPriceWithoutDecimals": false},"settings": {"product": {"addToCart": {"addToCartPosition": {"1755608122917": "image bottom","defaultValue": "product bottom"},"addToCartType": "product level","ajaxAnimation": false,"backgroundColor": "#1976d2","backgroundColorOnHover": "none","border": "unset","borderColorOnHover": "none","borderRadius": "unset","changeColorsOnHover": false,"color": "#000000","dimensions": {"height": "auto","width": "auto","x": "0","y": "0"},"font": {"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"gridPosition": {"areaName": "addToCart","numOfCols": 3,"row": 5},"isActive": {"1755608122917": false,"defaultValue": false}
3729,"margin": "unset","quantitySelector": false,"quickAddBackgroundColor": "#1976d2","quickAddColor": "#000000","quickAddText": "+ Quick Shop","shadow": "unset","showOnHover": {"1755608122917": true,"defaultValue": false},"showQuickAddBtn": false,"text": "Add to Cart","textColorsOnHover": "none"},"backgroundColor": "none","border": "unset","borderRadius": "unset","colorSwatches": {"changeVariantOnHover": false,"dimensions": {"height": "auto","width": "auto","x": "0","y": "0"},"enableOutOfStockSwatches": false,"gridPosition": {"areaName": "colorSwatches","numOfCols": 3,"row": 6},"isActive": {"1755608122917": true,"defaultValue": false},"margin": "unset","maxSwatches": 6,"swatchesType": "Color"},"compare": {"color": {"1755612592198": "#ffffff","d086d08c24c1": "#161414","defaultValue": "#000000"},"dimensions": {"height": "auto","width": "auto","x": "0","y": "0"},"font": {"1755608122917": {"desktop": {"font": "futura-pt, Sans Serif","fontSize": "16px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"font": "futura-pt, Sans Serif","fontSize": "16px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","mobile": {"font": "futura-pt, Sans Serif","fontSize": "16px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"tablet": {"font": "futura-pt, Sans Serif","fontSize": "16px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"textAlign": "center"},"1755608751423": {"desktop": {"font": "futura-pt, Sans Serif","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"font": "futura-pt, Sans Serif","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","mobile": {"font": "futura-pt, Sans Serif","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"tablet": {"font": "futura-pt, Sans Serif","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"textAlign": "left"},"1755612592198": {"font": "futura-pt, Sans Serif","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"1757358377089": {"font": "Arial","fontSize": "10px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"d086d08c24c1": {"font": "futura-pt, Sans Serif","fontSize": "10px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"defaultValue": {"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"gridPosition": {"areaName": "compare","numOfCols": 1,"row": 2},"isActive": true,"margin": "unset","shadow": "unset"},"description": {"color": "#000000","dimensions": {"height": "auto","width": "auto","x": "0","y": "0"},"font": {"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"gridPosition": {"areaName": "description","numOfCols": 3,"row": 4},"isActive": false,"margin": "unset","numberOfLines": "2","saveSpaceForLineClamp": true,"shadow": "unset"},"dimensions": {"height": "auto","width": "auto","x": "0","y": "0"},"imageCarousel": false,"imageRatio": {"1755608122917": {"imageFit": "cover","imageRatio": 0.6666666666666666},"1755608751423": {"imageFit": "cover","imageRatio": 0.75},"d086d08c24c1": {"imageFit": "cover","imageRatio": 0.75},"defaultValue": {"imageFit": "cover","imageRatio": 0.75},"imageFit": "cover","imageRatio": 0.75},"info": {"grid": {"1755608122917": {"gridAreas": "\"title title title title\" \"price price compare compare\" \"colorSwatches colorSwatches colorSwatches colorSwatches\" ","gridAreasObj": [{"h": 1,"i": "title","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 4,"x": 0,"y": 0},{"h": 1,"i": "price","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 0,"y": 1},{"h": 1,"i": "compare","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 2,"y": 1},{"h": 1,"i": "colorSwatches","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 4,"x": 0,"y": 2}]},"1755608751423": {"desktop": {"gridAreas": "\"title title title title\" \"price price compare compare\" ","gridAreasObj": [{"h": 1,"i": "t
3729itle","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 4,"x": 0,"y": 0},{"h": 1,"i": "price","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 0,"y": 1},{"h": 1,"i": "compare","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 2,"y": 1}]},"gridAreas": "\"title title title title\" \"price price compare compare\" ","gridAreasObj": [{"h": 1,"i": "title","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 4,"x": 0,"y": 0},{"h": 1,"i": "price","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 0,"y": 1},{"h": 1,"i": "compare","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 2,"y": 1}],"mobile": {"gridAreas": "\"title title title title\" \"price price compare compare\" ","gridAreasObj": [{"h": 1,"i": "title","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 4,"x": 0,"y": 0},{"h": 1,"i": "price","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 0,"y": 1},{"h": 1,"i": "compare","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 2,"y": 1}]},"tablet": {"gridAreas": "\"title title title title\" \"price price compare compare\" ","gridAreasObj": [{"h": 1,"i": "title","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 4,"x": 0,"y": 0},{"h": 1,"i": "price","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 0,"y": 1},{"h": 1,"i": "compare","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 2,"y": 1}]}},"1755612592198": {"gridAreas": "\"title title title title\" \"price price compare compare\" ","gridAreasObj": [{"h": 1,"i": "title","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 4,"x": 0,"y": 0},{"h": 1,"i": "price","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 0,"y": 1},{"h": 1,"i": "compare","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 2,"y": 1}]},"1757358377089": {"gridAreas": "\"title title title title\" \"price price price price\" \"compare compare compare compare\" ","gridAreasObj": [{"h": 1,"i": "title","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 4,"x": 0,"y": 0},{"h": 1,"i": "price","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 4,"x": 0,"y": 1},{"h": 1,"i": "compare","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 4,"x": 0,"y": 2}]},"d086d08c24c1": {"gridAreas": "\"title title title title\" \"price price compare compare\" ","gridAreasObj": [{"h": 1,"i": "title","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 4,"x": 0,"y": 0},{"h": 1,"i": "price","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 0,"y": 1},{"h": 1,"i": "compare","maxH": 1,"maxW": 4,"moved": false,"static": false,"w": 2,"x": 2,"y": 1}]},"defaultValue": {"gridAreas": "\"title title title title\" \"price price price price\" \"compare compare compare compare\"","gridAreasObj": [{"h": 1,"i": "title","maxH": 1,"maxW": 4,"w": 4,"x": 0,"y": 0},{"h": 1,"i": "price","maxH": 1,"maxW": 4,"w": 4,"x": 0,"y": 1},{"h": 1,"i": "compare","maxH": 1,"maxW": 4,"w": 4,"x": 1,"y": 2}]},"gridAreas": "\"title title title title\" \"price price price price\" \"compare compare compare compare\"","gridAreasObj": [{"h": 1,"i": "title","maxH": 1,"maxW": 4,"w": 4,"x": 0,"y": 0},{"h": 1,"i": "price","maxH": 1,"maxW": 4,"w": 4,"x": 0,"y": 1},{"h": 1,"i": "compare","maxH": 1,"maxW": 4,"w": 4,"x": 1,"y": 2}]},"padding": {"defaultValue": "0px"}},"lazyLoadingImage": false,"padding": {"defaultValue": "0px"},"price": {"alignIfCompare": {"1755608122917": "center","1755608751423": {"desktop": "left","mobile": "right","tablet": "left"},"1755612592198": "left","d086d08c24c1": "left","defaultValue": "left"},"color": {"1755612592198": "#ffffff","d086d08c24c1": "#0a0a0a","defaultValue": "#000000"},"colorIfCompareEnable": {"1755608122917": "#cd2428","1755612592198": "#ffffff","d086d08c24c1": "#090808","defaultValue": "#C90404"},"currency": "auto","dimensions": {"height": "auto","width": "auto","x": "0","y": "0"},"font": {"1755608122917": {"desktop": {"font": "futura-pt, Sans Serif","fontSize": "16px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"font": "futura-pt, Sans Serif","fontSize": "16px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","mobile": {"font": "futura-pt, Sans Serif","fontSize": "16px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"tablet": {"font": "futura-pt, Sans Serif","fontSize": "16px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"textAlign": "center"},"1755608751423": {"font": "futura-pt, Sans Serif","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"1755612592198": {"font": "futura-pt, Sans Serif","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"1757358377089": {"font": "Arial","fontSize": "10px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"d086d08c24c1": {"font": "futura-pt, Sans Serif","fontSize": "10px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"defaultValue": {"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"gridPosition": {"areaName": "price","numOfCols": 1,"row": 2},"isActive": true,"margin": "unset","shadow": "unset"},"quickView": {"attributes": [],"backgroundColor": "none","border": "1p
3729x solid #000000","borderRadius": "unset","color": "#000000","defaultStoreQuickview": true,"dimensions": {"height": "auto","width": "auto","x": "0","y": "0"},"font": {"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"gridPosition": {"areaName": "quickView","numOfCols": 3,"row": 1},"isActive": {"1755608122917": false,"d086d08c24c1": false,"defaultValue": false},"margin": "unset","text": "Quick View","theme": "modern"},"reviews": {"dimensions": {"height": "auto","width": "auto","x": "0","y": "0"},"font": {"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"gridPosition": {"areaName": "reviews","numOfCols": 3,"row": 3},"isActive": {"1755608751423": false,"1755612592198": false,"defaultValue": false},"margin": "unset","noReviewsStarsColor": "#9F9F9F","reviewsCount": true,"reviewsCountAvg": true,"reviewsCountColor": "#9F9F9F","reviewsStarsColor": "#ffb518","shadow": "unset","widgetForNoReview": true},"shadow": "unset","showBorderOnHover": false,"sku": {"color": "#000000","dimensions": {"height": "auto","width": "auto","x": "0","y": "0"},"font": {"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"gridPosition": {"areaName": "description","numOfCols": 3,"row": 4},"isActive": false,"margin": "unset","shadow": "unset"},"title": {"color": {"1755608122917": "#213079","1755608751423": "#213079","1755612592198": "#ffffff","d086d08c24c1": "#0a0a0a","defaultValue": "#000000"},"dimensions": {"height": "auto","width": "auto","x": "0","y": "0"},"font": {"1755608122917": {"desktop": {"font": "futura-pt, Sans Serif","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "1.5","textAlign": "center"},"font": "futura-pt, Sans Serif","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "1.5","mobile": {"font": "futura-pt, Sans Serif","fontSize": "12px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "1.5","textAlign": "center"},"tablet": {"font": "futura-pt, Sans Serif","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "1.5","textAlign": "center"},"textAlign": "center"},"1755608751423": {"font": "futura-pt, Sans Serif","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "1.5","textAlign": "center"},"1755612592198": {"font": "futura-pt, Sans Serif","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "1.5","textAlign": "center"},"1757358377089": {"font": "Arial","fontSize": "11px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "1.5","textAlign": "left"},"d086d08c24c1": {"font": "futura-pt, Sans Serif","fontSize": "10px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "1.5","textAlign": "center"},"defaultValue": {"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "1.5","textAlign": "left"},"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "1.5","textAlign": "left"},"gridPosition": {"areaName": "title","numOfCols": 3,"row": 1},"isActive": true,"margin": "auto","numberOfLines": {"1755608122917": "2","1755608751423": "4","1755612592198": "4","d086d08c24c1": "4","defaultValue": "1"},"saveSpaceForLineClamp": true},"wishList": {"checkedColor": "#ff1493","checkedIconName": "","dimensions": {"height": "auto","width": "auto","x": "0","y": "0"},"font": {"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"gridPosition": {"areaName": "wishlist","numOfCols": 1,"row": 1},"isActive": false,"isCustomIcon": false,"location": "on-image","margin": "unset","notCheckedColor": "#ff1493","notCheckedIconName": "","padding": "10px","position": "top-left","size": "30px"}},"quickViewModal": {"animationDuration": 400,"animationInX": 0,"animationInY": -200,"animationOutX": 0,"animationOutY": -100,"closeButtonCustomIconName": "","height": "70%","imagesBar": false,"imagesInside": false,"imagesPosition": "left","isCustomIconClose": false,"openingDirection": "top to bottom","quantityBorder": "unset","quantityBorderRadius": "unset","quantityFont": {"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"quantityFontColor": "#000000","quantityLayout": "classic","quantityTitle": "Qty","theme": "classic","width": "70%"},"recommendationGeneral": {"backgroundColor": "none","border": "unset","borderColorOnHover": "none","borderRadius": "unset","collections": ["244207517869"],"currentProgressBarIcon": "","emptyProgressBarIcon": "","font": {"font": "Arial","fontSize": "14px","fontWeight": "400","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "left"},"gridColumnGap": "1px","gridRowGap": "3px","isCustomCarouselIcons": {"1755608122917": true,"1755608751423": {"desktop": true,"mobile": true,"tablet": true},"1755612592198": true,"d086d08c24c1": true,"defaultValue": false},"isCustomProgressBarIcon": false,"layout": "horizontal","leftArrowIcon": {"1755608122917": "left arrow","1755608751423": {"desktop": "left arrow","mobile": "left arrow","tablet": "left arrow"},"1755612592198": "left arrow","d086d08c24c1": "left arrow","defaultValue": ""},"loadMore": false,"maxSuggestionsProducts": 15,"mobileExpandLimitProducts": false,"numberOfColumns": "3","numberOfRows": "3","padding": {"1755608122917": "1px","1755612592198": "0px","d086d08c24c1": "0px","defaultValue": "0px"},"productsPerArrowClick": {"1755608122917": {"desktop": "4","mobile": "1","tablet": "2"},"1755608751423": {"desktop": "2","mobile": "1","tablet": "2"},"1757358377089": "2","d086d08c24c1": "2","defaultValue": "4"},"productsPerSlide": {"1755608122917": {"desktop": "4","mobile": "2","tablet": "3"},"1755608751423": {"desktop": "2","mobile": "1","tablet": "2"},"1757358377089": "2","d086d08c24c1": "2","defaultValue": "4"},"progressBarColor": "#571eae","rightArrowIcon": {"1755608122917": "right arrow","1755608751423": {"desktop": "right arrow","mobile": "right arrow","tablet": "right arrow"},"1755612592198": "right arrow","d086d08c24c1": "right arrow","defaultValue": ""},"sources": ["category_products","related_recent_products","related_recently_viewed"]},"recommendationTitle": {"color": {"1755608122917": "#172342","1755608751423": "#233566","1755612592198": "#ffffff","d086d08c24c1": "#000000","defaultValue": "#000000"},"dimensions": {"height": "auto","width": "auto","x": "0","y": "0"},"font": {"1755608122917": {"desktop": {"font": "futura-pt, Sans Serif","fontSize": "18px","fontWeight": "bold","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"font": "futura-pt-bold, Sans Serif","fontSize": "18px","fontWeight": "bold","letterSpacing": "0.25px","lineHeight": "auto","mobile": {"font": "Arial","fontSize": "18px","fontWeight": "bold","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"tablet": {"font": "Arial","fontSize": "18px","fontWeight": "bold","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"textAlign": "center"},"1755608751423": {"font": "futura-pt, Sans Serif","fontSize": "18px","fontWeight": "bold","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"1755612592198": {"font": "futura-pt, Sans Serif","fontSize": "18px","fontWeight": "bold","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"1757358377089": {"font": "Arial","fontSize": "12px","fontWeight": "bold","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"d086d08c24c1": {"font": "futura-pt, Sans Serif","fontSize": "11px","fontWeight": "bold","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"defaultValue": {"font": "Arial","fontSize": "35px","fontWeight": "bold","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"font": "Arial","fontSize": "35px","fontWeight": "bold","letterSpacing": "0.25px","lineHeight": "auto","textAlign": "center"},"innerText": "MEN NEW ARRIVAL","isActive": true,"margin": "unset","numberOfLines": {"d086d08c24c1": "1","defaultValue": "1"},"shadow": "unset"}},"textBadges": null,"translationProvider": "langify","unifiedBadges": [],"variationWidgetConfig": {},"widgetUiConfig": {"17556080038968737": {"displayType": "embed","isMiniCart": false,"miniCartConfig": {},"popupTrigger": "add-to-cart","style": "1755608122917","styleName": "Home Page","t
3729itle": "Recommendations for you"},"1755608289506371": {"displayType": "embed","isMiniCart": false,"miniCartConfig": {},"popupTrigger": "add-to-cart","style": "1755608122917","styleName": "Home Page","title": "Best Sellers"},"1755608359916700": {"displayType": "embed","isMiniCart": false,"miniCartConfig": {},"popupTrigger": "add-to-cart","style": "1755608122917","styleName": "Home Page","title": "Other Customers Were Interested In"},"17556084846506676": {"displayType": "embed","isMiniCart": false,"miniCartConfig": {},"popupTrigger": "add-to-cart","style": "1755608751423","styleName": "Complete the look","title": "complete the look"},"17556123587764281": {"displayType": "embed","isMiniCart": false,"miniCartConfig": {},"popupTrigger": "add-to-cart","style": "1755608122917","styleName": "Home Page","title": "Still Interested In These?"},"17556124363939459": {"displayType": "embed","isMiniCart": false,"miniCartConfig": {},"popupTrigger": "add-to-cart","style": "1755608122917","styleName": "Home Page","title": "People Who Bought These Also Bought..."},"17556125270353361": {"displayType": "embed","isMiniCart": false,"miniCartConfig": {},"popupTrigger": "add-to-cart","style": "1755612592198","styleName": "Mini cart","title": "Recommended For You"},"17556127147342104": {"displayType": "embed","isMiniCart": false,"miniCartConfig": {},"popupTrigger": "add-to-cart","style": "1755608122917","styleName": "Home Page","title": "MEN NEW ARRIVAL"},"17556127720366667": {"displayType": "embed","isMiniCart": false,"miniCartConfig": {},"popupTrigger": "add-to-cart","style": "1755608122917","styleName": "Home Page","title": "WOMEN NEW ARRIVAL"},"17573408078118619": {"displayType": "embed","isMiniCart": false,"miniCartConfig": {},"popupTrigger": "add-to-cart","style": "1757358377089","styleName": "mini cart latest","title": "You May Also Like"},"17576090603221351": {"displayType": "embed","isMiniCart": false,"miniCartConfig": {},"popupTrigger": "add-to-cart","style": "1755608751423","styleName": "Complete the look","title": "complete the look"},"17611633461844886": {"displayType": "embed","isMiniCart": true,"miniCartConfig": {"addToCartTrigger": true,"cartDrawerSelector": "","cartIconSelector": "#cart","miniCartBodySelector": "#sidebar-cart > form > div.Drawer__Main","miniCartBottomSelector": "#sidebar-cart > form > div.Drawer__Footer","reloadProductsOnOpen": true},"popupTrigger": "add-to-cart","style": "d086d08c24c1","styleName": "Mini cart-copy","title": "People Who Bought These Also Bought..."}},"wishlistProvider": 0}; </script>
3729<div class="fast-simon-new-upsell-17572636489567118" data-settings=FAST_UPSELL_CONFIG style="display:block;height:100%;"></div>
3729<script src="https://static-recommendations.fastsimon.com/no-code-recommendations/fs-recommendations-init.js?uuid=e61aafd9-48c9-4c24-99db-7d62fca2b81f&store_id=51674742957&platform=Shopify&widgetId=17572636489567118" async></script>
3729<!-- Fast Simon Product Recommendation Widget END -->
3730
3731</div>
3732
3733
3734<script>
3735  $(document).ready( function(){
3736    $(document).on("click", "a.product-bundle-cart", function(e){
3737      let group = $("." + $(this).data("group"));
3738         let updateItem = {};
3739         var addItems = [];
3740         group.each((i, e) => {
3741             updateItem[$(e).data("key")] = 0;
3742         })
3743         let removeVariantId = $(this).closest(".CartItemWrapper").data("variant");
3744         let currentProduct = $(this).closest(".CartItemWrapper");
3745     
3746         let remainingVariant = [];
3747     
3748         $('div[data-bundle-id=' + $(this).data("bundle-id") + ']').each((i, e) => {
3749             var item = {};
3750             if ($(e).data("variant") != removeVariantId) {
3751                 remainingVariant.push($(e));
3752                 item["quantity"] = 1;
3753                 item["id"] = $(e).data("variant");
3754                 addItems.push(item);
3755             }
3756         });
3757         $.ajax({
3758          type: 'POST',
3759          url: '/cart/update.js',
3760          data: {
3761              updates: updateItem
3762          },
3763          dataType: 'json',
3764          async: false,
3765          success: async function(res) {
3766              if (addItems.length > 0) {
3767                  await jQuery.post('/cart/add.js', {
3768                      items: addItems
3769                  }, "json");
3770              }
3771              document.documentElement.dispatchEvent(new CustomEvent('cart:refresh', {
3772                bubbles: true
3773              }));
3774          },
3775          error: function(data) {}
3776         });
3777    });
3778  });
3779</script>
3779
3780
3781
3782<div class="PageContainer">
3783      <div id="shopify-section-announcement" class="shopify-section"><section id="section-announcement" data-section-id="announcement" data-section-type="announcement-bar">
3784      <div class="AnnouncementBar" data-announcements-container>
3785        <div class="AnnouncementBar__Wrapper"><div class="Announcement">
3786                  <p class="AnnouncementBar__Content">Weekend Flash Sale - 40% Off Sitewide<a href="/collections/sale" title="Shop Now" aria-label="Shop Now">Shop Now</a></p>
3787            </div><div class="Announcement">
3788                  <p class="AnnouncementBar__Content">Up to 70% Off Markdowns<a href="/collections/marked-down-must-haves" title="Shop Now" aria-label="Shop Now">Shop Now</a></p>
3789            </div><div class="Announcement">
3790                  <p class="AnnouncementBar__Content">Free Standard Shipping on Orders $99+<a href="/pages/shipping-returns" title="Details" aria-label="Details">Details</a></p>
3791            </div></div>  
3792      </div>
3793    </section>
3794
3795    <style>
3796      #section-announcement {
3797        background: #172342;
3798        color: #ffffff;
3799      }
3800    </style>
3801
3802    
3802<script>
3803      document.documentElement.style.setProperty('--announcement-bar-height', document.getElementById('shopify-section-announcement').offsetHeight + 'px');
3804    </script>
3804</div>
3805      <div id="shopify-section-header" class="shopify-section shopify-section--header"><div id="Search" class="Search" aria-hidden="true">
3806  <div class="Search__Inner">
3807    <div class="Search__SearchBar">
3808      <form action="/search" name="GET" role="search" class="Search__Form">
3809        <div class="Search__InputIconWrapper">
3810          <span class="hidden-tablet-and-up"><img src="//www.buffalojeans.ca/cdn/shop/t/525/assets/search.png?v=84615755003518909361790085232" alt="Search"  width="20px" height="20px" /></span>
3811          <span class="hidden-phone"><img src="//www.buffalojeans.ca/cdn/shop/t/525/assets/search.png?v=84615755003518909361790085232" alt="Search"  width="20px" height="20px" /></span>
3812        </div>
3813
3814        <input type="search" class="Search__Input Heading" name="q" autocomplete="off" autocorrect="off" autocapitalize="off" placeholder="Search..." autofocus>
3815        <input type="hidden" name="type" value="product">
3816      </form>
3817
3818      <button class="Search__Close Link Link--primary" data-action="close-search"><svg class="Icon Icon--close" role="presentation" viewBox="0 0 16 14">
3819      <path d="M15 0L1 14m14 0L1 0" stroke="currentColor" fill="none" fill-rule="evenodd"></path>
3820    </svg></button>
3821    </div>
3822
3823    <div class="Search__Results" aria-hidden="true"><div class="PageLayout PageLayout--breakLap">
3824          <div class="PageLayout__Section"></div>
3825          <div class="PageLayout__Section PageLayout__Section--secondary"></div>
3826        </div></div>
3827  </div>
3828</div><header id="section-header" class="Header Header--inline   " data-section-id="header" data-section-type="header" data-section-settings='{
3829  "navigationStyle": "inline",
3830  "hasTransparentHeader":
3831  false,
3832  "isSticky":
3833  true
3834  }' data-section-navigationstyle="inline" role="banner">
3835  <div class="Header__Wrapper">
3836    <div class="Header__FlexItem Header__FlexItem--fill">
3837      <button class="Header__Icon Icon-Wrapper Icon-Wrapper--clickable hidden-desk" aria-expanded="false" data-action="open-drawer" data-drawer-id="sidebar-menu" aria-label="Open navigation">
3838        <span class="hidden-tablet-and-up"><svg class="Icon Icon--nav" role="presentation" viewBox="0 0 20 14">
3839      <path d="M0 14v-1h20v1H0zm0-7.5h20v1H0v-1zM0 0h20v1H0V0z" fill="currentColor"></path>
3840    </svg></span>
3841        <span class="hidden-phone"><svg class="Icon Icon--nav-desktop" role="presentation" viewBox="0 0 24 16">
3842      <path d="M0 15.985v-2h24v2H0zm0-9h24v2H0v-2zm0-7h24v2H0v-2z" fill="currentColor"></path>
3843    </svg></span>
3844      </button><nav class="Header__MainNav hidden-pocket hidden-lap" aria-label="Main navigation">
3845          <ul class="HorizontalList HorizontalList--spacingLoose"><li class="HorizontalList__Item " aria-haspopup="true">
3846                <a href="/collections/new-arrivals" class="Heading u-h6 nav--new">New</a><div class="DropdownMenu" aria-hidden="true">
3847                    <ul class="Linklist"><li class="Linklist__Item" >
3848                          <a href="/collections/men-new-arrivals" class="Link Link--secondary sub-nav--mens-new-arrivals">Men&#39;s New Arrivals
3849                            
3850                          </a></li><li class="Linklist__Item" >
3851                          <a href="/collections/women-new-arrivals" class="Link Link--secondary sub-nav--womens-new-arrivals">Women&#39;s New Arrivals
3852                            
3853                          </a></li></ul>
3854                  </div></li><li class="HorizontalList__Item " aria-haspopup="true">
3855                <a href="/collections/mens-clothing-1" class="Heading u-h6 nav--men">Men<span class="Header__LinkSpacer">Men</span></a><div class="MegaMenu  " aria-hidden="true" >
3856                      <div class="MegaMenu__Inner"><div class="MegaMenu__Item MegaMenu__Item--fit">
3857                            <a href="/collections/mens-jeans" class="MegaMenu__Title Heading u-h7">Jeans</a><ul class="Linklist"><li class="Linklist__Item">
3858                                    <a href="/collections/mens-straight-fit-jeans" class="Link Link--secondary sub-nav--straight">Straight</a>
3859                                  </li><li class="Linklist__Item">
3860                                    <a href="/collections/mens-loose-fit-jeans" class="Link Link--secondary sub-nav--relaxed">Relaxed</a>
3861                                  </li><li class="Linklist__Item">
3862                                    <a href="/collections/mens-baggy-jeans" class="Link Link--secondary sub-nav--baggy-loose">Baggy &amp; Loose</a>
3863                                  </li><li class="Linklist__Item">
3864                                    <a href="/collections/mens-bootcut-jeans" class="Link Link--secondary sub-nav--bootcut">Bootcut</a>
3865                                  </li><li class="Linklist__Item">
3866                                    <a href="/collections/mens-slim-fit-jeans" class="Link Link--secondary sub-nav--slim">Slim</a>
3867                                  </li><li class="Linklist__Item">
3868                                    <a href="/collections/mens-skinny-jeans" class="Link Link--secondary sub-nav--skinny">Skinny</a>
3869                                  </li><li class="Linklist__Item">
3870                                    <a href="/collections/mens-jeans" class="Link Link--secondary sub-nav--shop-all-fits">Shop All Fits</a>
3871                                  </li><li class="Linklist__Item">
3872                                    <a href="/pages/fitguide-men" class="Link Link--secondary sub-nav--fit-guide">Fit Guide</a>
3873                                  </li></ul></div><div class="MegaMenu__Item MegaMenu__Item--fit">
3874                            <a href="/collections/mens-fits-we-love" class="MegaMenu__Title Heading u-h7">Fits We Love</a><ul class="Linklist"><li class="Linklist__Item">
3875                                    <a href="/collections/mens-straight-fit-jeans" class="Link Link--secondary sub-nav--straight-six">Straight Six </a>
3876                                  </li><li class="Linklist__Item">
3877                                    <a href="/collections/mens-slim-fit-jeans" class="Link Link--secondary sub-nav--slim-ash">Slim Ash</a>
3878                                  </li><li class="Linklist__Item">
3879                                    <a href="/collections/mens-easy-fit-jeans" class="Link Link--secondary sub-nav--easy-fit-ruffer">Easy Fit Ruffer</a>
3880                                  </li></ul></div><div class="MegaMenu__Item MegaMenu__Item--fit">
3881                            <a href="/collections/mens-clothing-1" class="MegaMenu__Title Heading u-h7">Clothing</a><ul class="Linklist"><li class="Linklist__Item">
3882                                    <a href="/collections/mens-jeans" class="Link Link--secondary sub-nav--jeans">Jeans</a>
3883                                  </li><li class="Linklist__Item">
3884                                    <a href="/collections/mens-pants" class="Link Link--secondary sub-nav--pants">Pants</a>
3885                                  </li><li class="Linklist__Item">
3886                                    <a href="/collections/mens-shorts" class="Link Link--secondary sub-nav--shorts">Shorts</a>
3887                                  </li><li class="Linklist__Item">
3888                                    <a href="/collections/mens-tshirts" class="Link Link--secondary sub-nav--tops-tees">Tops &amp; Tees</a>
3889                                  </li><li class="Linklist__Item">
3890                                    <a href="/collections/mens-shirts" class="Link Link--secondary sub-nav--shirts">Shirts</a>
3891                                  </li><li class="Linklist__Item">
3892                                    <a href="/collections/mens-sweaters" class="Link Link--secondary sub-nav--sweaters">Sweaters</a>
3893                                  </li><li class="Linklist__Item">
3894                                    <a href="/collections/mens-sweatshirts-hoodies" class="Link Link--secondary sub-nav--sweatshirts">Sweatshirts</a>
3895                                  </li><li class="Linklist__Item">
3896                                    <a href="/collections/mens-hoodies" class="Link Link--secondary sub-nav--hoodies">Hoodies</a>
3897                                  </li><li class="Linklist__Item">
3898                                    <a href="/collections/mens-jackets" class="Link Link--secondary sub-nav--jackets">Jackets</a>
3899                                  </li><li class="Linklist__Item">
3900                                    <a href="/collections/mens-underwear-accessories" class="Link Link--secondary sub-nav--belts-accessories">Belts &amp; Accessories</a>
3901                                  </li><li class="Linklist__Item">
3902                                    <a href="/collections/mens-clothing" class="Link Link--secondary sub-nav--shop-all">Shop All</a>
3903                                  </li></ul></div><div class="MegaMenu__Item MegaMenu__Item--fit">
3904                            <a href="/pages/mens-clothes" class="MegaMenu__Title Heading u-h7">Featured</a><ul class="Linklist"><li class="Linklist__Item">
3905                                    <a href="/collections/men-best-sellers" class="Link Link--secondary sub-nav--best-sellers">Best Sellers</a>
3906                                  </li><li class="Linklist__Item">
3907                                    <a href="/collections/freedom-flex-fleece-jeans" class="Link Link--secondary sub-nav--freedom-flex-fleece-jeans">Freedom Flex - Fleece Jeans</a>
3908                                  </li><li class="Linklist__Item">
3909                                    <a href="/collections/wardrobe-essentials-men" class="Link Link--secondary sub-nav--wardrobe-essentials">Wardrobe Essentials</a>
3910                                  </li><li class="Linklist__Item">
3911                                    <a href="/collections/mens-destination-cozy" class="Link Link--secondary sub-nav--destination-cozy">Destination Cozy</a>
3912                                  </li><li class="Linklist__Item">
3913                                    <a href="/collections/men-sale" class="Link Link--secondary sub-nav--sale">SALE</a>
3914                                  </li></ul></div><div class="MegaMenu__Item" style="width: 660px; min-width: 425px;"><div class="MegaMenu__Push MegaMenu__Push--shrink"><a class="MegaMenu__PushLink" href="/collections/men-new-arrivals"><div class="MegaMenu__PushImageWrapper AspectRatio" style="background: url(//www.buffalojeans.ca/cdn/shop/files/WebHeadersM1_995d00d8-029c-4d47-a3c5-424412f542cc_1x1.jpg?v=1788876185); max-width: 370px; --aspect-ratio: 1.608695652173913">
3915                                    <img class="Image--lazyLoad Image--fadeIn" data-src="//www.buffalojeans.ca/cdn/shop/files/[email protected]?v=1788876185" alt="">
3916
3917                                    <span class="Image__Loader"></span>
3918                                  </div><p class="MegaMenu__PushHeading Heading u-h6">NEW COLLECTION</p><p class="MegaMenu__PushSubHeading Heading Text--subdued u-h7">Shop New Styles</p></a></div><div class="MegaMenu__Push MegaMenu__Push--shrink"><a class="MegaMenu__PushLink" href="https://www.buffalojeans.ca/pages/fitguide-men"><div class="MegaMenu__PushImageWrapper AspectRatio" style="background: url(//www.buffalojeans.ca/cdn/shop/files/WebHeadersM2_54c5c285-fa12-4033-9246-b08d5c638114_1x1.jpg?v=1788876189); max-width: 370px; --aspect-ratio: 1.608695652173913">
3919                                    <img class="Image--lazyLoad Image--fadeIn" data-src="//www.buffalojeans.ca/cdn/shop/files/[email protected]?v=1788876189" alt="">
3920
3921                                    <span class="Image__Loader"></span>
3922                                  </div><p class="MegaMenu__PushHeading Heading u-h6">FIND YOUR PERFECT FIT</p><p class="MegaMenu__PushSubHeading Heading Text--subdued u-h7">Discover The Perfect Denim For You</p></a></div></div></div>
3923                    </div></li><li class="HorizontalList__Item " aria-haspopup="true">
3924                <a href="/pages/womens-clothing" class="Heading u-h6 nav--women">Women<span class="Header__LinkSpacer">Women</span></a><div class="MegaMenu  " aria-hidden="true" >
3925                      <div class="MegaMenu__Inner"><div class="MegaMenu__Item MegaMenu__Item--fit">
3926                            <a href="/collections/womens-jeans" class="MegaMenu__Title Heading u-h7">Jeans</a><ul class="Linklist"><li class="Linklist__Item">
3927                                    <a href="/collections/womens-wide-leg-jeans" class="Link Link--secondary sub-nav--loose-wide">Loose &amp; Wide</a>
3928                                  </li><li class="Linklist__Item">
3929                                    <a href="/collections/womens-straight-leg-jeans" class="Link Link--secondary sub-nav--slim-straight">Slim &amp; Straight</a>
3930                                  </li><li class="Linklist__Item">
3931                                    <a href="/collections/womens-bootcut-jeans" class="Link Link--secondary sub-nav--bootcut-flare">Bootcut &amp; Flare</a>
3932                                  </li><li class="Linklist__Item">
3933                                    <a href="/collections/womens-skinny-jeans" class="Link Link--secondary sub-nav--skinny">Skinny</a>
3934                                  </li><li class="Linklist__Item">
3935                                    <a href="/collections/womens-jeans" class="Link Link--secondary sub-nav--shop-all-fits">Shop All Fits</a>
3936                                  </li><li class="Linklist__Item">
3937                                    <a href="/pages/fitguide-women" class="Link Link--secondary sub-nav--fit-guide">Fit Guide</a>
3938                                  </li></ul></div><div class="MegaMenu__Item MegaMenu__Item--fit">
3939                            <a href="/collections/womens-fits-we-love" class="MegaMenu__Title Heading u-h7">Fits We Love</a><ul class="Linklist"><li class="Linklist__Item">
3940                                    <a href="/collections/womens-bella-barrel-fit-jeans" class="Link Link--secondary sub-nav--bella-barrel">Bella Barrel</a>
3941                                  </li><li class="Linklist__Item">
3942                                    <a href="/collections/womens-amelia-wide-leg-jeans" class="Link Link--secondary sub-nav--amelia-wide-leg">Amelia Wide Leg</a>
3943                                  </li><li class="Linklist__Item">
3944                                    <a href="/collections/womens-mariah-straight-fit-jeans" class="Link Link--secondary sub-nav--mariah-straight">Mariah Straight</a>
3945                                  </li></ul></div><div class="MegaMenu__Item MegaMenu__Item--fit">
3946                            <a href="/collections/womens-clothing" class="MegaMenu__Title Heading u-h7">Clothing</a><ul class="Linklist"><li class="Linklist__Item">
3947                                    <a href="/collections/womens-jeans" class="Link Link--secondary sub-nav--jeans">Jeans</a>
3948                                  </li><li class="Linklist__Item">
3949                                    <a href="/collections/womens-pants" class="Link Link--secondary sub-nav--pants">Pants</a>
3950                                  </li><li class="Linklist__Item">
3951                                    <a href="/collections/womens-shorts-skirts" class="Link Link--secondary sub-nav--shorts-skirts">Shorts &amp; Skirts</a>
3952                                  </li><li class="Linklist__Item">
3953                                    <a href="/collections/womens-tops" class="Link Link--secondary sub-nav--tops-tees">Tops &amp; Tees</a>
3954                                  </li><li class="Linklist__Item">
3955                                    <a href="/collections/womens-blouses" class="Link Link--secondary sub-nav--blouses-shirts">Blouses &amp; Shirts</a>
3956                                  </li><li class="Linklist__Item">
3957                                    <a href="/collections/womens-sweaters" class="Link Link--secondary sub-nav--sweaters">Sweaters</a>
3958                                  </li><li class="Linklist__Item">
3959                                    <a href="/collections/womens-dresses" class="Link Link--secondary sub-nav--dresses">Dresses</a>
3960                                  </li><li class="Linklist__Item">
3961                                    <a href="/collections/womens-jackets" class="Link Link--secondary sub-nav--jackets">Jackets</a>
3962                                  </li><li class="Linklist__Item">
3963                                    <a href="/collections/womens-clothing" class="Link Link--secondary sub-nav--shop-all">Shop All</a>
3964                                  </li></ul></div><div class="MegaMenu__Item MegaMenu__Item--fit">
3965                            <a href="/pages/womens-clothing" class="MegaMenu__Title Heading u-h7">Featured</a><ul class="Linklist"><li class="Linklist__Item">
3966                                    <a href="/collections/women-best-sellers" class="Link Link--secondary sub-nav--best-sellers">Best Sellers</a>
3967                                  </li><li class="Linklist__Item">
3968                                    <a href="/collections/wardrobe-essentials-women" class="Link Link--secondary sub-nav--wardrobe-essentials">Wardrobe essentials</a>
3969                                  </li><li class="Linklist__Item">
3970                                    <a href="/collections/womens-destination-cozy" class="Link Link--secondary sub-nav--destination-cozy">Destination Cozy</a>
3971                                  </li><li class="Linklist__Item">
3972                                    <a href="/collections/women-sale" class="Link Link--secondary sub-nav--sale">SALE</a>
3973                                  </li></ul></div><div class="MegaMenu__Item" style="width: 660px; min-width: 425px;"><div class="MegaMenu__Push MegaMenu__Push--shrink"><a class="MegaMenu__PushLink" href="/collections/women-new-arrivals"><div class="MegaMenu__PushImageWrapper AspectRatio" style="background: url(//www.buffalojeans.ca/cdn/shop/files/WebHeadersW1_2fca7fa1-5dba-487e-8ff2-0994676142a9_1x1.jpg?v=1788876196); max-width: 370px; --aspect-ratio: 1.608695652173913">
3974                                    <img class="Image--lazyLoad Image--fadeIn" data-src="//www.buffalojeans.ca/cdn/shop/files/[email protected]?v=1788876196" alt="">
3975
3976                                    <span class="Image__Loader"></span>
3977                                  </div><p class="MegaMenu__PushHeading Heading u-h6">NEW COLLECTION</p><p class="MegaMenu__PushSubHeading Heading Text--subdued u-h7">Latest Styles For Her</p></a></div><div class="MegaMenu__Push MegaMenu__Push--shrink"><a class="MegaMenu__PushLink" href="https://www.buffalojeans.ca/pages/fitguide-women"><div class="MegaMenu__PushImageWrapper AspectRatio" style="background: url(//www.buffalojeans.ca/cdn/shop/files/WebHeadersW2_95a451da-1f44-43f1-9e5e-02a09b967626_1x1.jpg?v=1788876199); max-width: 370px; --aspect-ratio: 1.608695652173913">
3978                                    <img class="Image--lazyLoad Image--fadeIn" data-src="//www.buffalojeans.ca/cdn/shop/files/[email protected]?v=1788876199" alt="">
3979
3980                                    <span class="Image__Loader"></span>
3981                                  </div><p class="MegaMenu__PushHeading Heading u-h6">FIND YOUR PERFECT FIT</p><p class="MegaMenu__PushSubHeading Heading Text--subdued u-h7">Discover Sizes and Fits</p></a></div></div></div>
3982                    </div></li><li class="HorizontalList__Item " aria-haspopup="true">
3983                <a href="/pages/buffalo-jeans-sale" class="Heading u-h6 nav--sale">Sale<span class="Header__LinkSpacer">Sale</span></a><div class="MegaMenu  " aria-hidden="true" >
3984                      <div class="MegaMenu__Inner"><div class="MegaMenu__Item MegaMenu__Item--fit">
3985                            <a href="/collections/men-sale" class="MegaMenu__Title Heading u-h7">Men</a><ul class="Linklist"><li class="Linklist__Item">
3986                                    <a href="/collections/men-sale" class="Link Link--secondary sub-nav--shop-all">Shop All</a>
3987                                  </li><li class="Linklist__Item">
3988                                    <a href="/collections/mens-sale-fall-winter" class="Link Link--secondary sub-nav--fall-winter">Fall &amp; Winter</a>
3989                                  </li><li class="Linklist__Item">
3990                                    <a href="/collections/mens-sale-spring-summer" class="Link Link--secondary sub-nav--spring-summer">Spring &amp; Summer</a>
3991                                  </li><li class="Linklist__Item">
3992                                    <a href="/collections/sale-men-jeans" class="Link Link--secondary sub-nav--jeans-pants">Jeans &amp; Pants</a>
3993                                  </li><li class="Linklist__Item">
3994                                    <a href="/collections/men-sale-tops" class="Link Link--secondary sub-nav--tops">Tops</a>
3995                                  </li><li class="Linklist__Item">
3996                                    <a href="/collections/mens-doorcrashers" class="Link Link--secondary sub-nav--doorcrashers">Doorcrashers</a>
3997                                  </li><li class="Linklist__Item">
3998                                    <a href="/collections/men-final-sale" class="Link Link--secondary sub-nav--last-chance">Last Chance</a>
3999                                  </li></ul></div><div class="MegaMenu__Item MegaMenu__Item--fit">
4000                            <a href="/collections/women-sale" class="MegaMenu__Title Heading u-h7">Women</a><ul class="Linklist"><li class="Linklist__Item">
4001                                    <a href="/collections/women-sale" class="Link Link--secondary sub-nav--shop-all">Shop All</a>
4002                                  </li><li class="Linklist__Item">
4003                                    <a href="/collections/womens-sale-fall-winter" class="Link Link--secondary sub-nav--fall-winter">Fall &amp; Winter</a>
4004                                  </li><li class="Linklist__Item">
4005                                    <a href="/collections/womens-sale-spring-summer" class="Link Link--secondary sub-nav--spring-summer">Spring &amp; Summer</a>
4006                                  </li><li class="Linklist__Item">
4007                                    <a href="/collections/sale-women-jeans" class="Link Link--secondary sub-nav--jeans-pants">Jeans &amp; Pants</a>
4008                                  </li><li class="Linklist__Item">
4009                                    <a href="/collections/women-sale-tops-dresses" class="Link Link--secondary sub-nav--tops-dresses">Tops &amp; Dresses</a>
4010                                  </li><li class="Linklist__Item">
4011                                    <a href="/collections/womens-final-sale" class="Link Link--secondary sub-nav--last-chance">Last Chance </a>
4012                                  </li></ul></div><div class="MegaMenu__Item" style="width: 660px; min-width: 425px;"><div class="MegaMenu__Push MegaMenu__Push--shrink"><a class="MegaMenu__PushLink" href="/collections/men-sale"><div class="MegaMenu__PushImageWrapper AspectRatio" style="background: url(//www.buffalojeans.ca/cdn/shop/files/WebHeadersM3_200f7203-df4e-4a03-91df-a742a733f034_1x1.jpg?v=1788876191); max-width: 370px; --aspect-ratio: 1.608695652173913">
4013                                    <img class="Image--lazyLoad Image--fadeIn" data-src="//www.buffalojeans.ca/cdn/shop/files/[email protected]?v=1788876191" alt="">
4014
4015                                    <span class="Image__Loader"></span>
4016                                  </div><p class="MegaMenu__PushHeading Heading u-h6">MEN&#39;S SALE</p></a></div><div class="MegaMenu__Push MegaMenu__Push--shrink"><a class="MegaMenu__PushLink" href="/collections/women-sale"><div class="MegaMenu__PushImageWrapper AspectRatio" style="background: url(//www.buffalojeans.ca/cdn/shop/files/WebHeadersW3_1x1.jpg?v=1788876201); max-width: 370px; --aspect-ratio: 1.608695652173913">
4017                                    <img class="Image--lazyLoad Image--fadeIn" data-src="//www.buffalojeans.ca/cdn/shop/files/[email protected]?v=1788876201" alt="">
4018
4019                                    <span class="Image__Loader"></span>
4020                                  </div><p class="MegaMenu__PushHeading Heading u-h6">WOMEN&#39;S SALE</p></a></div></div></div>
4021                    </div></li></ul>
4022        </nav></div><div class="Header__FlexItem Header__FlexItem--logo"><div class="Header__Logo"><a href="/" class="Header__LogoLink">
4023        
4024<img class="Header__LogoImage Header__LogoImage--primary" src="//www.buffalojeans.ca/cdn/shop/files/Website_BUFFALOJEANS_Red_165x.jpg?v=1789409508" srcset="//www.buffalojeans.ca/cdn/shop/files/Website_BUFFALOJEANS_Red_165x.jpg?v=1789409508 1x, //www.buffalojeans.ca/cdn/shop/files/[email protected]?v=1789409508 2x" width="165" alt="Buffalo Jeans CA"></a></div></div>
4025
4026    <div class="Header__FlexItem Header__FlexItem--fill"><nav class="Header__SecondaryNav Header__MainNav hidden-phone">
4027          <ul class="HorizontalList HorizontalList--spacingLoose hidden-pocket hidden-lap">
4028<div class="Country__SwitchTop HorizontalList__Item">
4029  <input type="hidden" name="locale_code" value="">
4030  <span class="u-visually-hidden">Language</span>
4031
4032  
4033<svg class="Icon Icon--canada locale__Icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><circle cx="256" cy="256" r="256" fill="#f0f0f0"/><g fill="#d80027">
4034      <path d="M512 256c0-101.494-59.065-189.19-144.696-230.598v461.195C452.935 445.19 512 357.494 512 256zM0 256c0 101.494 59.065 189.19 144.696 230.598V25.402C59.065 66.81 0 154.506 0 256zM300.522 289.391l44.521-22.261-22.26-11.13v-22.261L278.261 256l22.261-44.522h-22.261L256 178.087l-22.261 33.391h-22.261L233.739 256l-44.522-22.261V256l-22.26 11.13 44.521 22.261-11.13 22.261h44.522v33.391h22.26v-33.391h44.522z"/></g>
4035    </svg>
4036  
4037  <button type="button" class="SelectButton Link Link--primary u-h8" aria-haspopup="true" aria-expanded="false" aria-controls="header-locale-popover">
4038    CA/en
4039<svg class="Icon Icon--select-arrow" role="presentation" viewBox="0 0 19 12">
4040      <polyline fill="none" stroke="currentColor" points="17 2 9.5 10 2 2" fill-rule="evenodd" stroke-width="2" stroke-linecap="square"></polyline>
4041    </svg></button>
4042
4043  <div id="header-locale-popover" class="Popover Popover--small Popover--noWrap" aria-hidden="true">
4044    <header class="Popover__Header">
4045      <button type="button" class="Popover__Close Icon-Wrapper--clickable" data-action="close-popover"><svg class="Icon Icon--close" role="presentation" viewBox="0 0 16 14">
4046      <path d="M15 0L1 14m14 0L1 0" stroke="currentColor" fill="none" fill-rule="evenodd"></path>
4047    </svg></button>
4048      <span class="Popover__Title Heading u-h4">Language</span>
4049    </header>
4050
4051    <div class="Popover__Content">
4052      <div class="Locale__CountryList Popover__ValueList Popover__ValueList--center" data-scrollable>
4053        <li class="Locale__Country"><svg class="Icon Icon--united-states locale__Icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><circle cx="256" cy="256" r="256" fill="#f0f0f0"/><g fill="#d80027">
4054      <path d="M244.87 256H512c0-23.106-3.08-45.49-8.819-66.783H244.87V256zM244.87 122.435h229.556a257.35 257.35 0 00-59.07-66.783H244.87v66.783zM256 512c60.249 0 115.626-20.824 159.356-55.652H96.644C140.374 491.176 195.751 512 256 512zM37.574 389.565h436.852a254.474 254.474 0 0028.755-66.783H8.819a254.474 254.474 0 0028.755 66.783z"/></g><path d="M118.584 39.978h23.329l-21.7 15.765 8.289 25.509-21.699-15.765-21.699 15.765 7.16-22.037a257.407 257.407 0 00-49.652 55.337h7.475l-13.813 10.035a255.58 255.58 0 00-6.194 10.938l6.596 20.301-12.306-8.941a253.567 253.567 0 00-8.372 19.873l7.267 22.368h26.822l-21.7 15.765 8.289 25.509-21.699-15.765-12.998 9.444A258.468 258.468 0 000 256h256V0c-50.572 0-97.715 14.67-137.416 39.978zm9.918 190.422l-21.699-15.765L85.104 230.4l8.289-25.509-21.7-15.765h26.822l8.288-25.509 8.288 25.509h26.822l-21.7 15.765 8.289 25.509zm-8.289-100.083l8.289 25.509-21.699-15.765-21.699 15.765 8.289-25.509-21.7-15.765h26.822l8.288-25.509 8.288 25.509h26.822l-21.7 15.765zM220.328 230.4l-21.699-15.765L176.93 230.4l8.289-25.509-21.7-15.765h26.822l8.288-25.509 8.288 25.509h26.822l-21.7 15.765 8.289 25.509zm-8.289-100.083l8.289 25.509-21.699-15.765-21.699 15.765 8.289-25.509-21.7-15.765h26.822l8.288-25.509 8.288 25.509h26.822l-21.7 15.765zm0-74.574l8.289 25.509-21.699-15.765-21.699 15.765 8.289-25.509-21.7-15.765h26.822l8.288-25.509 8.288 25.509h26.822l-21.7 15.765z" fill="#0052b4"/>
4055    </svg><a data-ly-locked href="https://www.buffalojeans.com/account/login?noredirect=yes" class="Link u-h8">United States</a>
4056        </li>
4057        <li class="Locale__Country"><svg class="Icon Icon--canada locale__Icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><circle cx="256" cy="256" r="256" fill="#f0f0f0"/><g fill="#d80027">
4058      <path d="M512 256c0-101.494-59.065-189.19-144.696-230.598v461.195C452.935 445.19 512 357.494 512 256zM0 256c0 101.494 59.065 189.19 144.696 230.598V25.402C59.065 66.81 0 154.506 0 256zM300.522 289.391l44.521-22.261-22.26-11.13v-22.261L278.261 256l22.261-44.522h-22.261L256 178.087l-22.261 33.391h-22.261L233.739 256l-44.522
4058-22.261V256l-22.26 11.13 44.521 22.261-11.13 22.261h44.522v33.391h22.26v-33.391h44.522z"/></g>
4059    </svg><a data-ly-locked href="https://www.buffalojeans.ca/account/login?noredirect=yes" class="Link u-h8">Canada</a>
4060          <ul class="Locale__LangCA">
4061            <li><a data-ly-locked href="https://www.buffalojeans.ca/account/login?noredirect=yes">English</a></li>
4062            <li><a data-ly-locked href="https://www.buffalojeans.ca/fr/account/login?noredirect=yes">Français</a></li>
4063          </ul>
4064        </li>
4065      </div>
4066    </div>
4067  </div>
4068</div>
4069
4070
4071            <li class="HorizontalList__Item">
4072              <button type="button" class="Link u-h8" data-action="toggle-search" aria-label="Search"><img src="//www.buffalojeans.ca/cdn/shop/t/525/assets/search.png?v=84615755003518909361790085232" width="20px" height="20px"/></button>
4073            </li>
4074
4075            
4076<li class="HorizontalList__Item">
4077                <a href="/account" class="Link u-h8">
4078                  <img src="//www.buffalojeans.ca/cdn/shop/t/525/assets/user.png?v=46249184109821190601790085232" width="20px" height="20px"/>
4079                </a>
4080              </li><li class="HorizontalList__Item account-sub-navigation" aria-haspopup="true">
4081              
4082                <a href="https://www.buffalojeans.ca/pages/loyalty-rewards" class="Link u-h8"><img src="//www.buffalojeans.ca/cdn/shop/t/525/assets/LoyaltyIconHP.png?v=111173825629614945971790085232" width="20px" height="20px"/></a>
4083              
4084              
4085              <div class="DropdownMenu" aria-hidden="true">
4086                <ul class="Linklist">
4087                  
4088                    <li class="Linklist__Item">
4089                      <a href="/pages/loyalty-rewards" class="Link Link--secondary">VIP Rewards
4090                      </a>
4091                    </li>
4092                    
4093                  
4094                  
4095                </ul>
4096              </div>
4097            </li>
4098
4099            <li id="cart" class="HorizontalList__Item">
4100              <a href="/cart" class="Link u-h8" data-action="open-drawer"data-drawer-id="sidebar-cart"aria-label="Open cart"><img src="//www.buffalojeans.ca/cdn/shop/t/525/assets/cart.png?v=165517935736489732381790085232" width="20px" height="20px"/>
4101                <span class="Header__CountContainer">(<span class="Header__CartCount">0</span>)</span>
4102              </a>
4103            </li>
4104          </ul>
4105        </nav><a href="https://www.buffalojeans.ca/pages/swym-wishlist" class="Header__Icon hidden-phone Icon-Wrapper Icon-Wrapper--clickable hidden-desk">
4106        <span class="hidden-tablet-and-up"><img src="//www.buffalojeans.ca/cdn/shop/t/525/assets/wishlist.png?v=183594773956405981341790085232" alt="Wishlist"  width="20px" height="20px" /></span>
4107        <span class="hidden-phone"><img src="//www.buffalojeans.ca/cdn/shop/t/525/assets/wishlist.png?v=183594773956405981341790085232" alt="Wishlist"  width="20px" height="20px" /></span>
4108      </a><a href="/account" class="Header__Icon Icon-Wrapper hidden-desk Icon-Wrapper--clickable"><img src="//www.buffalojeans.ca/cdn/shop/t/525/assets/user.png?v=46249184109821190601790085232" alt="Account"  width="20px" height="20px" /></a><button type="button" class="Header__Icon Icon-Wrapper Icon-Wrapper--clickable hidden-desk" data-action="toggle-search" aria-label="Search">
4109        <span class="hidden-tablet-and-up"><img src="//www.buffalojeans.ca/cdn/shop/t/525/assets/search.png?v=84615755003518909361790085232" alt="Search"  width="20px" height="20px" /></span>
4110        <span class="hidden-phone"><img src="//www.buffalojeans.ca/cdn/shop/t/525/assets/search.png?v=84615755003518909361790085232" alt="Search"  width="20px" height="20px" /></span>
4111      </button>
4112
4113      <a href="/cart" class="Header__Icon Icon-Wrapper Icon-Wrapper--clickable hidden-desk" data-action="open-drawer"data-drawer-id="sidebar-cart"aria-expanded="false"aria-label="Open cart">
4114        <span class="hidden-tablet-and-up"><img src="//www.buffalojeans.ca/cdn/shop/t/525/assets/cart.png?v=165517935736489732381790085232" alt="Cart"  width="20px" height="20px" /></span>
4115        <span class="hidden-phone"><img src="//www.buffalojeans.ca/cdn/shop/t/525/assets/cart.png?v=165517935736489732381790085232" alt="Cart"  width="20px" height="20px" /></span>
4116        <span class="Header__CartDot "></span>
4117      </a>
4118    </div>
4119  </div>
4120
4121
4122</header>
4123
4124<style>:root {
4125    --use-sticky-header: 1;
4126    --use-unsticky-header: 0;
4127  }
4128
4129  .shopify-section--header {
4130    position: -webkit-sticky;
4131    position: sticky;
4132  }@media screen and (max-width: 640px) {
4133    .Header__LogoImage {
4134      max-width: 90px;
4135    }
4136  }:root {
4137    --header-is-not-transparent: 1;
4138    --header-is-transparent: 0;
4139  }</style>
4140
4141<script>
4142  document.documentElement.style.setProperty('--header-height', document.getElementById('shopify-section-header').offsetHeight + 'px');
4143</script>
4143
4144
4145</div>
4146
4147      <main id="main" role="main">
4148        <section data-section-id="login" data-section-type="login">
4149  <div class="Container">
4150    <div class="PageContent PageContent--fitScreen PageContent--extraNarrow"><form method="post" action="/account/recover" accept-charset="UTF-8"><input type="hidden" name="form_type" value="recover_customer_password" /><input type="hidden" name="utf8" value="✓" /></form><form method="post" action="/account/login" id="customer_login" accept-charset="UTF-8" data-login-with-shop-sign-in="true" name="login" class="Form Form--spacingTight Form__Login" style="display: block"><input type="hidden" name="form_type" value="customer_login" /><input type="hidden" name="utf8" value="✓" /><header class="Form__Header">
4151          <h1 class="Form__Title Heading u-h1">Login</h1>
4152          <p class="Form__Legend">Please enter your e-mail and password:</p>
4153        </header><div class="Form__Item">
4154          <input type="email" class="Form__Input" name="customer[email]" required="required" placeholder="Email" aria-label="Email" autofocus>
4155          <label class="Form__FloatingLabel">Email</label>
4156        </div>
4157
4158        <div class="Form__Item">
4159          <input type="password" class="Form__Input" name="customer[password]" required="required" placeholder="Password" aria-label="Password">
4160          <label class="Form__FloatingLabel">Password</label>
4161          <button type="button" class="Form__ItemHelp Link Link--primary" data-action="toggle-recover-form">Forgot password?</button>
4162        </div>
4163
4164        <button type="submit" class="Form__Submit Button Button--primary Button--full">Login</button>
4165
4166        <div class="Form__Hint Form__Hint--center">
4167          <span class="Text--subdued">Don&#39;t have an account?</span>
4168          <a href="/account/register" class="Link Link--secondary">Create one</a>
4169        </div><input type="hidden" name="return_url" value="/account" /></form><form method="post" action="/account/recover" id="recover_customer_password" accept-charset="UTF-8" name="recover" class="Form Form--spacingTight" style="display: none"><input type="hidden" name="form_type" value="recover_customer_password" /><input type="hidden" name="utf8" value="✓" /><header class="Form__Header">
4170          <h1 class="Form__Title Heading u-h1">Recover password</h1><p class="Form__Legend">Please enter your email:</p></header><div class="Form__Item">
4171          <input type="email" class="Form__Input" name="email" required="required" placeholder="Email" aria-label="Email" autofocus>
4172          <label class="Form__FloatingLabel">Email</label>
4173        </div>
4174
4175        <button type="submit" class="Form__Submit Button Button--primary Button--full">Recover</button>
4176
4177        <div class="Form__Hint Form__Hint--center">
4178          <span class="Text--subdued">Remember your password?</span>
4179          <button type="button" class="Link Link--secondary" data-action="toggle-recover-form">Back to login</button>
4180        </div></form></div>
4181  </div>
4182</section>
4183      </main>
4184
4185      <!--begin-boost-pfs-js-->
4186        
4186<script>
4187  /* Declare bcSfFilterConfig variable */
4188  var boostPFSAppConfig = {
4189    api: {
4190      filterUrl: 'https://services.mybcapps.com/bc-sf-filter/filter',
4191      searchUrl: 'https://services.mybcapps.com/bc-sf-filter/search',
4192      suggestionUrl: 'https://services.mybcapps.com/bc-sf-filter/search/suggest',
4193      productsUrl: 'https://services.mybcapps.com/bc-sf-filter/search/products',
4194      analyticsUrl: 'https://lambda.mybcapps.com/e'
4195    },
4196    shop: {
4197      name: 'Buffalo Jeans CA',
4198      url: 'https://www.buffalojeans.ca',
4199      domain: 'buffalo-jeans-ca.myshopify.com',
4200      currency: 'CAD',
4201      money_format: "\u0026#36;{{amount}}",
4202      money_format_with_currency: "\u0026#36;{{amount}} CAD"
4203    },
4204    general: {
4205      file_url: "//www.buffalojeans.ca/cdn/shop/files/?v=47680",
4206      asset_url: "//www.buffalojeans.ca/cdn/shop/t/525/assets/boost-pfs.js?v=47680",
4207      collection_id: 0,
4208      collection_handle: "",
4209      collection_product_count: 0,
4210      
4211      
4212      theme_id: 166960070829,
4213      collection_tags: null,
4214      current_tags: null,
4215      default_sort_by: "",
4216      swatch_extension: "png",
4217      no_image_url: "//www.buffalojeans.ca/cdn/shop/t/525/assets/boost-pfs-no-image.gif?v=45510820439899768411790085232",
4218      search_term: "",
4219      template: "customers/login",currencies: ["CAD"],
4220      current_currency:"CAD",published_locales: {"en":true,"fr":false},
4221      current_locale:"en",
4222      isInitFilter:false,
4223      blurb_text: 'This product is part of our Wear Better Collection featuring products made with eco-conscious or recycled materials to reduce water usage and cut down on chemicals.' /* BJ-235 */
4224    },
4225    
4226    settings: {"general":{"productAndVariantAvailable":true,"availableAfterFiltering":false,"activeFilterScrollbar":true,"showFilterOptionCount":true,"showSingleOption":false,"showOutOfStockOption":false,"collapseOnPCByDefault":false,"collapseOnMobileByDefault":false,"keepToggleState":true,"showRefineBy":true,"capitalizeFilterOptionValues":true,"paginationType":"infinite","showLoading":false,"activeScrollToTop":false,"customSortingList":"manual|best-selling|extra-sort1-descending|price-ascending|price-descending|extra-sort2-descending","changeMobileButtonLabel":false,"sortingAvailableFirst":false,"addCollectionToProductUrl":true,"enableAjaxCart":true,"ajaxCartStyle":"slide","selectOptionInProductItem":false,"swatchImageVersion":1},"search":{"enableSuggestion":true,"showSuggestionProductVendor":true,"showSuggestionProductPrice":true,"showSuggestionProductSalePrice":true,"showSuggestionProductSku":true,"showSuggestionProductImage":true,"suggestionBlocks":[{"type":"suggestions","label":"Popular suggestions","status":"active","number":5},{"type":"collections","label":"Collections","status":"active","number":3,"excludedValues":[]},{"type":"products","label":"Products","status":"active","number":6},{"type":"pages","label":"Pages","status":"active","number":3}],"searchPanelBlocks":{"products":{"label":"Products","pageSize":25,"active":true,"displayImage":true},"collections":{"label":"Collections","pageSize":25,"active":false,"displayImage":false,"displayDescription":false,"excludedValues":[]},"pages":{"label":"Blogs & Pages","pageSize":25,"active":false,"displayImage":false,"displayExcerpt":false},"searchEmptyResultMessages":{"active":true,"label":"We are sorry! We couldn't find results for \"{{ terms }}\".{{ breakline }}But don't give up – check the spelling or try less specific search terms."},"searchTips":{"label":"Search tips","active":false,"searchTips":"Please double-check your spelling.{{ breakline }}Use more generic search terms.{{ breakline }}Enter fewer keywords.{{ breakline }}Try searching by product type, brand, model number or product feature."},"searchTermSuggestions":{"label":"Check out some of these popular searches","active":false,"type":null,"backup":null,"searchTermList":[]},"mostPopularProducts":{"label":"Trending products","active":false,"type":null,"backup":null,"productList":[]}},"searchBoxOnclick":{"productSuggestion":{"label":"Trending products","status":false,"data":[]},"recentSearch":{"label":"Recent searches","status":false,"number":"3"},"searchTermSuggestion":{"label":"Popular searches","status":false,"data":[]}},"suggestionNoResult":{"products":{"label":"Trending products","status":false,"data":[]},"search_terms":{"label":"Check out some of these popular searches","status":false,"data":[]}}},"backSettings":{"offSensitive":false}
4226,"actionlist":{"qvBtnBackgroundColor":"rgba(255||255||255||1)","qvBtnTextColor":"rgba(61||66||70||1)","qvBtnBorderColor":"rgba(255||255||255||1)","qvBtnHoverBackgroundColor":"rgba(61||66||70||1)","qvBtnHoverTextColor":"rgba(255||255||255||1)","qvBtnHoverBorderColor":"rgba(61||66||70||1)","atcBtnBackgroundColor":"rgba(0||0||0||1)","atcBtnTextColor":"rgba(255||255||255||1)","atcBtnBorderColor":"rgba(0||0||0||1)","atcBtnHoverBackgroundColor":"rgba(61||66||70||1)","atcBtnHoverTextColor":"rgba(255||255||255||1)","atcBtnHoverBorderColor":"rgba(61||66||70||1)","alStyle":"bc-al-style4","qvEnable":true,"atcEnable":true},"labelTranslations":{"en":{"refineDesktop":"Filter","refine":"Refine By","refineMobile":"Refine By","refineMobileCollapse":"Hide Filter","clear":"Clear","clearAll":"Clear All","viewMore":"View More","viewLess":"View Less","apply":"Apply","applyAll":"Apply All","close":"Close","back":"Back","showLimit":"Show","collectionAll":"All","under":"Under","above":"Above","ratingStar":"Star","ratingStars":"Star","ratingUp":"& Up","showResult":"Show results","searchOptions":"Search Options","inCollectionSearch":"Search for products in this collection","loadPreviousPage":"Load Previous Page","listView":"List view","gridView":"Grid view","gridViewColumns":"Grid view {{ count }} Columns","loadMore":"Load More","loadMoreTotal":"{{ from }} - {{ to }} of {{ total }} Products","sortByOptions":{"sorting":"Sort by","manual":"Recommended","best-selling":"Best sellers","extra-sort1-descending":"Latest Arrivals ","price-ascending":"Price Low-High","price-descending":"Price High-Low","extra-sort2-descending":"Rating"},"recommendation":{"homepage-632435":"Just dropped","homepage-643350":"Best Sellers","collectionpage-611561":"Just dropped","collectionpage-338127":"Most Popular Products","productpage-402153":"Recently viewed","productpage-562676":"Frequently Bought Together","cartpage-600864":"Still interested in this?","cartpage-324145":"Similar Products"},"search":{"generalTitle":"Search","resultHeader":"Search results for \"{{ terms }}\"","resultNumber":"Showing {{ count }} results for \"{{ terms }}\"","seeAllProducts":"See all products","resultEmpty":"We are sorry! We couldn't find results for \"{{ terms }}\".{{ breakline }}But don't give up – check the spelling or try less specific search terms.","resultEmptyWithSuggestion":"Sorry, nothing found for \"{{ terms }}\". Check out these items instead?","searchTotalResult":"Showing {{ count }} result","searchTotalResults":"Showing {{ count }} results","searchPanelProduct":"Products","searchPanelCollection":"Collections","searchPanelPage":"Blogs & Pages","searchTipsTitle":"Search tips","searchTipsContent":"Please double-check your spelling.{{ breakline }}Use more generic search terms.{{ breakline }}Enter fewer keywords.{{ breakline }}Try searching by product type, brand, model number or product feature."},"suggestion":{"viewAll":"View all results","didYouMean":"Did you mean: {{ terms }}?","searchBoxPlaceholder":"Search","suggestQuery":"Showing results for {{ terms }}","instantSearchSuggestionsLabel":"Popular suggestions","instantSearchCollectionsLabel":"Collections","instantSearchProductsLabel":"Products","instantSearchPagesLabel":"Pages","searchBoxOnclickRecentSearchLabel":"Recent searches","searchBoxOnclickSearchTermLabel":"Popular searches","searchBoxOnclickProductsLabel":"Trending products","noSearchResultSearchTermLabel":"Check out some of these popular searches","noSearchResultProductsLabel":"Trending products"},"error":{"noFilterResult":"Sorry, no products matched your selection","noSearchResult":"Sorry, no products matched the keyword","noProducts":"No products found in this collection","noSuggestionResult":"Sorry, nothing found for \"{{ terms }}\"","noSuggestionProducts":"Sorry, nothing found for \"{{ terms }}\""},"action_list":{"qvBtnLabel":"Quick View","qvAddToCartBtnLabel":"Add To Cart","qvSoldOutLabel":"Sold Out","qvSaleLabel":"Sale","qvViewFullDetails":"View Full Details","qvQuantity":"Quantity","atcAvailableLabel":"Add To Cart","atcSelectOptionsLabel":"Select Options","atcSoldOutLabel":"Sold Out","atcMiniCartSubtotalLabel":"Subtotal","atcMiniCartCheckoutLabel":"Checkout","atcMiniCartShopingCartLabel":"Your Cart","atcMiniCartEmptyCartLabel":"Your Cart Is Currently Empty","atcMiniCartViewCartLabel":"View cart","atcAddingToCartBtnLabel":"Adding","atcAddedToCartBtnLabel":"Added!","atcMiniCartCountItemLabel":"item","atcMiniCartCountItemLabelPlural":"items"},"defaultTheme":{"toolbarViewAs":"View as","toolbarProduct":"Product","toolbarProducts":"Products","productItemSoldOut":"Sold out","productItemSale":"Sale","productItemFrom":"from"},"recentlyViewed":{"recentProductHeading":"Recently Viewed Products"},"mostPopular":{"popularProductsHeading":"Popular Products"}},"fr":{"refineDesktop":"Filtrer","refine":"Affiner par","refineMobile":"Affiner par","refineMobileCollapse":"Masquer le filtre","clear":"Effacer","clearAll":"Effacer tout","viewMore":"Afficher plus","viewLess":"Voir moins","apply":"Appliquer","applyAll":"Appliquer tout","close"
4226:"Fermer","back":"Arrière","showLimit":"Afficher","collectionAll":"Tous","under":"Sous","above":"Au-dessus de","ratingStar":"Étoile","ratingStars":"Étoiles","ratingUp":"& Haut","showResult":"Afficher les résultats","searchOptions":"Options de recherche","inCollectionSearch":"Rechercher des produits dans cette liste","loadPreviousPage":"Charger la page précédente","listView":"Vue de la liste","gridView":"Vue en grille","gridViewColumns":"Vue en grille {{ count }} Colonnes","loadMore":"Charger plus de {{ amountProduct }} Produits","loadMoreTotal":"{{ from }} - {{ to }} de {{ total }} Produits","sortByOptions":{"sorting":"Trier par","manual":"Manuel","best-selling":"Meilleures ventes","extra-sort1-descending":"Plus récent - Plus ancien","price-ascending":"Prix croissant","price-descending":"Prix descendant"},"recommendation":{"homepage-632435":"Nouvel arrivage","homepage-643350":"Meilleurs Vendeurs","collectionpage-611561":"Nouvel arrivage","collectionpage-338127":"Nos produits les plus populaires","productpage-402153":"Récemment consulté","productpage-562676":"Souvent Acheté Ensemble","cartpage-600864":"Toujours intéressés?","cartpage-324145":"Produits Similaires"},"search":{"generalTitle":"Titre général (si aucun terme de recherche)","resultHeader":"Résultats de la recherche pour \"{{ terms }}\"","resultNumber":"Afficher {{ count }} résultats pour \"{{ terms }}\"","seeAllProducts":"Voir tous les produits","resultEmpty":"Désolés ! Nous n'avons aucun résultat pour \"{{ terms }}\".{{ breakline }}Mais n'abandonnez pas – vérifiez l'orthographe ou essayez avec des termes de recherche moins précis.","resultEmptyWithSuggestion":"Désolé, rien trouvé pour \"{{ terms }}\". Consultez ces articles à la place ?","searchTotalResult":"Afficher {{ count }} résultat","searchTotalResults":"Afficher {{ count }}} résultats","searchPanelProduct":"Produits","searchPanelCollection":"Collections","searchPanelPage":"Blogs et pages","searchTipsTitle":"Conseils de recherche","searchTipsContent":"Veuillez vérifier votre orthographe.{{ breakline }}Utilisez des termes de recherche plus génériques.{{ breakline }}Entrez moins de mots-clés.{{ breakline }}Essayez d'effectuer une recherche par type de produit, marque, numéro de modèle ou caractéristique du produit."},"suggestion":{"viewAll":"Voir tous {{ count }} les produits","didYouMean":"Vous voulez dire : {{ terms }}","searchBoxPlaceholder":"Recherchez","suggestQuery":"Afficher {{ count }} résultats pour {{ terms }}","instantSearchSuggestionsLabel":"Propositions populaire","instantSearchCollectionsLabel":"Collections","instantSearchProductsLabel":"Produits","instantSearchPagesLabel":"Pages","searchBoxOnclickRecentSearchLabel":"Recherches récentes","searchBoxOnclickSearchTermLabel":"Recherches populaires","searchBoxOnclickProductsLabel":"Produits tendance","noSearchResultSearchTermLabel":"Consultez certaines des recherches les plus courantes","noSearchResultProductsLabel":"Produits tendance"},"error":{"noFilterResult":"Désolé, aucun produit ne correspond à votre sélection","noSearchResult":"Désolé, aucun produit ne correspond au mot-clé","noProducts":"Aucun produit trouvé dans cette collection","noSuggestionResult":"Désolé, aucun produit trouvé pour \"{{ terms }}\".","noSuggestionProducts":"Désolé, rien trouvé pour \"{{ terms }}\"."},"action_list":{"qvBtnLabel":"Vue rapide","qvAddToCartBtnLabel":"Ajouter au panier","qvSoldOutLabel":"Épuisé","qvSaleLabel":"Vente","qvViewFullDetails":"Voir tous les détails","qvQuantity":"Quantité","atcAvailableLabel":"Ajouter au panier","atcSelectOptionsLabel":"Sélectionnez les options","atcSoldOutLabel":"Épuisé","atcMiniCartSubtotalLabel":"Sous-total","atcMiniCartCheckoutLabel":"Commander","atcMiniCartShopingCartLabel":"Votre panier","atcMiniCartEmptyCartLabel":"Votre panier est actuellement vide","atcMiniCartViewCartLabel":"Voir le panier","atcAddingToCartBtnLabel":"Ajout de","atcAddedToCartBtnLabel":"Ajouté!","atcMiniCartCountItemLabel":"objet","atcMiniCartCountItemLabelPlural":"éléments"},"defaultTheme":{"toolbarViewAs":"Voir comme","toolbarProduct":"Produit","toolbarProducts":"Produits","productItemSoldOut":"Épuisé","productItemSale":"Vente","productItemFrom":"de"},"recentlyViewed":{"recentProductHeading":"Produits récemment consultés"},"mostPopular":{"popularProductsHeading":"Produits populaires"}}},"label":{"refineDesktop":"Filter","refine":"Refine By","refineMobile":"Refine By","refineMobileCollapse":"Hide Filter","clear":"Clear","clearAll":"Clear All","viewMore":"View More","viewLess":"View Less","apply":"Apply","applyAll":"Apply All","close"
4226:"Close","back":"Back","showLimit":"Show","collectionAll":"All","under":"Under","above":"Above","ratingStar":"Star","ratingStars":"Star","ratingUp":"& Up","showResult":"Show results","searchOptions":"Search Options","inCollectionSearch":"Search for products in this collection","loadPreviousPage":"Load Previous Page","listView":"List view","gridView":"Grid view","gridViewColumns":"Grid view {{ count }} Columns","loadMore":"Load More","loadMoreTotal":"{{ from }} - {{ to }} of {{ total }} Products","sortByOptions":{"sorting":"Sort by","manual":"Recommended","best-selling":"Best sellers","extra-sort1-descending":"Latest Arrivals ","price-ascending":"Price Low-High","price-descending":"Price High-Low","extra-sort2-descending":"Rating"},"recommendation":{"homepage-632435":"Just dropped","homepage-643350":"Best Sellers","collectionpage-611561":"Just dropped","collectionpage-338127":"Most Popular Products","productpage-402153":"Recently viewed","productpage-562676":"Frequently Bought Together","cartpage-600864":"Still interested in this?","cartpage-324145":"Similar Products"},"search":{"generalTitle":"Search","resultHeader":"Search results for \"{{ terms }}\"","resultNumber":"Showing {{ count }} results for \"{{ terms }}\"","seeAllProducts":"See all products","resultEmpty":"We are sorry! We couldn't find results for \"{{ terms }}\".{{ breakline }}But don't give up – check the spelling or try less specific search terms.","resultEmptyWithSuggestion":"Sorry, nothing found for \"{{ terms }}\". Check out these items instead?","searchTotalResult":"Showing {{ count }} result","searchTotalResults":"Showing {{ count }} results","searchPanelProduct":"Products","searchPanelCollection":"Collections","searchPanelPage":"Blogs & Pages","searchTipsTitle":"Search tips","searchTipsContent":"Please double-check your spelling.{{ breakline }}Use more generic search terms.{{ breakline }}Enter fewer keywords.{{ breakline }}Try searching by product type, brand, model number or product feature."},"suggestion":{"viewAll":"View all results","didYouMean":"Did you mean: {{ terms }}?","searchBoxPlaceholder":"Search","suggestQuery":"Showing results for {{ terms }}","instantSearchSuggestionsLabel":"Popular suggestions","instantSearchCollectionsLabel":"Collections","instantSearchProductsLabel":"Products","instantSearchPagesLabel":"Pages","searchBoxOnclickRecentSearchLabel":"Recent searches","searchBoxOnclickSearchTermLabel":"Popular searches","searchBoxOnclickProductsLabel":"Trending products","noSearchResultSearchTermLabel":"Check out some of these popular searches","noSearchResultProductsLabel":"Trending products"},"error":{"noFilterResult":"Sorry, no products matched your selection","noSearchResult":"Sorry, no products matched the keyword","noProducts":"No products found in this collection","noSuggestionResult":"Sorry, nothing found for \"{{ terms }}\"","noSuggestionProducts":"Sorry, nothing found for \"{{ terms }}\""},"action_list":{"qvBtnLabel":"Quick View","qvAddToCartBtnLabel":"Add To Cart","qvSoldOutLabel":"Sold Out","qvSaleLabel":"Sale","qvViewFullDetails":"View Full Details","qvQuantity":"Quantity","atcAvailableLabel":"Add To Cart","atcSelectOptionsLabel":"Select Options","atcSoldOutLabel":"Sold Out","atcMiniCartSubtotalLabel":"Subtotal","atcMiniCartCheckoutLabel":"Checkout","atcMiniCartShopingCartLabel":"Your Cart","atcMiniCartEmptyCartLabel":"Your Cart Is Currently Empty","atcMiniCartViewCartLabel":"View cart","atcAddingToCartBtnLabel":"Adding","atcAddedToCartBtnLabel":"Added!","atcMiniCartCountItemLabel":"item","atcMiniCartCountItemLabelPlural":"items"},"defaultTheme":{"toolbarViewAs":"View as","toolbarProduct":"Product","toolbarProducts":"Products","productItemSoldOut":"Sold out","productItemSale":"Sale","productItemFrom":"from"},"recentlyViewed":{"recentProductHeading":"Recently Viewed Products"},"mostPopular":{"popularProductsHeading":"Popular Products"}},"style":{"filterTitleTextColor":"","filterTitleFontSize":"","filterTitleFontWeight":"","filterTitleFontTransform":"","filterTitleFontFamily":"","filterOptionTextColor":"","filterOptionFontSize":"","filterOptionFontFamily":"","filterMobileButtonTextColor":"","filterMobileButtonFontSize":"","filterMobileButtonFontWeight":"","filterMobileButtonFontTransform":"","filterMobileButtonFontFamily":"","filterMobileButtonBackgroun
4226dColor":""},"searchEmptyResultMessages":{}},
4227    
4228    
4229    
4230    default_sort_order: {"error":"json not allowed for this object"},
4231    
4232  };
4233  function mergeObject(obj1, obj2){
4234    var obj3 = {};
4235    for (var attr in obj1) { obj3[attr] = obj1[attr]; }
4236    for (var attr in obj2) { obj3[attr] = obj2[attr]; }
4237    return obj3;
4238  }
4239  if (typeof boostPFSConfig == 'undefined') {
4240    boostPFSConfig = {};
4241  }
4242  if (typeof boostPFSAppConfig != 'undefined') {
4243    boostPFSConfig = mergeObject(boostPFSConfig, boostPFSAppConfig);
4244  }
4245  if (typeof boostPFSThemeConfig != 'undefined') {
4246    boostPFSConfig = mergeObject(boostPFSConfig, boostPFSThemeConfig);
4247  }
4248</script>
4248
4249
4250<!-- Include Resources -->
4250<script defer src="//www.buffalojeans.ca/cdn/shop/t/525/assets/boost-pfs-core-instant-search.js?v=47445860109005093691790085232"></script>
4250
4251  
4251<script defer src="//www.buffalojeans.ca/cdn/shop/t/525/assets/boost-pfs-instant-search.js?v=85293949619621958551790085232"></script>
4251<!-- Initialize App -->
4252<script defer src="//www.buffalojeans.ca/cdn/shop/t/525/assets/boost-pfs-init.js?v=164080107980954591611790085232"></script>
4252
4253
4254
4255
4256  <!-- Instant search no result JSON data -->
4257  
4258<script type="application/json" id="boost-pfs-instant-search-products-not-found-json">
4259	{
4260		"search_terms": [],
4261		"products": []
4262	}
4263</script>
4263
4264
4265
4266 <!-- 3rd App Integration -->
4267      <!--end-boost-pfs-js-->
4268
4269      
4270      <div id="shopify-section-sign-up-banner" class="shopify-section shopify-section--slideshow"><section id="section-sign-up-banner" data-section-id="sign-up-banner" data-section-type="slideshow">
4271    <div class="Slideshow ">
4272      <div class="Slideshow__Carousel  Carousel Carousel--fadeIn  Carousel--insideDots"
4273           data-flickity-config='{
4274    "prevNextButtons": false,
4275    "setGallerySize": true,
4276    "adaptiveHeight": false,
4277    "wrapAround": true,
4278    "dragThreshold": 15,
4279    "pauseAutoPlayOnHover": false,
4280    "autoPlay": 5000,
4281    "pageDots": false
4282  }'><div id="Slideimage_fKdUC9" class="Slideshow__Slide Carousel__Cell is-selected" style="visibility: visible" data-slide-index="0" ><div class="Slideshow__ImageContainer  AspectRatio hidden-tablet-and-up"
4283                   style="--aspect-ratio: 2.144578313253012; background-image: url(//www.buffalojeans.ca/cdn/shop/files/SIGNUP_BANNER_MOBILE_1x1.jpg?v=1768407240)">
4284                  <img class="Slideshow__Image Image--lazyLoad"
4285                       src="//www.buffalojeans.ca/cdn/shop/files/SIGNUP_BANNER_MOBILE_1x1.jpg?v=1768407240"
4286                       data-src="//www.buffalojeans.ca/cdn/shop/files/SIGNUP_BANNER_MOBILE_x800.jpg?v=1768407240"
4287                       alt="">
4288  
4289                  <noscript>
4290                    <img class="Slideshow__Image" src="//www.buffalojeans.ca/cdn/shop/files/SIGNUP_BANNER_MOBILE_x800.jpg?v=1768407240" alt="">
4291                  </noscript>
4292              </div><div class="Slideshow__ImageContainer  AspectRatio AspectRatio--withFallback hidden-phone"
4293                   style="padding-bottom: 12.222222222222221%; --aspect-ratio: 8.181818181818182; background-image: url(//www.buffalojeans.ca/cdn/shop/files/SIGNUP_BANNER_DESKTOP_1x1.jpg?v=1768407226)">
4294                
4295
4296                <img class="Slideshow__Image Image--lazyLoad hide-no-js"
4297                     data-src="//www.buffalojeans.ca/cdn/shop/files/SIGNUP_BANNER_DESKTOP_{width}x.jpg?v=1768407226"
4298                     data-optimumx="1.2"
4299                     data-widths="[400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000, 2200]"
4300                     data-sizes="auto"
4301                     alt="">
4302
4303                <noscript>
4304                  <img class="Slideshow__Image" src="//www.buffalojeans.ca/cdn/shop/files/SIGNUP_BANNER_DESKTOP_1000x.jpg?v=1768407226" alt="">
4305                </noscript>
4306              </div><div class="Slideshow__Content Slideshow__Content--desktop-middleRight Slideshow__Content--mobile-bottomCenter" id="block-image_fKdUC9">
4307                <header class="SectionHeader">
4308                  <div class="SectionHeader__ButtonWrapper horizontal">
4309                  <div class="ButtonGroup  ButtonGroup--spacingSmall ButtonGroup-desktop-center ButtonGroup-mobile-center  ">
4310  
4311                      <a  href="" class="attentive_cls ButtonGroup__Item Button   "><span>SIGN UP</span></a>
4312  
4313                      
4314
4315                      
4315<script>
4316                        document.addEventListener("DOMContentLoaded", function () {
4317                          const button = document.querySelector("#Slideimage_fKdUC9 .attentive_cls");
4318                          if (button) {
4319                            button.addEventListener("click", function (e) {
4320                              e.preventDefault(); // Prevents the link from navigating
4321                              console.log("Button clicked!");
4322                              
4323                              if(window.innerWidth >= 760){
4324                                  //call the desktop creative
4325                                  window.__attentive.trigger(null,null,null,1172842);
4326                                } else {
4327                                  //call the mobile creative
4328                                  window.__attentive.trigger(null,null,null, 1172843);
4329                                }// Your custom logic here
4330                            });
4331                          }
4332                        });
4333                      </script>
4333</div>
4334                </div>
4335                </header>
4336              </div>
4337  
4338            
4338<script>
4339              $(document).ready( function(){
4340                function buttonDeviceHandler(){
4341                  let windowWidth = $(window).width();
4342                  if( windowWidth > 640 ){
4343                      $("#block-image_fKdUC9 .ButtonGroup").addClass("desktop");
4344                      $("#block-image_fKdUC9 .ButtonGroup").removeClass("mobile");
4345                  } else {
4346                      $("#block-image_fKdUC9 .ButtonGroup").addClass("mobile");
4347                      $("#block-image_fKdUC9 .ButtonGroup").removeClass("desktop");
4348                  }
4349                }
4350            
4351                buttonDeviceHandler();
4352  
4353                $(window).resize( function(){
4354                  buttonDeviceHandler();
4355                });
4356              });
4357            </script>
4357</div></div></div>
4358  
4359    <span id="section-sign-up-banner-end" class="Anchor"></span>
4360  </section>
4361  
4362  
4362<script>
4363    $(document).ready( function(){
4364      $("#section-sign-up-banner a.slide-up").click( function(e){
4365        e.preventDefault();
4366        let subOptionsLength = $(this).closest(".button-options").find("."+$(this).data("block")).find("a").length;
4367        if ( $(this).closest(".button-options").find("."+$(this).data("block")).css('display') == 'none' && subOptionsLength > 0 ) {
4368          $(".slide-up-wrapper").each( function(){
4369            $(this).hide();
4370          });
4371          $(this).closest(".button-options").find("."+$(this).data("block")).show();
4372        } else {
4373          $(this).closest(".button-options").find("."+$(this).data("block")).hide();
4374        }
4375      });
4376    });
4377  </script>
4377<style>
4378    #section-sign-up-banner #block-image_fKdUC9 .HeroBanner__SubHeading {
4379      color: #ffffff;
4380      font-size: 16px;
4381      font-family: futura-pt, Sans Serif;
4382      font-weight: inherit;
4383      margin: 0 0 0px;
4384    }
4385  
4386    #section-sign-up-banner #block-image_fKdUC9 .HeroBanner__Heading {
4387      color: #ffffff;
4388      font-size: 32px;
4389      font-family: futura-pt-bold, Sans Serif;
4390      font-weight: inherit;
4391      margin: 0 0 10px;
4392    }
4393  
4394    #section-sign-up-banner #block-image_fKdUC9 .HeroBody__Heading {
4395      color: #ffffff;
4396      font-size: 14px;
4397      font-family: futura-pt, Sans Serif;
4398      font-weight: inherit;
4399      margin: 0 0 20px;
4400    }
4401  
4402    #section-sign-up-banner .Image--contrast.contrast--image_fKdUC9::after {
4403      background-image: linear-gradient(to top, rgba(4, 4, 4, 0.65), rgba(54, 54, 54, 0.2));
4404    }
4405  
4406    #section-sign-up-banner .slide-up-wrapper { 
4407      background: #fff;
4408      border: 1px solid #d6d6d6;
4409      border-radius: 15px;
4410      display: none;
4411      position: absolute;
4412      top: -92px;
4413      width: 97%;
4414    }
4415  
4416    #section-sign-up-banner .button-wrapper a:not(:last-child) {
4417      border-bottom: 1px solid #d6d6d6;
4418    }
4419  
4420    #section-sign-up-banner .button-options {
4421      position: relative;
4422    }
4423  
4424    #section-sign-up-banner .button-wrapper {
4425      display: flex;
4426      flex-direction: column;
4427    }
4428  
4429    #section-sign-up-banner .button-options a {
4430      padding: 15px;
4431    }
4432  
4433    @media screen and (max-width: 640px) {
4434      #section-sign-up-banner #block-image_fKdUC9 .HeroBanner__SubHeading {
4435        font-size: 16px;
4436        margin: 0 0 0px;
4437      }
4438  
4439      #section-sign-up-banner #block-image_fKdUC9 .HeroBanner__Heading {
4440        font-size: 32px;
4441        margin: 0 0 10px;
4442      }
4443  
4444      #section-sign-up-banner #block-image_fKdUC9 .HeroBody__Heading {
4445        font-size: 14px;
4446        margin: 0 0 20px;
4447      }
4448    }
4449    </style><style>
4450    #section-sign-up-banner .button-tint-effect a {
4451      background: #fffc;
4452      -webkit-transition: background .3s cubic-bezier(0, 0.61, 0.35, 0.98);
4453      -o-transition: background .3s cubic-bezier(0, 0.61, 0.35, 0.98);
4454      transition: background .3s cubic-bezier(0, 0.61, 0.35, 0.98)
4455    }
4456  
4457    #section-sign-up-banner a.button-rounded {
4458      border-radius: 10px;
4459    }
4460  
4461    #section-sign-up-banner .button-tint-effect a:hover{
4462      background: #fff !important;
4463      color: #172342 !important;
4464    }
4465  
4466    #section-sign-up-banner a i {
4467      margin-left: 3%;
4468    }
4469    #section-sign-up-banner .Heading,
4470     #section-sign-up-banner .flickity-page-dots {
4471      color: #ffffff;
4472    }
4473  
4474    #section-sign-up-banner .Button {
4475      color: #ffffff;
4476      background-color: #172342;
4477    }
4478  
4479    #section-sign-up-banner .Button:hover {
4480      color: #363636;
4481      background-color: #dedfd5;
4482    }
4483  
4484    #section-sign-up-banner .Button::before {
4485      background-color: #172342;
4486    }
4487  
4488    #section-sign-up-banner .Carousel__Cell,
4489    #section-sign-up-banner .flickity-viewport {
4490      
4491    }
4492
4493    a.button-arrow {
4494      display: flex;
4495      justify-content: space-between;
4496      align-items: center;
4497    }
4498
4499    #section-slideshow a i {
4500      margin-left: 10px;
4501    }
4502
4503    #section-slideshow .button-wrapper.desktop-center, #section-slideshow .button-wrapper.desktop-center a {
4504      text-align: center;
4505    }
4506
4507    #section-slideshow .button-wrapper.desktop-left, #section-slideshow .button-wrapper.desktop-left a {
4508      text-align: left;
4509    }
4510
4511    #section-slideshow .button-wrapper.desktop-right, #section-slideshow .button-wrapper.desktop-right a {
4512      text-align: right;
4513    }
4514  
4515    @media screen and (max-width: 1200px) {
4516      #section-sign-up-banner .Carousel__Cell,
4517      #section-sign-up-banner .flickity-viewport {
4518        
4519      }
4520    }
4521  
4522    @media screen and (max-width: 640px) {
4523      #section-sign-up-banner .Carousel__Cell,
4524      #section-sign-up-banner .flickity-viewport {
4525       
4526      }
4527    }#section-slideshow .button-options a {
4528      display: block;
4529    }
4530  </style>
4531  
4532  
4533  </div>
4534      <div id="shopify-section-newsletter" class="shopify-section">
4535
4536
4537</div>
4538      <div id="shopify-section-footer" class="shopify-section shopify-section--footer"><footer id="section-footer" data-section-id="footer" data-section-type="footer" class="Footer  " role="contentinfo">
4539  <div class="Container"><div class="Footer__Inner"><div class="Footer__Block Footer__Block--links" ><h2 class="Footer__Title">CUSTOMER SERVICE</h2>
4540
4541                  <ul class="Linklist">
4542                        <li class="Linklist__Item track-your-order">
4543                          <a href="/account/orders" class="Link Link--primary">
4543Track Your Order</a>
4544                        </li>
4545                      
4546
4547                        <li class="Linklist__Item contact-us">
4548                          <a href="/pages/contactus-ca" class="Link Link--primary">Contact Us</a>
4549                        </li>
4550                      
4551
4552                        <li class="Linklist__Item shipping-returns">
4553                          <a href="/pages/shipping-returns" class="Link Link--primary">Shipping &amp; Returns</a>
4554                        </li>
4555                      
4556
4557                        <li class="Linklist__Item account-information">
4558                          <a href="/account" class="Link Link--primary">Account Information</a>
4559                        </li>
4560                      
4561
4562                        <li class="Linklist__Item f-a-q">
4563                          <a href="/pages/faq-can-en" class="Link Link--primary">F.A.Q.</a>
4564                        </li>
4565                      
4566</ul></div><div class="Footer__Block Footer__Block--links" ><h2 class="Footer__Title">Shopping</h2>
4567
4568                  <ul class="Linklist">
4569                        <li class="Linklist__Item reviews">
4570                          <a href="/pages/reviews" class="Link Link--primary">Reviews</a>
4571                        </li>
4572                      
4573
4574                        <li class="Linklist__Item rewards-program">
4575                          <a href="https://www.buffalojeans.ca/fr/pages/loyalty-rewards" class="Link Link--primary">Rewards Program</a>
4576                        </li>
4577                      
4578
4579                        <li class="Linklist__Item gift-cards">
4580                          <a href="/products/buffalo-gift-card-cad" class="Link Link--primary">Gift Cards</a>
4581                        </li>
4582                      
4583
4584                        <li class="Linklist__Item store-locations">
4585                          <a href="https://www.buffalojeans.ca/pages/store-locations" class="Link Link--primary">Store Locations</a>
4586                        </li>
4587                      
4588</ul></div><div class="Footer__Block Footer__Block--links" ><h2 class="Footer__Title">ABOUT</h2>
4589
4590                  <ul class="Linklist">
4591                        <li class="Linklist__Item about-us">
4592                          <a href="/pages/aboutus" class="Link Link--primary">About Us</a>
4593                        </li>
4594                      
4595
4596                        <li class="Linklist__Item affiliates">
4597                          <a href="/pages/affiliates" class="Link Link--primary">Affiliates</a>
4598                        </li>
4599                      
4600
4601                        <li class="Linklist__Item brand-ambassador-program-collabs">
4602                          <a href="/pages/influencers-en-ca" class="Link Link--primary">Brand Ambassador Program - Collabs</a>
4603                        </li>
4604                      
4605
4606                        <li class="Linklist__Item do-not-sell-or-share-my-personal-information">
4607                          <a href="/pages/data-sharing-opt-out" class="Link Link--primary">Do not sell or share my personal information</a>
4608                        </li>
4609                      
4610
4611                        <li class="Linklist__Item manage-preferences">
4612                          <a href="/pages/manage-preferences-center" class="Link Link--primary">Manage Preferences</a>
4613                        </li>
4614                      
4615
4616                        <li class="Linklist__Item careers">
4617                          <a href="https://careers-buffalojeans.icims.com/jobs/search?ss=1" class="Link Link--primary">Careers</a>
4618                        </li>
4619                      
4620</ul></div><div class="Footer__Block Footer__Block--links" ><h2 class="Footer__Title">Legal</h2>
4621
4622                  <ul class="Linklist">
4623                        <li class="Linklist__Item promotion-details-disclaimers">
4624                          <a href="/pages/promotion-details-disclaimers" class="Link Link--primary">Promotion Details &amp; Disclaimers</a>
4625                        </li>
4626                      
4627
4628                        <li class="Linklist__Item terms-conditions">
4629                          <a href="/pages/terms-conditions" class="Link Link--primary">Terms &amp; Conditions</a>
4630                        </li>
4631                      
4632
4633                        <li class="Linklist__Item privacy-policy">
4634                          <a href="/policies/privacy-policy" class="Link Link--primary">Privacy Policy</a>
4635                        </li>
4636                      
4637
4638                        <li class="Linklist__Item transparency-in-supply-chains-act">
4639                          <a href="/pages/transparency-in-supply-chains-act" class="Link Link--primary">Transparency In Supply Chains Act.</a>
4640                        </li>
4641                      
4642</ul></div></div><div class="Footer__Aside"><div class="Footer__Copyright">
4643        <a href="/" class="Footer__StoreName u-h7 Link Link--secondary">©2026 BUFFALO DAVID BITTON© CENTRIC CANADA APPAREL AND ACCESSORIES ULC</a>
4644      </div>
4645
4646    </div>
4647  </div>
4648</footer><style>
4649  section[data-section-id="search"] #view-all {
4650    display: none;
4651  }
4652
4653  .Pagination__Nav div {
4654    float: left;
4655  }
4656</style>
4657
4658<script  type="text/javascript">
4659  let currentPageUrl = window.location.href.split("?").length > 1 ? window.location.href.split("?")[0] : window.location.href;
4660  let removeIfPageExist = window.location.search.replace("?", "").split("&").filter((value, i)=>{ return value.split("=")[0] !== "page" }).join("&");
4661  let isAndNeeded = removeIfPageExist ? "?"+ removeIfPageExist.replace(/&\s*$/, "") +"&page=viewall" : "?page=viewall"
4662  let urlToSet = window.location.search ? currentPageUrl + isAndNeeded : currentPageUrl+"?page=viewall";
4663  document.addEventListener("DOMContentLoaded", function(event) {
4664    let paginationPartLength = document.getElementsByClassName("pagination-parts").length;
4665    if( document.getElementById("view-all")){
4666      document.getElementById("view-all").setAttribute("href", urlToSet);
4667    }
4668  });
4669
4670  let observer = new MutationObserver((mutations) => {
4671    mutations.forEach((mutation, i) => {
4672      let oldValue = mutation.oldValue;
4673      let newValue = mutation.target.textContent;
4674      if (oldValue !== newValue && i==0) {
4675        let currentPageUrlonMutation = window.location.href.split("?").length > 1?window.location.href.split("?")[0] : window.location.href;
4676        let removeIfPageExist = window.location.search.replace("?", "").split("&").filter((value, i)=>{ return value.split("=")[0] !== "page" }).join("&");
4677        let isAndNeeded = removeIfPageExist ? "?"+ removeIfPageExist.replace(/&\s*$/, "") +"&page=viewall" : "?page=viewall"
4678        let urlToSetOnMutation = window.location.search ? currentPageUrlonMutation + isAndNeeded : currentPageUrlonMutation+"?page=viewall";
4679        let paginationPartLength = document.getElementsByClassName("pagination-parts").length;
4680        if( document.getElementById("view-all")){
4681          document.getElementById("view-all").setAttribute("href", urlToSetOnMutation);
4682        }
4683      }
4684    });
4685  });
4686
4687
4688  observer.observe(document.body, {
4689    characterDataOldValue: true,
4690    subtree: true,
4691    childList: true,
4692    characterData: true
4693  });
4694
4695  var obser_element = document.querySelector('.CollectionInner');
4696  if ( obser_element ) {
4697    observer.observe( obser_element, {
4698      characterDataOldValue: true,
4699      subtree: true,
4700      childList: true,
4701      characterData: true
4702    });
4703  }
4704
4705  var obser_wrapper = document.querySelector('.ProductListWrapper');
4706  if ( obser_wrapper ) {
4707    observer.observe( obser_wrapper, {
4708      characterDataOldValue: true,
4709      subtree: true,
4710      childList: true,
4711      characterData: true
4712    });
4713  }
4714</script>
4714
4715
4716
4717</div>
4718    </div><!-- CRITEO START -->
4719      
4719<script type="text/javascript">
4720  (function(){
4721    var partnerid = 5999;
4722switch(Shopify.locale) {
4723    case 'en':
4724		partnerid = 5999;
4725		break;
4726    case 'fr':
4727        partnerid = 107033;
4728        break;
4729    default:
4730        // do nothing
4731        break;
4732}
4733    var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
4734    window.criteo_q = window.criteo_q || [];
4735    window.criteo_q.push(
4736      { event: "setAccount", account: partnerid },
4737      
4738        { event: "setEmail", email: "", hash_method: "none"},
4739      
4740      { event: "setSiteType", type: deviceType },
4741      { event: "setZipcode", zipcode: "" },
4742        
4743        
4744          { event: "viewPage" , ecpplugin: "shopify-cg" }
4745        
4746    );
4747    window.addEventListener('load', function() {
4748      // ajax request catching
4749      (function(open) {
4750        XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {
4751          this.addEventListener("readystatechange", function() {
4752            if (this.readyState == 4 && this._url.includes("/add.js") && "" != "") {
4753              try {
4754                $.getJSON("/cart.js", function(data) {
4755                  var basketData = [];
4756                  var item;
4757                  if (!data.items || !data.items.length) return;
4758                  for (var i = 0; i < data.items.length; i++) {
4759                    item = data.items[i];
4760                    if (item.product_id == "") {
4761                      basketData.push({
4762                        id: item.product_id,
4763                        price: (typeof(item.price) != "number") ? item.price : (item.price/100),
4764                        quantity: item.quantity
4765                      });
4766                    }
4767                  }
4768                  window.criteo_q.push({
4769                    event: "addToCart",
4770                    ecpplugin: "shopify-cg",
4771                    product: basketData 
4772                  });
4773                });
4774              } catch (err) {
4775                // do nothing
4776              }
4777            }
4778          }, false);
4779          open.apply(this, arguments);
4780        };
4781      })(XMLHttpRequest.prototype.open);
4782
4783      // fetch request catching
4784      const crtoMock = window.fetch;
4785      window.fetch = function() {
4786        return new Promise((resolve, reject) => {
4787          crtoMock.apply(this, arguments)
4788            .then((response) => {
4789              if(response.url.includes("/add.js") && response.type != "cors" && "" != ""){
4790                try {
4791                  $.getJSON("/cart.js", function(data) {
4792                    var basketData = [];
4793                    var item;
4794                    if (!data.items || !data.items.length) return;
4795                    for (var i = 0; i < data.items.length; i++) {
4796                      item = data.items[i];
4797                      if (item.product_id == "") {
4798                        basketData.push({
4799                          id: item.product_id,
4800                          price: (typeof(item.price) != "number") ? item.price : (item.price/100),
4801                          quantity: item.quantity
4802                        });
4803                      }
4804                    }
4805                    window.criteo_q.push({
4806                      event: "addToCart",
4807                      ecpplugin: "shopify-cg",
4808                      product: basketData 
4809                    });
4810                  });
4811                } catch (err) {
4812                  // do nothing
4813                }
4814              }
4815              resolve(response);
4816            })
4817            .catch((error) => {
4818              reject(error);
4819            })
4820        });
4821      }
4822    }, false);
4823  })();
4824</script>
4824
4825      <!-- CRITEO END -->
4826  
4827  
4827<script
4828    async
4829    type="text/javascript"
4830    src="//static.klaviyo.com/onsite/js/Sm9a5a/klaviyo.js"
4831  ></script>
4831
4832
4833
4834    <!-- "snippets/swymSnippet.liquid" was not rendered, the associated app was uninstalled -->
4835    
4836<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.css">
4837<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js"></script>
vendor: 1 bytes, line 4837
4837
4838<script type="text/javascript">
4839  function initMoveWishlist(){
4840    var ShopifyCartData = {"note":null,"attributes":{},"original_total_price":0,"total_price":0,"total_discount":0,"total_weight":0.0,"item_count":0,"items":[],"requires_shipping":false,"currency":"CAD","items_subtotal_price":0,"cart_level_discount_applications":[],"checkout_charge_amount":0} || {'items': []};
4841    window.SwymCallbacks = window.SwymCallbacks || [];
4842    window.SwymCallbacks.push(function(swat) {
4843      // Add a confirmation step
4844      // For cart page button and dynamic cart
4845      // Use delegate listener to attach click for the button
4846      // TODO For more granular listeners, attach a direct listener
4847      $( "body" ).on('click', '.move_to_wishlist', function(evt) {
4848        evt.preventDefault();
4849        var elem = this;
4850        var lineNum = $(this).data()['line'];
4851        var lineItem = ShopifyCartData.items[lineNum - 1];
4852        $.confirm({
4853          title: 'Maybe...',
4854          theme: 'supervan', // 'material', 'bootstrap'
4855          content: 'Would you like to save this for later?', // TODO You can edit the message to show the product name
4856          buttons: {
4857            save: {
4858              text: 'Yes!',
4859              btnClass: 'btn-blue',
4860              action: function(savebutton){
4861                // Move to wishlist and remove
4862                if(!lineItem) {
4863                  // get from cart.js
4864                  jQuery.getJSON('/cart.js', function (cart, textStatus) {
4865                    ShopifyCartData = cart;
4866                    var lineItem = ShopifyCartData.items[lineNum - 1];
4867                    moveToWishlist(lineItem, lineNum, elem);
4868                  });
4869                } else {
4870                  moveToWishlist(lineItem, lineNum, elem);
4871                }
4872              }
4873            },
4874            nah: {
4875              text: 'No!',
4876              btnClass: 'btn-red',
4877              action: function(nahbutton){
4878                // Just remove from cart
4879                //removeFromCart(lineNum); // remove here if they say no.
4880              }
4881            }
4882          }
4883        });
4884      });
4885      function moveToWishlist(lineItem, lineNum, elem) {
4886        var wishlistData = swat.platform.transformCartItem(lineItem);
4887        swat.addToWishList(wishlistData, function() {
4888          // console.log('Item added to wishlist');
4889          $(elem).addClass('moved_to_wishlist').addClass('moving_to_wishlist');
4890          removeFromCart(lineNum);
4891        });
4892      }
4893      function removeFromCart(lineNum) { 
4894        var Cartelement =  document.getElementsByClassName('Cart--expanded');
4895        if (typeof(Cartelement) != 'undefined' && Cartelement != null)
4896        {
4897          $(".CartItem__Remove[data-line='"+lineNum+"']")[0].click();
4898        } else { 
4899          $(".Drawer__Container .CartItem__Remove[data-line='"+lineNum+"']")[0].click();
4900        }
4901        //$( ".Drawer__Container .CartItem__Remove[data-line='"+lineNum+"']" ).trigger( "click" );
4902        //console.log(".Drawer__Container .CartItem__Remove[data-line='"+lineNum+"']");
4903        //optional - since cart btn already does this in new themes.
4904        // Remove from cart via location
4905        // window.location = '/cart/change?line='+lineNum+'&quantity=0';
4906        // You can also do it via cartJS AJAX APIs and dynamically update the UI
4907        // More here https://help.shopify.com/themes/development/getting-started/using-ajax-api
4908      }
4909    });  
4910  }
4911  (function(){
4912    initMoveWishlist();
4913  })();
4914</script>
4914
4915    
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926<div class="nosto_cart" style="display:none">
4927    
4928    
4929    
4930</div>
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940    <!--BeginCFFPersistentCartCart-->
4941    
4942
4943    
4943<script>
4944        window.cffPCLiquidPlaced = true
4945    </script>
4945
4946
4947    <!--EndCFFPersistentCartCart-->
4948
4949    
4950    <!-- langify-v2-scripts-begin -->
4951
4952
4953<script>
4954  var langify = langify || {};
4955
4956
4957  /**
4958  * 
4959  * 
4960  * @class LyHelper
4961  */
4962  class LyHelper {
4963    constructor() {
4964      return {
4965        ajax: function(params) { return LyHelper.ajax(params); },
4966        isIE: function() { return LyHelper.isIE(); },
4967        extractImageObject: function(val) { return LyHelper.extractImageObject(val); },
4968        getCurrentLanguage: function() { return LyHelper.getCurrentLanguage(); },
4969        getCookie: function(name) { return LyHelper.getCookie(name); },
4970        setCookie: function(name, value, days) { return LyHelper.setCookie(name, value, days); },
4971        getVersion: function() { return LyHelper.getVersion(); },
4972        isOutOfViewport: function(elem) { return LyHelper.isOutOfViewport(elem); },
4973        isDomainFeatureEnabled: function() { return LyHelper.isDomainFeatureEnabled(); },
4974        getVal: function(str) { return LyHelper.getVal(str); },
4975        inIframe: function() { return LyHelper.inIframe(); },
4976        shopifyAPI: function() { return LyHelper.shopifyAPI(); },
4977        loadScript: function(url, callback) { return LyHelper.loadScript(url, callback); },
4978        localizationRedirect: function(type, code, additionalFields, additionalParams, domain) { return LyHelper.localizationRedirect(type, code, additionalFields, additionalParams, domain); },
4979        changeCurrency: function(code) { return LyHelper.changeCurrency(code); },
4980        log: function(title, data, type) { return LyHelper.log(title, data, type); },
4981      }
4982    }
4983    static ajax(params) {
4984      var data = params.data;
4985      fetch(params.url, {
4986        method: params.method,
4987        headers: {
4988          'Content-Type': 'application/json',
4989        },
4990        body: (data && params.method === 'POST') ? JSON.stringify(data) : null,
4991      })
4992      .then(response => response.json())
4993      .then(data => {
4994        params.success(data);
4995      })
4996      .catch((error) => {
4997        console.error('Error:', error);
4998      });
4999    }
5000    static isIE() {
5001      var ua = navigator.userAgent;
5002      var is_ie = ua.indexOf("MSIE ") > -1 || ua.indexOf("Trident/") > -1;
5003      return is_ie;
5004    }
5005    static extractImageObject(val) {
5006      if(!val || val == '') return false;
5007      var val = val;
5008
5009      // Handle src-sets
5010      if(val.search(/([0-9]+w?h?x?,)/gi) > -1) {
5011        val = val.split(/([0-9]+w?h?x?,)/gi)[0];
5012      }
5013
5014      var hostBegin = val.indexOf('//') ? val.indexOf('//') : 0;
5015      var hostEnd = val.lastIndexOf('/') + 1;
5016      var host = val.substring(hostBegin, hostEnd);      
5017      var afterHost = val.substring(hostEnd, val.length);
5018
5019      var url = val;
5020      var file = ''; 
5021      var name = ''; 
5022      var type = '';
5023      afterHost = afterHost.substring(0, (afterHost.indexOf("#") == -1) ? afterHost.length : afterHost.indexOf("#"));
5024      afterHost = afterHost.substring(0, (afterHost.indexOf("?") == -1) ? afterHost.length : afterHost.indexOf("?"));
5025      name = afterHost.replace(/(_[0-9]+x[0-9]*|_{width}x|_{size})?(_crop_(top|center|bottom|left|right))?(@[0-9]*x)?(\.progressive)?\.(png\.jpg|jpe?g|png|gif|webp)/gi, "");
5026
5027      if(afterHost.search(/(\.png\.jpg|\.jpg\.jpg)/gi) > -1) {
5028        type = afterHost.substring(afterHost.search(/(\.png\.jpg|\.jpg\.jpg)/gi)+1, afterHost.length);
5029      } else {
5030        type = afterHost.substring(afterHost.lastIndexOf('.')+1, afterHost.length);
5031      }
5032      
5033      file = afterHost.replace(/(_[0-9]+x[0-9]*|_{width}x|_{size})?(_crop_(top|center|bottom|left|right))?(@[0-9]*x)?(\.progressive)?\.(png\.jpg|jpe?g|png|gif|webp)/gi, '.'+type);
5034
5035      return {
5036        host: host,
5037        name: name,
5038        type: type,
5039        file: file
5040      }
5041    }
5042    static getCurrentLanguage() {
5043      return window.langify.locale.iso_code;
5044    }
5045    static setLanguage(code) {
5046      
5047    }
5048    static getCookie(name) {
5049      var v = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
5050      if(v) return v[2];
5051      else return null;
5052    }
5053    static setCookie(name, value, days) {
5054      var d = new Date;
5055      d.setTime(d.getTime() + 24*60*60*1000*days);
5056      document.cookie = name + "=" + value + ";path=/;expires=" + d.toGMTString();
5057    }
5058    static getVersion() {
5059      return 2;
5060    }
5061    static isOutOfViewport (elem) {
5062      var bounding = elem.getBoundingClientRect();
5063      var out = {};
5064      out.top = bounding.top < 0;
5065      out.left = bounding.left < 0;
5066      out.bottom = Math.ceil(bounding.bottom) >= (window.innerHeight || document.documentElement.clientHeight);
5067      out.right = bounding.right > (window.innerWidth || document.documentElement.clientWidth);
5068      out.any = out.top || out.left || out.bottom || out.right;
5069      out.inViewport = bounding.x > 0 && bounding.y > 0;
5070      return out;
5071    }
5072    static isDomainFeatureEnabled() {
5073      return window.langify.locale.domain_feature_enabled;
5074    }
5075    static getVal(str) {
5076      var v = window.location.search.match(new RegExp('(?:[?&]'+str+'=)([^&]+)'));
5077      return v ? v[1] : null;
5078    }
5079    static inIframe() {
5080      try {
5081        return window.self !== window.top;
5082      } catch (e) {
5083        return true;
5084      }
5085    }
5086    static shopifyAPI() {
5087      var root_url = window.langify.locale.root_url != '/' ? window.langify.locale.root_url : '';
5088
5089      return {
5090        attributeToString: function(attribute) {
5091          if((typeof attribute) !== 'string') {
5092            attribute += '';
5093            if(attribute === 'undefined') {attribute = '';}
5094          }
5095          return attribute.trim();
5096        },
5097        getCart: function(callback) {
5098          LyHelper.ajax({
5099            method: 'GET',
5100            url: root_url+'/cart.js',
5101            success: function (cart, textStatus) {
5102              if((typeof callback) === 'function') {
5103                callback(cart);
5104              }
5105            }
5106          });
5107        },
5108        updateCartNote: function(note, callback) {
5109          var params = {
5110            method: 'POST',
5111            url: root_url+'/cart/update.js',
5112            data: 'note=' + this.attributeToString(note),
5113            dataType: 'json',
5114            success: function(cart) {if((typeof callback) === 'function') {callback(cart);}},
5115            error: this.onError
5116          };
5117          LyHelper.ajax(params);
5118        },
5119        updateCartAttributes: function(attributes, callback) {
5120          var params = {
5121            method: 'POST',
5122            url: root_url+'/cart/update.js',
5123            data: {"attributes": attributes},
5124            dataType: 'json',
5125            success: function(cart) {
5126              if((typeof callback) === 'function') {
5127                callback(cart);
5128              }
5129            },
5130            error: this.onError
5131          };
5132          LyHelper.ajax(params);
5133        },
5134        onError: function(XMLHttpRequest, textStatus) {
5135
5136        }      
5137      }
5138    }
5139    static loadScript(url, callback) {
5140      var script = document.createElement('script');
5141      script.type = 'text/javascript';
5142      if(script.readyState) {
5143        script.onreadystatechange = function () {
5144          if(script.readyState == 'loaded' || script.readyState == 'complete') {
5145            script.onreadystatechange = null;
5146            callback();
5147          }
5148        };
5149      } else {
5150        script.onload = function () {
5151          callback();
5152        };
5153      }
5154      script.src = url;
5155      document.getElementsByTagName('head')[0].appendChild(script);
5156    }
5157    static localizationRedirect(type, code, additionalFields, additionalParams, domain) {
5158      if(type !== 'country_code' && type !== 'language_code') { 
5159        return false; 
5160      }
5161      if(!additionalParams) {
5162        var additionalParams = '';
5163      }
5164      if(domain) {
5165        window.location.href = domain;
5166        return true;
5167      }
5168      var params = [
5169        {
5170          name: type,
5171          value: code
5172        },
5173        {
5174          name: 'return_to',
5175          value: window.location.pathname + window.location.search + additionalParams + window.location.hash
5176        },
5177        {
5178          name: 'form_type',
5179          value: 'localization'
5180        },
5181        {
5182          name: '_method',
5183          value: 'put'
5184        }
5185      ];
5186      if(additionalFields) {
5187        for(var i=0; i<additionalFields.length; i++) {
5188          params.push(additionalFields[i]);
5189        }
5190      }
5191      const form = document.createElement('form');
5192      form.method = 'POST';
5193      form.action = '/localization';
5194      params.forEach(function(param) {
5195        const field = document.createElement('input');
5196        field.type = 'hidden';
5197        field.name = param['name'];
5198        field.value = param['value'];
5199        form.appendChild(field);
5200      });
5201      document.body.appendChild(form);
5202      form.submit();
5203    }
5204    static changeCurrency(code) {
5205      const params = [
5206        {
5207          name: 'currency_code',
5208          value: code
5209        },
5210        {
5211          name: 'return_to',
5212          value: window.location.pathname + window.location.search + window.location.hash
5213        },
5214        {
5215          name: 'form_type',
5216          value: 'localization'
5217        },
5218        {
5219          name: '_method',
5220          value: 'put'
5221        }
5222      ];
5223      const form = document.createElement('form');
5224      form.method = 'POST';
5225      form.action = '/localization';
5226      params.forEach(function(param) {
5227        const field = document.createElement('input');
5228        field.type = 'hidden';
5229        field.name = param['name'];
5230        field.value = param['value'];
5231        form.appendChild(field);
5232      });
5233      document.body.appendChild(form);
5234      form.submit();
5235    }
5236    static log(title, data, type) {
5237      if(langify.settings.debug) {
5238        if(!data) {
5239          var data = '';
5240        }
5241        
5242        var css = 'color: green; font-weight: bold;';
5243        if(type === 'error') {
5244          css = 'color: red; font-weight: bold;';
5245        }
5246
5247        console.log(`%c ${title}: \n`, css, data);
5248      }
5249    }
5250  };
5251
5252
5253  /**
5254  *
5255  *
5256  * @class TranslationObserver
5257  */
5258  class TranslationObserver {
5259    constructor() {
5260      LyHelper.log('TranslationObserver instantiation')
5261    }
5262
5263    init() {
5264      if(langify.settings.observe && !LyHelper.isIE()) {
5265        var langifyObserver = this.langifyObserverCore();
5266        langifyObserver.init();
5267        
5268        // HOTFIX: translation observer sometimes refuses to trigger on page load_
5269        langifyObserver.triggerCustomContents();
5270
5271        langify.api = {
5272          observer: {
5273            start: langifyObserver.init,
5274            stop: langifyObserver.stopObserver,
5275            trigger: langifyObserver.triggerCustomContents,
5276            translateLink: langifyObserver.translateLink,
5277            translateTextNode: langifyObserver.translateTextNode,
5278            translateNodeAttrs: langifyObserver.translateNodeAttrs,
5279            translateImage: langifyObserver.translateImage,
5280            translateCssImage: langifyObserver.translateCssImage
5281          }
5282        };
5283      }
5284
5285      return this;
5286    }
5287
5288    langifyObserverCore() {
5289      var observedNodes = [];
5290      var intersectionObs = null;
5291      var mutationCount = 0;
5292      var mutationObs = null;
5293      var mutationObsConfig = {
5294        characterData: true,
5295        characterDataOldValue: true,
5296        attributes: true,
5297        attributeOldValue: true,
5298        childList: true,
5299        subtree: true,
5300      };
5301      var customContents_html = {};
5302      var customContents_text = {};
5303      var customContents_attr = {};
5304    
5305      function init() {
5306        if(langify.settings.observe) {
5307          spreadCustomContents();
5308          if (window.MutationObserver) {
5309            if (langify.settings.lazyload && window.IntersectionObserver) {
5310              startIntersectionObserver();
5311            } else {
5312              startMutationObserver(null);
5313            }
5314          } else {
5315            startMutationEvents();
5316          }
5317        }
5318      }
5319    
5320    
5321      // Intersection Observer
5322      function startIntersectionObserver() {
5323        intersectionObs = new IntersectionObserver(callbackIntersectionChange);
5324        var elementNodes = document.getElementsByClassName('shopify-section');
5325        Array.prototype.slice.call(elementNodes).forEach(function(node) {
5326          intersectionObs.observe(node);
5327        });
5328      }
5329    
5330      function callbackIntersectionChange(intersections) {
5331        intersections.forEach(function(intersection) {
5332          var target = intersection.target;
5333          var targetIsIntersecting = Boolean(target.getAttribute('ly-is-intersecting') === "true" ? true : false);
5334    
5335          if(typeof targetIsIntersecting == 'undefined' || targetIsIntersecting == null) {
5336            target.setAttribute('ly-is-intersecting', intersection.isIntersecting);
5337            targetIsIntersecting = intersection.isIntersecting;
5338          }
5339          
5340          // On Screen
5341          if(targetIsIntersecting == false && intersection.isIntersecting == true) {
5342            if(!target.getAttribute('ly-is-observing')) {
5343              startMutationObserver(target);
5344              intersectionObs.unobserve(target);
5345    
5346              // As the mutation observer didn't see the "add" of the elememts, trigger the initial translation manually
5347              var elementNodes = getNodesUnder(target, 'SHOW_ELEMENT');
5348              var textNodes = getNodesUnder(target, 'SHOW_TEXT');
5349              var nodes = elementNodes.concat(textNodes);
5350              nodes.forEach(function(node) {
5351                translate(node, 'mutation -> childList');
5352              });
5353            }
5354          } 
5355          // Off Screen
5356          //else if(targetIsIntersecting == true && intersection.isIntersecting == false) {
5357          //  stopMutationObserver(target);
5358          //}
5359          target.setAttribute('ly-is-intersecting', intersection.isIntersecting);
5360        });
5361      }
5362    
5363    
5364      // Mutation Observer
5365      function startMutationObserver(observerTarget) {
5366        if (!observerTarget) {
5367          var target = document.documentElement || document.body; // main window
5368        } else {
5369          if (observerTarget.nodeName  === 'IFRAME') {
5370            try { var target = observerTarget.contentDocument || observerTarget.contentWindow.document; }
5371            catch { return false; }
5372          } else {
5373            var target = observerTarget;
5374          }
5375        }
5376        mutationObs = new MutationObserver(callbackDomChange);
5377        mutationObs.observe(target, mutationObsConfig);
5378        observedNodes.push(target);
5379        try { target.setAttribute('ly-is-observing', 'true'); } catch(e) {}
5380      }
5381    
5382      function stopMutationObserver(target) {
5383        if(observedNodes.indexOf(target) > -1) {
5384          observedNodes.splice(observedNodes.indexOf(target), 1);
5385        }
5386        var mutations = mutationObs.takeRecords();
5387        mutationObs.disconnect();
5388        observedNodes.forEach(node => {
5389          mutationObs.observe(node, mutationObsConfig);
5390        });
5391        try { target.removeAttribute('ly-is-observing'); } catch(e) {}
5392      }
5393    
5394    
5395      function callbackDomChange(mutations, mutationObs) {
5396        for (var i = 0, length = mutations.length; i < length; i++) {
5397          var mutation = mutations[i];
5398          var target = mutation.target;
5399    
5400          // Links-Hook
5401          if (mutation.type === 'attributes' && (mutation.attributeName === 'href' || mutation.attributeName === 'action')) {
5402            var target = mutation.target;
5403            translateLink(target.getAttribute(mutation.attributeName), target);
5404          }
5405          // Images-Hook
5406          else if (mutation.type === 'attributes' && (mutation.attributeName === 'src' || mutation.attributeName === 'data-src' || mutation.attributeName === 'srcset' || mutation.attributeName === 'data-srcset')) {
5407            translateImage(target, mutation.attributeName);
5408          }
5409          else if (mutation.type === 'attributes' && mutation.attributeName === 'style') {
5410            translateCssImage(target);
5411          }
5412          // Subtree Events
5413          else if (mutation.type === 'childList') {
5414            // Added Nodes
5415            if(mutation.addedNodes.length > 0) {
5416              var elementNodes = getNodesUnder(mutation.target, 'SHOW_ELEMENT');
5417              var textNodes = getNodesUnder(mutation.target, 'SHOW_TEXT');
5418              var nodes = elementNodes.concat(textNodes);
5419              nodes.forEach(function(node) {
5420                translate(node, 'mutation -> childList');
5421              });
5422            }
5423          }
5424          // CharacterData Events
5425          else if (mutation.type === 'characterData') {
5426            var target = mutation.target;
5427            translate(target, 'mutation -> characterData');
5428          }
5429        }
5430      }
5431    
5432    
5433      function translate(node, info) {
5434        if((node.nodeType === 1 && node.hasAttribute('data-ly-locked')) || (node.nodeType === 3 && node.parentNode && node.parentNode.hasAttribute('data-ly-locked'))) {
5435          return;
5436        }
5437        // CC-Hook
5438        if (node.nodeName  !== 'SCRIPT' && node.nodeName  !== 'STYLE') {
5439          if (node.nodeType === 3) {
5440            translateTextNode(node, info);
5441          }
5442          translateNodeAttrs(node);
5443        }
5444        // Links-Hook
5445        if (node.nodeName  === 'A' || node.nodeName  === 'FORM') {
5446          if(node.hasAttribute('href')) var attrName = 'href';
5447          else var attrName = 'action';
5448          var url = node.getAttribute(attrName);
5449          translateLink(url, node);
5450        }
5451        // Images-Hook
5452        if (node.nodeName  === 'IMG' || node.nodeName  === 'SOURCE') {
5453          translateImage(node, ['src', 'data-src', 'srcset', 'data-srcset']);
5454        }
5455        if (node.attributes && node.getAttribute('style')) {
5456          translateCssImage(node);
5457        }
5458        // Iframe Observation
5459        if (node.nodeName  === 'IFRAME') {
5460          // Todo: handle srcdoc iframe content observing
5461          if (node.getAttribute('ly-is-observing') == null && node.getAttribute('src') == null && !node.hasAttribute('srcdoc')) {
5462            node.setAttribute('ly-is-observing', 'true');
5463            startMutationObserver(node);
5464          }
5465        }
5466      }
5467    
5468      function translateNodeAttrs(node) {
5469        if (node.attributes && node.getAttribute('placeholder')) {
5470          var src = node.getAttribute('placeholder').trim().replace(/(\r\n|\n|\r)/gim,"").replace(/\s+/g," ").toLowerCase();
5471          if(customContents_text[src] && node.getAttribute('placeholder') !== customContents_text[src]) {
5472            node.setAttribute('placeholder', customContents_text[src]);
5473          }
5474        }
5475      }
5476    
5477    
5478      function translateTextNode(node, info) {
5479        if(langify.settings.observeCustomContents === false || !node.textContent || node.textContent.trim().length === 0) {
5480          return;
5481        }
5482        var oldSrc = node.textContent.trim().replace(/(\r\n|\n|\r)/gim,"").replace(/\s+/g," ").toLowerCase();
5483        var src = node.textContent.trim().replace(/(\r\n|\n|\r)/gim," ").replace(/\s+/g," ").toLowerCase();
5484        if(customContents_text[oldSrc]) {
5485          src = oldSrc;
5486        }
5487        if(customContents_text[src] && node.textContent !== customContents_text[src]) {
5488          var newContent = node.textContent.replace(node.textContent.trim(), customContents_text[src]);
5489          if (newContent != node.textContent) {
5490            if(!node.parentNode.hasAttribute('data-ly-mutation-count') || parseInt(node.parentNode.getAttribute('data-ly-mutation-count')) < langify.settings.maxMutations) {
5491              var count = node.parentNode.hasAttribute('data-ly-mutation-count') ? parseInt(node.parentNode.getAttribute('data-ly-mutation-count')) : 0;
5492              node.parentNode.setAttribute('data-ly-mutation-count', count+1);
5493              node.textContent = newContent;
5494    
5495              mutationCount = mutationCount + 1;
5496              LyHelper.log('REPLACED (TEXT)', {
5497                  oldValue: src,
5498                  newValue: customContents_text[src],
5499                  mutationCount,
5500                }, 'success'
5501              );
5502            
5503              var event = new CustomEvent('langify.observer.aftertranslatetext', { 
5504                bubbles: true,
5505                detail: {
5506                  target: node,
5507                  original: src,
5508                  translation: customContents_text[src]
5509                }
5510              });
5511              node.dispatchEvent(event);
5512            }
5513          }
5514        }
5515      }
5516    
5517      function translateLink(url, node, force) {
5518        if(langify.settings.observeLinks === false || isLocalizationForm(node) || node.hasAttribute('data-ly-locked') || !url || (url.indexOf('mailto:') !== -1 || url.indexOf('javascript:') !== -1 || url.indexOf('tel:') !== -1 || url.indexOf('file:') !== -1 || url.indexOf('ftp:') !== -1 || url.indexOf('sms:') !== -1 || url.indexOf('market:') !== -1 || url.indexOf('fax:') !== -1 || url.indexOf('callto:') !== -1 || url.indexOf('ts3server:') !== -1)) {
5519          return;
5520        }
5521        var isLocalized = (
5522          url.indexOf('/'+ langify.locale.iso_code +'/') === 0 || url === '/'+ langify.locale.iso_code || 
5523          url.indexOf('/'+ langify.locale.iso_code.toLowerCase() +'/') === 0 || url === '/'+ langify.locale.iso_code.toLowerCase() ||          
5524          url.indexOf('/'+ langify.locale.iso_code.toLowerCase().substring(0,2) +'/') === 0 || url === '/'+ langify.locale.iso_code.toLowerCase().substring(0,2) ||
5525          url.indexOf(langify.locale.root_url + '/') === 0 || url === langify.locale.root_url || 
5526          url.indexOf(langify.locale.shop_url + langify.locale.root_url) === 0 || url === langify.locale.shop_url + langify.locale.root_url
5527        );
5528        var cleanUrl = url.replace(langify.locale.shop_url, '');
5529        var re = new RegExp(`\/\\b${langify.locale.iso_code.replace('-', '\-')}\\b\/`, 'gi');
5530        var link = cleanUrl.replace(re, '/');
5531        var isUrlAbsolute = (link.indexOf('://') > 0 || link.indexOf('//') === 0);
5532        var blacklist = ['#', '/'+ langify.locale.iso_code +'#'].concat(langify.settings.linksBlacklist);
5533        var isUrlBlacklisted = blacklist.find(x => url.indexOf(x) === 0);
5534        if(!isLocalized && !isUrlAbsolute && !isUrlBlacklisted && langify.locale.root_url != '/' || force) {
5535          if(node.hasAttribute('href')) var attrName = 'href'; else var attrName = 'action';
5536          if(link === '/' || link == langify.locale.root_url) link = '';
5537          var newLink = langify.locale.root_url + link;
5538          var timeStamp = Math.floor(Date.now());
5539          if(!node.hasAttribute('data-ly-processed') || timeStamp > parseInt(node.getAttribute('data-ly-processed')) + langify.settings.timeout) {
5540            node.setAttribute('data-ly-processed', timeStamp);
5541            node.setAttribute(attrName, newLink);
5542            if(node.hasAttribute('data-'+attrName)) node.setAttribute('data-'+attrName, newLink);
5543    
5544            mutationCount = mutationCount + 1;
5545            LyHelper.log('REPLACED (LINK)', {
5546                attrName,
5547                oldValue: url,
5548                newValue: newLink,
5549                mutationCount,
5550              }, 'success'
5551            );
5552            
5553            var event = new CustomEvent('langify.observer.aftertranslatelink', { 
5554              bubbles: true,
5555              detail: {
5556                target: node,
5557                attribute: attrName,
5558                original: url,
5559                translation: newLink
5560              }
5561            });
5562            node.dispatchEvent(event);
5563          }
5564        }
5565      }
5566    
5567      function translateImage(node, attr) {
5568        if(langify.settings.observeImages === false || node.hasAttribute('data-ly-locked') || Object.keys(customContents_image).length === 0) {
5569          return
5570        }
5571        var attrs = [];
5572        if(typeof attr === 'string') attrs.push(attr);
5573        else if(typeof attr === 'object') attrs = attr;
5574        var timeStamp = Math.floor(Date.now());
5575        if(!node.hasAttribute('data-ly-processed') || timeStamp > parseInt(node.getAttribute('data-ly-processed')) + langify.settings.timeout) {
5576          node.setAttribute('data-ly-processed', timeStamp);
5577          attrs.forEach(function(attr) {
5578            if(node.hasAttribute(attr)) {
5579              var imgObject = LyHelper.extractImageObject(node.getAttribute(attr));
5580              var imgKey = imgObject ? imgObject.file.toLowerCase() : '';
5581    
5582              if(customContents_image[imgKey]) {
5583    
5584                // Replace
5585                var oldValue = node.getAttribute(attr);
5586                var translation = node.getAttribute(attr);
5587                translation = translation.replace(new RegExp(imgObject.host, 'g'), customContents_image[imgKey].host);
5588                translation = translation.replace(new RegExp(imgObject.name, 'g'), customContents_image[imgKey].name);
5589                translation = translation.replace(new RegExp(imgObject.type, 'g'), customContents_image[imgKey].type);
5590    
5591                // China Hook
5592                if(node.getAttribute(attr).indexOf('cdn.shopifycdn.net') >= 0) {
5593                  translation = translation.replace(new RegExp('cdn.shopify.com', 'g'), 'cdn.shopifycdn.net'); 
5594                }
5595    
5596                if(node.getAttribute(attr) != translation) {
5597                  node.setAttribute(attr, translation);
5598    
5599                  mutationCount = mutationCount + 1;
5600                  LyHelper.log('REPLACED (IMAGE)', {
5601                    attrName: attr,
5602                    oldValue: oldValue,
5603                    newValue: translation,
5604                    mutationCount,
5605                  }, 'success');
5606            
5607                  var event = new CustomEvent('langify.observer.aftertranslateimage', { 
5608                    bubbles: true,
5609                    detail: {
5610                      target: node,
5611                      attribute: attr,
5612                      original: oldValue,
5613                      translation: translation
5614                    }
5615                  });
5616                  node.dispatchEvent(event);
5617                }
5618              }
5619            }
5620          });
5621        }
5622      }
5623    
5624      function translateCssImage(node) {
5625        if(langify.settings.observeImages === false || node.hasAttribute('data-ly-locked') || Object.keys(customContents_image).length === 0 || !node.getAttribute('style')) {
5626          return
5627        }
5628    
5629        var imgMatches = node.getAttribute('style').match(/url\(("|')?(.*)("|')?\)/gi);
5630        if(imgMatches !== null) {
5631          var imgSource = imgMatches[0].replace(/url\(("|')?|("|')?\)/, '');
5632          var imgObject = LyHelper.extractImageObject(imgSource);
5633          var imgKey = imgObject ? imgObject.file.toLowerCase() : '';
5634          var attr = 'style';
5635    
5636          if(customContents_image[imgKey]) {
5637    
5638            // Replace
5639            var translation = node.getAttribute(attr);
5640            translation = translation.replace(new RegExp(imgObject.host, 'g'), customContents_image[imgKey].host);
5641            translation = translation.replace(new RegExp(imgObject.name, 'g'), customContents_image[imgKey].name);
5642            translation = translation.replace(new RegExp(imgObject.type, 'g'), customContents_image[imgKey].type);
5643    
5644            // China Hook
5645            if(node.getAttribute(attr).indexOf('cdn.shopifycdn.net') >= 0) {
5646              translation = translation.replace(new RegExp('cdn.shopify.com', 'g'), 'cdn.shopifycdn.net'); 
5647            }
5648    
5649            if(node.getAttribute(attr) != translation) {
5650              var timeStamp = Math.floor(Date.now());
5651              if(!node.hasAttribute('data-ly-processed') || timeStamp > parseInt(node.getAttribute('data-ly-processed')) + langify.settings.timeout) {
5652                node.setAttribute('data-ly-processed', timeStamp);
5653                node.setAttribute(attr, translation);
5654                mutationCount = mutationCount + 1;
5655              }
5656            }
5657          }          
5658        }
5659      }
5660    
5661      function findAndLocalizeLinks(target, parent) {
5662        if(target.parentNode && parent) var allLinks = target.parentElement.querySelectorAll('[href],[action]');
5663        else var allLinks = target.querySelectorAll('[href],[action]');
5664        allLinks.forEach(link => {
5665          if(link.hasAttribute('href')) var attrName = 'href'; else var attrName = 'action';
5666          var url = link.getAttribute(attrName);
5667          translateLink(url, link);
5668        });
5669      }
5670      
5671      function isLocalizationForm(node) {
5672        if(node.querySelector('input[name="form_type"][value="localization"]')){
5673          return true;
5674        }
5675        return false;
5676      }
5677    
5678      function getNodesUnder(el, show){
5679        var n, a=[], walk=document.createTreeWalker(el, NodeFilter[show] , null, false);
5680        while(n=walk.nextNode()) a.push(n);
5681        return a;
5682      }
5683    
5684      function spreadCustomContents() {
5685        var getFileName = function(url) {
5686          if(!url || url == '') return;
5687          url = url.substring(0, (url.indexOf("#") == -1) ? url.length : url.indexOf("#"));
5688          url = url.substring(0, (url.indexOf("?") == -1) ? url.length : url.indexOf("?"));
5689          url = url.substring(url.lastIndexOf("/") + 1, url.length);
5690          url = url.replace(/(_[0-9]+x[0-9]*|_{width}x)?(_crop_(top|center|bottom|left|right))?(@[0-9]*x)?(\.progressive)?\.(jpe?g|png|gif|webp)/gi, "");
5691          return '/' + url;
5692        }
5693        Object.entries(customContents).forEach(function(entry) {
5694          //if(/<\/?[a-z][\s\S]*>/i.test(entry[0])) customContents_html[entry[0]] = entry[1];
5695          //else if(/(http(s?):)?([/|.|\w|\s|-])*\.(?:jpe?g|gif|png)/.test(entry[0])) customContents_image[getFileName(entry[0])] = getFileName(entry[1]);
5696          if(/(http(s?):)?([/|.|\w|\s|-])*\.(?:jpe?g|gif|png|webp)/.test(entry[0])) customContents_image[LyHelper.extractImageObject(entry[0]).file] = LyHelper.extractImageObject(entry[1]);
5697          else customContents_text[entry[0]] = entry[1];
5698        });
5699        LyHelper.log('CUSTOM CONTENTS:', {customContents, customContents_text, customContents_image}, 'info')
5700      }
5701    
5702      // Polyfill for old browsers
5703      function startMutationEvents() {
5704        var target = document.querySelector('body');
5705        target.addEventListener("DOMAttrModified", function (event) {
5706          if(event.attrName === 'href' || event.attrName === 'action') {
5707            if(event.prevValue != event.newValue) {
5708              translateLink(event.newValue, event.target);
5709            }
5710          }
5711        }, false);
5712        target.addEventListener("DOMSubtreeModified", function (event) {
5713          //findAndLocalizeLinks(event.target, false);
5714          //matchCustomContent(event.target);
5715        }, false);
5716      }
5717    
5718      function triggerCustomContents() {
5719        var rootnode = document.getElementsByTagName('body')[0]
5720        var walker = document.createTreeWalker(rootnode, NodeFilter.SHOW_ALL, null, false)
5721        
5722        while (walker.nextNode()) {
5723          //LyHelper.log(walker.currentNode.tagName)
5724          translate(walker.currentNode, null);
5725        }
5726      }
5727    
5728      function stopObserver() {
5729        mutationObs.takeRecords();
5730        mutationObs.disconnect();
5731      }
5732    
5733      //init();
5734      return {
5735        init: init,
5736        triggerCustomContents: triggerCustomContents,
5737        stopObserver: stopObserver,
5738        translateLink: translateLink,
5739        translateTextNode: translateTextNode,
5740        translateNodeAttrs: translateNodeAttrs,
5741        translateImage: translateImage,
5742        translateCssImage: translateCssImage
5743      }
5744    };
5745  }
5746
5747
5748  /**
5749  *
5750  * 
5751  * @class Switcher
5752  */
5753  class Switcher {
5754    constructor(switcherSettings) {
5755      LyHelper.log('Switcher instantiation');
5756
5757      this.lyForceOff = location.search.split('ly-force-off=')[1];
5758      this.switcherElements = Array.prototype.slice.call(document.getElementsByClassName('ly-switcher-wrapper'));
5759    }
5760
5761    init() {
5762
5763      // Initial cart.attributes update
5764      LyHelper.shopifyAPI().getCart(function (cart) {
5765        var currentLanguage = langify.locale.iso_code;
5766        if(!cart.attributes.language || cart.attributes.language != currentLanguage) {
5767          LyHelper.shopifyAPI().updateCartAttributes({"language": currentLanguage}, function(data){});
5768        }
5769      });
5770
5771      if(langify.locale.languages.length === 1) {
5772        console.info(`%c LANGIFY INFO:\n`, 'font-weight: bold;', 'The language switcher is hidden! This can have one of the following reasons: \n * All additional languages are disabled in the "Langify -> Dashboard -> Languages" section. \n * If you are using different domains for your additional languages, ensure that "Cross Domain Links" are enabled inside the "Langify -> Dashboard -> Switcher Configurator -> Domains" section.');
5773        return false;
5774      }
5775
5776      this.setCustomPosition();
5777      this.initCustomDropdown();
5778      this.bindCountrySwitchers();
5779      this.bindCurrencySwitchers();
5780      this.bindLanguageSwitchers();
5781
5782      var event = new CustomEvent('langify.switcher.initialized', { 
5783        bubbles: true,
5784        detail: {}
5785      });
5786    }
5787
5788    initCustomDropdown() {
5789      // Custom Dropdown
5790      var root = this;
5791      var switcher = document.getElementsByClassName('ly-custom-dropdown-switcher');
5792      for(var a = 0; a < switcher.length; a++) {
5793        switcher[a].classList.toggle('ly-is-open');
5794        var isOut = LyHelper.isOutOfViewport(switcher[a]);
5795        if(isOut.bottom && isOut.inViewport) {
5796          switcher[a].classList.add('ly-is-dropup');
5797          var arrows = switcher[a].querySelectorAll('.ly-arrow');
5798          for(var b = 0; b < arrows.length; b++) {
5799            arrows[b].classList.add('ly-arrow-up');    
5800          }
5801        }
5802        switcher[a].classList.toggle('ly-is-open');
5803        switcher[a].onclick = function(event) {
5804          root.toggleSwitcherOpen(this);
5805        }
5806      }
5807
5808      document.addEventListener('click', function(event) {
5809        if(!event.target.closest('.ly-custom-dropdown-switcher')) {
5810          var openSwitchers = document.querySelectorAll('.ly-custom-dropdown-switcher.ly-is-open')
5811          for(var i = 0; i < openSwitchers.length; i++) {
5812            openSwitchers[i].classList.remove('ly-is-open');
5813          }
5814        }
5815      });
5816    }
5817    
5818    bindLanguageSwitchers() {
5819      var root = this;
5820      var links = document.getElementsByClassName('ly-languages-switcher-link');
5821      for(var l = 0; l < links.length; l++) {
5822        links[l].addEventListener('click', function(event) {
5823          event.preventDefault();
5824          if(LyHelper.isDomainFeatureEnabled() && this.getAttribute('href') !== '#') {
5825          	var domain = this.getAttribute('href');
5826          }
5827          LyHelper.setCookie('ly-lang-selected', this.getAttribute('data-language-code'), 365);
5828          LyHelper.localizationRedirect('language_code', this.getAttribute('data-language-code'), null, null, domain);
5829        });
5830      }
5831
5832      // Native select event handling
5833      var nativeLangifySelects = document.querySelectorAll('select.ly-languages-switcher');
5834      for(var i = 0; i < nativeLangifySelects.length; i++) {
5835        nativeLangifySelects[i].onchange = function() {
5836          event.preventDefault();
5837          if(LyHelper.isDomainFeatureEnabled() && this[this.selectedIndex].getAttribute('data-domain') !== '#') {
5838            var domain = this[this.selectedIndex].getAttribute('data-domain');
5839          }
5840          LyHelper.setCookie('ly-lang-selected', this[this.selectedIndex].getAttribute('data-language-code'), 365);
5841          LyHelper.localizationRedirect('language_code', this[this.selectedIndex].getAttribute('data-language-code'), null, null, domain);
5842        };
5843      }
5844    }
5845    
5846    bindCountrySwitchers() {
5847      var countrySelectSwitcher = document.querySelectorAll('select.ly-country-switcher');
5848      var countryCustomSwitcher = document.querySelectorAll('div.ly-country-switcher a');
5849      for(var i=0; i<countryCustomSwitcher.length; i++) {
5850        countryCustomSwitcher[i].addEventListener('click', function(e) {
5851          LyHelper.localizationRedirect('country_code', this.getAttribute('data-country-code'));
5852        });
5853      }
5854      for(var a=0; a<countrySelectSwitcher.length; a++) {
5855        countrySelectSwitcher[a].addEventListener('change', function(){
5856          LyHelper.localizationRedirect('country_code', this[this.selectedIndex].getAttribute('data-country-code'));
5857        });
5858      }  
5859    }
5860    
5861    bindCurrencySwitchers() {
5862      var currencySelectSwitcher = document.querySelectorAll('select.ly-currency-switcher');
5863      var currencyCustomSwitcher = document.querySelectorAll('div.ly-currency-switcher a');
5864      for(var i=0; i<currencyCustomSwitcher.length; i++) {
5865        currencyCustomSwitcher[i].addEventListener('click', function(e) {
5866          LyHelper.changeCurrency(this.getAttribute('data-currency-code'));
5867        });
5868      }
5869      for(var a=0; a<currencySelectSwitcher.length; a++) {
5870        currencySelectSwitcher[a].addEventListener('change', function(){
5871          LyHelper.changeCurrency(this[this.selectedIndex].getAttribute('data-currency-code'));
5872        });
5873      }  
5874    }
5875
5876    setCustomPosition() {
5877      for(var i = 0; i < this.switcherElements.length; i++) {
5878        if(this.lyForceOff !== 'true') {
5879          if(langify.locale.languages.length <= 1) {
5880            this.switcherElements[i].querySelector('.ly-languages-switcher').classList.add('ly-hide');
5881          }
5882          this.switcherElements[i].classList.remove('ly-hide');
5883        }
5884        if(this.switcherElements[i].classList.contains('ly-custom') && (document.getElementById('ly-custom-'+this.switcherElements[i].getAttribute('data-breakpoint')) || document.getElementsByClassName('ly-custom-'+this.switcherElements[i].getAttribute('data-breakpoint')).length )) {
5885          var targets = Array.from(document.getElementsByClassName('ly-custom-'+this.switcherElements[i].getAttribute('data-breakpoint')));
5886          var target = document.getElementById('ly-custom-'+this.switcherElements[i].getAttribute('data-breakpoint'));
5887          if(target) targets.push(target);
5888          for(var c = 0; c < targets.length; c++) {
5889            var clone = this.switcherElements[i].cloneNode(true);
5890            targets[c].innerHTML = clone.outerHTML;
5891          }
5892          this.switcherElements[i].classList.add('ly-hide');
5893        }
5894      }
5895    }
5896
5897    toggleSwitcherOpen(e) {
5898      var target = e;
5899      if(!target.classList.contains('ly-is-open')) {
5900        var openSwitchers = document.querySelectorAll('.ly-custom-dropdown-switcher.ly-is-open')
5901        for(var i = 0; i < openSwitchers.length; i++) {
5902          openSwitchers[i].classList.remove('ly-is-open');
5903        }
5904
5905        target.getElementsByClassName('ly-custom-dropdown-current')[0].setAttribute('aria-expanded', 'true');
5906      } else {
5907        target.getElementsByClassName('ly-custom-dropdown-current')[0].setAttribute('aria-expanded', 'false');
5908      }
5909      target.classList.toggle('ly-is-open');
5910      var isOut = LyHelper.isOutOfViewport(target);
5911      if(isOut.bottom) {
5912        target.classList.add('ly-is-dropup');
5913      }
5914    }
5915
5916    togglePopupOpen(e) {
5917      e.closest('.ly-popup-switcher').classList.toggle('ly-is-open');
5918    }
5919
5920    _getCountryCodeFromHreflang(language_code) {
5921      var hreflangTags = document.querySelectorAll('link[hreflang]');
5922      var languageDomains = {};
5923      var countryCode = false;
5924      for(var i = 0; i < hreflangTags.length; i++) {
5925        if(hreflangTags[i].getAttribute('hreflang').indexOf(language_code) === 0) {
5926          if(!languageDomains[hreflangTags[i].getAttribute('href')]) {
5927            languageDomains[hreflangTags[i].getAttribute('href')] = hreflangTags[i];
5928          }
5929        }
5930      }
5931      if(Object.keys(languageDomains).length > 0) {
5932        countryCode = Object.values(languageDomains)[0].getAttribute('hreflang');
5933        countryCode = countryCode.split('-');
5934        if(countryCode[1]) {
5935          countryCode = countryCode[1]
5936        } else {
5937          
5938        }
5939      }
5940      return countryCode;
5941    }
5942  }
5943
5944
5945  /**
5946  *
5947  *
5948  * @class LanguageDetection
5949  */
5950  class LanguageDetection {
5951
5952    constructor() {
5953      this.hreflangList = null;
5954      LyHelper.log('LanguageDetection instantiation');
5955    }
5956
5957    init() {
5958      if(LyHelper.inIframe()
5959      || window.location.pathname.indexOf('preview_key=') > 0) {
5960        return null;
5961      }
5962
5963      var currentLang = langify.locale.iso_code.toLowerCase();
5964      //var localizationData = this.getLocalizationData();
5965      this.hreflangList = this.getHreflangList();
5966
5967      var userLang = navigator.language || navigator.userLanguage;
5968      userLang = userLang.toLowerCase();
5969      var bot = /bot|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|Chrome-Lighthouse/i.test(navigator.userAgent);
5970      var blockedRoutes = window.lyBlockedRoutesList || [];
5971      var blockedRoute = blockedRoutes.find(x => window.location.pathname.indexOf(x) === 0);
5972      var is404 = document.getElementsByClassName('template-404').length;
5973
5974      if(LyHelper.getVal('redirected') === 'true') {
5975        LyHelper.setCookie('ly-lang-selected', currentLang, 365);
5976        var _href = window.location.href;
5977        history.replaceState(null, '', _href.replace(/(\?|&)(redirected=true)/i, ''));
5978        return null;
5979      }
5980
5981      if(!is404 && !bot && !blockedRoute && LyHelper.getVal('ly-lang-detect') !== 'off') {
5982        if(userLang && !LyHelper.getCookie('ly-lang-selected')) {
5983          var hasMatch = this.matchHreflangList(userLang);
5984          if(currentLang !== this._hreflangToLanguageCode(hasMatch)) {
5985            if(hasMatch) {
5986              this.redirectMatched(userLang);
5987            } else if (!hasMatch && langify.settings.switcher.languageDetectionDefault) {
5988              // Redirect to default language
5989              this.redirectMatched(langify.settings.switcher.languageDetectionDefault);
5990            }
5991          }
5992        } else {
5993          if(LyHelper.getCookie('ly-lang-selected') && LyHelper.getCookie('ly-lang-selected') !== currentLang) {
5994            // Only save cookie when the domain feature is active
5995            if(LyHelper.isDomainFeatureEnabled()) {
5996              LyHelper.setCookie('ly-lang-selected', currentLang, 365);
5997            }
5998            this.redirectMatched(LyHelper.getCookie('ly-lang-selected'));
5999          }
6000        }
6001      }
6002      
6003      this._geolocationAppSupport();
6004    }
6005    redirectMatched(userLang) {
6006      var match = this.matchHreflangList(userLang);
6007      if(match) {
6008        this.redirectHref(match.href, match.lang);
6009      }
6010      return match;
6011    }
6012    matchHreflangList(userLang) {
6013      var matchedHreflang = false;
6014      var browserLang = userLang;
6015
6016      // Find candidates
6017      var candidates = this.hreflangList.filter(item => item.lang === browserLang);
6018      if(candidates.length === 0) {
6019        browserLang = userLang.toLowerCase();
6020        candidates = this.hreflangList.filter(item => item.lang.toLowerCase().indexOf(browserLang) === 0);
6021      }
6022      if(candidates.length === 0) {
6023        browserLang = userLang.toLowerCase().substring(0, 2);
6024        candidates = this.hreflangList.filter(item => item.lang.toLowerCase().indexOf(browserLang) === 0);
6025      }
6026
6027      // Handle candidates
6028      if(candidates.length === 1) {
6029        return({href: candidates[0].href, lang: browserLang});
6030      } 
6031      else if(candidates.length > 1) {
6032        var preferedCandidate = candidates.find(item => item.href.indexOf(window.location.host) >= 0)
6033        if(preferedCandidate) {
6034          return({href: preferedCandidate.href, lang: browserLang});
6035        } else {
6036          return({href: candidates[0].href, lang: browserLang});
6037        }
6038      } 
6039      
6040      return false;
6041    }
6042    redirectHref(href, userLang) {
6043      var queryString = window.location.search;
6044      var url = href.split('?')[0];
6045      if(queryString === '') {
6046        queryString = '?redirected=true';
6047      } else {
6048        queryString += '&redirected=true';
6049      }
6050      window.location.replace(url + queryString);
6051    }
6052    getHreflangList() {
6053      var hreflangTags = document.querySelectorAll('link[hreflang]');
6054      var hreflangList = [];
6055      var countryCode = false;
6056      // Cross Domain Links option
6057      if(LyHelper.isDomainFeatureEnabled()) {
6058        for(var i = 0; i < langify.locale.languages.length; i++) {
6059          hreflangList.push({
6060            href: 'https://' + langify.locale.languages[i].domain + window.location.pathname + window.location.search + window.location.hash,
6061            lang: langify.locale.languages[i].iso_code,
6062          });
6063        }
6064      }
6065      for(var i = 0; i < hreflangTags.length; i++) {
6066        var hreflang = hreflangTags[i].getAttribute('hreflang').toLowerCase();
6067        hreflang = hreflang.replace('zh-hans', 'zh-cn').replace('zh-hant', 'zh-tw'); // Chinese special cases
6068        hreflangList.push({
6069          href: hreflangTags[i].getAttribute('href'),
6070          lang: hreflang
6071        });
6072      }
6073      return hreflangList;
6074    }
6075    _langToHreflang(userLang) {
6076      var hreflang = '';
6077      this.hreflangList.map(function(item) {
6078        if(item.lang === userLang) {
6079          hreflang = userLang;
6080        }
6081      });
6082      if(hreflang === '') {
6083        this.hreflangList.map(function(item) {
6084          var browserLang = userLang.toLowerCase();
6085          if(item.lang.toLowerCase().indexOf(browserLang) === 0) {
6086            hreflang = browserLang;
6087          }
6088          else if(item.lang.toLowerCase().indexOf(browserLang.substring(0, 2)) === 0) {
6089            hreflang = browserLang.substring(0, 2);
6090          }
6091        });        
6092      }
6093      return hreflang || userLang;
6094    }
6095    _hreflangToLanguageCode(hreflangTag) {
6096      if(!hreflangTag || !hreflangTag.lang) return false;
6097	  var languageCode = false;
6098      langify.locale.languages.forEach(function(item) {
6099        if(item.iso_code.toLowerCase() === hreflangTag.lang.toLowerCase()) {
6100          languageCode = item.iso_code;
6101        }
6102      });
6103      if(!languageCode) {
6104        langify.locale.languages.forEach(function(item) {
6105          if(item.iso_code.toLowerCase() === hreflangTag.lang.substring(0, 2).toLowerCase()) {
6106            languageCode = item.iso_code;
6107          }
6108        });
6109      }
6110      return languageCode;
6111    }
6112    _geolocationAppSupport() {
6113      var target = document.querySelector('body');
6114      var config = { childList: true, subtree: true };
6115      var geolocationObserver = new MutationObserver(function(mutations) {
6116        mutations.forEach(function(mutation) {
6117          if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {
6118            var target = mutation.target.getElementsByClassName('locale-bar__form');
6119            if(target[0]) {
6120              target[0].onsubmit = function() {
6121                var locale_code = target[0].elements['locale_code'].value;
6122                var selector = target[0].getElementsByClassName('locale-bar__selector');
6123                if(selector.length >= 1) {
6124                  locale_code = selector[0].options[selector[0].selectedIndex].value;
6125                }
6126                LyHelper.setCookie('ly-lang-selected', locale_code, 365);
6127              };
6128            }
6129            var selectors = mutation.target.getElementsByClassName('locale-selectors__selector');
6130            if(selectors.length > 0) {
6131              for(var selector of selectors) {
6132                if(selector.getAttribute('name') === 'locale_code') {
6133                  selector.onchange = function() {
6134                    var locale_code = selector.options[selector.selectedIndex].value;
6135                    LyHelper.setCookie('ly-lang-selected', locale_code, 365);
6136                  };        
6137                }
6138              }
6139            }
6140          }
6141        });
6142      });
6143      geolocationObserver.observe(target, config);
6144      setTimeout(function() {
6145        geolocationObserver.disconnect();
6146      }, 10000);
6147    }
6148  }
6149
6150
6151  /**
6152  *
6153  *
6154  * @class Recommendation
6155  */
6156  class Recommendation extends LanguageDetection {
6157    
6158    constructor() {
6159      super();
6160      LyHelper.log('Recommendation instantiation');
6161    }
6162
6163    init() {
6164      this.hreflangList = this.getHreflangList();
6165
6166      var userLang = navigator.language || navigator.userLanguage;
6167      userLang = userLang.toLowerCase();
6168
6169      var recommendation = this.matchHreflangList(userLang);
6170      var recommendationLanguageCode = this._hreflangToLanguageCode(recommendation);
6171      if(recommendationLanguageCode && recommendationLanguageCode !== langify.locale.iso_code && !LyHelper.getCookie('ly-lang-selected')) {
6172        this.recommended_language_code = recommendationLanguageCode;
6173        this.recommended_country_code = null;
6174        this.recommended_currency_code = null;
6175        this._translateStrings(recommendationLanguageCode);
6176        this._bindings();
6177      } else {
6178        return false;
6179      }
6180    }
6181
6182    _translateStrings(languageCode) {
6183      var recommendationElement = document.querySelectorAll('.ly-recommendation')[0];
6184      var strings = langify.settings.switcher.recommendation_strings[languageCode];
6185      var recommendationStr = 'Looks like your browser is set to [[language]]. Change the language?';
6186      var buttonStr = 'Change';
6187      var matchedLanguageCode = this._langToHreflang(languageCode).toLowerCase();
6188      var languageStr = langify.settings.switcher.languages.find(x => x.iso_code.toLowerCase() === matchedLanguageCode) ? langify.settings.switcher.languages.find(x => x.iso_code.toLowerCase() === matchedLanguageCode).name : languageCode.toUpperCase();
6189      if(strings) {
6190        recommendationStr = strings.recommendation ? strings.recommendation : recommendationStr;
6191        buttonStr = strings.button ? strings.button : buttonStr;
6192        languageStr = strings.language ? strings.language : languageStr;
6193      }
6194      var newCode = recommendationElement.innerHTML;
6195      newCode = newCode.replaceAll('[[recommendation]]', recommendationStr).replaceAll('[[button]]', buttonStr).replaceAll('[[language]]', languageStr);
6196      recommendationElement.innerHTML = newCode;     
6197    }
6198
6199    _bindings() {
6200      var _this = this;
6201      var lyForceOff = location.search.split('ly-force-off=')[1];
6202      var recommendationElement = document.querySelectorAll('.ly-recommendation')[0];
6203      var form = recommendationElement.querySelectorAll('.ly-recommendation-form')[0];
6204      var links = recommendationElement.getElementsByClassName('ly-custom-dropdown-list-element');
6205      var customDropdown = recommendationElement.querySelectorAll('.ly-custom-dropdown-switcher');
6206      var nativeSelects = recommendationElement.getElementsByClassName('ly-native-select');
6207
6208      form.addEventListener('submit', function(e) {
6209        e.preventDefault();
6210        
6211        if(_this.recommended_country_code || _this.recommended_currency_code) {
6212          // When a country or currency is involved, use old redirection
6213          var additionalFields = [];
6214          if(_this.recommended_country_code) {
6215            additionalFields.push({
6216              name: 'country_code',
6217              value: _this.recommended_country_code
6218            });
6219          }
6220          if(_this.recommended_currency_code) {
6221            additionalFields.push({
6222              name: 'currency_code',
6223              value: _this.recommended_currency_code
6224            });
6225          }
6226          LyHelper.setCookie('ly-lang-selected', _this.recommended_language_code, 365);
6227          LyHelper.localizationRedirect('language_code', _this.recommended_language_code, additionalFields);
6228        } else {
6229          //...or use new hreflang redirection
6230          _this.redirectMatched(_this.recommended_language_code);
6231        }
6232      });
6233      
6234      // Overwrite switchers
6235      for(var l = 0; l < links.length; l++) {
6236        links[l].addEventListener('click', function(event) {
6237          event.preventDefault();
6238          
6239          // When clicked from within a custom dropdown
6240          var parentCustomDropdown = event.currentTarget.closest('.ly-custom-dropdown-switcher');
6241          if(parentCustomDropdown) {
6242            _this._selectCustomDropdownEntry(parentCustomDropdown, this);
6243          } else {
6244            _this.recommended_language_code = this.getAttribute('data-language-code');
6245          }
6246        });
6247      }
6248
6249      for(var i = 0; i < nativeSelects.length; i++) {
6250        nativeSelects[i].onchange = _this._selectNativeDropdownEntry.bind(this);
6251        
6252        if(nativeSelects[i].classList.contains('ly-languages-switcher')) {
6253          nativeSelects[i].value = _this.recommended_language_code;
6254        }
6255      }
6256
6257      for(var i = 0; i < customDropdown.length; i++) {
6258        if(recommendationElement.className.indexOf('bottom') > -1) {
6259          customDropdown[i].classList.add('ly-is-dropup');       
6260        }
6261        
6262        if(customDropdown[i].classList.contains('ly-languages-switcher')) {
6263          _this._selectCustomDropdownEntry(customDropdown[i], customDropdown[i].querySelector('.ly-custom-dropdown-list a[data-language-code="'+ _this.recommended_language_code +'"]'));
6264        }
6265      } 
6266      if(!lyForceOff) {
6267        recommendationElement.classList.add('ly-is-open');
6268      }
6269    }
6270
6271    _selectNativeDropdownEntry(event) {
6272      event.preventDefault();
6273      var element = event.currentTarget;
6274      var _this = this;
6275
6276      if(element[element.selectedIndex].hasAttribute('data-language-code')) {
6277        _this.recommended_language_code = element[element.selectedIndex].getAttribute('data-language-code');
6278      }
6279      if(element[element.selectedIndex].hasAttribute('data-country-code')) {
6280        _this.recommended_country_code = element[element.selectedIndex].getAttribute('data-country-code');
6281      }
6282      if(element[element.selectedIndex].hasAttribute('data-currency-code')) {
6283        _this.recommended_currency_code = element[element.selectedIndex].getAttribute('data-currency-code');
6284      }
6285    }
6286
6287    _selectCustomDropdownEntry(element, entry) {
6288      if(!entry) return;
6289      var _this = this;
6290      var currentElem = element.querySelector('.ly-custom-dropdown-current');
6291      var currentIcon = currentElem.querySelector('.ly-icon');        
6292      var currentLabel = currentElem.querySelector('span');
6293      var valueToSelect = '';
6294
6295      if(entry.hasAttribute('data-language-code')) {
6296        _this.recommended_language_code = entry.getAttribute('data-language-code');
6297        valueToSelect = _this.recommended_language_code;
6298      }
6299      if(entry.hasAttribute('data-country-code')) {
6300        _this.recommended_country_code = entry.getAttribute('data-country-code');
6301        valueToSelect = _this.recommended_country_code;
6302      }
6303      if(entry.hasAttribute('data-currency-code')) {
6304        _this.recommended_currency_code = entry.getAttribute('data-currency-code');
6305        valueToSelect = _this.recommended_currency_code;
6306      }
6307      if(entry.hasAttribute('data-country-code') && entry.hasAttribute('data-currency-code')) {
6308        valueToSelect = _this.recommended_country_code + '-' + _this.recommended_currency_code;
6309      }
6310
6311      if(element.querySelector('.ly-custom-dropdown-list li.current')) {
6312        element.querySelector('.ly-custom-dropdown-list li.current').classList.remove('current');  
6313        element.querySelector('.ly-custom-dropdown-list li[key="'+ valueToSelect +'"]').classList.add('current');  
6314      }
6315      if(element.querySelector('.ly-custom-dropdown-list li.current span')) currentLabel.innerHTML = element.querySelector('.ly-custom-dropdown-list li.current span').innerHTML;
6316      if(element.querySelector('.ly-custom-dropdown-list li.current .ly-icon')) currentIcon.classList = element.querySelector('.ly-custom-dropdown-list li.current .ly-icon').classList;
6317    }
6318
6319    toggleOpen(e) {
6320      e.closest('.ly-recommendation').classList.toggle('ly-is-open');
6321      if(!e.closest('.ly-recommendation').classList.contains('ly-is-open')) {
6322        LyHelper.setCookie('ly-lang-selected', this.recommended_language_code, 365);
6323      }
6324    }
6325  }
6326
6327
6328  /**
6329  *
6330  *
6331  * @class Langify
6332  */
6333  class Langify {
6334    constructor(settings, locale) {
6335      LyHelper.log('Langify instantiation')
6336
6337      var translationObserver = new TranslationObserver().init();
6338
6339      langify.helper = new LyHelper();
6340      LyHelper.log(langify.helper);
6341
6342
6343      var lyForceOff = location.search.split('ly-force-off=')[1];
6344      if(lyForceOff === 'true') {
6345        document.getElementById('preview-bar-iframe').classList.add('ly-hide');
6346        return false;
6347      }
6348
6349      if(settings.theme && ((settings.theme.loadJquery && settings.theme.loadJquery === true) || typeof settings.theme.loadJquery === 'undefined')) {
6350        if(typeof jQuery === 'undefined') {
6351          LyHelper.loadScript('//cdn.jsdelivr.net/jquery/1.9.1/jquery.min.js', function() {});
6352        } 
6353      }
6354
6355      //document.addEventListener("DOMContentLoaded", function() {
6356        langify.switcher = new Switcher();
6357        langify.switcher.init();
6358
6359        if(settings.switcher) {
6360          if(settings.switcher.recommendation && settings.switcher.recommendation_enabled) {
6361            langify.recommendation = new Recommendation();
6362            langify.recommendation.init();
6363          } else {
6364            if(settings.switcher.languageDetection) {
6365              langify.languageDetection = new LanguageDetection();
6366              langify.languageDetection.init();
6367            }        
6368          }
6369        }
6370      //});
6371    }
6372  }
6373
6374  // Polyfills
6375  (function(){var t;null==window.MutationObserver&&(t=function(){function t(t){this.callBack=t}return t.prototype.observe=function(t,n){return this.element=t,this.interval=setInterval((e=this,function(){var t;if((t=e.element.innerHTML)!==e.oldHtml)return e.oldHtml=t,e.callBack.apply(null)}),200);var e},t.prototype.disconnect=function(){return window.clearInterval(this.interval)},t}(),window.MutationObserver=t)}).call(this);
6376  !function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=function(t){for(var e=window.document,o=i(e);o;)o=i(e=o.ownerDocument);return e}(),e=[],o=null,n=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return o||(o=function(t,o){n=t&&o?l(t,o):{top:0,bottom:0,left:0,right:0,width:0,height:0},e.forEach(function(t){t._checkForIntersections()})}),o},s._resetCrossOriginUpdater=function(){o=null,n=null},s.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},s.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},s.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,o){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==o[e-1]})},s.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},s.prototype._monitorIntersections=function(e){var o=e.defaultView;if(o&&-1==this._monitoringDocuments.indexOf(e)){var n=this._checkForIntersections,r=null,s=null;this.POLL_INTERVAL?r=o.setInterval(n,this.POLL_INTERVAL):(h(o,"resize",n,!0),h(e,"scroll",n,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in o&&(s=new o.MutationObserver(n)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push(function(){var t=e.defaultView;t&&(r&&t.clearInterval(r),c(t,"resize",n,!0)),c(e,"scroll",n,!0),s&&s.disconnect()});var u=this.root&&(this.root.ownerDocument||this.root)||t;if(e!=u){var a=i(e);a&&this._monitorIntersections(a.ownerDocument)}}},s.prototype._unmonitorIntersections=function(e){var o=this._monitoringDocuments.indexOf(e);if(-1!=o){var n=this.root&&(this.root.ownerDocument||this.root)||t;if(!this._observationTargets.some(function(t){var o=t.element.ownerDocument;if(o==e)return!0;for(;o&&o!=n;){var r=i(o);if((o=r&&r.ownerDocument)==e)return!0}return!1})){var r=this._monitoringUnsubscribes[o];if(this._monitoringDocuments.splice(o,1),this._monitoringUnsubscribes.splice(o,1),r(),e!=n){var s=i(e);s&&this._unmonitorIntersections(s.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e<t.length;e++)t[e]()},s.prototype._checkForIntersections=function(){if(this.root||!o||n){var t=this._rootIsInDom(),e=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};
6376this._observationTargets.forEach(function(n){var i=n.element,s=u(i),h=this._rootContainsTarget(i),c=n.entry,a=t&&h&&this._computeTargetAndRootIntersection(i,s,e),l=null;this._rootContainsTarget(i)?o&&!this.root||(l=e):l={top:0,bottom:0,left:0,right:0,width:0,height:0};var f=n.entry=new r({time:window.performance&&performance.now&&performance.now(),target:i,boundingClientRect:s,rootBounds:l,intersectionRect:a});c?t&&h?this._hasCrossedThreshold(c,f)&&this._queuedEntries.push(f):c&&c.isIntersecting&&this._queuedEntries.push(f):this._queuedEntries.push(f)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},s.prototype._computeTargetAndRootIntersection=function(e,i,r){if("none"!=window.getComputedStyle(e).display){for(var s,h,c,a,f,d,g,m,v=i,_=p(e),b=!1;!b&&_;){var w=null,y=1==_.nodeType?window.getComputedStyle(_):{};if("none"==y.display)return null;if(_==this.root||9==_.nodeType)if(b=!0,_==this.root||_==t)o&&!this.root?!n||0==n.width&&0==n.height?(_=null,w=null,v=null):w=n:w=r;else{var I=p(_),E=I&&u(I),T=I&&this._computeTargetAndRootIntersection(I,E,r);E&&T?(_=I,w=l(E,T)):(_=null,v=null)}else{var R=_.ownerDocument;_!=R.body&&_!=R.documentElement&&"visible"!=y.overflow&&(w=u(_))}if(w&&(s=w,h=v,c=void 0,a=void 0,f=void 0,d=void 0,g=void 0,m=void 0,c=Math.max(s.top,h.top),a=Math.min(s.bottom,h.bottom),f=Math.max(s.left,h.left),d=Math.min(s.right,h.right),m=a-c,v=(g=d-f)>=0&&m>=0&&{top:c,bottom:a,left:f,right:d,width:g,height:m}||null),!v)break;_=_&&p(_)}return v}},s.prototype._getRootRect=function(){var e;if(this.root&&!d(this.root))e=u(this.root);else{var o=d(this.root)?this.root:t,n=o.documentElement,i=o.body;e={top:0,left:0,right:n.clientWidth||i.clientWidth,width:n.clientWidth||i.clientWidth,bottom:n.clientHeight||i.clientHeight,height:n.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(e)},s.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,o){return"px"==e.unit?e.value:e.value*(o%2?t.width:t.height)/100}),o={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return o.width=o.right-o.left,o.height=o.bottom-o.top,o},s.prototype._hasCrossedThreshold=function(t,e){var o=t&&t.isIntersecting?t.intersectionRatio||0:-1,n=e.isIntersecting?e.intersectionRatio||0:-1;if(o!==n)for(var i=0;i<this.thresholds.length;i++){var r=this.thresholds[i];if(r==o||r==n||r<o!=r<n)return!0}},s.prototype._rootIsInDom=function(){return!this.root||f(t,this.root)},s.prototype._rootContainsTarget=function(e){var o=this.root&&(this.root.ownerDocument||this.root)||t;return f(o,e)&&(!this.root||o==e.ownerDocument)},s.prototype._registerInstance=function(){e.indexOf(this)<0&&e.push(this)},s.prototype._unregisterInstance=function(){var t=e.indexOf(this);-1!=t&&e.splice(t,1)},window.IntersectionObserver=s,window.IntersectionObserverEntry=r}function i(t){try{return t.defaultView&&t.defaultView.frameElement||null}catch(t){return null}}function r(t){this.time=t.time,this.target=t.target,this.rootBounds=a(t.rootBounds),this.boundingClientRect=a(t.boundingClientRect),this.intersectionRect=a(t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,o=e.width*e.height,n=this.intersectionRect,i=n.width*n.height;this.intersectionRatio=o?Number((i/o).toFixed(4)):this.isIntersecting?1:0}function s(t,e){var o,n,i,r=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(r.root&&1!=r.root.nodeType&&9!=r.root.nodeType)throw new Error("root must be a Document or Element");this._checkForIntersections=(o=this._checkForIntersections.bind(this),n=this.THROTTLE_TIMEOUT,i=null,function(){i||(i=setTimeout(function(){o(),i=null},n))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(r.rootMargin),this.thresholds=this._initThresholds(r.threshold),this.root=r.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function h(t,e,o,n){"function"==typeof t.addEventListener?t.addEventListener(e,o,n||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,o)}function c(t,e,o,n){"function"==typeof t.removeEventListener?t.removeEventListener(e,o,n||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,o)}function u(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function a(t){return!t||"x"in t?t:{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function l(t,e){var o=e.top-t.top,n=e.left-t.left;return{top:o,left:n,height:e.height,width:e.width,bottom:o+e.height,right:n+e.width}}function f(t,e){for(var o=e;o;){if(o==t)return!0;o=p(o)}return!1}function p(e){var o=e.parentNode;return 9==e.nodeType&&e!=t?i(e):(o&&o.assignedSlot&&(o=o.assignedSlot.parentNode),o&&11==o.nodeType&&o.host?o.host:o)}function d(t){return t&&9===t.nodeType}}();
6377  !function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(n,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var e=document.createEvent("CustomEvent");return e.initCustomEvent(n,t.bubbles,t.cancelable,t.detail),e}}();
6378
6379  var langify = window.langify || {};
6380  var customContents = {};
6381  var customContents_image = {};
6382  var langifySettingsOverwrites = {};
6383  var defaultSettings = {
6384    debug: false,               // BOOL : Enable/disable console logs
6385    observe: true,              // BOOL : Enable/disable the entire mutation observer (off switch)
6386    observeLinks: false,
6387    observeImages: true,
6388    observeCustomContents: true,
6389    maxMutations: 5,
6390    timeout: 100,               // INT : Milliseconds to wait after a mutation, before the next mutation event will be allowed for the element
6391    linksBlacklist: [],
6392  };
6393
6394  if(langify.settings) { 
6395    langifySettingsOverwrites = Object.assign({}, langify.settings);
6396    langify.settings = Object.assign(defaultSettings, langify.settings); 
6397  } else { 
6398    langify.settings = defaultSettings; 
6399  }
6400
6401  langify.settings.theme = null;
6402  langify.settings.switcher = null;
6403
6404  langify.locale = langify.locale || {
6405    primary: true,
6406    iso_code: "en",
6407    root_url: "\/",
6408    language_id: "ly135177",
6409    shop_url: "https:\/\/www.buffalojeans.ca",
6410    domain_feature_enabled: null,
6411    languages: [{
6412        iso_code: "en",
6413        root_url: "\/",
6414        domain: null,
6415      },{
6416        iso_code: "fr",
6417        root_url: "\/fr",
6418        domain: null,
6419      },],};
6420
6421  // Disable link correction ALWAYS on languages with mapped domains
6422  
6423  if(langify.locale.root_url == '/') {
6424    langify.settings.observeLinks = false;
6425  }
6426
6427  window.addEventListener('DOMContentLoaded', function() {
6428    langify.helper = new LyHelper();
6429
6430    // Custom Contents Section
6431
6432    // Images Section
6433    
6434
6435
6436    var langifyInstance = new Langify(langify.settings, langify.locale);
6437  });
6438</script>
6438<!-- langify-v2-scripts-end -->
6439   
6440
6441    
6441<script>
6442       $(document).ready( function(e){
6443        $(document).on("click", "#reviews-click", function(e){
6444          e.preventDefault();
6445          window.location = "https://www.buffalojeans.ca" + $(this).attr("data-redirect");
6446        });
6447       });
6448      </script>
6448
6449
6450    <style type="text/css">
6451      /*strike through css*/
6452      label.SizeSwatch.strike {
6453        cursor: pointer;
6454        position: relative;
6455        color: #cccccc !important;
6456        background: none !important;
6457      }
6458
6459      .SizeSwatch.strike.is-active::after, .SizeSwatch__Radio.strike:checked+.SizeSwatch.strike{background:#000; color: #ccc !important;}
6460
6461      label.SizeSwatch.strike:hover, label.SizeSwatch.strike:focus, label.SizeSwatch.strike:active{
6462      background: none !important;
6463      border: 1px solid #000;
6464      color: #cccccc !important;
6465      }
6466
6467      .SizeSwatch.strike.is-active::after, .SizeSwatch__Radio:checked+.SizeSwatch.strike{
6468      color: #cccccc !important;
6469      }
6470
6471      label.SizeSwatch.strike:before {
6472        content: " ";
6473        position: absolute;
6474        border: 1px solid #000;
6475        left: 0;
6476        right: 0;
6477        top: 50%;
6478        border-color: inherit;
6479        -webkit-transform: rotate(-40deg);
6480        -moz-transform: rotate(-40deg);
6481        -ms-transform: rotate(-40deg);
6482        -o-transform: rotate(-40deg);
6483        transform: rotate(-40deg);
6484      }
6485      /*end of strike through css*/
6486    </style>
6487    
6487<script>
6488      jQuery(document).ready(function(){
6489        jQuery(window).scroll(function() {
6490          if(jQuery(this).scrollTop() > 29) {
6491            jQuery("#header-locale-popover-1").addClass("popover-sticky").removeClass("popover-top");
6492          }else {
6493            jQuery("#header-locale-popover-1").removeClass("popover-sticky").addClass("popover-top");
6494          }
6495
6496        });
6497      });
6498
6499      </script>
6499
6500    
6501   
6501<script>
6502
6503function bj_express_checkout() {
6504	var Shopify;!function(){var f,l,n={9976:function(t,e,n){if(void 0===n.g)throw new Error("config/env.js is only usable in node environments.");t.exports=n(7834)},7834:function(t){t.exports={animationTime:500,bugsnagApiUrl:"https://upload.bugsnag.com",bugsnagPublicHost:"cdn.shopify.com/shopifycloud",bugsnagApiKey:"256b27e25ef85a189c1b1ef7c2668f30",defaultCdnHost:"cdn.shopify.com",defaultCdnPath:"/shopifycloud/payment-sheet/assets",googleCloudAssetsPath:"payment-sheet/assets",googleCloudBucketName:"cdn.shopifycloud.com",googleCloudProjectId:"shopify-tiers",versionName:"latest",metricApiHost:"godog.shopifycloud.com",analyze:!1}},8943:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,{Z:function(){return r}})},5201:function(t,e,n){"use strict";function r(t){if(Array.isArray(t))return t}n.d(e,{Z:function(){return r}})},1476:function(t,e,n){"use strict";function s(t,e,n,r,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,o)}function r(u){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=u.apply(t,a);function o(t){s(r,e,n,o,i,"next",t)}function i(t){s(r,e,n,o,i,"throw",t)}o(void 0)})}}n.d(e,{Z:function(){return r}})},5180:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,{Z:function(){return r}})},8640:function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,{Z:function(){return o}})},8994:function(t,e,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,{Z:function(){return r}})},4897:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=n(5201);function o(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}var i=n(4152),a=n(8994);function u(t,e){return(0,r.Z)(t)||o(t,e)||(0,i.Z)(t,e)||(0,a.Z)()}},4152:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(8943);function o(t,e){if(t){if("string"==typeof t)return(0,r.Z)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(t,e):void 0}}},7135:function(t,e,n){t.exports=n(6248)},2707:function(t,e,n){"use strict";e.in=e.l5=void 0;var r=n(4513);Object.defineProperty(e,"l5",{enumerable:!0,get:function(){return r.TelemetryAgent}});var o=n(2167);Object.defineProperty(e,"in",{enumerable:!0,get:function(){return o.LogLevel}})},5874:function(t,r,e){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,a,n,u){function s(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n=n||Promise)(function(e,n){function r(t){try{i(u.next(t))}catch(t){n(t)}}function o(t){try{i(u.throw(t))}catch(t){n(t)}}function i(t){t.done?e(t.value):s(t.value).then(r,o)}i((u=u.apply(t,a||[])).next())})},i=this&&this.__generator||function(t,n){var r,o,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:u(0),throw:u(1),return:u(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(t){return s([e,t])}}function s(e){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&e[0]?o.return:e[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,e[1])).done)return i;switch(o=0,(e=i?[2&e[0],i.value]:e)[0]){case 0:case 1:i=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,o=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(i=0<(i=a.trys).length&&i[i.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]<i[3])){a.label=e[1];break}if(6===e[0]&&a.label<i[1]){a.label=i[1],i=e;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(e);break}i[2]&&a.ops.pop(),a.trys.pop();continue}e=n.call(t,a)}catch(t){e=[6,t],o=0}finally{r=i=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}};
6504Object.defineProperty(r,"__esModule",{value:!0}),r.MonorailEvents=r.monorail=void 0;e=e(2872);r.monorail=e.Monorail.createHttpProducer({production:!0,middleware:[new e.RetryMiddleware(3,100)]});a.prototype.shutdown=function(){return o(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return clearInterval(this.queueFlusherID),[4,this.flush()];case 1:return t.sent(),[2]}})})},a.prototype.record=function(t){t&&(this.events.push(this.prepareEvent(t)),this.events.length>=this.config.maxQueueSize&&this.flush())},a.prototype.flush=function(){return o(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,this.sendAllBufferedEvents()];case 1:return t.sent(),[2]}})})},a.prototype.prepareEvent=function(t){return n(n({},t),{metadata:{eventCreatedAtMs:Date.now()}})},a.prototype.sendAllBufferedEvents=function(){return o(this,void 0,void 0,function(){var e,n;return i(this,function(t){switch(t.label){case 0:if(this.events.length<=0)return[2];e=this.events,this.events=[],t.label=1;case 1:return t.trys.push([1,3,,4]),[4,r.monorail.produceBatch({events:e})];case 2:return t.sent(),[3,4];case 3:return n=t.sent(),this.errorHandler(n),[3,4];case 4:return[2]}})})},e=a;function a(t,e){void 0===e&&(e={bufferDuration:1e3,maxQueueSize:50});var n=this;this.events=[],this.errorHandler=t,this.config=e,this.queueFlusherID=setInterval(function(){n.flush()},this.config.bufferDuration)}r.MonorailEvents=e},4513:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,a,n,u){function s(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n=n||Promise)(function(e,n){function r(t){try{i(u.next(t))}catch(t){n(t)}}function o(t){try{i(u.throw(t))}catch(t){n(t)}}function i(t){t.done?e(t.value):s(t.value).then(r,o)}i((u=u.apply(t,a||[])).next())})},u=this&&this.__generator||function(t,n){var r,o,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:u(0),throw:u(1),return:u(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(t){return s([e,t])}}function s(e){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&e[0]?o.return:e[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,e[1])).done)return i;switch(o=0,(e=i?[2&e[0],i.value]:e)[0]){case 0:case 1:i=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,o=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(i=0<(i=a.trys).length&&i[i.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]<i[3])){a.label=e[1];break}if(6===e[0]&&a.label<i[1]){a.label=i[1],i=e;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(e);break}i[2]&&a.ops.pop(),a.trys.pop();continue}e=n.call(t,a)}catch(t){e=[6,t],o=0}finally{r=i=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryAgent=void 0;var s=n(2167),o=n(5874),i=n(7),n=(a.prototype.incrementCounter=function(t,e,n){void 0===e&&(e=1),void 0===n&&(n=new Map),this.sendMetric(s.MetricType.Counter,t,e,n)},a.prototype.histogram=function(t,e,n){void 0===e&&(e=1),void 0===n&&(n=new Map),this.sendMetric(s.MetricType.Historgram,t,e,n)},a.prototype.gauge=function(t,e,n){void 0===e&&(e=1),void 0===n&&(n=new Map),this.sendMetric(s.MetricType.Gauge,t,e,n)},a.prototype.measure=function(o,i,a){return void 0===i&&(i=new Map),r(this,void 0,void 0,function(){var e,n,r;return u(this,function(t){switch(t.label){case 0:return e=Date.now(),[4,a()];case 1:return n=t.sent(),r=Date.now(),this.sendMetric(s.MetricType.Measure,o,e-r,i),[2,n]}})})},a.prototype.log=function(t,e,n){n={type:s.TelemetryType.Log,level:t,message:e,entries:n};t>=this.minTransmittableLogLevel()&&this.sendEvent(n)},a.prototype.noticeError=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r=!1),(e=void 0===e?new Map:e).set("expected",String(r)),e.set("errorName",t.name);e={metricType:s.MetricType.Counter,type:s.TelemetryType.Metric,key:"Errors",value:1,tags:e};this.sendEvent(e);t={type:s.TelemetryType.Log,level:s.LogLevel.Error,entries:n,message:"".concat(t.name,": ").concat(t.message," \n ").concat(t.stack)};this.sendEvent(t)},a.prototype.flush=function(){return r(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,this.client.flush()];case 1:return t.sent(),[2]}})})},a.prototype.shutdown=function(){return r(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,this.client.shutdown()];case 1:return t.sent(),[2]}})})},a.prototype.sendMetric=function(t,e,n,r){r={type:s.TelemetryType.Metric,metricType:t,key:e,value:n,tags:r};this.sendEvent(r)}
6504,a.prototype.sendEvent=function(t){this.client.record(this.mapEventToMonorailSchema(t))},a.prototype.mapEventToMonorailSchema=function(t){switch(t.type){case s.TelemetryType.Metric:return(0,i.mapMetricToMonorail)(t,this.appId);case s.TelemetryType.Log:return(0,i.mapLogToMonorail)(t,this.appId);default:throw new Error("unknown telemetry type cannot be mapped to checkout frontend telemetry monorail schema")}},a);function a(t,e,n){void 0===e&&(e=function(){return s.LogLevel.Info}),void 0===n&&(n=function(){}),this.appId=t,this.minTransmittableLogLevel=e,this.errorHandler=n,this.client=new o.MonorailEvents(this.errorHandler)}e.TelemetryAgent=n},2167:function(t,e){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevel=e.MetricType=e.TelemetryType=e.MonorailSchemaId=void 0,(e.MonorailSchemaId||(e.MonorailSchemaId={})).CheckoutFrontendTelemetry="checkout_frontend_telemetry/2.1",(n=e.TelemetryType||(e.TelemetryType={})).Metric="metric",n.Log="log",n.MetricWithLogs="metric_and_log",(n=e.MetricType||(e.MetricType={})).Counter="counter",n.Historgram="histogram",n.Gauge="gauge",n.Measure="measure",(e=e.LogLevel||(e.LogLevel={}))[e.Trace=0]="Trace",e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error"},7:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&("get"in o?e.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){t[r=void 0===r?n:r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(8891),e)},8891:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLogFields=e.mapMetricToMonorail=e.mapLogToMonorail=void 0;var l=new Set(["userToken","sessionToken"]);function n(t,e){return{payload:{origin:e,logFields:o(t.entries),logMessage:t.message},schemaId:"checkout_frontend_telemetry/2.1"}}function r(t,e){return{payload:{origin:e,metricType:t.metricType,metricKey:t.key,metricDelta:t.value,metricTags:o(Object.fromEntries(t.tags))},schemaId:"checkout_frontend_telemetry/2.1"}}function o(t){return i(p(t))}function i(t){if(null==t)return[];for(var e=[],n=0,r=Object.entries(t);n<r.length;n++){var o=r[n],i=o[0],o=o[1];e.push(i.toString()),e.push("".concat(o))}return e}function p(t){if(null==t)return{};for(var e={},n=0,r=Object.entries(t);n<r.length;n++){var o=r[n],i=o[0],a=o[1];if(!l.has(i))if(a&&"object"==typeof a)for(var o=p(a),u=0,s=Object.entries(o);u<s.length;u++){var c=s[u],f=c[0],c=c[1];e["".concat(i,".").concat(f)]=c}else e[i]=a}return e}e.mapLogToMonorail=n,e.mapMetricToMonorail=r,e.toLogFields=o},1481:function(t,e){"use strict";function n(t){return"https://"+new URL(t).hostname}Object.defineProperty(e,"__esModule",{value:!0}),e.DEVELOPMENT_DOMAIN="http://localhost:8082",e.PRODUCTION_DOMAIN="https://monorail-edge.shopifysvc.com",e.PRODUCE_BATCH_ENDPOINT="/unstable/produce_batch",e.PRODUCE_ENDPOINT="/v1/produce",e.PRODUCTION_CANADA_ENDPOINT="https://monorail-edge-ca.shopifycloud.com/v1/produce",e.extractDomain=n},4324:function(t,e){"use strict";function n(t){return void 0!==t.schemaId}Object.defineProperty(e,"__esModule",{value:!0}),e.isCompositeMonorailEvent=n},1036:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9312);function o(n,t){return void 0===t&&(t=!0),n&&Object.keys(n).length&&t?Object.keys(n).map(function(t){var e={};return e[i(t)]=n[t],e}).reduce(function(t,e){return r.__assign({},t,e)}):n}function i(t){return t.split(/(?=[A-Z])/).join("_").toLowerCase()}function a(t){return t.events.map(function(t){var e=!0,n=!0;return t&&t.options&&t.options.hasOwnProperty("convertEventCase")&&(e=Boolean(t.options.convertEventCase)),t&&t.options&&t.options.hasOwnProperty("convertMetaDataCase")&&(n=Boolean(t.options.convertMetaDataCase)),{schema_id:t.schemaId,payload:o(t.payload,e),metadata:o(t.metadata,n)}})}e.toUnderscoreCase=o,e.convertStringToUnderscoreCase=i,e.convertAllEventsToUnderscoreCase=a},1833:function(t,e,n){"use strict";
6504Object.defineProperty(e,"__esModule",{value:!0});var r=n(4324),n=(o.prototype.do=function(t,e){return r.isCompositeMonorailEvent(t)?this.producer.produce(t):this.producer.produceBatch(t)},o);function o(t){this.producer=t}e.ProducerMiddleware=n},9264:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=n(9312),c=n(6624),n=(r.prototype.do=function(a,u){return s.__awaiter(this,void 0,void 0,function(){var e,n,r,o,i;return s.__generator(this,function(t){switch(t.label){case 0:e=0,t.label=1;case 1:if(!(e<this.maxRetries))return[3,7];r=void 0,t.label=2;case 2:return t.trys.push([2,4,,6]),[4,u(a)];case 3:return r=t.sent(),[3,6];case 4:if(o=t.sent(),n=n||new Error,n=new Error(n.message+" Retry count:"+(e+1)+" Error msg:"+o.message+"\n"),o instanceof c.MonorailUnableToProduceError&&(i=o.response.status)&&400<=i&&i<500)throw o;return[4,this.delay(this.delayMs*Math.pow(2,e))];case 5:return t.sent(),e++,[3,1];case 6:return[2,r];case 7:throw n?n.message="Retry count of "+this.maxRetries+" exceeded. Failed with error: \n"+n.message+" Aborting request for "+JSON.stringify(a):n=new Error,new c.MonorailRetriesExceededError(n)}})})},r.prototype.delay=function(e){return new Promise(function(t){return setTimeout(t,e)})},r);function r(t,e){void 0===e&&(e=150),this.maxRetries=t=void 0===t?3:t,this.delayMs=e}e.RetryMiddleware=n},2872:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4162);e.Monorail=r.Monorail;r=n(6624);e.MonorailRequestError=r.MonorailRequestError,e.MonorailUnableToProduceError=r.MonorailUnableToProduceError,e.MonorailRetriesExceededError=r.MonorailRetriesExceededError;n=n(9264);e.RetryMiddleware=n.RetryMiddleware},7817:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var u=n(9312),r=n(1719),o=n(1481),s=n(6624),c=n(1036),n=(f.withEndpoint=function(t){return new f(o.extractDomain(t))},f.getHeadersFromMetadata=function(t){var e={"Content-Type":"application/json; charset=utf-8","X-Monorail-Edge-Event-Created-At-Ms":(t&&t.eventCreatedAtMs||Date.now()).toString(),"X-Monorail-Edge-Event-Sent-At-Ms":Date.now().toString(),"X-Monorail-Edge-Client-Message-Id":(t&&t.clientMessageId||r.v4()).toString()};return t&&t.userAgent&&(e["User-Agent"]=t.userAgent),e},f.prototype.produceBatch=function(a){return u.__awaiter(this,void 0,void 0,function(){var e,n,r,o,i;return u.__generator(this,function(t){switch(t.label){case 0:e={events:c.convertAllEventsToUnderscoreCase(a),metadata:c.toUnderscoreCase(a.metadata)},t.label=1;case 1:return t.trys.push([1,3,,4]),[4,fetch(this.produceBatchEndpoint(),{method:"post",headers:f.getHeadersFromMetadata(a.metadata),body:JSON.stringify(e)})];case 2:return n=t.sent(),[3,4];case 3:throw r=t.sent(),new s.MonorailRequestError(r);case 4:return 207!==n.status?[3,6]:[4,n.json()];case 5:throw r=t.sent(),new s.MonorailBatchProduceError(r);case 6:return n.ok?[3,8]:(o=s.MonorailUnableToProduceError.bind,i={status:n.status},[4,n.text()]);case 7:throw new(o.apply(s.MonorailUnableToProduceError,[void 0,(i.message=t.sent(),i)]));case 8:return[2,{status:n.status}]}})})},f.prototype.produce=function(a){return u.__awaiter(this,void 0,void 0,function(){var e,n,r,o,i;return u.__generator(this,function(t){switch(t.label){case 0:r=!0,a&&a.options&&a.options.hasOwnProperty("convertEventCase")&&(r=Boolean(a.options.convertEventCase)),e={schema_id:a.schemaId,payload:c.toUnderscoreCase(a.payload,r)},t.label=1;case 1:return t.trys.push([1,3,,4]),[4,fetch(this.produceEndpoint(),{method:"post",headers:f.getHeadersFromMetadata(a.metadata),body:JSON.stringify(e)})];case 2:return n=t.sent(),[3,4];case 3:throw r=t.sent(),new s.MonorailRequestError(r);case 4:if(!n)throw new s.MonorailUnableToProduceError({message:"No response from edge"});return n.ok?[3,6]:(o=s.MonorailUnableToProduceError.bind,i={status:n.status},[4,n.text()]);case 5:throw new(o.apply(s.MonorailUnableToProduceError,[void 0,(i.message=t.sent(),i)]));case 6:return[2,{status:n.status}]}})})},f.prototype.produceBatchEndpoint=function(){return this.edgeDomain+o.PRODUCE_BATCH_ENDPOINT},f.prototype.produceEndpoint=function(){return this.edgeDomain+o.PRODUCE_ENDPOINT},f);function f(t){void 0===t&&(t=o.DEVELOPMENT_DOMAIN),this.edgeDomain=t}e.HttpProducer=n},6058:function(t,e){"use strict";
6504Object.defineProperty(e,"__esModule",{value:!0});var n=(r.printWelcomeMessage=function(t){console.log("%c👋 from Monorail%c\n\nWe've noticed that you're"+(t?"":" not")+" running in debug mode. As such, we will "+(t?"produce":"not produce")+" Monorail events to the console. \n\nIf you want Monorail events to "+(t?"stop":"start")+" appearing here, %cset debugMode="+(!t).toString()+"%c, for the Monorail Log Producer in your code.","font-size: large;","font-size: normal;","font-weight: bold;","font-weight: normal;")},r.prototype.produce=function(e){return this.sendToConsole&&console.log("Monorail event produced",e),new Promise(function(t){t(e)})},r.prototype.produceBatch=function(e){return this.sendToConsole&&console.log("Monorail Batch event produced",e),new Promise(function(t){t(e)})},r);function r(t){(this.sendToConsole=t)&&r.printWelcomeMessage(t)}e.LogProducer=n},4162:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9312),o=n(1481),i=n(7817),a=n(6058),u=n(1833),s=n(1719),n=(c.createLogProducer=function(t){return new c(new a.LogProducer(t.debugMode),t.middleware||[])},c.createHttpProducerWithEndpoint=function(t,e){return void 0===e&&(e=[]),new c(i.HttpProducer.withEndpoint(t),e)},c.createHttpProducer=function(t){return new c(t.production?new i.HttpProducer(o.PRODUCTION_DOMAIN):new i.HttpProducer(o.DEVELOPMENT_DOMAIN),t.middleware||[])},c.buildMiddlewareChain=function(e,n){var r=this;return(n=void 0===n?0:n)===e.length?this.identityFn:function(t){return e[n].do(t,r.buildMiddlewareChain(e,n+1))}},c.prototype.produce=function(t){return t.metadata=r.__assign({eventCreatedAtMs:Date.now(),clientMessageId:s.v4()},t.metadata),this.executeChain(t)},c.prototype.produceBatch=function(t){return this.executeChain(t)},c);function c(t,e){this.producer=t,this.middleware=e,this.executeChain=c.buildMiddlewareChain(this.middleware.concat(new u.ProducerMiddleware(t)))}e.Monorail=n},6624:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(9312),n=(r=Error,o.__extends(i,r),i);function i(t){var e=r.call(this,"Error producing to the Monorail Edge. Response received: "+JSON.stringify(t))||this;return e.response=t,Object.setPrototypeOf(e,i.prototype),e}e.MonorailUnableToProduceError=n;var a,n=(a=Error,o.__extends(u,a),u);function u(t){var e=a.call(this,"Error producing to the Monorail Edge. Response received: "+JSON.stringify(t))||this;return Object.setPrototypeOf(e,u.prototype),e.response=t,e}e.MonorailBatchProduceError=n;var s,n=(s=Error,o.__extends(c,s),c);function c(t){t=s.call(this,"Error completing request. A network failure may have prevented the request from completing. Error: "+t)||this;return Object.setPrototypeOf(t,c.prototype),t}e.MonorailRequestError=n;var f,o=(f=Error,o.__extends(l,f),l);function l(t){t=f.call(this,""+t)||this;return Object.setPrototypeOf(t,l.prototype),t}e.MonorailRetriesExceededError=o},3487:function(t,e,n){"use strict";n.d(e,{j:function(){return c}});e=n(2410),e=n(3238),e=n(3352),e=n(5610),e=n(7460),e=n(5901),e=n(2189),e=n(1047),e=n(5769),e=n(4078);function r(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=u(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,e=function(){};return{s:e,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){a=!0,o=t},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}function u(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(n="Object"===n&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var i,a=200,s=[];function c(t,e){(d()?f:l)(t,e)}function f(t,e){window.ShopifyAnalytics.lib.track(t,h(e))}function l(t,e){s.push([t,e]),i=i||window.setInterval(p,a)}function p(){if(d()){var t,e=r(s);try{for(e.s();!(t=e.n()).done;){var n=t.value;c(n[0],n[1])}}catch(t){e.e(t)}finally{e.f()}i&&(window.clearInterval(i),i=null)}}function h(t){return t.pageType=window.ShopifyAnalytics.meta.page.pageType||window.ShopifyAnalytics.meta.page.path,t}function d(){return void 0!==window.ShopifyAnalytics&&window.ShopifyAnalytics.lib}},1399:function(t,e,n){"use strict";n.d(e,{n:function(){return i},K:function(){return a}});var e=n(5769),e=n(1484),e=n(3238),e=n(7460),e=n(4078),e=n(1013),e=n(2077),e=n(2482),e=n(3352),e=n(3938),e=n(9976),r=n.n(e),o=(n(3018),n(2707),n(5430));function i(t){return u({name:t,type:"increment"},1<arguments.length&&void 0!==arguments[1]?arguments[1]:[])}function a(t,e){return u({name:t,type:"histogram",value:e},2<arguments.length&&void 0!==arguments[2]?arguments[2]:[])}function u(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];var n=r().metricApiHost;if(!n)return null;t.name="spb.".concat(t.name),t.tags=s(e);t=JSON.stringify(t);document.createElement("img").src="https://".concat(n,"/v1/event.gif?q=").concat(o(t))}function s(t){if(Array.isArray(t))return t;var e,n=[];for(e in t)t.hasOwnProperty(e)&&n.push("".concat(e,":").concat(t[e]));return n}},7361:function(t,e,o){"use strict";o.d(e,{d:function(){return n},C:function(){return f}});var r=o(1476),i=o(5180),a=o(8640),e=o(7135),u=o.n(e),e=(o(3238),o(1418),o(9976)),s=o.n(e);function c(t){return t.context="",0!==t.stacktrace.length}var n=function(){function t(){(0,i.Z)(this,t)}function e(t){return n.apply(this,arguments)}var n;return(0,a.Z)(t,[{key:"notify",value:(n=(0,r.Z)(u().mark(function t(e){var n,r=this;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Promise(function(t){return t(o(3001))}),t.abrupt("return",n.then(function(t){r.notifier=r.notifier||t.default({apiKey:s().bugsnagApiKey||"",autoNotify:!1,releaseStage:"production",notifyReleaseStages:["production"],appVersion:"4438a6811f7a6f391f7a9df51d715d5ac8df2168",beforeSend:c}),r.notifier.notify(e)}));case 2:case"end":return t.stop()}},t)})),e)}]),t}();o(3352);function f(t,e){return t&&(e instanceof Error||Boolean(e.errorClass&&e.errorMessage)||Boolean(e.name&&e.message))}},5682:function(t,e,n){"use strict";n.d(e,{je:function(){return r},tN:function(){return o}});e=n(3238),e=n(1418),e=n(3938),n(1399);function r(t){i()&&window.performance.mark("".concat(t,"-start"))}function o(t){return i()?(window.performance.mark("".concat(t,"-end")),window.performance.measure(t,"".concat(t,"-start"),"".concat(t,"-end")),window.performance.getEntriesByName(t)[0].duration):0}
6504function i(){return window.performance&&window.performance.mark&&window.performance.measure}},3018:function(t,e,n){"use strict";n.d(e,{W:function(){return o}});var r=n(2707),n=n(7361),o=new r.l5("payment-sheet",a,u),i=new n.d;function a(){return r.in.Info}function u(t){i.notify(t)}},6368:function(t,e,n){"use strict";var r;n.d(e,{G:function(){return r}}),(e=r=r||{}).CartPage="cart_page",e.CartAjax="cart_ajax",e.CheckoutPage="checkout",e.ProductPage="product",e.Unknown="unknown"},4782:function(t,e){"use strict";e.byteLength=i,e.toByteArray=a,e.fromByteArray=d;for(var s=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,o=n.length;r<o;++r)s[r]=n[r],c[n.charCodeAt(r)]=r;function l(t){var e=t.length;if(0<e%4)throw new Error("Invalid string. Length must be a multiple of 4");t=t.indexOf("=");return[t=-1===t?e:t,t===e?0:4-t%4]}function i(t){var e=l(t),t=e[0],e=e[1];return 3*(t+e)/4-e}function p(t,e,n){return 3*(e+n)/4-n}function a(t){for(var e,n=l(t),r=n[0],n=n[1],o=new f(p(t,r,n)),i=0,a=0<n?r-4:r,u=0;u<a;u+=4)e=c[t.charCodeAt(u)]<<18|c[t.charCodeAt(u+1)]<<12|c[t.charCodeAt(u+2)]<<6|c[t.charCodeAt(u+3)],o[i++]=e>>16&255,o[i++]=e>>8&255,o[i++]=255&e;return 2===n&&(e=c[t.charCodeAt(u)]<<2|c[t.charCodeAt(u+1)]>>4,o[i++]=255&e),1===n&&(e=c[t.charCodeAt(u)]<<10|c[t.charCodeAt(u+1)]<<4|c[t.charCodeAt(u+2)]>>2,o[i++]=e>>8&255,o[i++]=255&e),o}function u(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function h(t,e,n){for(var r,o=[],i=e;i<n;i+=3)r=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(255&t[i+2]),o.push(u(r));return o.join("")}function d(t){for(var e,n=t.length,r=n%3,o=[],i=16383,a=0,u=n-r;a<u;a+=i)o.push(h(t,a,u<a+i?u:a+i));return 1===r?(e=t[n-1],o.push(s[e>>2]+s[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],o.push(s[e>>10]+s[e>>4&63]+s[e<<2&63]+"=")),o.join("")}c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},5430:function(e){!function(){"use strict";function t(t){t=t instanceof Buffer?t:Buffer.from(t.toString(),"binary");return t.toString("base64")}e.exports=t}()},816:function(t,n,e){"use strict";
6505	/*!
6506	 * The buffer module from node.js, for the browser.
6507	 *
6508	 * @author   Feross Aboukhadijeh <https://feross.org>
6509	 * @license  MIT
6510	 */
6511	const r=e(4782),i=e(8898),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;n.lW=f,n.h2=50;const a=2147483647;function u(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,f.prototype),e}function f(t,e,n){if("number"!=typeof t)return c(t,e,n);if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}function c(t,e,n){if("string"==typeof t)return d(t,e);if(ArrayBuffer.isView(t))return y(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(it(t,ArrayBuffer)||t&&it(t.buffer,ArrayBuffer))return v(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(it(t,SharedArrayBuffer)||t&&it(t.buffer,SharedArrayBuffer)))return v(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return f.from(r,e,n);const o=m(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return f.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function p(t,e,n){return l(t),!(t<=0)&&void 0!==e?"string"==typeof n?s(t).fill(e,n):s(t).fill(e):s(t)}function h(t){return l(t),s(t<0?0:0|b(t))}function d(t,e){if(!f.isEncoding(e="string"!=typeof e||""===e?"utf8":e))throw new TypeError("Unknown encoding: "+e);const n=0|w(t,e);let r=s(n);const o=r.write(t,e);return o!==n&&(r=r.slice(0,o)),r}function g(e){const n=e.length<0?0:0|b(e.length),r=s(n);for(let t=0;t<n;t+=1)r[t]=255&e[t];return r}function y(t){if(it(t,Uint8Array)){const e=new Uint8Array(t);return v(e.buffer,e.byteOffset,e.byteLength)}return g(t)}function v(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,f.prototype),r}function m(t){if(f.isBuffer(t)){const e=0|b(t.length),n=s(e);return 0===n.length?n:(t.copy(n,0,0,e),n)}return void 0!==t.length?"number"!=typeof t.length||at(t.length)?s(0):g(t):"Buffer"===t.type&&Array.isArray(t.data)?g(t.data):void 0}function b(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function w(t,e){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||it(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=2<arguments.length&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return tt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return rt(t).length;default:if(o)return r?-1:tt(t).length;e=(""+e).toLowerCase(),o=!0}}function E(t,e,n){let r=!1;if((e=void 0===e||e<0?0:e)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":return C(this,e,n);case"utf8":case"utf-8":return B(this,e,n);case"ascii":return L(this,e,n);case"latin1":case"binary":return k(this,e,n);case"base64":return P(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function x(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function S(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647<n?n=2147483647:n<-2147483648&&(n=-2147483648),(n=(n=at(n=+n)?o?0:t.length-1:n)<0?t.length+n:n)>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=f.from(e,r)),f.isBuffer(e))return 0===e.length?-1:O(t,e,n,r,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(t,e,n):O(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function O(n,r,e,t,o){let i=1,a=n.length,u=r.length;if(void 0!==t&&("ucs2"===(t=String(t).toLowerCase())||"ucs-2"===t||"utf16le"===t||"utf-16le"===t)){if(n.length<2||r.length<2)return-1;i=2,a/=2,u/=2,e/=2}function s(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}let c;if(o){let t=-1;for(c=e;c<a;
6511c++)if(s(n,c)===s(r,-1===t?0:c-t)){if(-1===t&&(t=c),c-t+1===u)return t*i}else-1!==t&&(c-=c-t),t=-1}else for(e+u>a&&(e=a-u),c=e;0<=c;c--){let e=!0;for(let t=0;t<u;t++)if(s(n,c+t)!==s(r,t)){e=!1;break}if(e)return c}return-1}function _(t,e,n,r){n=Number(n)||0;const o=t.length-n;(!r||(r=Number(r))>o)&&(r=o);const i=e.length;r>i/2&&(r=i/2);let a;for(a=0;a<r;++a){const u=parseInt(e.substr(2*a,2),16);if(at(u))return a;t[n+a]=u}return a}function j(t,e,n,r){return ot(tt(e,t.length-n),t,n,r)}function T(t,e,n,r){return ot(et(e),t,n,r)}function A(t,e,n,r){return ot(rt(e),t,n,r)}function M(t,e,n,r){return ot(nt(e,t.length-n),t,n,r)}function P(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function B(a,t,e){e=Math.min(a.length,e);const n=[];let u=t;for(;u<e;){const s=a[u];let o=null,i=239<s?4:223<s?3:191<s?2:1;if(u+i<=e){let t,e,n,r;switch(i){case 1:s<128&&(o=s);break;case 2:t=a[u+1],128==(192&t)&&(r=(31&s)<<6|63&t,127<r&&(o=r));break;case 3:t=a[u+1],e=a[u+2],128==(192&t)&&128==(192&e)&&(r=(15&s)<<12|(63&t)<<6|63&e,2047<r&&(r<55296||57343<r)&&(o=r));break;case 4:t=a[u+1],e=a[u+2],n=a[u+3],128==(192&t)&&128==(192&e)&&128==(192&n)&&(r=(15&s)<<18|(63&t)<<12|(63&e)<<6|63&n,65535<r&&r<1114112&&(o=r))}}null===o?(o=65533,i=1):65535<o&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),u+=i}return R(n)}a,f.TYPED_ARRAY_SUPPORT=u(),f.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),f.poolSize=8192,f.from=function(t,e,n){return c(t,e,n)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array),f.alloc=function(t,e,n){return p(t,e,n)},f.allocUnsafe=function(t){return h(t)},f.allocUnsafeSlow=function(t){return h(t)},f.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==f.prototype},f.compare=function(n,r){if(it(n,Uint8Array)&&(n=f.from(n,n.offset,n.byteLength)),it(r,Uint8Array)&&(r=f.from(r,r.offset,r.byteLength)),!f.isBuffer(n)||!f.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(n===r)return 0;let o=n.length,i=r.length;for(let t=0,e=Math.min(o,i);t<e;++t)if(n[t]!==r[t]){o=n[t],i=r[t];break}return o<i?-1:i<o?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return f.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=f.allocUnsafe(t);let o=0;for(n=0;n<e.length;++n){let t=e[n];if(it(t,Uint8Array))o+t.length>r.length?(f.isBuffer(t)||(t=f.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!f.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},f.byteLength=w,f.prototype._isBuffer=!0,f.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)x(this,t,t+1);return this},f.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},f.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)x(this,t,t+7),x(this,t+1,t+6),x(this,t+2,t+5),x(this,t+3,t+4);return this},f.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?B(this,0,t):E.apply(this,arguments)}
6511,f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){let t="";const e=n.h2;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},o&&(f.prototype[o]=f.prototype.inspect),f.prototype.compare=function(t,e,n,r,o){if(it(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),(e=void 0===e?0:e)<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(o<=r&&n<=e)return 0;if(o<=r)return-1;if(n<=e)return 1;if(this===t)return 0;let i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0);const u=Math.min(i,a),s=this.slice(r,o),c=t.slice(e,n);for(let t=0;t<u;++t)if(s[t]!==c[t]){i=s[t],a=c[t];break}return i<a?-1:a<i?1:0},f.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},f.prototype.indexOf=function(t,e,n){return S(this,t,e,n,!0)},f.prototype.lastIndexOf=function(t,e,n){return S(this,t,e,n,!1)},f.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-e;if((void 0===n||n>o)&&(n=o),0<t.length&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r=r||"utf8";let i=!1;for(;;)switch(r){case"hex":return _(this,t,e,n);case"utf8":case"utf-8":return j(this,t,e,n);case"ascii":case"latin1":case"binary":return T(this,t,e,n);case"base64":return A(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function R(t){const e=t.length;if(e<=I)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=I));return n}function L(e,n,r){let o="";r=Math.min(e.length,r);for(let t=n;t<r;++t)o+=String.fromCharCode(127&e[t]);return o}function k(e,n,r){let o="";r=Math.min(e.length,r);for(let t=n;t<r;++t)o+=String.fromCharCode(e[t]);return o}function C(e,n,r){const t=e.length;(!n||n<0)&&(n=0),(!r||r<0||r>t)&&(r=t);let o="";for(let t=n;t<r;++t)o+=ut[e[t]];return o}function N(t,e,n){const r=t.slice(e,n);let o="";for(let t=0;t<r.length-1;t+=2)o+=String.fromCharCode(r[t]+256*r[t+1]);return o}function D(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(n<t+e)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,n,r,o,i){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<e||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function F(t,e,n,r,o){J(e,r,o,t,n,7);let i=Number(e&BigInt(4294967295));t[n++]=i,i>>=8,t[n++]=i,i>>=8,t[n++]=i,i>>=8,t[n++]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function q(t,e,n,r,o){J(e,r,o,t,n,7);let i=Number(e&BigInt(4294967295));t[n+7]=i,i>>=8,t[n+6]=i,i>>=8,t[n+5]=i,i>>=8,t[n+4]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function $(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function H(t,e,n,r,o){return e=+e,n>>>=0,o||$(t,e,n,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,n,r,23,4),n+4}function V(t,e,n,r,o){return e=+e,n>>>=0,o||$(t,e,n,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,n,r,52,8),n+8}f.prototype.slice=function(t,e){const n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,f.prototype),r},f.prototype.readUintLE=f.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);let r=this[t],o=1,i=0;for(;
6511++i<e&&(o*=256);)r+=this[t+i]*o;return r},f.prototype.readUintBE=f.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);let r=this[t+--e],o=1;for(;0<e&&(o*=256);)r+=this[t+--e]*o;return r},f.prototype.readUint8=f.prototype.readUInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),this[t]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readBigUInt64LE=st(function(t){Z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||X(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(o)<<BigInt(32))}),f.prototype.readBigUInt64BE=st(function(t){Z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||X(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(o)}),f.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);let r=this[t],o=1,i=0;for(;++i<e&&(o*=256);)r+=this[t+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},f.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||D(t,e,this.length);let r=e,o=1,i=this[t+--r];for(;0<r&&(o*=256);)i+=this[t+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},f.prototype.readInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||D(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},f.prototype.readInt16BE=function(t,e){t>>>=0,e||D(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readBigInt64LE=st(function(t){Z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||X(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),f.prototype.readBigInt64BE=st(function(t){Z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||X(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)}),f.prototype.readFloatLE=function(t,e){return t>>>=0,e||D(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||D(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||D(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||D(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){const a=Math.pow(2,8*n)-1;U(this,t,e,n,a,0)}let o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){const a=Math.pow(2,8*n)-1;U(this,t,e,n,a,0)}let o=n-1,i=1;for(this[e+o]=255&t;0<=--o&&(i*=256);)this[e+o]=t/i&255;return e+n},f.prototype.writeUint8=f.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||U(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||U(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||U(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||U(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||U(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigUInt64LE=st(function(t,e=0){return F(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=st(function(t,e=0){return q(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const u=Math.pow(2,8*n-1);U(this,t,e,n,u-1,-u)}let o=0,i=1,a=0;for(this[e]=255&t;++o<n&&(i*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/i>>0)-a&255;return e+n},f.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const u=Math.pow(2,8*n-1);U(this,t,e,n,u-1,-u)}let o=n-1,i=1,a=0;for(this[e+o]=255&t;0<=--o&&(i*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/i>>0)-a&255;return e+n},f.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||U(this,t,e,1,127,-128),this[e]=255&(t=t<0?255+t+1:t),e+1},f.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||U(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||U(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||U(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||U(this,t,e,4,2147483647,-2147483648),this[e]=(t=t<0?4294967295+t+1:t)>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigInt64LE=st(function(t,e=0){return F(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=st(function(t,e=0){return q(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeFloatLE=function(t,e,n){return H(this,t,e,!0,n)},f.prototype.writeFloatBE=function(t,e,n){return H(this,t,e,!1,n)},f.prototype.writeDoubleLE=function(t,e,n){return V(this,t,e,!0,n)},f.prototype.writeDoubleBE=function(t,e,n){return V(this,t,e,!1,n)},f.prototype.copy=function(t,e,n,r){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n=n||0,r||0===r||(r=this.length),e>=t.length&&(e=t.length),(r=0<r&&r<n?n:r)===n)return 0;if(0===t.length||0===this.length)return 0;if((e=e||0)<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length);const o=(r=t.length-e<r-n?t.length-e+n:r)-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),o},f.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!f.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const i=t.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e>>>=0,n=void 0===n?this.length:n>>>0;let o;if("number"==typeof(t=t||0))for(o=e;o<n;++o)this[o]=t;else{const a=f.isBuffer(t)?t:f.from(t,r),u=a.length;
6511if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-e;++o)this[o+e]=a[o%u]}return this};const G={};function z(t,e,n){G[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function W(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function K(t,e,n){Z(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||X(e,t.length-(n+1))}function J(e,n,r,t,o,i){if(r<e||e<n){const a="bigint"==typeof n?"n":"";let t;throw t=3<i?0===n||n===BigInt(0)?`>= 0${a} and < 2${a} ** ${8*(i+1)}${a}`:`>= -(2${a} ** ${8*(i+1)-1}${a}) and < 2 ** `+`${8*(i+1)-1}${a}`:`>= ${n}${a} and <= ${r}${a}`,new G.ERR_OUT_OF_RANGE("value",t,e)}K(t,o,i)}function Z(t,e){if("number"!=typeof t)throw new G.ERR_INVALID_ARG_TYPE(e,"number",t)}function X(t,e,n){if(Math.floor(t)!==t)throw Z(t,n),new G.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new G.ERR_BUFFER_OUT_OF_BOUNDS;throw new G.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}z("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),z("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),z("ERR_OUT_OF_RANGE",function(t,e,n){let r=`The value of "${t}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=W(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=W(o)),o+="n"),r+=` It must be ${e}. Received ${o}`,r},RangeError);const Y=/[^+/0-9A-Za-z-_]/g;function Q(t){if((t=(t=t.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function tt(e,n){n=n||1/0;let r;const o=e.length;let i=null;const a=[];for(let t=0;t<o;++t){if(r=e.charCodeAt(t),55295<r&&r<57344){if(!i){if(56319<r){-1<(n-=3)&&a.push(239,191,189);continue}if(t+1===o){-1<(n-=3)&&a.push(239,191,189);continue}i=r;continue}if(r<56320){-1<(n-=3)&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&-1<(n-=3)&&a.push(239,191,189);if(i=null,r<128){if(--n<0)break;a.push(r)}else if(r<2048){if((n-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((n-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function et(e){const n=[];for(let t=0;t<e.length;++t)n.push(255&e.charCodeAt(t));return n}function nt(e,n){let r,o,i;const a=[];for(let t=0;t<e.length&&!((n-=2)<0);++t)r=e.charCodeAt(t),o=r>>8,i=r%256,a.push(i),a.push(o);return a}function rt(t){return r.toByteArray(Q(t))}function ot(t,e,n,r){let o;for(o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function it(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function at(t){return t!=t}const ut=function(){const n="0123456789abcdef",r=new Array(256);for(let e=0;e<16;++e){const o=16*e;for(let t=0;t<16;++t)r[o+t]=n[e]+n[t]}return r}();function st(t){return"undefined"==typeof BigInt?ct:t}function ct(){throw new Error("BigInt not supported")}},3001:function(t){var e;e=function(){var n,e=function(t,e,n){for(var r=n,o=0,i=t.length;o<i;o++)r=e(r,t[o],o,t);return r},t=function(t,o){return e(t,function(t,e,n,r){return o(e,n,r)?t.concat(e):t},[])},r=function(t,o){return e(t,function(t,e,n,r){return t.concat(o(e,n,r))},[])},o=function(t,o){return e(t,function(t,e,n,r){return!0===t||e===o},!1)},i=!{toString:null}.propertyIsEnumerable("toString"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){return t<10?"0"+t:t},s={map:r,reduce:e,filter:t,includes:o,keys:function(t){var e=[],n=void 0;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);if(!i)return e;for(var r=0,o=a.length;r<o;r++)Object.prototype.hasOwnProperty.call(t,a[r])&&e.push(a[r]);return e},isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isoDate:function(){var t=new Date;return t.getUTCFullYear()+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}};function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var f=s.isoDate;function l(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"[anonymous]",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"manual",r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:f();c(this,l),this.type=n,this.name=t,this.metaData=e,this.timestamp=r}
6511var p=(l.prototype.toJSON=function(){return{type:this.type,name:this.name,timestamp:this.timestamp,metaData:this.metaData}},l),r={},h=s.includes;r.positiveIntIfDefined=function(t){return h(["undefined","number"],typeof t)&&parseInt(""+t,10)===t&&0<t},r.stringWithLength=function(t){return"string"==typeof t&&!!t.length};var d={},g=s.filter,y=s.reduce,v=s.keys,m=s.isArray,b=s.includes,w=r.positiveIntIfDefined,E=r.stringWithLength;d.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:E},appVersion:{defaultValue:function(){return null},message:"should be a string",validate:function(t){return null===t||E(t)}},autoNotify:{defaultValue:function(){return!0},message:"should be true|false",validate:function(t){return!0===t||!1===t}},beforeSend:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:function(t){return"function"==typeof t||m(t)&&g(t,function(t){return"function"==typeof t}).length===t.length}},endpoints:{defaultValue:function(){return{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}},message:"should be an object containing endpoint URLs { notify, sessions }. sessions is optional if autoCaptureSessions=false",validate:function(t,e){return t&&"object"==typeof t&&E(t.notify)&&(!1===e.autoCaptureSessions||E(t.sessions))&&0===g(v(t),function(t){return!b(["notify","sessions"],t)}).length}},autoCaptureSessions:{defaultValue:function(t,e){return void 0===e.endpoints||!!e.endpoints&&!!e.endpoints.sessions},message:"should be true|false",validate:function(t){return!0===t||!1===t}},notifyReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(t){return null===t||m(t)&&g(t,function(t){return"string"==typeof t}).length===t.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(t){return"string"==typeof t&&t.length}},maxBreadcrumbs:{defaultValue:function(){return 20},message:"should be a number ≤40",validate:function(t){return 0===t||w(t)&&(void 0===t||t<=40)}},autoBreadcrumbs:{defaultValue:function(){return!0},message:"should be true|false",validate:function(t){return"boolean"==typeof t}},user:{defaultValue:function(){return null},message:"(object) user should be an object",validate:function(t){return"object"==typeof t}},metaData:{defaultValue:function(){return null},message:"should be an object",validate:function(t){return"object"==typeof t}},logger:{defaultValue:function(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(n){return!n||y(["debug","info","warn","error"],function(t,e){return t&&"function"==typeof n[e]},!0)}}},d.mergeDefaults=function(n,r){if(!n||!r)throw new Error("opts and schema objects are required");return y(v(r),function(t,e){return t[e]=void 0!==n[e]?n[e]:r[e].defaultValue(n[e],n),t},{})},d.validate=function(n,r){if(!n||!r)throw new Error("opts and schema objects are required");var t=y(v(r),function(t,e){return r[e].validate(n[e],n)?t:t.concat({key:e,message:r[e].message,value:n[e]})},[]);return{valid:!t.length,errors:t}};var x=function(t){return(t.app&&"string"==typeof t.app.releaseStage?t.app:t.config).releaseStage},S=function(t){return!(!t||!t.stack&&!t.stacktrace&&!t["opera#sourceloc"]||"string"!=typeof(t.stack||t.stacktrace||t["opera#sourceloc"])||t.stack===t.name+": "+t.message)},O={};!function(t,e){"use strict";"function"==typeof n&&n.amd?n("stackframe",[],e):"object"==typeof O?O=e():t.StackFrame=e()}(this,function(){"use strict";function n(t){return!isNaN(parseFloat(t))&&isFinite(t)}function r(t){return t.charAt(0).toUpperCase()+t.substring(1)}function t(t){return function(){return this[t]}}var e=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],i=["fileName","functionName","source"],a=["args"],u=e.concat(o,i,a);function s(t){if(t instanceof Object)for(var e=0;e<u.length;e++)t.hasOwnProperty(u[e])&&void 0!==t[u[e]]&&this["set"+r(u[e])](t[u[e]])}s.prototype={getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(t){if(t instanceof s)this.evalOrigin=t;else{if(!(t instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new s(t)}},toString:function(){return(this.getFunctionName()||"{anonymous}")+("("+(this.getArgs()||[]).join(",")+")")+(this.getFileName()?"@"+this.getFileName():"")+(n(this.getLineNumber())?":"+this.getLineNumber():"")+(n(this.getColumnNumber())?":"+this.getColumnNumber():"")}};for(var c=0;c<e.length;c++)s.prototype["get"+r(e[c])]=t(e[c]),s.prototype["set"+r(e[c])]=function(e){return function(t){this[e]=Boolean(t)}}(e[c]);for(var f=0;f<o.length;f++)s.prototype["get"+r(o[f])]=t(o[f]),s.prototype["set"+r(o[f])]=function(e){return function(t){if(!n(t))throw new TypeError(e+" must be a Number");this[e]=Number(t)}}(o[f]);for(var l=0;l<i.length;l++)s.prototype["get"+r(i[l])]=t(i[l]),s.prototype["set"+r(i[l])]=function(e){return function(t){this[e]=String(t)}}(i[l]);return s});var _={};!function(t,e){"use strict";
6511"function"==typeof n&&n.amd?n("error-stack-parser",["stackframe"],e):"object"==typeof _?_=e(O):t.ErrorStackParser=e(t.StackFrame)}(this,function(u){"use strict";var e=/(^|@)\S+\:\d+/,n=/^\s*at .*(\S+\:\d+|\(native\))/m,r=/^(eval@)?(\[native code\])?$/;return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(n))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];t=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(t.replace(/[\(\)]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter(function(t){return!!t.match(n)},this).map(function(t){var e=(t=-1<t.indexOf("(eval ")?t.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""):t).replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),n=this.extractLocation(e.pop()),r=e.join(" ")||void 0,e=-1<["eval","<anonymous>"].indexOf(n[0])?void 0:n[0];return new u({functionName:r,fileName:e,lineNumber:n[1],columnNumber:n[2],source:t})},this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter(function(t){return!t.match(r)},this).map(function(t){if(-1===(t=-1<t.indexOf(" > eval")?t.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1"):t).indexOf("@")&&-1===t.indexOf(":"))return new u({functionName:t});var e=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=t.match(e),n=n&&n[1]?n[1]:void 0,e=this.extractLocation(t.replace(e,""));return new u({functionName:n,fileName:e[0],lineNumber:e[1],columnNumber:e[2],source:t})},this)},parseOpera:function(t){return!t.stacktrace||-1<t.message.indexOf("\n")&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(t){for(var e=/Line (\d+).*script (?:in )?(\S+)/i,n=t.message.split("\n"),r=[],o=2,i=n.length;o<i;o+=2){var a=e.exec(n[o]);a&&r.push(new u({fileName:a[2],lineNumber:a[1],source:n[o]}))}return r},parseOpera10:function(t){for(var e=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=t.stacktrace.split("\n"),r=[],o=0,i=n.length;o<i;o+=2){var a=e.exec(n[o]);a&&r.push(new u({functionName:a[3]||void 0,fileName:a[2],lineNumber:a[1],source:n[o]}))}return r},parseOpera11:function(t){return t.stack.split("\n").filter(function(t){return!!t.match(e)&&!t.match(/^Error created at/)},this).map(function(t){var e=t.split("@"),n=this.extractLocation(e.pop()),r=e.shift()||"",e=r.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0,o=void 0===(o=r.match(/\(([^\)]*)\)/)?r.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"):o)||"[arguments not available]"===o?void 0:o.split(",");return new u({functionName:e,args:o,fileName:n[0],lineNumber:n[1],columnNumber:n[2],source:t})},this)}}});var j={};!function(t,e){"use strict";"function"==typeof n&&n.amd?n("stack-generator",["stackframe"],e):"object"==typeof j?j=e(O):t.StackGenerator=e(t.StackFrame)}(this,function(a){return{backtrace:function(t){var e=[],n=10;"object"==typeof t&&"number"==typeof t.maxStackSize&&(n=t.maxStackSize);for(var r=arguments.callee;r&&e.length<n&&r.arguments;){for(var o=new Array(r.arguments.length),i=0;i<o.length;++i)o[i]=r.arguments[i];/function(?:\s+([\w$]+))+\s*\(/.test(r.toString())?e.push(new a({functionName:RegExp.$1||void 0,args:o})):e.push(new a({args:o}));try{r=r.caller}catch(t){break}}return e}}});var T=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var M=s.reduce,P=s.filter,B=(I.prototype.ignore=function(){this._ignored=!0},I.prototype.isIgnored=function(){return this._ignored},I.prototype.updateMetaData=function(t){var e;if(!t)return this;var n=void 0;return null===(arguments.length<=1?void 0:arguments[1])?this.removeMetaData(t):null===(arguments.length<=2?void 0:arguments[2])?this.removeMetaData(t,arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2]):("object"==typeof(arguments.length<=1?void 0:arguments[1])&&(n=arguments.length<=1?void 0:arguments[1]),"string"==typeof(arguments.length<=1?void 0:arguments[1])&&((e={})[arguments.length<=1?void 0:arguments[1]]=arguments.length<=2?void 0:arguments[2],n=e),n&&(this.metaData[t]||(this.metaData[t]={}),this.metaData[t]=T({},this.metaData[t],n)),this)},I.prototype.removeMetaData=function(t,e){return"string"!=typeof t||(e?this.metaData[t]&&delete this.metaData[t][e]:delete this.metaData[t]),this},I.prototype.toJSON=function(){return{payloadVersion:"4",exceptions:[{errorClass:this.errorClass,message:this.errorMessage,stacktrace:this.stacktrace,type:"browserjs"}],severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,breadcrumbs:this.breadcrumbs,context:this.context,user:this.user,metaData:this.metaData,groupingHash:this.groupingHash,request:this.request,session:this.session}},I);function I(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:k();A(this,I),this.__isBugsnagReport=!0,this._ignored=!1,this._handledState=r,this.app=void 0,this.apiKey=void 0,this.breadcrumbs=[],this.context=void 0,this.device=void 0,this.errorClass=C(t,"[no error class]"),this.errorMessage=C(e,"[no error message]"),this.groupingHash=void 0,this.metaData={},this.request=void 0,this.severity=this._handledState.severity,this.stacktrace=M(n,function(e,t){t=R(t);try{return"{}"===JSON.stringify(t)?e:e.concat(t)}catch(t){return e}},[]),this.user=void 0,this.session=void 0}var R=function(t){t={file:t.fileName,method:L(t.functionName),lineNumber:t.lineNumber,columnNumber:t.columnNumber,code:void 0,inProject:void 0};return-1<t.lineNumber&&!t.file&&!t.method&&(t.file="global code"),t},L=function(t){return/^global code$/i.test(t)?"global code":t},k=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},C=function(t,e){return"string"==typeof t&&t?t:e};B.getStacktrace=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;return S(t)?_.parse(t).slice(e):P(j.backtrace(),function(t){return-1===(t.functionName||"").indexOf("StackGenerator$$")}).slice(1+n)},B.ensureReport=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;if(e.__isBugsnagReport)return e;try{var r=B.getStacktrace(e,t,1+n);return new B(e.name,e.message,r)}catch(t){return new B(e.name,e.message,[])}};var N,D=B,U=function(t,e){t="000000000"+t;return t.substr(t.length-e)},F="object"==typeof window?window:self,q=0;for(N in F)Object.hasOwnProperty.call(F,N)&&q++;var t=navigator.mimeTypes?navigator.mimeTypes.length:0,$=U((t+navigator.userAgent.length).toString(36)+q.toString(36),4),H=function(){return $},V=0,G=4,z=36,W=Math.pow(z,G);function K(){return U((Math.random()*W<<0).toString(z),G)}function J(){return V=V<W?V:0,++V-1}function Z(){return"c"+(new Date).getTime().toString(z)+U(J().toString(z),G)+H()+(K()+K())}Z.fingerprint=H;var X=Z;function Y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Q=s.isoDate;function tt(){Y(this,tt),this.id=X(),this.startedAt=Q(),this._handled=0,this._unhandled=0}var et=(tt.prototype.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},tt.prototype.trackError=function(t){this[t._handledState.unhandled?"_unhandled":"_handled"]+=1},tt),nt=rt;function rt(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object E
6511xception]":case"[object DOMException]":return!0;default:return t instanceof Error}}var ot=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function it(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var at=s.map,ut=s.reduce,st=s.includes,ct=s.isArray,ft="Usage error.",lt="Bugsnag usage error.",pt=function(){},o=(ht.prototype.configure=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.config=d.mergeDefaults(ot({},this.config,t),this.configSchema);t=d.validate(this.config,this.configSchema);if(!0==!t.valid)throw new Error(yt(t.errors));return"function"==typeof this.config.beforeSend&&(this.config.beforeSend=[this.config.beforeSend]),null!==this.config.appVersion&&(this.app.version=this.config.appVersion),this.config.metaData&&(this.metaData=this.config.metaData),this.config.user&&(this.user=this.config.user),this.config.logger&&this.logger(this.config.logger),this._configured=!0,this._logger.debug("Loaded!"),this},ht.prototype.use=function(t){return this.plugins.push(t),t.init(this)},ht.prototype.transport=function(t){return this._transport=t,this},ht.prototype.logger=function(t,e){return this._logger=t,this},ht.prototype.sessionDelegate=function(t){return this._sessionDelegate=t,this},ht.prototype.startSession=function(){return this._sessionDelegate?this._sessionDelegate.startSession(this):(this._logger.warn("No session implementation is installed"),this)},ht.prototype.leaveBreadcrumb=function(t,e,n,r){if(!this._configured)throw new Error("client not configured");if(n="string"==typeof n?n:void 0,r="string"==typeof r?r:void 0,e="object"==typeof e&&null!==e?e:void 0,"string"==typeof(t=t||void 0)||e){r=new p(t,e,n,r);return this.breadcrumbs.push(r),this.breadcrumbs.length>this.config.maxBreadcrumbs&&(this.breadcrumbs=this.breadcrumbs.slice(this.breadcrumbs.length-this.config.maxBreadcrumbs)),this}},ht.prototype.notify=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!this._configured)throw new Error("client not configured");var n=x(this),r=dt(t,e,this._logger),o=r.err,i=r.errorFramesToSkip,r=r._opts;r&&(e=r),o||(r=vt("nothing"),this._logger.warn(ft+" "+r),o=new Error(lt+" "+r)),"object"==typeof e&&null!==e||(e={});var a=D.ensureReport(o,i,1);if(a.app=ot({releaseStage:n},a.app,this.app),a.context=a.context||e.context||this.context||void 0,a.device=ot({},a.device,this.device,e.device),a.request=ot({},a.request,this.request,e.request),a.user=ot({},a.user,this.user,e.user),a.metaData=ot({},a.metaData,this.metaData,e.metaData),a.breadcrumbs=this.breadcrumbs.slice(0),this.session&&(this.session.trackError(a),a.session=this.session),void 0!==e.severity&&(a.severity=e.severity,a._handledState.severityReason={type:"userSpecifiedSeverity"}),ct(this.config.notifyReleaseStages)&&!st(this.config.notifyReleaseStages,n))return this._logger.warn("Report not sent due to releaseStage/notifyReleaseStages configuration"),!1;n=a.severity,e=[].concat(e.beforeSend).concat(this.config.beforeSend);return ut(e,function(t,e){return!0===t||("function"==typeof e&&!1===e(a)||!!a.isIgnored())},!1)?(this._logger.debug("Report not sent due to beforeSend callback"),!1):(this.config.autoBreadcrumbs&&this.leaveBreadcrumb(a.errorClass,{errorClass:a.errorClass,errorMessage:a.errorMessage,severity:a.severity},"error"),n!==a.severity&&(a._handledState.severityReason={type:"userCallbackSetSeverity"}),this._transport.sendReport(this._logger,this.config,{apiKey:a.apiKey||this.config.apiKey,notifier:this.notifier,events:[a]}),!0)},ht);function ht(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:d.schema,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(it(this,ht),!(t&&t.name&&t.version&&t.url))throw new Error("`notifier` argument is required");this.notifier=t,this.configSchema=e,this._configured=!1,this._transport={sendSession:pt,sendReport:pt},this._logger={debug:pt,info:pt,warn:pt,error:pt},this.plugins=[],this.session=n,this.beforeSession=[],this.breadcrumbs=[],this.app={},this.context=void 0,this.device=void 0,this.metaData=void 0,this.request=void 0,this.user={},this.BugsnagReport=D,this.BugsnagBreadcrumb=p,this.BugsnagSession=et}var dt=function(t,e,n){var r,o=void 0,i=0,a=void 0;switch(typeof t){case"string":"string"==typeof e?(r=vt("string/string"),n.warn(ft+" "+r),o=new Error(lt+" "+r),a={metaData:{notifier:{notifyArgs:[t,e]}}}):(o=new Error(String(t)),i+=2);break;case"number":case"boolean":o=new Error(String(t));break;case"function":var u=vt("function");n.warn(ft+" "+u),o=new Error(lt+" "+u);break;case"object":null!==t&&(nt(t)||t.__isBugsnagReport)?o=t:null!==t&&gt(t)?((o=new Error(t.message||t.errorMessage)).name=t.name||t.errorClass,i+=2):(u=vt("unsupported object"),n.warn(ft+" "+u),o=new Error(lt+" "+u))}return{err:o,errorFramesToSkip:i,_opts:a}},gt=function(t){return!("string"!=typeof t.name&&"string"!=typeof t.errorClass||"string"!=typeof t.message&&"string"!=typeof t.errorMessage)},yt=function(t){return"Bugsnag configuration error\n"+at(t,function(t){return'"'+t.key+'" '+t.message+" \n    got "+mt(t.value)}).join("\n\n")},vt=function(t){return"notify() expected error/opts parameters, got "+t},mt=function(t){return"object"==typeof t?JSON.stringify(t):String(t)},bt=o,wt=r.positiveIntIfDefined,Et={init:function(e){var n=0;e.config.beforeSend.push(function(t){return n>=e.config.maxEvents?t.ignore():void n++}),e.refresh=function(){n=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer ≤100",validate:function(t){return wt(t)&&t<100}}}},t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];
6511for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o=d.schema,xt=s.map,t={releaseStage:{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?"development":"production"},message:"should be set",validate:r.stringWithLength},collectUserIp:{defaultValue:function(){return!0},message:"should be true|false",validate:function(t){return!0===t||!1===t}},logger:t({},o.logger,{defaultValue:function(){return"undefined"!=typeof console&&"function"==typeof console.debug?St():void 0}})},St=function(){var n={},r=console.log;return xt(["debug","info","warn","error"],function(t){var e=console[t];n[t]=("function"==typeof e?e:r).bind(console,"[bugsnag]")}),n},Ot={},_t=s.map,jt=s.reduce,o=s.filter;Ot.init=function(i){_t(Tt,function(r){var o=console[r];console[r]=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];i.leaveBreadcrumb("Console output",jt(e,function(t,e,n){var r=String(e);if("[object Object]"===r)try{r=JSON.stringify(e)}catch(t){}return t["["+n+"]"]=r,t},{severity:0===r.indexOf("group")?"log":r}),"log"),o.apply(console,e)},console[r]._restore=function(){console[r]=o}})},Ot.configSchema={consoleBreadcrumbsEnabled:{defaultValue:function(){},validate:function(t){return!0===t||!1===t||void 0===t},message:"should be true|false"}};var Tt=o(["log","debug","info","warn","error"],function(t){return"undefined"!=typeof console&&"function"==typeof console[t]}),At={init:function(t){t.config.beforeSend.unshift(function(t){t.context||(t.context=window.location.pathname)})}},Mt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Pt=s.isoDate,Bt={init:function(t){t.config.beforeSend.unshift(function(t){t.device=Mt({time:Pt(),locale:navigator.browserLanguage||navigator.systemLanguage||navigator.userLanguage||navigator.language,userAgent:navigator.userAgent},t.device)}),t.beforeSession.push(function(t){t.device={userAgent:navigator.userAgent}})}},It={},Rt=s.reduce,Lt=/^.*
6511<script.*?>/,kt=/<\/script>.*$/,Ct=(It={init:function(t){var i="",a=!1,u=function(){return document.documentElement.outerHTML},s=window.location.href,e=function(t){var r=t.stacktrace[0];if(!r||!r.file||!r.lineNumber)return r;if(r.file.replace(/#.*$/,"")!==s.replace(/#.*$/,""))return r;a&&i||(i=u());var e=["\x3c!-- DOC START --\x3e"].concat(i.split("\n")),n=Ct(e,r.lineNumber-1),e=n.script,o=n.start,n=Rt(e,function(t,e,n){return 10<Math.abs(o+n+1-r.lineNumber)||(t[""+(o+n+1)]=e),t},{});r.code=n,t.updateMetaData("script",{content:e.join("\n")})},i=u();document.onreadystatechange=function(){"interactive"===document.readyState&&(i=u(),a=!0)},t.config.beforeSend.unshift(e)}}).extractScriptContent=function(t,e){for(var n=e;n<t.length&&!kt.test(t[n]);)n++;for(var r=n;0<n&&!Lt.test(t[n]);)n--;e=n,r=t.slice(e,r+1);return r[0]=r[0].replace(Lt,""),r[r.length-1]=r[r.length-1].replace(kt,""),{script:r,start:e}},Nt={init:function(r){"addEventListener"in window&&window.addEventListener("click",function(t){var e=void 0,n=void 0;try{e=Dt(t.target),n=Ut(t.target)}catch(t){n=e="[hidden]",r._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/y94fq5zm")}r.leaveBreadcrumb("UI click",{targetText:e,targetSelector:n},"user")},!0)},configSchema:{interactionBreadcrumbsEnabled:{defaultValue:function(){},validate:function(t){return!0===t||!1===t||void 0===t},message:"should be true|false"}}},Dt=function(t){var e=t.textContent||t.innerText||"";return Ft(e=(e=!(e||"submit"!==t.type&&"button"!==t.type)?t.value:e).replace(/^\s+|\s+$/g,""),140)};function Ut(t){var e,n=[t.tagName];if(t.id&&n.push("#"+t.id),t.className&&t.className.length&&n.push("."+t.className.split(" ").join(".")),!document.querySelectorAll||!Array.prototype.indexOf)return n.join("");try{if(1===document.querySelectorAll(n.join("")).length)return n.join("")}catch(t){return n.join("")}return 1<t.parentNode.childNodes.length&&(e=Array.prototype.indexOf.call(t.parentNode.childNodes,t)+1,n.push(":nth-child("+e+")")),1!==document.querySelectorAll(n.join("")).length&&t.parentNode?Ut(t.parentNode)+" > "+n.join(""):n.join("")}function Ft(t,e){var n="(...)";return t&&t.length<=e?t:t.slice(0,e-n.length)+n}var qt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$t={init:function(t){t.config.collectUserIp||t.config.beforeSend.push(function(t){t.user=qt({id:"[NOT COLLECTED]"},t.user),t.request=qt({clientIp:"[NOT COLLECTED]"},t.request)})}},Ht={init:function(e){var t;"addEventListener"in window&&(t=function(t){return function(){return e.leaveBreadcrumb(t,{},"navigation")}},window.addEventListener("pagehide",t("Page hidden"),!0),window.addEventListener("pageshow",t("Page shown"),!0),window.addEventListener("load",t("Page loaded"),!0),window.document.addEventListener("DOMContentLoaded",t("DOMContentLoaded"),!0),window.addEventListener("load",function(){return window.addEventListener("popstate",t("Navigated back"),!0)}),window.addEventListener("hashchange",function(t){t=t.oldURL?{from:Vt(t.oldURL),to:Vt(t.newURL),state:Wt()}:{to:Vt(window.location.href)};e.leaveBreadcrumb("Hash changed",t,"navigation")},!0),window.history.replaceState&&zt(e,window.history,"replaceState"),window.history.pushState&&zt(e,window.history,"pushState"),e.leaveBreadcrumb("Bugsnag loaded",{},"navigation"))},configSchema:{navigationBreadcrumbsEnabled:{defaultValue:function(){},validate:function(t){return!0===t||!1===t||void 0===t},message:"should be true|false"}}},Vt=function(t){var e=document.createElement("A");return e.href=t,""+e.pathname+e.search+e.hash},Gt=function(t,e,n){var r=Vt(window.location.href);return{title:e,state:t,prevState:Wt(),to:n||r,from:r}},zt=function(r,o,i){var a=o[i];o[i]=function(t,e,n){r.leaveBreadcrumb("History "+i,Gt(t,e,n),"navigation"),"function"==typeof r.refresh&&r.refresh(),r.session&&r.startSession(),a.apply(o,[t,e].concat(void 0!==n?n:[]))},o[i]._restore=function(){o[i]=a}},Wt=function(){try{return window.history.state}catch(t){}},Kt={},Jt="request",Zt="BS~~S",Xt="BS~~U",Yt="BS~~M",Qt=s.includes,te=void 0,ee=function(){return[te.config.endpoints.notify,te.config.endpoints.sessions]};Kt.init=function(t){te=t,ne(),ie()},Kt.configSchema={networkBreadcrumbsEnabled:{defaultValue:function(){},validate:function(t){return!0===t||!1===t||void 0===t},message:"should be true|false"}};var ne=function(){var n;"addEventListener"in window.XMLHttpRequest.prototype&&(n=window.XMLHttpRequest.prototype.open,window.XMLHttpRequest.prototype.open=function(t,e){this[Xt]=e,this[Yt]=t,this[Zt]&&(this.removeEventListener("load",re),this.removeEventListener("error",oe)),this.addEventListener("load",re),this.addEventListener("error",oe),this[Zt]=!0,n.apply(this,arguments)})};function re(){var t;Qt(ee(),this[Xt])||(t={status:this.status,request:this[Yt]+" "+this[Xt]},400<=this.status?te.leaveBreadcrumb("XMLHttpRequest failed",t,Jt):te.leaveBreadcrumb("XMLHttpRequest succeeded",t,Jt))}function oe(){Qt(ee(),this[Xt])||te.leaveBreadcrumb("XMLHttpRequest error",{request:this[Yt]+" "+this[Xt]},Jt)}var ie=function(){var a;"fetch"in window&&(a=window.fetch,window.fetch=function(){for(var t=arguments.length,r=Array(t),e=0;e<t;e++)r[e]=arguments[e];var o=r[0],n=r[1],i="GET";return n&&n.method&&(i=n.method),new Promise(function(e,n){a.apply(void 0,r).then(function(t){ae(t,i,o),e(t)}).catch(function(t){ue(i,o),n(t)})})})},ae=function(t,e,n){n={status:t.status,request:e+" "+n};400<=t.status?te.leaveBreadcrumb("fetch() failed",n,Jt):te.leaveBreadcrumb("fetch() succeeded",n,Jt)},ue=function(t,e){te.leaveBreadcrumb("fetch() error",{request:t+" "+e},Jt)},se=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];
6511for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ce={init:function(t){t.config.beforeSend.unshift(function(t){t.request&&t.request.url||(t.request=se({},t.request,{url:window.location.href}))})}},fe=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},le=s.map,pe=s.isArray,he=s.includes,de={init:function(t){return t.sessionDelegate(ge)}},ge={startSession:function(t){var e=t;e.session=new t.BugsnagSession,le(e.beforeSession,function(t){return t(e)});t=x(e);return pe(e.config.notifyReleaseStages)&&!he(e.config.notifyReleaseStages,t)?e._logger.warn("Session not sent due to releaseStage/notifyReleaseStages configuration"):e.config.endpoints.sessions?e._transport.sendSession(e._logger,e.config,{notifier:e.notifier,device:e.device,app:fe({releaseStage:t},e.app),sessions:[{id:e.session.id,startedAt:e.session.startedAt,user:e.user}]}):e._logger.warn("Session not sent due to missing endpoints.sessions configuration"),e}},ye={},ve=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},me=s.map,be=(ye={init:function(t){t.config.beforeSend.push(function(t){t.stacktrace=me(t.stacktrace,function(t){return ve({},t,{file:be(t.file)})})})}})._strip=function(t){return"string"==typeof t?t.replace(/\?.*$/,"").replace(/#.*$/,""):t},we={},Ee=s.reduce;we.init=function(o){var n=function(t){var e=t.reason,n=!1;t.detail&&t.detail.reason&&(e=t.detail.reason,n=!0);var r={severity:"error",unhandled:!0,severityReason:{type:"unhandledPromiseRejection"}},t=void 0;e&&S(e)?(t=new o.BugsnagReport(e.name,e.message,_.parse(e),r),n&&(t.stacktrace=Ee(t.stacktrace,Se(e),[]))):(t=new o.BugsnagReport(e&&e.name?e.name:"UnhandledRejection",e&&e.message?e.message:'Rejection reason was not an Error. See "Promise" tab for more detail.',[],r)).updateMetaData("promise","rejection reason",xe(e)),o.notify(t)};"addEventListener"in window?window.addEventListener("unhandledrejection",n):window.onunhandledrejection=function(t,e){n({detail:{reason:t,promise:e}})},0};var xe=function(t){if(null==t)return"undefined (or null)";if(nt(t)){var e={};return e[Object.prototype.toString.call(t)]={name:t.name,message:t.message,code:t.code,stack:t.stack},e}return t},Se=function(n){return function(t,e){return e.file===n.toString()?t:(e.method&&(e.method=e.method.replace(/^\s+/,"")),t.concat(e))}},Oe={init:function(c){var t=function(t,e,n,r,o){var i,a,u,s;0===n&&/Script error\.?/.test(t)?c._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/y94fq5zm"):(i={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},s=void 0,o?o.name&&o.message?s=new c.BugsnagReport(o.name,o.message,_e(c.BugsnagReport.getStacktrace(o),e,n,r),i):(s=new c.BugsnagReport("window.onerror",String(o),_e(c.BugsnagReport.getStacktrace(o,1),e,n,r),i)).updateMetaData("window onerror",{error:o}):"object"!=typeof t||null===t||e||n||r||o?(s=new c.BugsnagReport("window.onerror",String(t),_e(c.BugsnagReport.getStacktrace(o,1),e,n,r),i)).updateMetaData("window onerror",{event:t}):(a=t.type?"Event: "+t.type:"window.onerror",u=t.message||t.detail||"",(s=new c.BugsnagReport(a,u,c.BugsnagReport.getStacktrace(new Error,1).slice(1),i)).updateMetaData("window onerror",{event:t})),c.notify(s),"function"==typeof f&&f(t,e,n,r,o))},f=window.onerror;window.onerror=t}},_e=function(t,e,n,r){var o=t[0];return o&&(o.fileName||o.setFileName(e),o.lineNumber||o.setLineNumber(n),o.columnNumber||(void 0!==r?o.setColumnNumber(r):window.event&&window.event.errorCharacter&&o.setColumnNumber(window.event&&window.event.errorCharacter))),t},je=function(t,e,n){return JSON.stringify(ke(t),e,n)},Te=20,Ae=25e3,Me=8,Pe="...";function Be(t){return"[Throws: "+(t?t.message:"?")+"]"}function Ie(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return!0;return!1}function Re(t){return"[object Array]"===Object.prototype.toString.call(t)}function Le(t,e){try{return t[e]}catch(t){return Be(t)}}function ke(t){var c=[],f=0;function l(t,e){function n(){return Me<e&&Ae<f}if(f++,Te<(e=void 0===e?0:e))return Pe;if(n())return Pe;if(null===t||"object"!=typeof t)return t;if(Ie(c,t))return"[Circular]";if(c.push(t),"function"==typeof t.toJSON)try{f--;var r=l(t.toJSON(),e);return c.pop(),r}catch(t){return Be(t)}if(Re(t)){for(var o=[],i=0,a=t.length;i<a;i++){if(n()){o.push(Pe);break}o.push(l(t[i],e+1))}return c.pop(),o}var u={};try{for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){if(n()){u[s]=Pe;break}u[s]=l(Le(t,s),e+1)}}catch(t){}return c.pop(),u}return l(t)}var Ce=function(t){var e=je(t);if(1e6<e.length&&(delete t.events[0].metaData,t.events[0].metaData={notifier:"WARNING!\nSerialized payload was "+e.length/1e6+"MB (limit = 1MB)\nmetaData was removed"},1e6<(e=je(t)).length))throw new Error("payload exceeded 1MB limit");return e},Ne={},De=s.isoDate,Ne={sendReport:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:function(){},o=Ue(t,"notify","4.0"),i=new window.XDomainRequest;i.onload=function(){r(null,i.responseText)},i.open("POST",o),setTimeout(function(){try{i.send(Ce(n))}catch(t){e.error(t)}},0)},sendSession:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:function(){},o=Ue(t,"sessions","1.0"),i=new window.XDomainRequest;i.onload=function(){r(null,i.responseText)},i.open("POST",o),setTimeout(function(){try{i.send(je(n))}catch(t){e.error(t)}},0)}},Ue=function(t,e,n){return Fe(t.endpoints[e],window.location.protocol)+"?apiKey="+encodeURIComponent(t.apiKey)+"&payloadVersion="+n+"&sentAt="+encodeURIComponent(De())},Fe=Ne._matchPageProtocol=function(t,e){return"http:"===e?t.replace(/^https:/,"http:"):t},qe=s.isoDate,$e={sendReport:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:function(){};try{var o=t.endpoints.notify,i=new window.XMLHttpRequest;i.onreadystatechange=function(){i.readyState===window.XMLHttpRequest.DONE&&r(null,i.responseText)},i.open("POST",o),i.setRequestHeader("Content-Type","application/json"),i.setRequestHeader("Bugsnag-Api-Key",n.apiKey||t.apiKey),i.setRequestHeader("Bugsnag-Payload-Version","4.0"),i.setRequestHeader("Bugsnag-Sent-At",qe()),i.send(Ce(n))}catch(t){e.error(t)}},sendSession:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:function(){};try{var o=t.endpoints.sessions,i=new window.XMLHttpRequest;i.onreadystatechange=function(){i.readyState===window.XMLHttpRequest.DONE&&r(null,i.responseText)},i.open("POST",o),i.setRequestHeader("Content-Type","application/json"),i.setRequestHeader("Bugsnag-Api-Key",t.apiKey),i.setRequestHeader("Bugsnag-Payload-Version","1.0"),i.setRequestHeader("Bugsnag-Sent-At",qe()),i.send(je(n))}catch(t){e.error(t)}}},o={},He=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];
6511for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ve="Bugsnag JavaScript",Ge="4.7.3",ze="https://github.com/bugsnag/bugsnag-js",We=s.map,Ke=s.reduce,Je=He({},d.schema,t),Ze=[Oe,we,Bt,At,ce,Et,Ot,Kt,Ht,Nt,It,de,$t,ye],o=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=[];(t="string"==typeof t?{apiKey:t}:t).sessionTrackingEnabled&&(n.push("deprecated option sessionTrackingEnabled is now called autoCaptureSessions"),t.autoCaptureSessions=t.sessionTrackingEnabled),!t.endpoint&&!t.sessionEndpoint||t.endpoints||(n.push("deprecated options endpoint/sessionEndpoint are now configured in the endpoints object"),t.endpoints={notify:t.endpoint,sessions:t.sessionEndpoint}),t.endpoints&&t.endpoints.notify&&!t.endpoints.sessions&&n.push("notify endpoint is set but sessions endpoint is not. No sessions will be sent.");var r=Ke([].concat(Ze).concat(e),function(t,e){return e.configSchema?He({},t,e.configSchema):t},Je),o=new bt({name:Ve,version:Ge,url:ze},r);return o.transport(window.XDomainRequest?Ne:$e),o.configure(t),We(n,function(t){return o._logger.warn(t)}),o.use(Bt),o.use(At),o.use(ce),o.use(It),o.use(Et),o.use(de),o.use($t),o.use(ye),!1!==o.config.autoNotify&&(o.use(Oe),o.use(we)),Xe(o.config,"navigationBreadcrumbsEnabled")&&o.use(Ht),Xe(o.config,"interactionBreadcrumbsEnabled")&&o.use(Nt),Xe(o.config,"networkBreadcrumbsEnabled")&&o.use(Kt),Xe(o.config,"consoleBreadcrumbsEnabled",!1)&&o.use(Ot),We(e,function(t){return o.use(t)}),o.config.autoCaptureSessions?o.startSession():o},Xe=function(t,e){var n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];return"boolean"==typeof t[e]?t[e]:t.autoBreadcrumbs&&(n||!/^dev(elopment)?$/.test(t.releaseStage))};return o.Bugsnag={Client:bt,Report:D,Session:et,Breadcrumb:p},o.default=o},t.exports=e()},9944:function(t){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},1378:function(t,e,n){var r=n(8759);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},8669:function(t,e,n){var r=n(211),o=n(4710),n=n(7826),i=r("unscopables"),a=Array.prototype;null==a[i]&&n.f(a,i,{configurable:!0,value:o(null)}),t.exports=function(t){a[i][t]=!0}},9966:function(t,e,n){"use strict";var r=n(3448).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},1855:function(t){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},6112:function(t,e,n){var r=n(8759);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},1842:function(t,e,n){"use strict";var h=n(8516),d=n(3060),g=n(7850),y=n(2814),v=n(4005),m=n(9720),b=n(3546),w=n(1667);t.exports=function(t){var e,n,r,o,i,a,u=d(t),s="function"==typeof this?this:Array,c=arguments.length,f=1<c?arguments[1]:void 0,l=void 0!==f,t=w(u),p=0;if(l&&(f=h(f,2<c?arguments[2]:void 0,2)),null==t||s==Array&&y(t))for(n=new s(e=v(u.length));p<e;p++)a=l?f(u[p],p):u[p],m(n,p,a);else for(i=(o=b(u,t)).next,n=new s;!(r=i.call(o)).done;p++)a=l?g(o,f,[r.value,p],!0):r.value,m(n,p,a);return n.length=p,n}},6198:function(t,e,n){var s=n(4088),c=n(4005),f=n(7740),n=function(u){return function(t,e,n){var r,o=s(t),i=c(o.length),a=f(n,i);if(u&&e!=e){for(;a<i;)if((r=o[a++])!=r)return!0}else for(;a<i;a++)if((u||a in o)&&o[a]===e)return u||a||0;return!u&&-1}};t.exports={includes:n(!0),indexOf:n(!1)}},8062:function(t,e,n){var w=n(8516),E=n(5974),x=n(3060),S=n(4005),O=n(5574),_=[].push,n=function(p){var h=1==p,d=2==p,g=3==p,y=4==p,v=6==p,m=7==p,b=5==p||v;return function(t,e,n,r){for(var o,i,a=x(t),u=E(a),s=w(e,n,3),c=S(u.length),f=0,r=r||O,l=h?r(t,c):d||m?r(t,0):void 0;f<c;f++)if((b||f in u)&&(i=s(o=u[f],f,a),p))if(h)l[f]=i;else if(i)switch(p){case 3:return!0;case 5:return o;case 6:return f;case 2:_.call(l,o)}else switch(p){case 4:return!1;case 7:_.call(l,o)}return v?-1:g||y?y:l}};t.exports={forEach:n(0),map:n(1),filter:n(2),some:n(3),every:n(4),find:n(5),findIndex:n(6),filterReject:n(7)}},9955:function(t,e,n){var r=n(3677),o=n(211),i=n(1448),a=o("species");t.exports=function(e){return 51<=i||!r(function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}
6511},1!==t[e](Boolean).foo})}},8789:function(t,e,n){var r=n(8759),o=n(6526),i=n(211)("species");t.exports=function(t){var e;return void 0===(e=o(t)&&("function"==typeof(e=t.constructor)&&(e===Array||o(e.prototype))||r(e)&&null===(e=e[i]))?void 0:e)?Array:e}},5574:function(t,e,n){var r=n(8789);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},7850:function(t,e,n){var o=n(6112),i=n(6737);t.exports=function(e,t,n,r){try{return r?t(o(n)[0],n[1]):t(n)}catch(t){i(e,"throw",t)}}},8939:function(t,e,n){var o=n(211)("iterator"),i=!1;try{var r=0,a={next:function(){return{done:!!r++}},return:function(){i=!0}};a[o]=function(){return this},Array.from(a,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var r={};r[o]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}},2306:function(t){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},375:function(t,e,n){var r=n(2371),o=n(2306),i=n(211)("toStringTag"),a="Arguments"==o(function(){return arguments}()),u=function(t,e){try{return t[e]}catch(t){}};t.exports=r?o:function(t){var e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(t=u(e=Object(t),i))?t:a?o(e):"Object"==(t=o(e))&&"function"==typeof e.callee?"Arguments":t}},5204:function(t,e,n){"use strict";var c=n(7826).f,f=n(4710),l=n(9431),p=n(8516),h=n(1855),d=n(4722),a=n(8432),u=n(7420),g=n(5283),y=n(2423).fastKey,n=n(3278),v=n.set,m=n.getterFor;t.exports={getConstructor:function(t,n,r,o){var i=t(function(t,e){h(t,i,n),v(t,{type:n,index:f(null),first:void 0,last:void 0,size:0}),g||(t.size=0),null!=e&&d(e,t[o],{that:t,AS_ENTRIES:r})}),a=m(n),u=function(t,e,n){var r,o=a(t),i=s(t,e);return i?i.value=n:(o.last=i={index:r=y(e,!0),key:e,value:n,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=i),n&&(n.next=i),g?o.size++:t.size++,"F"!==r&&(o.index[r]=i)),t},s=function(t,e){var n,r=a(t),t=y(e);if("F"!==t)return r.index[t];for(n=r.first;n;n=n.next)if(n.key==e)return n};return l(i.prototype,{clear:function(){for(var t=this,e=a(t),n=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete n[r.index],r=r.next;e.first=e.last=void 0,g?e.size=0:t.size=0},delete:function(t){var e,n=this,r=a(n),o=s(n,t);return o&&(e=o.next,t=o.previous,delete r.index[o.index],o.removed=!0,t&&(t.next=e),e&&(e.previous=t),r.first==o&&(r.first=e),r.last==o&&(r.last=t),g?r.size--:n.size--),!!o},forEach:function(t){for(var e,n=a(this),r=p(t,1<arguments.length?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!s(this,t)}}),l(i.prototype,r?{get:function(t){t=s(this,t);return t&&t.value},set:function(t,e){return u(this,0===t?0:t,e)}}:{add:function(t){return u(this,t=0===t?0:t,t)}}),g&&c(i.prototype,"size",{get:function(){return a(this).size}}),i},setStrong:function(t,e,n){var r=e+" Iterator",o=m(e),i=m(r);a(t,e,function(t,e){v(this,{type:r,target:t,state:o(t),kind:e,last:void 0})},function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:{value:t.target=void 0,done:!0}},n?"entries":"values",!n,!0),u(e)}}},4909:function(t,e,n){"use strict";var y=n(1695),v=n(2086),m=n(7189),b=n(1007),w=n(2423),E=n(4722),x=n(1855),S=n(8759),O=n(3677),_=n(8939),j=n(914),T=n(5070);t.exports=function(n,t,e){var r,o,i,a,u,s=-1!==n.indexOf("Map"),c=-1!==n.indexOf("Weak"),f=s?"set":"add",l=v[n],p=l&&l.prototype,h=l,d={},g=function(t){var n=p[t];b(p,t,"add"==t?function(t){return n.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(c&&!S(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return c&&!S(t)?void 0:n.call(this,0===t?0:t)}:"has"==t?function(t){return!(c&&!S(t))&&n.call(this,0===t?0:t)}:function(t,e){return n.call(this,0===t?0:t,e),this})};return m(n,"function"!=typeof l||!(c||p.forEach&&!O(function(){(new l).entries().next()})))?(h=e.getConstructor(t,n,s,f),w.enable()):m(n,!0)&&(o=(r=new h)[f](c?{}:-0,1)!=r,i=O(function(){r.has(1)}),a=_(function(t){new l(t)}),u=!c&&O(function(){for(var t=new l,e=5;e--;)t[f](e,e);return!t.has(-0)}),a||(((h=t(function(t,e){x(t,h,n);t=T(new l,t,h);return null!=e&&E(e,t[f],{that:t,AS_ENTRIES:s}),t})).prototype=p).constructor=h),(i||u)&&(g("delete"),g("has"),s&&g("get")),(u||o)&&g(f),c&&p.clear&&delete p.clear),d[n]=h,y({global:!0,forced:h!=l},d),j(h,n),c||e.setStrong(h,n,s),h}},8474:function(t,e,n){var u=n(3167),s=n(6095),c=n(4399),f=n(7826);t.exports=function(t,e){for(var n=s(e),r=f.f,o=c.f,i=0;i<n.length;i++){var a=n[i];u(t,a)||r(t,a,o(e,a))}}},5469:function(t,e,n){var r=n(211)("match");t.exports=function(e){var n=/./;try{"/./"[e](n)}catch(t){try{return n[r]=!1,"/./"[e](n)}catch(t){}}return!1}},7209:function(t,e,n){n=n(3677);t.exports=!n(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},471:function(t,e,n){"use strict";var r=n(3083).IteratorPrototype,o=n(4710),i=n(5736),a=n(914),u=n(7719),s=function(){return this};t.exports=function(t,e,n){e+=" Iterator";return t.prototype=o(r,{next:i(1,n)}),a(t,e,!1,!0),u[e]=s,t}},2585:function(t,e,n){var r=n(5283),o=n(7826),i=n(5736);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},5736:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},9720:function(t,e,n){"use strict";var r=n(2258),o=n(7826),i=n(5736);t.exports=function(t,e,n){e=r(e);e in t?o.f(t,e,i(0,n)):t[e]=n}},8432:function(t,e,n){"use strict";var g=n(1695),y=n(471),v=n(2130),m=n(7530),b=n(914),w=n(2585),E=n(1007),r=n(211),x=n(3296),S=n(7719),n=n(3083),O=n.IteratorPrototype,_=n.BUGGY_SAFARI_ITERATORS,j=r("iterator"),T="keys",A="values",M="entr
6511ies",P=function(){return this};t.exports=function(t,e,n,r,o,i,a){y(n,e,r);var u,s,c=function(t){if(t===o&&d)return d;if(!_&&t in p)return p[t];switch(t){case T:case A:case M:return function(){return new n(this,t)}}return function(){return new n(this)}},f=e+" Iterator",l=!1,p=t.prototype,h=p[j]||p["@@iterator"]||o&&p[o],d=!_&&h||c(o),r="Array"==e&&p.entries||h;if(r&&(t=v(r.call(new t)),O!==Object.prototype&&t.next&&(x||v(t)===O||(m?m(t,O):"function"!=typeof t[j]&&w(t,j,P)),b(t,f,!0,!0),x&&(S[f]=P))),o==A&&h&&h.name!==A&&(l=!0,d=function(){return h.call(this)}),x&&!a||p[j]===d||w(p,j,d),S[e]=d,o)if(u={values:c(A),keys:i?d:c(T),entries:c(M)},a)for(s in u)!_&&!l&&s in p||E(p,s,u[s]);else g({target:e,proto:!0,forced:_||l},u);return u}},4145:function(t,e,n){var r=n(9775),o=n(3167),i=n(9251),a=n(7826).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},5283:function(t,e,n){n=n(3677);t.exports=!n(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},821:function(t,e,n){var r=n(2086),n=n(8759),o=r.document,i=n(o)&&n(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},933:function(t){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},172:function(t){t.exports="object"==typeof window},1848:function(t,e,n){var r=n(4999),n=n(2086);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==n.Pebble},4344:function(t,e,n){n=n(4999);
6511t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},1801:function(t,e,n){var r=n(2306),n=n(2086);t.exports="process"==r(n.process)},4928:function(t,e,n){n=n(4999);t.exports=/web0s(?!.*chrome)/i.test(n)},4999:function(t,e,n){n=n(563);t.exports=n("navigator","userAgent")||""},1448:function(t,e,n){var r,o,i=n(2086),a=n(4999),n=i.process,i=i.Deno,i=n&&n.versions||i&&i.version,i=i&&i.v8;i?o=(r=i.split("."))[0]<4?1:r[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||74<=r[1])&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),t.exports=o&&+o},8684:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1695:function(t,e,n){var c=n(2086),f=n(4399).f,l=n(2585),p=n(1007),h=n(3648),d=n(8474),g=n(7189);t.exports=function(t,e){var n,r,o,i=t.target,a=t.global,u=t.stat,s=a?c:u?c[i]||h(i,{}):(c[i]||{}).prototype;if(s)for(n in e){if(r=e[n],o=t.noTargetGet?(o=f(s,n))&&o.value:s[n],!g(a?n:i+(u?".":"#")+n,t.forced)&&void 0!==o){if(typeof r==typeof o)continue;d(r,o)}(t.sham||o&&o.sham)&&l(r,"sham",!0),p(s,n,r,t)}}},3677:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},2331:function(t,e,n){"use strict";n(2077);var s=n(1007),c=n(4861),f=n(3677),l=n(211),p=n(2585),h=l("species"),d=RegExp.prototype;t.exports=function(n,t,e,r){var a,o=l(n),u=!f(function(){var t={};return t[o]=function(){return 7},7!=""[n](t)}),i=u&&!f(function(){var t=!1,e=/a/;return"split"===n&&((e={constructor:{}}).constructor[h]=function(){return e},e.flags="",e[o]=/./[o]),e.exec=function(){return t=!0,null},e[o](""),!t});u&&i&&!e||(a=/./[o],t=t(o,""[n],function(t,e,n,r,o){var i=e.exec;return i===c||i===d.exec?u&&!o?{done:!0,value:a.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),s(String.prototype,n,t[0]),s(d,o,t[1])),r&&p(d[o],"sham",!0)}},6910:function(t,e,n){n=n(3677);t.exports=!n(function(){return Object.isExtensible(Object.preventExtensions({}))})},8516:function(t,e,n){var i=n(9944);t.exports=function(r,o,t){if(i(r),void 0===o)return r;switch(t){case 0:return function(){return r.call(o)};case 1:return function(t){return r.call(o,t)};case 2:return function(t,e){return r.call(o,t,e)};case 3:return function(t,e,n){return r.call(o,t,e,n)}}return function(){return r.apply(o,arguments)}}},563:function(t,e,n){var r=n(2086),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},1667:function(t,e,n){var r=n(375),o=n(7719),i=n(211)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},3546:function(t,e,n){var r=n(6112),o=n(1667);t.exports=function(t,e){var n=arguments.length<2?o(t):e;if("function"!=typeof n)throw TypeError(String(t)+" is not iterable");return r(n.call(t))}},2086:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},3167:function(t,e,n){var r=n(3060),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(r(t),e)}},7153:function(t){t.exports={}},1670:function(t,e,n){var r=n(2086);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},5963:function(t,e,n){n=n(563);t.exports=n("document","documentElement")},6761:function(t,e,n){var r=n(5283),o=n(3677),i=n(821);t.exports=!r&&!o(function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},5974:function(t,e,n){var r=n(3677),o=n(2306),i="".split;t.exports=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},5070:function(t,e,n){var i=n(8759),a=n(7530);t.exports=function(t,e,n){var r,o;return a&&"function"==typeof(r=e.constructor)&&r!==n&&i(o=r.prototype)&&o!==n.prototype&&a(t,o),t}},9277:function(t,e,n){var n=n(4489),r=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(t){return r.call(t)}),t.exports=n.inspectSource},2423:function(t,e,n){var r=n(1695),o=n(7153),i=n(8759),a=n(3167),u=n(7826).f,s=n(62),c=n(3226),f=n(5422),l=n(6910),p=!1,h=f("meta"),d=0,g=Object.isExtensible||function(){return!0},y=function(t){u(t,h,{value:{objectID:"O"+d++,weakData:{}}})}
6511,v=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,h)){if(!g(t))return"F";if(!e)return"E";y(t)}return t[h].objectID},m=function(t,e){if(!a(t,h)){if(!g(t))return!0;if(!e)return!1;y(t)}return t[h].weakData},n=function(t){return l&&p&&g(t)&&!a(t,h)&&y(t),t},f=function(){b.enable=function(){},p=!0;var o=s.f,i=[].splice,t={};t[h]=1,o(t).length&&(s.f=function(t){for(var e=o(t),n=0,r=e.length;n<r;n++)if(e[n]===h){i.call(e,n,1);break}return e},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:c.f}))},b=t.exports={enable:f,fastKey:v,getWeakData:m,onFreeze:n};o[h]=!0},3278:function(t,e,n){var r,o,i,a,u,s,c,f,l=n(9316),p=n(2086),h=n(8759),d=n(2585),g=n(3167),y=n(4489),v=n(8944),m=n(7153),b="Object already initialized",w=p.WeakMap,n=function(t){return c(t)?s(t):u(t,{})},p=function(n){return function(t){var e;if(!h(t)||(e=s(t)).type!==n)throw TypeError("Incompatible receiver, "+n+" required");return e}};c=l||y.state?(r=y.state||(y.state=new w),o=r.get,i=r.has,a=r.set,u=function(t,e){if(i.call(r,t))throw new TypeError(b);return e.facade=t,a.call(r,t,e),e},s=function(t){return o.call(r,t)||{}},function(t){return i.call(r,t)}):(m[f=v("state")]=!0,u=function(t,e){if(g(t,f))throw new TypeError(b);return e.facade=t,d(t,f,e),e},s=function(t){return g(t,f)?t[f]:{}},function(t){return g(t,f)}),t.exports={set:u,get:s,has:c,enforce:n,getterFor:p}},2814:function(t,e,n){var r=n(211),o=n(7719),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},6526:function(t,e,n){var r=n(2306);t.exports=Array.isArray||function(t){return"Array"==r(t)}},7189:function(t,e,n){var r=n(3677),o=/#|\.prototype\./,n=function(t,e){t=a[i(t)];return t==s||t!=u&&("function"==typeof e?r(e):!!e)},i=n.normalize=function(t){return String(t).replace(o,".").toLowerCase()},a=n.data={},u=n.NATIVE="N",s=n.POLYFILL="P";t.exports=n},8759:function(t){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},3296:function(t){t.exports=!1},7994:function(t,e,n){var r=n(8759),o=n(2306),i=n(211)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},2071:function(t,e,n){var r=n(563),n=n(1876);t.exports=n?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return"function"==typeof e&&Object(t)instanceof e}},4722:function(t,e,n){var y=n(6112),v=n(2814),m=n(4005),b=n(8516),w=n(3546),E=n(1667),x=n(6737),S=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var r,o,i,a,u,s,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),l=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),h=b(e,c,1+f+p),d=function(t){return r&&x(r,"normal",t),new S(!0,t)},g=function(t){return f?(y(t),p?h(t[0],t[1],d):h(t[0],t[1])):p?h(t,d):h(t)};if(l)r=t;else{if("function"!=typeof(l=E(t)))throw TypeError("Target is not iterable");if(v(l)){for(o=0,i=m(t.length);o<i;o++)if((a=g(t[o]))&&a instanceof S)return a;return new S(!1)}r=w(t,l)}for(u=r.next;!(s=u.call(r)).done;){try{a=g(s.value)}catch(t){x(r,"throw",t)}if("object"==typeof a&&a&&a instanceof S)return a}return new S(!1)}},6737:function(t,e,n){var i=n(6112);t.exports=function(t,e,n){var r,o;i(t);try{if(void 0===(r=t.return)){if("throw"===e)throw n;return n}r=r.call(t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return i(r),n}},3083:function(t,e,n){"use strict";var r,o=n(3677),i=n(2130),a=n(2585),u=n(3167),s=n(211),c=n(3296),f=s("iterator"),l=!1,n=function(){return this};[].keys&&("next"in(s=[].keys())?(s=i(i(s)))!==Object.prototype&&(r=s):l=!0);o=null==r||o(function(){var t={};return r[f].call(t)!==t});o&&(r={}),c&&!o||u(r,f)||a(r,f,n),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:l}},7719:function(t){t.exports={}},3173:function(t,e,n){var r,o,i,a,u,s,c,f,l=n(2086),p=n(4399).f,h=n(4953).set,d=n(4344),g=n(1848),y=n(4928),v=n(1801),m=l.MutationObserver||l.WebKitMutationObserver,b=l.document,w=l.process,n=l.Promise,p=p(l,"queueMicrotask"),p=p&&p.value;p||(r=function(){var t,e;for(v&&(t=w.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},a=d||v||y||!m||!b?!g&&n&&n.resolve?((c=n.resolve(void 0)).constructor=n,f=c.then,function(){f.call(c,r)}):v?function(){w.nextTick(r)}:function(){h.call(l,r)}:(u=!0,s=b.createTextNode(""),new m(r).observe(s,{characterData:!0}
6511),function(){s.data=u=!u})),t.exports=p||function(t){t={fn:t,next:void 0};i&&(i.next=t),o||(o=t,a()),i=t}},8109:function(t,e,n){n=n(2086);t.exports=n.Promise},3193:function(t,e,n){var r=n(1448),n=n(3677);t.exports=!!Object.getOwnPropertySymbols&&!n(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41})},9316:function(t,e,n){var r=n(2086),n=n(9277),r=r.WeakMap;t.exports="function"==typeof r&&/native code/.test(n(r))},8722:function(t,e,n){"use strict";var o=n(9944),r=function(t){var n,r;this.promise=new t(function(t,e){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=t,r=e}),this.resolve=o(n),this.reject=o(r)};t.exports.f=function(t){return new r(t)}},7725:function(t,e,n){var r=n(7994);t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},4710:function(t,e,n){var r,o=n(6112),i=n(7711),a=n(8684),u=n(7153),s=n(5963),c=n(821),n=n(8944),f=">",l="<",p="prototype",h="script",d=n("IE_PROTO"),g=function(){},y=function(t){return l+h+f+t+l+"/"+h+f},v=function(t){t.write(y("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){var t=c("iframe"),e="java"+h+":";return t.style.display="none",s.appendChild(t),t.src=String(e),(t=t.contentWindow.document).open(),t.write(y("document.F=Object")),t.close(),t.F},b=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}b="undefined"==typeof document||document.domain&&r?v(r):m();for(var t=a.length;t--;)delete b[p][a[t]];return b()};u[d]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(g[p]=o(t),n=new g,g[p]=null,n[d]=t):n=b(),void 0===e?n:i(n,e)}},7711:function(t,e,n){var r=n(5283),a=n(7826),u=n(6112),s=n(8779);t.exports=r?Object.defineProperties:function(t,e){u(t);for(var n,r=s(e),o=r.length,i=0;i<o;)a.f(t,n=r[i++],e[n]);return t}},7826:function(t,e,n){var r=n(5283),o=n(6761),i=n(6112),a=n(2258),u=Object.defineProperty;e.f=r?u:function(t,e,n){if(i(t),e=a(e),i(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},4399:function(t,e,n){var r=n(5283),o=n(7446),i=n(5736),a=n(4088),u=n(2258),s=n(3167),c=n(6761),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=u(e),c)try{return f(t,e)}catch(t){}if(s(t,e))return i(!o.f.call(t,e),t[e])}},3226:function(t,e,n){var r=n(4088),o=n(62).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(t){try{return o(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?u(t):o(r(t))}},62:function(t,e,n){var r=n(1352),o=n(8684).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},6952:function(t,e){e.f=Object.getOwnPropertySymbols},2130:function(t,e,n){var r=n(3167),o=n(3060),i=n(8944),n=n(7209),a=i("IE_PROTO"),u=Object.prototype;t.exports=n?Object.getPrototypeOf:function(t){return t=o(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},1352:function(t,e,n){var a=n(3167),u=n(4088),s=n(6198).indexOf,c=n(7153);t.exports=function(t,e){var n,r=u(t),o=0,i=[];for(n in r)!a(c,n)&&a(r,n)&&i.push(n);for(;e.length>o;)a(r,n=e[o++])&&(~s(i,n)||i.push(n));return i}},8779:function(t,e,n){var r=n(1352),o=n(8684);t.exports=Object.keys||function(t){return r(t,o)}},7446:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){t=r(this,t);return!!t&&t.enumerable}:n},7530:function(t,e,n){var o=n(6112),i=n(1378);
6511t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var n,r=!1,t={};try{(n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(t,[]),r=t instanceof Array}catch(t){}return function(t,e){return o(t),i(e),r?n.call(t,e):t.__proto__=e,t}}():void 0)},999:function(t,e,n){"use strict";var r=n(2371),o=n(375);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},7999:function(t,e,n){var o=n(8759);t.exports=function(t,e){var n,r;if("string"===e&&"function"==typeof(n=t.toString)&&!o(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!o(r=n.call(t)))return r;if("string"!==e&&"function"==typeof(n=t.toString)&&!o(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},6095:function(t,e,n){var r=n(563),o=n(62),i=n(6952),a=n(6112);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=i.f;return n?e.concat(n(t)):e}},9775:function(t,e,n){n=n(2086);t.exports=n},4522:function(t){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},880:function(t,e,n){var r=n(6112),o=n(8759),i=n(8722);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;t=i.f(t);return(0,t.resolve)(e),t.promise}},9431:function(t,e,n){var o=n(1007);t.exports=function(t,e,n){for(var r in e)o(t,r,e[r],n);return t}},1007:function(t,e,n){var u=n(2086),s=n(2585),c=n(3167),f=n(3648),r=n(9277),n=n(3278),o=n.get,l=n.enforce,p=String(String).split("String");(t.exports=function(t,e,n,r){var o=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||c(n,"name")||s(n,"name",e),(r=l(n)).source||(r.source=p.join("string"==typeof e?e:""))),t!==u?(o?!a&&t[e]&&(i=!0):delete t[e],i?t[e]=n:s(t,e,n)):i?t[e]=n:f(e,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&o(this).source||r(this)})},1189:function(t,e,n){var r=n(2306),o=n(4861);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){n=n.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},4861:function(t,e,n){"use strict";var d=n(4059),g=n(4276),r=n(4930),o=n(9197),y=n(4710),v=n(3278).get,i=n(2582),a=n(2910),m=RegExp.prototype.exec,b=o("native-string-replace",String.prototype.replace),w=m,E=(n=/a/,o=/b*/g,m.call(n,"a"),m.call(o,"a"),0!==n.lastIndex||0!==o.lastIndex),x=r.UNSUPPORTED_Y||r.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(E||S||x||i||a)&&(w=function(t){var e,n,r,o,i,a,u=this,s=v(u),c=d(t),f=s.raw;if(f)return f.lastIndex=u.lastIndex,h=w.call(f,c),u.lastIndex=f.lastIndex,h;var l=s.groups,p=x&&u.sticky,t=g.call(u),f=u.source,h=0,s=c;if(p&&(-1===(t=t.replace("y","")).indexOf("g")&&(t+="g"),s=c.slice(u.lastIndex),0<u.lastIndex&&(!u.multiline||u.multiline&&"\n"!==c.charAt(u.lastIndex-1))&&(f="(?: "+f+")",s=" "+s,h++),e=new RegExp("^(?:"+f+")",t)),S&&(e=new RegExp("^"+f+"$(?!\\s)",t)),E&&(n=u.lastIndex),r=m.call(p?e:u,s),p?r?(r.input=r.input.slice(h),r[0]=r[0].slice(h),r.index=u.lastIndex,u.lastIndex+=r[0].length):u.lastIndex=0:E&&r&&(u.lastIndex=u.global?r.index+r[0].length:n),S&&r&&1<r.length&&b.call(r[0],e,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r&&l)for(r.groups=i=y(null),o=0;o<l.length;o++)i[(a=l[o])[0]]=r[a[1]];return r}),t.exports=w},4276:function(t,e,n){"use strict";var r=n(6112);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},4930:function(t,e,n){var r=n(3677),o=n(2086).RegExp;e.UNSUPPORTED_Y=r(function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),e.BROKEN_CARET=r(function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")})},2582:function(t,e,n){var r=n(3677),o=n(2086).RegExp;t.exports=r(function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})},2910:function(t,e,n){var r=n(3677),o=n(2086).RegExp;t.exports=r(function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})},9586:function(t){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},3648:function(t,e,n){var r=n(2086);t.exports=function(e,n){try{Object.defineProperty(r,e,{value:n,configurable:!0,writable:!0})}catch(t){r[e]=n}return n}},7420:function(t,e,n){"use strict";var r=n(563),o=n(7826),i=n(211),a=n(5283),u=i("species");t.exports=function(t){var e=r(t),t=o.f;a&&e&&!e[u]&&t(e,u,{configurable:!0,get:function(){return this}})}},914:function(t,e,n){var r=n(7826).f,o=n(3167),i=n(211)("toStringTag");
6511t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},8944:function(t,e,n){var r=n(9197),o=n(5422),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},4489:function(t,e,n){var r=n(2086),o=n(3648),n="__core-js_shared__",n=r[n]||o(n,{});t.exports=n},9197:function(t,e,n){var r=n(3296),o=n(4489);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.17.2",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},8515:function(t,e,n){var r=n(6112),o=n(9944),i=n(211)("species");t.exports=function(t,e){var n,t=r(t).constructor;return void 0===t||null==(n=r(t)[i])?e:o(n)}},3448:function(t,e,n){var a=n(9679),u=n(4059),s=n(9586),n=function(i){return function(t,e){var n,r=u(s(t)),o=a(e),t=r.length;return o<0||t<=o?i?"":void 0:(e=r.charCodeAt(o))<55296||56319<e||o+1===t||(n=r.charCodeAt(o+1))<56320||57343<n?i?r.charAt(o):e:i?r.slice(o,o+2):n-56320+(e-55296<<10)+65536}};t.exports={codeAt:n(!1),charAt:n(!0)}},4953:function(t,e,n){var r,o,i=n(2086),a=n(3677),u=n(8516),s=n(5963),c=n(821),f=n(4344),l=n(1801),p=i.setImmediate,h=i.clearImmediate,d=i.process,g=i.MessageChannel,y=i.Dispatch,v=0,m={},b="onreadystatechange";try{r=i.location}catch(t){}var w=function(t){var e;m.hasOwnProperty(t)&&(e=m[t],delete m[t],e())},E=function(t){return function(){w(t)}},x=function(t){w(t.data)},n=function(t){i.postMessage(String(t),r.protocol+"//"+r.host)};p&&h||(p=function(t){for(var e=[],n=arguments.length,r=1;r<n;)e.push(arguments[r++]);return m[++v]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},o(v),v},h=function(t){delete m[t]},l?o=function(t){d.nextTick(E(t))}:y&&y.now?o=function(t){y.now(E(t))}:g&&!f?(g=(f=new g).port2,f.port1.onmessage=x,o=u(g.postMessage,g,1)):i.addEventListener&&"function"==typeof postMessage&&!i.importScripts&&r&&"file:"!==r.protocol&&!a(n)?(o=n,i.addEventListener("message",x,!1)):o=b in c("script")?function(t){s.appendChild(c("script"))[b]=function(){s.removeChild(this),w(t)}}:function(t){setTimeout(E(t),0)}),t.exports={set:p,clear:h}},7740:function(t,e,n){var r=n(9679),o=Math.max,i=Math.min;t.exports=function(t,e){t=r(t);return t<0?o(t+e,0):i(t,e)}},4088:function(t,e,n){var r=n(5974),o=n(9586);t.exports=function(t){return r(o(t))}},9679:function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0<t?n:e)(t)}},4005:function(t,e,n){var r=n(9679),o=Math.min;t.exports=function(t){return 0<t?o(r(t),9007199254740991):0}},3060:function(t,e,n){var r=n(9586);t.exports=function(t){return Object(r(t))}},1288:function(t,e,n){var r=n(8759),o=n(2071),i=n(7999),a=n(211)("toPrimitive");t.exports=function(t,e){if(!r(t)||o(t))return t;var n=t[a];if(void 0===n)return i(t,e=void 0===e?"number":e);if(e=n.call(t,e=void 0===e?"default":e),!r(e)||o(e))return e;throw TypeError("Can't convert object to primitive value")}},2258:function(t,e,n){var r=n(1288),o=n(2071);t.exports=function(t){t=r(t,"string");return o(t)?t:String(t)}},2371:function(t,e,n){var r={};r[n(211)("toStringTag")]="z",t.exports="[object z]"===String(r)},4059:function(t,e,n){var r=n(2071);t.exports=function(t){if(r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},5422:function(t){var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},1876:function(t,e,n){n=n(3193);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},9251:function(t,e,n){n=n(211);e.f=n},211:function(t,e,n){var r=n(2086),o=n(9197),i=n(3167),a=n(5422),u=n(3193),n=n(1876),s=o("wks"),c=r.Symbol,f=n?c:c&&c.withoutSetter||a;t.exports=function(t){return i(s,t)&&(u||"string"==typeof s[t])||(u&&i(c,t)?s[t]=c[t]:s[t]=f("Symbol."+t)),s[t]}},3938:function(t,e,n){"use strict";var r=n(1695),o=n(3677),i=n(6526),a=n(8759),c=n(3060),f=n(4005),l=n(9720),p=n(5574),u=n(9955),s=n(211),n=n(1448),h=s("isConcatSpreadable"),d=9007199254740991,g="Maximum allowed index exceeded",o=51<=n||!o(function(){var t=[];return t[h]=!1,t.concat()[0]!==t}),u=u("concat"),y=function(t){if(!a(t))return!1;var e=t[h];
6511return void 0!==e?!!e:i(t)};r({target:"Array",proto:!0,forced:!o||!u},{concat:function(t){for(var e,n,r,o=c(this),i=p(o,0),a=0,u=-1,s=arguments.length;u<s;u++)if(y(r=-1===u?o:arguments[u])){if(n=f(r.length),d<a+n)throw TypeError(g);for(e=0;e<n;e++,a++)e in r&&l(i,a,r[e])}else{if(d<=a)throw TypeError(g);l(i,a++,r)}return i.length=a,i}})},5610:function(t,e,n){var r=n(1695),o=n(1842);r({target:"Array",stat:!0,forced:!n(8939)(function(t){Array.from(t)})},{from:o})},5623:function(t,e,n){"use strict";var r=n(1695),o=n(6198).includes,n=n(8669);r({target:"Array",proto:!0},{includes:function(t){return o(this,t,1<arguments.length?arguments[1]:void 0)}}),n("includes")},5769:function(t,e,n){"use strict";var r=n(4088),o=n(8669),i=n(7719),a=n(3278),n=n(8432),u="Array Iterator",s=a.set,c=a.getterFor(u);t.exports=n(Array,"Array",function(t,e){s(this,{type:u,target:r(t),index:0,kind:e})},function(){var t=c(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?{value:t.target=void 0,done:!0}:"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},1013:function(t,e,n){"use strict";var r=n(1695),o=n(8062).map;r({target:"Array",proto:!0,forced:!n(9955)("map")},{map:function(t){return o(this,t,1<arguments.length?arguments[1]:void 0)}})},2410:function(t,e,n){"use strict";var r=n(1695),c=n(8759),f=n(6526),l=n(7740),p=n(4005),h=n(4088),d=n(9720),o=n(211),n=n(9955)("slice"),g=o("species"),y=[].slice,v=Math.max;r({target:"Array",proto:!0,forced:!n},{slice:function(t,e){var n,r,o,i=h(this),a=p(i.length),u=l(t,a),s=l(void 0===e?a:e,a);if(f(i)&&((n="function"==typeof(n=i.constructor)&&(n===Array||f(n.prototype))||c(n)&&null===(n=n[g])?void 0:n)===Array||void 0===n))return y.call(i,u,s);for(r=new(void 0===n?Array:n)(v(s-u,0)),o=0;u<s;u++,o++)u in i&&d(r,o,i[u]);return r.length=o,r}})},3352:function(t,e,n){var r=n(5283),o=n(7826).f,i=Function.prototype,a=i.toString,u=/^\s*function ([^ (]*)/,n="name";!r||n in i||o(i,n,{configurable:!0,get:function(){try{return a.call(this).match(u)[1]}catch(t){return""}}})},1484:function(t,e,n){"use strict";var r=n(4909),n=n(5204);t.exports=r("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},n)},3238:function(t,e,n){var r=n(2371),o=n(1007),n=n(999);r||o(Object.prototype,"toString",n,{unsafe:!0})},1418:function(t,e,n){"use strict";var r,o,i,a,u=n(1695),s=n(3296),c=n(2086),f=n(563),l=n(8109),p=n(1007),h=n(9431),d=n(7530),g=n(914),y=n(7420),v=n(8759),m=n(9944),b=n(1855),w=n(9277),E=n(4722),x=n(8939),S=n(8515),O=n(4953).set,_=n(3173),j=n(880),T=n(1670),A=n(8722),M=n(4522),P=n(3278),B=n(7189),I=n(211),R=n(172),L=n(1801),k=n(1448),C=I("species"),N="Promise",D=P.get,U=P.set,F=P.getterFor(N),P=l&&l.prototype,q=l,$=P,H=c.TypeError,V=c.document,G=c.process,z=A.f,W=z,K=!!(V&&V.createEvent&&c.dispatchEvent),J="function"==typeof PromiseRejectionEvent,Z="unhandledrejection",X="rejectionhandled",Y=0,Q=1,tt=2,et=1,nt=2,rt=!1,B=B(N,function(){var t=w(q),e=t!==String(q);if(!e&&66===k)return!0;if(s&&!$.finally)return!0;if(51<=k&&/native code/.test(t))return!1;var n=new q(function(t){t(1)}),t=function(t){t(function(){},function(){})};return(n.constructor={})[C]=t,!(rt=n.then(function(){})instanceof t)||!e&&R&&!J}),x=B||!x(function(t){q.all(t).catch(function(){})}),ot=function(t){var e;return!(!v(t)||"function"!=typeof(e=t.then))&&e},it=function(l,p){var h;l.notified||(l.notified=!0,h=l.reactions,_(function(){for(var t=l.value,e=l.state==Q,n=0;h.length>n;){var r,o,i,a=h[n++],u=e?a.ok:a.fail,s=a.resolve,c=a.reject,f=a.domain;try{u?(e||(l.rejection===nt&&ct(l),l.rejection=et),!0===u?r=t:(f&&f.enter(),r=u(t),f&&(f.exit(),i=!0)),r===a.promise?c(H("Promise-chain cycle")):(o=ot(r))?o.call(r,s,c):s(r)):c(t)}catch(t){f&&!i&&f.exit(),c(t)}}l.reactions=[],l.notified=!1,p&&!l.rejection&&ut(l)}))},at=function(t,e,n){var r,o;K?((r=V.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:e,reason:n},!J&&(o=c["on"+t])?o(r):t===Z&&T("Unhandled promise rejection",n)},ut=function(o){O.call(c,function(){var t,e=o.facade,n=o.value,r=st(o);if(r&&(t=M(function(){L?G.emit("unhandledRejection",n,e):at(Z,e,n)}),o.rejection=L||st(o)?nt:et,t.error))throw t.value})},st=function(t){return t.rejection!==et&&!t.parent},ct=function(e){O.call(c,function(){var t=e.facade;L?G.emit("rejectionHandled",t):at(X,t,e.value)})},ft=function(e,n,r){return function(t){e(n,t,r)}},lt=function(t,e,n){t.done||(t.done=!0,(t=n?n:t).value=e,t.state=tt,it(t,!0))},pt=function(n,t,e){if(!n.done){n.done=!0,e&&(n=e);
6511try{if(n.facade===t)throw H("Promise can't be resolved itself");var r=ot(t);r?_(function(){var e={done:!1};try{r.call(t,ft(pt,e,n),ft(lt,e,n))}catch(t){lt(e,t,n)}}):(n.value=t,n.state=Q,it(n,!1))}catch(t){lt({done:!1},t,n)}}};if(B&&($=(q=function(t){b(this,q,N),m(t),r.call(this);var e=D(this);try{t(ft(pt,e),ft(lt,e))}catch(t){lt(e,t)}}).prototype,(r=function(t){U(this,{type:N,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:Y,value:void 0})}).prototype=h($,{then:function(t,e){var n=F(this),r=z(S(this,q));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=L?G.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=Y&&it(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=D(t);this.promise=t,this.resolve=ft(pt,e),this.reject=ft(lt,e)},A.f=z=function(t){return t===q||t===i?new o(t):W(t)},!s&&"function"==typeof l&&P!==Object.prototype)){a=P.then,rt||(p(P,"then",function(t,e){var n=this;return new q(function(t,e){a.call(n,t,e)}).then(t,e)},{unsafe:!0}),p(P,"catch",$.catch,{unsafe:!0}));try{delete P.constructor}catch(t){}d&&d(P,$)}u({global:!0,wrap:!0,forced:B},{Promise:q}),g(q,N,!1,!0),y(N),i=f(N),u({target:N,stat:!0,forced:B},{reject:function(t){var e=z(this);return e.reject.call(void 0,t),e.promise}}),u({target:N,stat:!0,forced:s||B},{resolve:function(t){return j(s&&this===i?q:this,t)}}),u({target:N,stat:!0,forced:x},{all:function(t){var u=this,e=z(u),s=e.resolve,c=e.reject,n=M(function(){var r=m(u.resolve),o=[],i=0,a=1;E(t,function(t){var e=i++,n=!1;o.push(void 0),a++,r.call(u,t).then(function(t){n||(n=!0,o[e]=t,--a||s(o))},c)}),--a||s(o)});return n.error&&c(n.value),e.promise},race:function(t){var n=this,r=z(n),o=r.reject,e=M(function(){var e=m(n.resolve);E(t,function(t){e.call(n,t).then(r.resolve,o)})});return e.error&&o(e.value),r.promise}})},2077:function(t,e,n){"use strict";var r=n(1695),n=n(4861);r({target:"RegExp",proto:!0,forced:/./.exec!==n},{exec:n})},1514:function(t,e,n){"use strict";var r=n(1695),o=n(7725),i=n(9586),a=n(4059);r({target:"String",proto:!0,forced:!n(5469)("includes")},{includes:function(t){return!!~a(i(this)).indexOf(a(o(t)),1<arguments.length?arguments[1]:void 0)}})},7460:function(t,e,n){"use strict";var r=n(3448).charAt,o=n(4059),i=n(3278),n=n(8432),a="String Iterator",u=i.set,s=i.getterFor(a);n(String,"String",function(t){u(this,{type:a,string:o(t),index:0})},function(){var t=s(this),e=t.string,n=t.index;return n>=e.length?{value:void 0,done:!0}:(n=r(e,n),t.index+=n.length,{value:n,done:!1})})},2482:function(t,e,n){"use strict";var r=n(2331),f=n(7994),v=n(6112),l=n(9586),m=n(8515),b=n(9966),w=n(4005),E=n(4059),x=n(1189),p=n(4861),o=n(4930),n=n(3677),S=o.UNSUPPORTED_Y,h=[].push,O=Math.min,_=4294967295;r("split",function(o,d,g){var y="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(t,e){var n=E(l(this)),r=void 0===e?_:e>>>0;
6511if(0===r)return[];if(void 0===t)return[n];if(!f(t))return d.call(n,t,r);for(var o,i,a,u=[],e=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),s=0,c=new RegExp(t.source,e+"g");(o=p.call(c,n))&&!(s<(i=c.lastIndex)&&(u.push(n.slice(s,o.index)),1<o.length&&o.index<n.length&&h.apply(u,o.slice(1)),a=o[0].length,s=i,u.length>=r));)c.lastIndex===o.index&&c.lastIndex++;return s===n.length?!a&&c.test("")||u.push(""):u.push(n.slice(s)),u.length>r?u.slice(0,r):u}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:d.call(this,t,e)}:d;return[function(t,e){var n=l(this),r=null==t?void 0:t[o];return void 0!==r?r.call(t,n,e):y.call(E(n),t,e)},function(t,e){var n=v(this),r=E(t),o=g(y,n,r,e,y!==d);if(o.done)return o.value;var t=m(n,RegExp),i=n.unicode,o=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(S?"g":"y"),a=new t(S?"^(?:"+n.source+")":n,o),u=void 0===e?_:e>>>0;if(0===u)return[];if(0===r.length)return null===x(a,r)?[r]:[];for(var s=0,c=0,f=[];c<r.length;){a.lastIndex=S?0:c;var l,p=x(a,S?r.slice(c):r);if(null===p||(l=O(w(a.lastIndex+(S?c:0)),r.length))===s)c=b(r,c,i);else{if(f.push(r.slice(s,c)),f.length===u)return f;for(var h=1;h<=p.length-1;h++)if(f.push(p[h]),f.length===u)return f;c=s=l}}return f.push(r.slice(s)),f}]},!!n(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};t="ab".split(t);return 2!==t.length||"a"!==t[0]||"b"!==t[1]}),S)},2189:function(t,e,n){"use strict";var r,o,i,a,u,s=n(1695),c=n(5283),f=n(2086),l=n(3167),p=n(8759),h=n(7826).f,n=n(8474),d=f.Symbol;!c||"function"!=typeof d||"description"in d.prototype&&void 0===d().description||(r={},n(o=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof o?new d(t):void 0===t?d():d(t);return""===t&&(r[e]=!0),e},d),(n=o.prototype=d.prototype).constructor=o,i=n.toString,a="Symbol(test)"==String(d("test")),u=/^Symbol\((.*)\)[^)]+$/,h(n,"description",{configurable:!0,get:function(){var t=p(this)?this.valueOf():this,e=i.call(t);if(l(r,t))return"";e=a?e.slice(7,-1):e.replace(u,"$1");return""===e?void 0:e}}),s({global:!0,forced:!0},{Symbol:o}))},1047:function(t,e,n){n(4145)("iterator")},5901:function(t,e,n){"use strict";var r=n(1695),o=n(2086),i=n(563),a=n(3296),u=n(5283),s=n(3193),c=n(3677),f=n(3167),l=n(6526),p=n(8759),h=n(2071),d=n(6112),g=n(3060),y=n(4088),v=n(2258),m=n(4059),b=n(5736),w=n(4710),E=n(8779),x=n(62),S=n(3226),O=n(6952),_=n(4399),j=n(7826),T=n(7446),A=n(2585),M=n(1007),P=n(9197),B=n(8944),I=n(7153),R=n(5422),L=n(211),k=n(9251),C=n(4145),N=n(914),D=n(3278),U=n(8062).forEach,F=B("hidden"),q="Symbol",$="prototype",B=L("toPrimitive"),H=D.set,V=D.getterFor(q),G=Object[$],z=o.Symbol,W=i("JSON","stringify"),K=_.f,J=j.f,Z=S.f,X=T.f,Y=P("symbols"),Q=P("op-symbol
6511s"),tt=P("string-to-symbol-registry"),et=P("symbol-to-string-registry"),D=P("wks"),i=o.QObject,nt=!i||!i[$]||!i[$].findChild,rt=u&&c(function(){return 7!=w(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=K(G,e);r&&delete G[e],J(t,e,n),r&&t!==G&&J(G,e,r)}:J,ot=function(t,e){var n=Y[t]=w(z[$]);return H(n,{type:q,tag:t,description:e}),u||(n.description=e),n},it=function(t,e,n){t===G&&it(Q,e,n),d(t);e=v(e);return d(n),f(Y,e)?(n.enumerable?(f(t,F)&&t[F][e]&&(t[F][e]=!1),n=w(n,{enumerable:b(0,!1)})):(f(t,F)||J(t,F,b(1,{})),t[F][e]=!0),rt(t,e,n)):J(t,e,n)},at=function(e,t){d(e);var n=y(t),t=E(n).concat(st(n));return U(t,function(t){u&&!ut.call(n,t)||it(e,t,n[t])}),e},P=function(t,e){return void 0===e?w(t):at(w(t),e)},ut=function(t){var e=v(t),t=X.call(this,e);return!(this===G&&f(Y,e)&&!f(Q,e))&&(!(t||!f(this,e)||!f(Y,e)||f(this,F)&&this[F][e])||t)},o=function(t,e){var n=y(t),t=v(e);if(n!==G||!f(Y,t)||f(Q,t)){e=K(n,t);return!e||!f(Y,t)||f(n,F)&&n[F][t]||(e.enumerable=!0),e}},i=function(t){var t=Z(y(t)),e=[];return U(t,function(t){f(Y,t)||f(I,t)||e.push(t)}),e},st=function(t){var e=t===G,t=Z(e?Q:y(t)),n=[];return U(t,function(t){!f(Y,t)||e&&!f(G,t)||n.push(Y[t])}),n};s||(M((z=function(){if(this instanceof z)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,e=R(t),n=function(t){this===G&&n.call(Q,t),f(this,F)&&f(this[F],e)&&(this[F][e]=!1),rt(this,e,b(1,t))};return u&&nt&&rt(G,e,{configurable:!0,set:n}),ot(e,t)})[$],"toString",function(){return V(this).tag}),M(z,"withoutSetter",function(t){return ot(R(t),t)}),T.f=ut,j.f=it,_.f=o,x.f=S.f=i,O.f=st,k.f=function(t){return ot(L(t),t)},u&&(J(z[$],"description",{configurable:!0,get:function(){return V(this).description}}),a||M(G,"propertyIsEnumerable",ut,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:z}),U(E(D),function(t){C(t)}),r({target:q,stat:!0,forced:!s},{for:function(t){var e=m(t);if(f(tt,e))return tt[e];t=z(e);return tt[e]=t,et[t]=e,t},keyFor:function(t){if(!h(t))throw TypeError(t+" is not a symbol");if(f(et,t))return et[t]},useSetter:function(){nt=!0},useSimple:function(){nt=!1}}),r({target:"Object",stat:!0,forced:!s,sham:!u},{create:P,defineProperty:it,defineProperties:at,getOwnPropertyDescriptor:o}),r({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:i,getOwnPropertySymbols:st}),r({target:"Object",stat:!0,forced:c(function(){O.f(1)})},{getOwnPropertySymbols:function(t){return O.f(g(t))}}),W&&r({target:"JSON",stat:!0,forced:!s||c(function(){var t=z();return"[null]"!=W([t])||"{}"!=W({a:t})||"{}"!=W(Object(t))})},{stringify:function(t,e,n){for(var r,o=[t],i=1;i<arguments.length;)o.push(arguments[i++]);if((p(r=e)||void 0!==t)&&!h(t))return l(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!h(e))return e}),o[1]=e,W.apply(null,o)}}),z[$][B]||A(z[$],B,z[$].valueOf),N(z,q),I[F]=!0},4078:function(t,e,n){var r,o=n(2086),i=n(933),a=n(5769),u=n(2585),n=n(211),s=n("iterator"),c=n("toStringTag"),f=a.values;for(r in i){var l=o[r],p=l&&l.prototype;if(p){if(p[s]!==f)try{u(p,s,f)}catch(t){p[s]=f}if(p[c]||u(p,c,r),i[r])for(var h in a)if(p[h]!==a[h])try{u(p,h,a[h])}catch(t){p[h]=a[h]}}}},8898:function(t,e){
6512	/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
6513	e.read=function(t,e,n,r,o){var i,a,u=8*o-r-1,s=(1<<u)-1,c=s>>1,f=-7,l=n?o-1:0,p=n?-1:1,n=t[e+l];for(l+=p,i=n&(1<<-f)-1,n>>=-f,f+=u;0<f;i=256*i+t[e+l],l+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;0<f;a=256*a+t[e+l],l+=p,f-=8);if(0===i)i=1-c;else{if(i===s)return a?NaN:1/0*(n?-1:1);a+=Math.pow(2,r),i-=c}return(n?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,u,s=8*i-o-1,c=(1<<s)-1,f=c>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,i=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(r=Math.pow(2,-a))<1&&(a--,r*=2),2<=(e+=1<=a+f?l/r:l*Math.pow(2,1-f))*r&&(a++,r/=2),c<=a+f?(u=0,a=c):1<=a+f?(u=(e*r-1)*Math.pow(2,o),a+=f):(u=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));8<=o;t[n+p]=255&u,p+=h,u/=256,o-=8);for(a=a<<o|u,s+=o;0<s;t[n+p]=255&a,p+=h,a/=256,s-=8);t[n+p-h]|=128*i}},6248:function(e){e=function(a){"use strict";var s,t=Object.prototype,c=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function i(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function(t,e,n){return t[e]=n}}function u(t,e,n,r){e=e&&e.prototype instanceof y?e:y,e=Object.create(e.prototype),r=new T(r||[]);return e._invoke=S(t,n,r),e}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var l="suspendedStart",p="suspendedYield",h="executing",d="completed",g={};function y(){}function v(){}function m(){}var b={};i(b,r,function(){return this});e=Object.getPrototypeOf,e=e&&e(e(A([])));e&&e!==t&&c.call(e,r)&&(b=e);var w=m.prototype=y.prototype=Object.create(b);function E(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function x(i,a){function u(t,e,n,r){t=f(i[t],i,e);if("throw"!==t.type){var o=t.arg,e=o.value;return e&&"object"==typeof e&&c.call(e,"__await")?a.resolve(e.__await).then(function(t){u("next",t,n,r)},function(t){u("throw",t,n,r)}):a.resolve(e).then(function(t){o.value=t,n(o)},function(t){return u("throw",t,n,r)})}r(t.arg)}var e;function t(n,r){function t(){return new a(function(t,e){u(n,r,t,e)})}return e=e?e.then(t,t):t()}this._invoke=t}function S(o,i,a){var u=l;return function(t,e){if(u===h)throw new Error("Generator is already running");if(u===d){if("throw"===t)throw e;return M()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){var r=O(n,a);if(r){if(r===g)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(u===l)throw u=d,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);u=h;r=f(o,i,a);if("normal"===r.type){if(u=a.done?d:p,r.arg!==g)return{value:r.arg,done:a.done}}else"throw"===r.type&&(u=d,a.method="throw",a.arg=r.arg)}}}function O(t,e){var n=t.iterator[e.method];if(n===s){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&
vendor: 4,954 bytes, line 6513
6513(e.method="return",e.arg=s,O(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}n=f(n,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,g;n=n.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=s),e.delegate=null,g):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function A(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,t=function t(){for(;++n<e.length;)if(c.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=s,t.done=!0,t};return t.next=t}}return{next:M}}function M(){return{value:s,done:!0}}return v.prototype=m,i(w,"constructor",m),i(m,"constructor",v),v.displayName=i(m,o,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,i(t,o,"GeneratorFunction")),t.prototype=Object.create(w),t},a.awrap=function(t){return{__await:t}},E(x.prototype),i(x.prototype,n,function(){return this}),a.AsyncIterator=x,a.async=function(t,e,n,r,o){void 0===o&&(o=Promise);var i=new x(u(t,e,n,r),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},E(w),i(w,o,"Generator"),i(w,r,function(){return this}),i(w,"toString",function(){return"[object Generator]"}),a.keys=function(n){var t,r=[];for(t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&c.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=s)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return i.type="throw",i.arg=n,r.next=t,e&&(r.method="next",r.arg=s),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=c.call(o,"catchLoc"),u=c.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&c.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r,o=n.completion;return"throw"===o.type&&(r=o.arg,j(n)),r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:A(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=s),g}},a}(e.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},9312:function(t,e,n){"use strict";n.r(e),n.d(e,{__extends:function(){return o},__assign:function(){return i},__rest:function(){return a},__decorate:function(){return u},__param:function(){return s},__metadata:function(){return c},__awaiter:function(){return f},__generator:function(){return l},__createBinding:function(){return p},__exportStar:function(){return h},__values:function(){return d},__read:function(){return g},__spread:function(){return y},__spreadArrays:function(){return v},__await:function(){return m},__asyncGenerator:function(){return b},__asyncDelegator:function(){return w},__asyncValues:function(){return E}
6513,__makeTemplateObject:function(){return x},__importStar:function(){return S},__importDefault:function(){return O},__classPrivateFieldGet:function(){return _},__classPrivateFieldSet:function(){return j}});
6514	/*! *****************************************************************************
6515	Copyright (c) Microsoft Corporation.
6516
6517	Permission to use, copy, modify, and/or distribute this software for any
6518	purpose with or without fee is hereby granted.
6519
6520	THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
6521	REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
6522	AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
6523	INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
6524	LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
6525	OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
6526	PERFORMANCE OF THIS SOFTWARE.
6527	***************************************************************************** */
6528	var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}function u(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;0<=u;u--)(o=t[u])&&(a=(i<3?o(a):3<i?o(e,n,a):o(e,n))||a);return 3<i&&a&&Object.defineProperty(e,n,a),a}function s(n,r){return function(t,e){r(t,e,n)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function f(t,a,n,u){function s(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n=n||Promise)(function(e,n){function r(t){try{i(u.next(t))}catch(t){n(t)}}function o(t){try{i(u.throw(t))}catch(t){n(t)}}function i(t){t.done?e(t.value):s(t.value).then(r,o)}i((u=u.apply(t,a||[])).next())})}function l(t,n){var r,o,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:u(0),throw:u(1),return:u(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function u(e){return function(t){return s([e,t])}}function s(e){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&e[0]?o.return:e[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,e[1])).done)return i;switch(o=0,(e=i?[2&e[0],i.value]:e)[0]){case 0:case 1:i=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,o=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(i=0<(i=a.trys).length&&i[i.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]<i[3])){a.label=e[1];break}if(6===e[0]&&a.label<i[1]){a.label=i[1],i=e;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(e);break}i[2]&&a.ops.pop(),a.trys.pop();continue}e=n.call(t,a)}catch(t){e=[6,t],o=0}finally{r=i=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}function p(t,e,n,r){t[r=void 0===r?n:r]=e[n]}function h(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])}function d(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(g(arguments[e]));return t}function v(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),o=0,e=0;e<n;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function b(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=n.apply(t,e||[]),i=[],a={};return r("next"),r("throw"),r("return"),a[Symbol.asyncIterator]=function(){return this},a;function r(r){o[r]&&(a[r]=function(n){return new Promise(function(t,e){1<i.push([r,n,t,e])||u(r,n)})})}function u(t,e){try{s(o[t](e))}catch(t){l(i[0][3],t)}}function s(t){t.value instanceof m?Promise.resolve(t.value.v).then(c,f):l(i[0][2],t)}function c(t){u("next",t)}function f(t){u("throw",t)}function l(t,e){t(e),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(r){var o,t={};return e("next"),e("throw",function(t){throw t}),e("return"),t[Symbol.iterator]=function(){return this},t;function e(e,n){t[e]=r[e]?function(t){return(o=!o)?{value:m(r[e](t)),done:"return"===e}:n?n(t):t}:n}}function E(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,e=o[Symbol.asyncIterator];return e?e.call(o):(o="function"==typeof d?d(o):o[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=o[r]&&function(n){return new Promise(function(t,e){i(t,e,(n=o[r](n)).done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function x(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function S(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function O(t){return t&&t.__esModule?t:{default:t}}function _(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function j(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},1719:function(t,e,n){var r=n(2998),o=n(6541),n=o;n.v1=r,n.v4=o,t.exports=n},3973:function(t){for(var r=[],e=0;e<256;++e)r[e]=(e+256).toString(16).substr(1);function n(t,e){var n=e||0,e=r;return[e[t[n++]],e[t[n++]],e[t[n++]],e[t[n++]],"-",e[t[n++]],e[t[n++]],"-",e[t[n++]],e[t[n++]],"-",e[t[n++]],e[t[n++]],"-",e[t[n++]],e[t[n++]],e[t[n++]],e[t[n++]],e[t[n++]],e[t[n++]]].join("")}t.exports=n},6963:function(t){var e,n,r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);r?(e=new Uint8Array(16),t.exports=function(){return r(e),e}):(n=new Array(16),t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n})},2998:function(t,e,n){var f,l,p=n(6963),h=n(3973),d=0,g=0;function r(t,e,n){var r=e&&n||0,o=e||[],i=(t=t||{}).node||f,a=void 0!==t.clockseq?t.clockseq:l;null!=i&&null!=a||(s=p(),null==i&&(i=f=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=l=16383&(s[6]<<8|s[7])));var u=void 0!==t.msecs?t.msecs:(new Date).getTime(),n=void 0!==t.nsecs?t.nsecs:g+1,s=u-d+(n-g)/1e4;if(s<0&&void 0===t.clockseq&&(a=a+1&16383),1e4<=(n=(s<0||d<u)&&void 0===t.nsecs?0:n))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=u,l=a;n=(1e4*(268435455&(u+=122192928e5))+(g=n))%4294967296;o[r++]=n>>>24&255,o[r++]=n>>>16&255,o[r++]=n>>>8&255,o[r++]=255&n;u=u/4294967296*1e4&268435455;o[r++]=u>>>8&255,o[r++]=255&u,o[r++]=u>>>
652824&15|16,o[r++]=u>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var c=0;c<6;++c)o[r+c]=i[c];return e||h(o)}t.exports=r},6541:function(t,e,n){var a=n(6963),u=n(3973);function r(t,e,n){var r=e&&n||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[r+i]=o[i];return e||u(o)}t.exports=r}},r={};function d(t){var e=r[t];if(void 0!==e)return e.exports;e=r[t]={id:t,exports:{}};return n[t].call(e.exports,e,e.exports,d),e.exports}d.m=n,d.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return d.d(e,{a:e}),e},d.d=function(t,e){for(var n in e)d.o(e,n)&&!d.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},d.f={},d.e=function(n){return Promise.all(Object.keys(d.f).reduce(function(t,e){return d.f[e](n,t),t},[]))},d.u=function(t){return 815===t?"latest/d1c865a599556734bf47.dcc-815.en.js":456===t?"latest/9c7e04e3a5c7fc48dabc.dcc-456.en.js":3===t?"latest/d14a84ab7924ef68f71a.dcc-3.en.js":89===t?"latest/0b61ccef7685c01b95f9.dcc-89.en.js":604===t?"latest/a6b6bd0777ca9645da41.dcc-604.en.js":void 0},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),d.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},f={},l="shopifyDcc:",d.l=function(r,t,e,n){if(f[r])f[r].push(t);else{var o,i;if(void 0!==e)for(var a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var s=a[u];if(s.getAttribute("src")==r||s.getAttribute("data-webpack")==l+e){o=s;break}}o||(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,d.nc&&o.setAttribute("nonce",d.nc),o.setAttribute("data-webpack",l+e),o.src=r),f[r]=[t];var t=function(t,e){o.onerror=o.onload=null,clearTimeout(c);var n=f[r];if(delete f[r],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(function(t){return t(e)}),t)return t(e)},c=setTimeout(t.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=t.bind(null,o.onerror),o.onload=t.bind(null,o.onload),i&&document.head.appendChild(o)}},d.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},d.p="//cdn.shopify.com/shopifycloud/payment-sheet/assets/",function(){var s={179:0};d.f.j=function(n,t){var r,e,o=d.o(s,n)?s[n]:void 0;0!==o&&(o?t.push(o[2]):(e=new Promise(function(t,e){o=s[n]=[t,e]}),t.push(o[2]=e),t=d.p+d.u(n),r=new Error,e=function(t){var e;d.o(s,n)&&(0!==(o=s[n])&&(s[n]=void 0),o&&(e=t&&("load"===t.type?"missing":t.type),t=t&&t.target&&t.target.src,r.message="Loading chunk "+n+" failed.\n("+e+": "+t+")",r.name="ChunkLoadError",r.type=e,r.request=t,o[1](r)))},d.l(t,e,"chunk-"+n,n)))};var t=function(t,e){var n,r,o=e[0],i=e[1],a=e[2],u=0;for(n in i)d.o(i,n)&&(d.m[n]=i[n]);for(a&&a(d),t&&t(e);u<o.length;u++)r=o[u],d.o(s,r)&&s[r]&&s[r][0](),s[o[u]]=0},e=self.shopifyDccJsonp=self.shopifyDccJsonp||[];e.forEach(t.bind(null,0)),e.push=t.bind(null,e.push.bind(e))}();var u={};!function(){"use strict";d.r(u),d.d(u,{render:function(){return a}});var s=d(4897),t=d(1476),e=d(7135),c=d.n(e),n=(d(5769),d(3238),d(1418),d(7460),d(4078),d(5623),d(1514),d(3352),d(816)),r=(d(3938),d(9976)),e=d.n(r);function o(t){"loading"!==document.readyState?t():document.addEventListener?document.addEventListener("DOMContentLoaded",t):document.attachEvent("onreadystatechange",function(){"loading"!==document.readyState&&t()}),document.addEventListener&&(document.addEventListener("shopify:block:select",t),document.addEventListener("shopify:section:select",t))}window.Shopify&&(window.Shopify.cdnHost||window.Shopify.paymentSheetCdnHost)&&(r=window.Shopify.paymentSheetCdnHost||window.Shopify.cdnHost,d.p="//".concat(r).concat(e().defaultCdnPath,"/"));var f=d(5682),l=d(1399),p=d(3487),h=d(6368);window.Buffer=window.Buffer||n.lW;var i="dynamic-checkout-cart",a=function(){var e=(0,t.Z)(c().mark(function t(e){var n,r,o,i,a,u;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([Promise.all([d.e(815),d.e(456)]).then(d.bind(d,1456)),Promise.all([d.e(815),d.e(3),d.e(89)]).then(d.bind(d,3089))]);case 2:return r=t.sent,n=(0,s.Z)(r,2),r=n[0],o=n[1],t.next=8,r.init({storefrontWallet:!0});case 8:return i=t.sent,u=window.Shopify.CartType,a=u===h.G.CartAjax||u===h.G.CartPage?u:h.G.Unknown,(0,f.je)("buttonDisplay"),(0,l.n)("init.called",{pageType:h.G[a]}),(0,p.j)("spb_init_called",{}),t.next=16,d.e(604).then(d.bind(d,7604));case 16:u=t.sent,(0,u.track)({event:"spb_init_called",pageType:a}),o.render(e,i,a),(u=document.getElementById("shopify-dynamic-checkout-cart"))&&u.remove(),new PerformanceObserver(function(t){!t.getEntriesByType("resource").some(function(t){return t.name.includes("/cart/change")||t.name.includes("/cart/update")||t.name.includes("/cart/add")||t.name.includes("/cart/clear")}
6528)||(t=document.getElementById("dynamic-checkout-cart"))&&o.render(t,i,a)}).observe({entryTypes:["resource"]});case 23:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}();o(function(){var t=document.getElementById(i);t&&a(t)})}(),(Shopify=void 0===Shopify?{}:Shopify).main=u}();
6529}
6530</script>
6530
6531
6532   
6533    
6534        <!--Gorgias Chat Widget Start--> 
6534<script id="gorgias-chat-widget-install-v3"     src="https://config.gorgias.chat/bundle-loader/01GYCCVFY0HDHFHATCWQ5DJD0V"> </script>
6534 <!--Gorgias Chat Widget End-->   
6535    
6536   
6537  
6538   
6539  
6540  
6541  
6541<script id="engagex-general">
6542    (function () {
6543      function getDPI() {
6544        var d = document.createElement('div');
6545        d.style.width = '1in';
6546        d.style.height = '1in';
6547        d.style.position = 'absolute';
6548        d.style.top = '-100%';
6549        document.body.appendChild(d);
6550        var dpi = d.offsetWidth;
6551        document.body.removeChild(d);
6552        return dpi;
6553      }
6554      var q = [
6555        'referer='  + encodeURIComponent(document.referrer || ''),
6556        'location=' + encodeURIComponent(window.location.href),
6557        'sw='       + screen.width,
6558        'sh='       + screen.height,
6559        'dpi='      + getDPI()
6560      ].join('&');
6561
6562      var s   = document.createElement('script');
6563      s.async = true;
6564      s.src   = 'https://dv.engage-x.io/dv/v/691217e6049daa60090f8f07/js?' + q;
6565      document.body.appendChild(s);
6566    })();
6567</script>
6567
6568 
6569  
6569<script src="https://cdn.shopify.com/storefront/standard-actions.js" type="module" data-source-attribution="shopify.standard_actions"></script>
6569
6570</body>
6571</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.