PageSourceSearch

https://ptms.org.pl/assets/js/carousel.min.js

js ptms.org.pl collected 2026-10-06 13:19:20 UTC 2,445 bytes, 1 lines download raw bytes

1"use strict";!function(t){t.fn.carousel=function(e){const n={auto:!1,controls:!1,index:0,items:[],animation:"fade",...e,root:t(this),animations:{}};let a=[];const c=e=>{const n=e.template(),a=t=>{switch(t){case"contextmenu":case"previous":return u;case"click":case"next":return l;case"play":return d;case"pause":return p;default:return()=>r(e)}};return n.find("#c-next, #c-previous, #c-action").on("click",n=>{n.stopPropagation();const c=t(n.currentTarget);return a(c.data("op"))(r(e))}),n.on("click contextmenu",t=>(t.preventDefault(),a(t.type)(p(r(e))))),e},i=e=>{const n=e.template(),a=n.find("#c-item"),c=n.find("#c-img");return t.when(e.animations.out(c)).done(function(){c.detach().attr("src",e.items[e.index].src).css({display:"none"}).one("load",()=>{a.append(c),e.animations.in(c)})}),e},s=(t,e,n,a,c)=>(t.template().find(e).removeClass(a).addClass(n).data("op",c),t),r=t=>a[0]||t,o=t=>(a=[t,...a].slice(0,10),t),l=t=>{const e=(t.items||[]).length,n=(t.index+1)%e;return o(i({...t,index:n}))},u=t=>{const e=(t.items||[]).length,n=e-(e-t.index)%e-1;return o(i({...t,index:n}))},d=t=>{const e=t=>o({...t,interval:setInterval(()=>{l(r(t))},3e3)});return t.controls?e(s(t,"#c-action","fa-pause-circle","fa-play-circle","pause")):e(t)},p=t=>{const e=t=>{const{interval:e,...n}=t;return clearTimeout(e),o(n)};return t.controls?e(s(t,"#c-action","fa-play-circle","fa-pause-circle","play")):e(t)},f=t=>{const e=a[0]||o(t);return{...e,previous:()=>f(u(e)),next:()=>f(l(e)),play:()=>f(d(e)),pause:()=>f(p(e))}};let m=(e=>{const n=t("<div>",{class:"c-container"}),a=t("<div/>",{id:"c-item",class:"c-item"}),i=t("<i/>",{id:"c-next",class:"c-arrow c-next fas fa-angle-right fa-3x","data-op":"next"}),s=t("<i/>",{id:"c-previous",class:"c-arrow c-previous fas fa-angle-left fa-3x","data-op":"previous"});if((e.items||[]).length>0){const n=e.items[e.index];n&&a.append((e=>t("<img/>",{id:"c-img",class:"c-img",src:e}))(n.src))}if(e.controls){const e=t("<div/>",{id:"c-controls",class:"c-controls"}),n=t("<i/>",{id:"c-action",class:"fas fa-play-circle fa-2x","data-op":"play"});e.append(n),a.append(e)}n.append(a,i,s);const r={...e,template:()=>t(".c-container",e.root)};return r.root.html(n),c(r)})((t=>{const e=(t=>{switch(t){case"slide":return{in:"slideDown",out:"slideUp"};case"fade":default:return{in:"fadeIn",out:"fadeOut"}}})(t.animation);return{...t,animations:{in:t=>t[e.in](),out:t=>t[e.out]()}}})(n));return n.auto&&(m=d(m)),f(m)}}(jQuery);

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.