PageSourceSearch

https://handelshusetaulum.dk/cdn/shop/t/53/assets/photoswipe-ui-default.min.js?v=91727178825103366471752147552

js handelshusetaulum.dk collected 2026-10-02 22:36:35 UTC 14,900 bytes, 379 lines download raw bytes

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

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.