PageSourceSearch

https://gingerbreadusa.com/cdn/shop/t/21/assets/photoswipe-ui-default.min.js?v=38398438522819608121732193165

js gingerbreadusa.com collected 2026-09-26 15:30:33 UTC 16,337 bytes, 479 lines download raw bytes

1/* components v2.10.69 | Copyright © 2024 Archetype Themes Limited Partnership  | "Shopify Theme Store (https://www.shopify.com/legal/terms#9-additional-services)" License */
2/*! PhotoSwipe Default UI - 4.1.2 - 2017-04-05
3 * http://photoswipe.com
4 * Copyright (c) 2017 Dmitry Semenov; */
5!(function (a, b) {
6  a.PhotoSwipeUI_Default = b()
7})(window, function () {
8  'use strict'
9  var a = function (a, b) {
10    var c,
11      d,
12      e,
13      f,
14      g,
15      h,
16      i,
17      j,
18      k,
19      l,
20      m,
21      n,
22      o,
23      p,
24      q,
25      r,
26      s,
27      t,
28      u,
29      v = this,
30      w = !1,
31      x = !0,
32      y = !0,
33      z = {
34        barsSize: { top: 44, bottom: 'auto' },
35        closeElClasses: ['item', 'caption', 'zoom-wrap', 'ui', 'top-bar'],
36        timeToIdle: 4e3,
37        timeToIdleOutside: 1e3,
38        loadingIndicatorDelay: 1e3,
39        addCaptionHTMLFn: function (a, b) {
40          return a.title ? ((b.children[0].innerHTML = a.title), !0) : ((b.children[0].innerHTML = ''), !1)
41        },
42        closeEl: !0,
43        captionEl: !0,
44        fullscreenEl: !0,
45        zoomEl: !0,
46        shareEl: !0,
47        counterEl: !0,
48        arrowEl: !0,
49        preloaderEl: !0,
50        tapToClose: !1,
51        tapToToggleControls: !0,
52        clickToCloseNonZoomable: !0,
53        shareButtons: [
54          { id: 'facebook', label: 'Share on Facebook', url: 'https://www.facebook.com/sharer/sharer.php?u={{url}}' },
55          { id: 'twitter', label: 'Tweet', url: 'https://twitter.com/intent/tweet?text={{text}}&url={{url}}' },
56          {
57            id: 'pinterest',
58            label: 'Pin it',
59            url: 'http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}'
60          },
61          { id: 'download', label: 'Download image', url: '{{raw_image_url}}', download: !0 }
62        ],
63        getImageURLForShare: function () {
64          return a.currItem.src || ''
65        },
66        getPageURLForShare: function () {
67          return window.location.href
68        },
69        getTextForShare: function () {
70          return a.currItem.title || ''
71        },
72        indexIndicatorSep: ' / ',
73        fitControlsWidth: 1200
74      },
75      A = function (a) {
76        if (r) return !0
77        ;(a = a || window.event), q.timeToIdle && q.mouseUsed && !k && K()
78        for (var c, d, e = a.target || a.srcElement, f = e.getAttribute('class') || '', g = 0; g < S.length; g++)
79          (c = S[g]), c.onTap && f.indexOf('pswp__' + c.name) > -1 && (c.onTap(), (d = !0))
80        if (d) {
81          a.stopPropagation && a.stopPropagation(), (r = !0)
82          var h = b.features.isOldAndroid ? 600 : 30
83          s = setTimeout(function () {
84            r = !1
85          }, h)
86        }
87      },
88      B = function () {
89        return !a.likelyTouchDevice || q.mouseUsed || screen.width > q.fitControlsWidth
90      },
91      C = function (a, c, d) {
92        b[(d ? 'add' : 'remove') + 'Class'](a, 'pswp__' + c)
93      },
94      D = function () {
95        var a = 1 === q.getNumItemsFn()
96        a !== p && (C(d, 'ui--one-slide', a), (p = a))
97      },
98      E = function () {
99        C(i, 'share-modal--hidden', y)
100      },
101      F = function () {
102        return (
103          (y = !y),
104          y
105            ? (b.removeClass(i, 'pswp__share-modal--fade-in'),
106              setTimeout(function () {
107                y && E()
108              }, 300))
109            : (E(),
110              setTimeout(function () {
111                y || b.addClass(i, 'pswp__share-modal--fade-in')
112              }, 30)),
113          y || H(),
114          !1
115        )
116      },
117      G = function (b) {
118        b = b || window.event
119        var c = b.target || b.srcElement
120        return (
121          a.shout('shareLinkClick', b, c),
122          !!c.href &&
123            (!!c.hasAttribute('download') ||
124              (window.open(
125                c.href,
126                'pswp_share',
127                'scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left=' +
128                  (window.screen ? Math.round(screen.width / 2 - 275) : 100)
129              ),
130              y || F(),
131              !1))
132        )
133      },
134      H = function () {
135        for (var a, b, c, d, e, f = '', g = 0; g < q.shareButtons.length; g++)
136          (a = q.shareButtons[g]),
137            (c = q.getImageURLForShare(a)),
138            (d = q.getPageURLForShare(a)),
139            (e = q.getTextForShare(a)),
140            (b = a.url
141              .replace('{{url}}', encodeURIComponent(d))
142              .replace('{{image_url}}', encodeURIComponent(c))
143              .replace('{{raw_image_url}}', c)
144              .replace('{{text}}', encodeURIComponent(e))),
145            (f +=
146              '<a href="' +
147              b +
148              '" target="_blank" class="pswp__share--' +
149              a.id +
150              '"' +
151              (a.download ? 'download' : '') +
152              '>' +
153              a.label +
154              '</a>'),
155            q.parseShareButtonOut && (f = q.parseShareButtonOut(a, f))
156        ;(i.children[0].innerHTML = f), (i.children[0].onclick = G)
157      },
158      I = function (a) {
159        for (var c = 0; c < q.closeElClasses.length; c++) if (b.hasClass(a, 'pswp__' + q.closeElClasses[c])) return !0
160      },
161      J = 0,
162      K = function () {
163        clearTimeout(u), (J = 0), k && v.setIdle(!1)
164      },
165      L = function (a) {
166        a = a ? a : window.event
167        var b = a.relatedTarget || a.toElement
168        ;(b && 'HTML' !== b.nodeName) ||
169          (clearTimeout(u),
170          (u = setTimeout(function () {
171            v.setIdle(!0)
172          }, q.timeToIdleOutside)))
173      },
174      M = function () {
175        q.fullscreenEl &&
176          !b.features.isOldAndroid &&
177          (c || (c = v.getFullscreenAPI()),
178          c
179            ? (b.bind(document, c.eventK, v.updateFullscreen),
180              v.updateFullscreen(),
181              b.addClass(a.template, 'pswp--supports-fs'))
182            : b.removeClass(a.template, 'pswp--supports-fs'))
183      },
184      N = function () {
185        q.preloaderEl &&
186          (O(!0),
187          l('beforeChange', function () {
188            clearTimeout(o),
189              (o = setTimeout(function () {
190                a.currItem && a.currItem.loading
191                  ? (!a.allowProgressiveImg() || (a.currItem.img && !a.currItem.img.naturalWidth)) && O(!1)
192                  : O(!0)
193              }, q.loadingIndicatorDelay))
194          }),
195          l('imageLoadComplete', function (b, c) {
196            a.currItem === c && O(!0)
197          }))
198      },
199      O = function (a) {
200        n !== a && (C(m, 'preloader--active', !a), (n = a))
201      },
202      P = function (a) {
203        var c = a.vGap
204        if (B()) {
205          var g = q.barsSize
206          if (q.captionEl && 'auto' === g.bottom)
207            if (
208              (f ||
209                ((f = b.createEl('pswp__caption pswp__caption--fake')),
210                f.appendChild(b.createEl('pswp__caption__center')),
211                d.insertBefore(f, e),
212                b.addClass(d, 'pswp__ui--fit')),
213              q.addCaptionHTMLFn(a, f, !0))
214            ) {
215              var h = f.clientHeight
216              c.bottom = parseInt(h, 10) || 44
217            } else c.bottom = g.top
218          else c.bottom = 'auto' === g.bottom ? 0 : g.bottom
219          c.top = g.top
220        } else c.top = c.bottom = 0
221      },
222      Q = function () {
223        q.timeToIdle &&
224          l('mouseUsed', function () {
225            b.bind(document, 'mousemove', K),
226              b.bind(document, 'mouseout', L),
227              (t = setInterval(function () {
228                J++, 2 === J && v.setIdle(!0)
229              }, q.timeToIdle / 2))
230          })
231      },
232      R = function () {
233        l('onVerticalDrag', function (a) {
234          x && a < 0.95 ? v.hideControls() : !x && a >= 0.95 && v.showControls()
235        })
236        var a
237        l('onPinchClose', function (b) {
238          x && b < 0.9 ? (v.hideControls(), (a = !0)) : a && !x && b > 0.9 && v.showControls()
239        }),
240          l('zoomGestureEnded', function () {
241            ;(a = !1), a && !x && v.showControls()
242          })
243      },
244      S = [
245        {
246          name: 'caption',
247          option: 'captionEl',
248          onInit: function (a) {
249            e = a
250          }
251        },
252        {
253          name: 'share-modal',
254          option: 'shareEl',
255          onInit: function (a) {
256            i = a
257          },
258          onTap: function () {
259            F()
260          }
261        },
262        {
263          name: 'button--share',
264          option: 'shareEl',
265          onInit: function (a) {
266            h = a
267          },
268          onTap: function () {
269            F()
270          }
271        },
272        { name: 'button--zoom', option: 'zoomEl', onTap: a.toggleDesktopZoom },
273        {
274          name: 'counter',
275          option: 'counterEl',
276          onInit: function (a) {
277            g = a
278          }
279        },
280        { name: 'button--close', option: 'closeEl', onTap: a.close },
281        { name: 'button--arrow--left', option: 'arrowEl', onTap: a.prev },
282        { name: 'button--arrow--right', option: 'arrowEl', onTap: a.next },
283        {
284          name: 'button--fs',
285          option: 'fullscreenEl',
286          onTap: function () {
287            c.isFullscreen() ? c.exit() : c.enter()
288          }
289        },
290        {
291          name: 'preloader',
292          option: 'preloaderEl',
293          onInit: function (a) {
294            m = a
295          }
296        }
297      ],
298      T = function () {
299        var a,
300          c,
301          e,
302          f = function (d) {
303            if (d)
304              for (var f = d.length, g = 0; g < f; g++) {
305                ;(a = d[g]), (c = a.className)
306                for (var h = 0; h < S.length; h++)
307                  (e = S[h]),
308                    c.indexOf('pswp__' + e.name) > -1 &&
309                      (q[e.option]
310                        ? (b.removeClass(a, 'pswp__element--disabled'), e.onInit && e.onInit(a))
311                        : b.addClass(a, 'pswp__element--disabled'))
312              }
313          }
314        f(d.children)
315        var g = b.getChildByClass(d, 'pswp__top-bar')
316        g && f(g.children)
317      }
318    ;(v.init = function () {
319      b.extend(a.options, z, !0),
320        (q = a.options),
321        (d = b.getChildByClass(a.scrollWrap, 'pswp__ui')),
322        (l = a.listen),
323        R(),
324        l('beforeChange', v.update),
325        l('doubleTap', function (b) {
326          var c = a.currItem.initialZoomLevel
327          a.getZoomLevel() !== c ? a.zoomTo(c, b, 333) : a.zoomTo(q.getDoubleTapZoom(!1, a.currItem), b, 333)
328        }),
329        l('preventDragEvent', function (a, b, c) {
330          var d = a.target || a.srcElement
331          d &&
332            d.getAttribute('class') &&
333            a.type.indexOf('mouse') > -1 &&
334            (d.getAttribute('class').indexOf('__caption') > 0 || /(SMALL|STRONG|EM)/i.test(d.tagName)) &&
335            (c.prevent = !1)
336        }),
337        l('bindEvents', function () {
338          b.bind(d, 'pswpTap click', A),
339            b.bind(a.scrollWrap, 'pswpTap', v.onGlobalTap),
340            a.likelyTouchDevice || b.bind(a.scrollWrap, 'mouseover', v.onMouseOver)
341        }),
342        l('unbindEvents', function () {
343          y || F(),
344            t && clearInterval(t),
345            b.unbind(document, 'mouseout', L),
346            b.unbind(document, 'mousemove', K),
347            b.unbind(d, 'pswpTap click', A),
348            b.unbind(a.scrollWrap, 'pswpTap', v.onGlobalTap),
349            b.unbind(a.scrollWrap, 'mouseover', v.onMouseOver),
350            c &&
351              (b.unbind(document, c.eventK, v.updateFullscreen),
352              c.isFullscreen() && ((q.hideAnimationDuration = 0), c.exit(
352)),
353              (c = null))
354        }),
355        l('destroy', function () {
356          q.captionEl && (f && d.removeChild(f), b.removeClass(e, 'pswp__caption--empty')),
357            i && (i.children[0].onclick = null),
358            b.removeClass(d, 'pswp__ui--over-close'),
359            b.addClass(d, 'pswp__ui--hidden'),
360            v.setIdle(!1)
361        }),
362        q.showAnimationDuration || b.removeClass(d, 'pswp__ui--hidden'),
363        l('initialZoomIn', function () {
364          q.showAnimationDuration && b.removeClass(d, 'pswp__ui--hidden')
365        }),
366        l('initialZoomOut', function () {
367          b.addClass(d, 'pswp__ui--hidden')
368        }),
369        l('parseVerticalMargin', P),
370        T(),
371        q.shareEl && h && i && (y = !0),
372        D(),
373        Q(),
374        M(),
375        N()
376    }),
377      (v.setIdle = function (a) {
378        ;(k = a), C(d, 'ui--idle', a)
379      }),
380      (v.update = function () {
381        x && a.currItem
382          ? (v.updateIndexIndicator(),
383            q.captionEl && (q.addCaptionHTMLFn(a.currItem, e), C(e, 'caption--empty', !a.currItem.title)),
384            (w = !0))
385          : (w = !1),
386          y || F(),
387          D()
388      }),
389      (v.updateFullscreen = function (d) {
390        d &&
391          setTimeout(function () {
392            a.setScrollOffset(0, b.getScrollY())
393          }, 50),
394          b[(c.isFullscreen() ? 'add' : 'remove') + 'Class'](a.template, 'pswp--fs')
395      }),
396      (v.updateIndexIndicator = function () {
397        q.counterEl && (g.innerHTML = a.getCurrentIndex() + 1 + q.indexIndicatorSep + q.getNumItemsFn())
398      }),
399      (v.onGlobalTap = function (c) {
400        c = c || window.event
401        var d = c.target || c.srcElement
402        if (!r)
403          if (c.detail && 'mouse' === c.detail.pointerType) {
404            if (I(d)) return void a.close()
405            b.hasClass(d, 'pswp__img') &&
406              (1 === a.getZoomLevel() && a.getZoomLevel() <= a.currItem.fitRatio
407                ? q.clickToCloseNonZoomable && a.close()
408                : a.toggleDesktopZoom(c.detail.releasePoint))
409          } else if (
410            (q.tapToToggleControls && (x ? v.hideControls() : v.showControls()),
411            q.tapToClose && (b.hasClass(d, 'pswp__img') || I(d)))
412          )
413            return void a.close()
414      }),
415      (v.onMouseOver = function (a) {
416        a = a || window.event
417        var b = a.target || a.srcElement
418        C(d, 'ui--over-close', I(b))
419      }),
420      (v.hideControls = function () {
421        b.addClass(d, 'pswp__ui--hidden'), (x = !1)
422      }),
423      (v.showControls = function () {
424        ;(x = !0), w || v.update(), b.removeClass(d, 'pswp__ui--hidden')
425      }),
426      (v.supportsFullscreen = function () {
427        var a = document
428        return !!(a.exitFullscreen || a.mozCancelFullScreen || a.webkitExitFullscreen || a.msExitFullscreen)
429      }),
430      (v.getFullscreenAPI = function () {
431        var b,
432          c = document.documentElement,
433          d = 'fullscreenchange'
434        return (
435          c.requestFullscreen
436            ? (b = { enterK: 'requestFullscreen', exitK: 'exitFullscreen', elementK: 'fullscreenElement', eventK: d })
437            : c.mozRequestFullScreen
438              ? (b = {
439                  enterK: 'mozRequestFullScreen',
440                  exitK: 'mozCancelFullScreen',
441                  elementK: 'mozFullScreenElement',
442                  eventK: 'moz' + d
443                })
444              : c.webkitRequestFullscreen
445                ? (b = {
446                    enterK: 'webkitRequestFullscreen',
447                    exitK: 'webkitExitFullscreen',
448                    elementK: 'webkitFullscreenElement',
449                    eventK: 'webkit' + d
450                  })
451                : c.msRequestFullscreen &&
452                  (b = {
453                    enterK: 'msRequestFullscreen',
454                    exitK: 'msExitFullscreen',
455                    elementK: 'msFullscreenElement',
456                    eventK: 'MSFullscreenChange'
457                  }),
458          b &&
459            ((b.enter = function () {
460              return (
461                (j = q.closeOnScroll),
462                (q.closeOnScroll = !1),
463                'webkitRequestFullscreen' !== this.enterK
464                  ? a.template[this.enterK]()
465                  : void a.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)
466              )
467            }),
468            (b.exit = function () {
469              return (q.closeOnScroll = j), document[this.exitK]()
470            }),
471            (b.isFullscreen = function () {
472              return document[this.elementK]
473            })),
474          b
475        )
476      })
477  }
478  return a
479})

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.