Joywork/presentation-complexes/js/41.bb02890d.js

6 lines
60 KiB
JavaScript
Raw Permalink Normal View History

2026-05-22 20:21:54 +02:00
"use strict";(self["webpackChunkjw_land_main"]=self["webpackChunkjw_land_main"]||[]).push([[41],{3041:function(t,i,e){e.r(i),e.d(i,{default:function(){return Tt}});e(4114);
/*!
* PhotoSwipe 5.4.4 - https://photoswipe.com
* (c) 2024 Dmytro Semenov
*/function s(t,i,e){const s=document.createElement(i);return t&&(s.className=t),e&&e.appendChild(s),s}function n(t,i){return t.x=i.x,t.y=i.y,void 0!==i.id&&(t.id=i.id),t}function o(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function a(t,i){const e=Math.abs(t.x-i.x),s=Math.abs(t.y-i.y);return Math.sqrt(e*e+s*s)}function h(t,i){return t.x===i.x&&t.y===i.y}function r(t,i,e){return Math.min(Math.max(t,i),e)}function l(t,i,e){let s=`translate3d(${t}px,${i||0}px,0)`;return void 0!==e&&(s+=` scale3d(${e},${e},1)`),s}function p(t,i,e,s){t.style.transform=l(i,e,s)}const d="cubic-bezier(.4,0,.22,1)";function c(t,i,e,s){t.style.transition=i?`${i} ${e}ms ${s||d}`:"none"}function m(t,i,e){t.style.width="number"===typeof i?`${i}px`:i,t.style.height="number"===typeof e?`${e}px`:e}function u(t){c(t)}function v(t){return"decode"in t?t.decode().catch((()=>{})):t.complete?Promise.resolve(t):new Promise(((i,e)=>{t.onload=()=>i(t),t.onerror=e}))}const _={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function g(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function y(t,i,e=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"===typeof t?t:i;n&&(s=Array.from(e.querySelectorAll(n)))}return s}function f(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}let w=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{w=!0}}))}catch(Zt){}class x{constructor(){this._pool=[]}add(t,i,e,s){this._toggleListener(t,i,e,s)}remove(t,i,e,s){this._toggleListener(t,i,e,s,!0)}removeAll(){this._pool.forEach((t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)})),this._pool=[]}_toggleListener(t,i,e,s,n,o){if(!t)return;const a=n?"removeEventListener":"addEventListener",h=i.split(" ");h.forEach((i=>{if(i){o||(n?this._pool=this._pool.filter((s=>s.type!==i||s.listener!==e||s.target!==t)):this._pool.push({target:t,type:i,listener:e,passive:s}));const h=!!w&&{passive:s||!1};t[a](i,e,h)}}))}}function P(t,i){if(t.getViewportSizeFn){const e=t.getViewportSizeFn(t,i);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function S(t,i,e,s,n){let o=0;if(i.paddingFn)o=i.paddingFn(e,s,n)[t];else if(i.padding)o=i.padding[t];else{const e="padding"+t[0].toUpperCase()+t.slice(1);i[e]&&(o=i[e])}return Number(o)||0}function b(t,i,e,s){return{x:i.x-S("left",t,i,e,s)-S("right",t,i,e,s),y:i.y-S("top",t,i,e,s)-S("bottom",t,i,e,s)}}class L{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:i}=this.slide,e=this.slide["x"===t?"width":"height"]*this.currZoomLevel,s="x"===t?"left":"top",n=S(s,i.options,i.viewportSize,this.slide.data,this.slide.index),o=this.slide.panAreaSize[t];this.center[t]=Math.round((o-e)/2)+n,this.max[t]=e>o?Math.round(o-e)+n:this.center[t],this.min[t]=e>o?n:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,i){return r(i,this.max[t],this.min[t])}}const z=4e3;class C{constructor(t,i,e,s){this.pswp=s,this.options=t,this.itemData=i,this.index=e,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,i,e){const s={x:t,y:i};this.elementSize=s,this.panAreaSize=e;const n=e.x/s.x,o=e.y/s.y;this.fit=Math.min(1,n<o?n:o),this.fill=Math.min(1,n>o?n:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const i=t+"ZoomLevel",e=this.options[i];if(e)return"function"===typeof e?e(this):"fill"===e?th
//# sourceMappingURL=41.bb02890d.js.map