// ==UserScript== // @name PT种子列表瀑布流视图(Svelte重构) // @name:en PT_Masonry_View_Svelte // @namespace https://github.com/KesaubeEire/PT_Masonry_View_Svelte // @version 1.1.9 // @author Kesa // @description PT种子列表无限下拉瀑布流视图(Svelte重构) // @description:en PT Masonry View by Svelte. // @license MIT // @icon https://avatars.githubusercontent.com/u/23617963 // @match https://kamept.com/* // @match https://pterclub.com/* // @match https://kp.m-team.cc/* // @match https://xp.m-team.io/* // @match https://xp.m-team.cc/* // @match https://ap.m-team.cc/* // @match https://test2.m-team.cc/* // @exclude */offers.php* // @exclude */index.php* // @exclude */forums.php* // @exclude */viewrequests.php* // @exclude */seek.php* // @grant none // @downloadURL none // ==/UserScript== (t=>{const e=document.createElement("style");e.dataset.source="vite-plugin-monkey",e.textContent=t,document.head.append(e)})(' #_Reload.svelte-1me98ya{position:fixed;top:0;left:0}div.waterfall{width:100%;padding-top:20px;padding-bottom:60px;border-radius:20px;height:100%;margin:20px auto;transition:height .3s}div.waterfall_newMT{padding-top:0;padding-bottom:0;margin:10px auto}button.debug{position:fixed;top:10px;right:10px;padding:4px;background-color:#333;color:#fff;border:none;border-radius:5px;cursor:pointer}button#toggle_oldTable{top:10px}button#btnReLayout{top:40px}button#btnSwitchMode{top:70px}button#sort_masonry{top:100px}.pic_error{height:100px;display:flex;justify-content:center;align-items:center}.ant-menu-submenu{z-index:12000}.svelte-zt6zlx.svelte-zt6zlx,.svelte-zt6zlx.svelte-zt6zlx:after,.svelte-zt6zlx.svelte-zt6zlx:before{box-sizing:content-box}.switch.svelte-zt6zlx.svelte-zt6zlx{width:100%;height:30px;display:flex;align-items:center;justify-content:space-between}.s_title.svelte-zt6zlx.svelte-zt6zlx{display:flex;align-items:center;font-size:14px;position:relative}.title_green.svelte-zt6zlx.svelte-zt6zlx{color:green;font-weight:800}.title_red.svelte-zt6zlx.svelte-zt6zlx{color:red;font-weight:800}.s_title.svelte-zt6zlx:has(.hint):hover ._hint.svelte-zt6zlx{display:block}._hint.svelte-zt6zlx.svelte-zt6zlx{display:none;position:absolute;bottom:28px;left:0;width:max-content;height:auto;background-color:#fff;border:1px solid black;border-radius:8px;padding:4px 8px;box-sizing:content-box;z-index:1}input[type=checkbox].svelte-zt6zlx.svelte-zt6zlx{width:0px;height:0px;display:none;visibility:hidden}label.svelte-zt6zlx.svelte-zt6zlx{width:48px;height:12px;display:inline-block;position:relative;background-color:#777;border:2px solid #555;border-radius:30px;transition:all .2s}label.svelte-zt6zlx.svelte-zt6zlx:after{content:"";display:block;width:24px;height:24px;background-color:#555;position:absolute;border-radius:50%;left:-2px;top:-6px;transition:transform .2s}input[type=checkbox].svelte-zt6zlx:checked~label.svelte-zt6zlx{background-color:#00a0fc;border-color:#006dc9}input[type=checkbox].svelte-zt6zlx:checked~label.svelte-zt6zlx:after{background-color:#0054b0;transform:translate(28px)}.sideP.svelte-kk96f3.svelte-kk96f3{position:fixed;opacity:.4;margin:4px 2px;border-radius:8px;overflow:hidden;z-index:40000;border:2px solid transparent}.sideP.svelte-kk96f3.svelte-kk96f3:hover{opacity:1;border:2px solid yellow}.sideP__title.svelte-kk96f3.svelte-kk96f3{width:100%;height:8px;background-color:#ff0}.sideP__title.svelte-kk96f3.svelte-kk96f3:hover{cursor:move}.sideP__out.svelte-kk96f3.svelte-kk96f3{display:flex;flex-direction:column}.sideP__btn.svelte-kk96f3.svelte-kk96f3{background-color:gray;color:#fff;padding:4px 8px;margin:4px;border-radius:8px;cursor:pointer;border:none}.sideP__btn.svelte-kk96f3.svelte-kk96f3:hover{background-color:#6531ff}.configP.svelte-kk96f3.svelte-kk96f3{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:0;margin:0;z-index:50000;background-color:#0003}.configP_holder.svelte-kk96f3.svelte-kk96f3{box-sizing:content-box;position:absolute;right:20px;top:20px;overflow-y:scroll;width:360px;max-height:calc(100vh - 40px);padding:0;margin:0;border-radius:24px;border:2px solid black;background-color:#d4e7ff}.configP_holder.svelte-kk96f3.svelte-kk96f3::-webkit-scrollbar{display:none}.configP_title.svelte-kk96f3.svelte-kk96f3{position:fixed;box-sizing:border-box;width:inherit;display:flex;justify-content:space-between;align-items:center;height:40px;padding:0 10px;border-top-left-radius:24px;border-top-right-radius:24px;border-bottom:2px solid black;background-color:#9ac6ff;z-index:2}.configP_title.svelte-kk96f3.svelte-kk96f3 p{font-size:18px;font-weight:500}.configP_title.svelte-kk96f3.svelte-kk96f3 button{border:none;padding:0;margin:0;background-color:transparent}.section.svelte-kk96f3.svelte-kk96f3{margin:16px 18px}.section.svelte-kk96f3.svelte-kk96f3 button{border-radius:10px;margin:4px;padding:12px 16px}.section.svelte-kk96f3.svelte-kk96f3 .s_title{text-align:center}.section.svelte-kk96f3.svelte-kk96f3 .s_panel{display:flex;flex-direction:column;justify-content:space-evenly;align-items:center}.section.svelte-kk96f3.svelte-kk96f3 .s_checkbox{padding:12px;margin:4px;border-radius:10px;border:1px solid black;font-size:14px;display:flex;align-items:center}.configP_holder.svelte-kk96f3 .section.svelte-kk96f3:nth-child(2){margin-top:48px}#reset_panel_pos.svelte-kk96f3.svelte-kk96f3{width:100%;text-align:center;border:1px solid black;border-radius:16px}.card.svelte-4b9kml.svelte-4b9kml{border:1px solid rgba(255,255,255,.5);border-radius:16px;margin:6px 0;overflow:hidden;cursor:pointer;box-shadow:#0000004d 3px 3px,#0000001a -1px -1px;transition:box-shadow .2s}.card.svelte-4b9kml.svelte-4b9kml:hover{box-shadow:#7300ff4d 5px 5px,#0000001a -1px -1px}.card-title.svelte-4b9kml.svelte-4b9kml{padding:2px 0}.card-holder.svelte-4b9kml.svelte-4b9kml{background-color:#ffffff80;background:linear-gradient(to bottom,rgba(255,255,255,.4),rgba(255,255,255,0))}.card-category.svelte-4b9kml.svelte-4b9kml{text-align:center;letter-spacing:2px;font-weight:700}.card-line.svelte-4b9kml.svelte-4b9kml{margin-top:1px;margin-bottom:1px;display:flex;justify-content:space-evenly;align-items:center;height:20px}.two-lines.svelte-4b9kml.svelte-4b9kml{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;transition:color .3s}.two-lines.svelte-4b9kml.svelte-4b9kml:hover{-webkit-line-clamp:100}.cl-center.svelte-4b9kml.svelte-4b9kml{display:flex;justify-content:space-evenly;align-items:center}.cl-tags.svelte-4b9kml.svelte-4b9kml{display:flex;justify-content:left;align-items:center;flex-wrap:wrap;gap:2px;transform:translate(4px)}.cl-tags.svelte-4b9kml.svelte-4b9kml:has(span){padding-top:2px}.card-details.svelte-4b9kml.svelte-4b9kml{display:flex;justify-content:center;align-items:center;flex-direction:column}.card-image.svelte-4b9kml.svelte-4b9kml{height:100%;position:relative}.card-image.svelte-4b9kml img.svelte-4b9kml{width:100%;object-fit:cover}.card-alter.svelte-4b9kml.svelte-4b9kml{text-align:center;height:20px;display:flex;justify-content:center;align-items:center}.top_and_free.svelte-4b9kml.svelte-4b9kml{padding:2px;border-radius:4px;margin-bottom:2px;display:flex;justify-content:center;align-items:center;line-height:11px;height:11px;font-size:10px}._Free.svelte-4b9kml.svelte-4b9kml{color:#00f}._2XFree.svelte-4b9kml.svelte-4b9kml{color:green}.card-description.svelte-4b9kml.svelte-4b9kml{padding-left:4px;padding-right:4px}.card-index.svelte-4b9kml.svelte-4b9kml{position:absolute;top:0;left:0;padding-right:9px;padding-left:2px;margin:0;height:20px;line-height:16px;font-size:16px;background-color:#000;color:#ff0;border-top-right-radius:100px;border-bottom-right-radius:100px;display:flex;align-items:center;pointer-events:none}.hover-trigger.svelte-4b9kml.svelte-4b9kml{position:absolute;top:8px;right:8px;padding:0;width:42px;margin:0;height:40px;line-height:16px;font-size:16px;opacity:.75;border-radius:9999px;display:flex;align-items:center}.hover-trigger.svelte-4b9kml.svelte-4b9kml:hover{opacity:1}.btnCollet.svelte-4b9kml.svelte-4b9kml{padding:1px 2px;cursor:pointer}.hot.svelte-4b9kml.svelte-4b9kml,.new.svelte-4b9kml.svelte-4b9kml{padding:0 2px;border-radius:8px;background:white;margin:2px}#turnPage.svelte-kydsmq{width:100%;height:32px;border-radius:16px;line-height:20px;font-size:14px;position:absolute;bottom:0px}#_turnPage.svelte-1gtc1kh{width:100%;height:34px;border-radius:12px;line-height:20px;font-size:16px;margin:0;padding:0 10px}.card-category.svelte-rhfb99.svelte-rhfb99{height:18px;padding:0 2px;border:1px;background:black;color:#fff;font-weight:900;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center}.card_category-img.svelte-rhfb99.svelte-rhfb99{height:32px;background-size:100% 141%;background-position:center top;padding-top:6px}.card.svelte-rhfb99.svelte-rhfb99{border:2px solid;border-radius:16px;margin:6px 0;overflow:hidden;box-shadow:#0000004d 0 6px,#0000001a -1px -1px;transition:box-shadow .2s}.card-title.svelte-rhfb99.svelte-rhfb99{padding:2px 0}.card-holder.svelte-rhfb99.svelte-rhfb99{background-color:#ffffff80}.card-line.svelte-rhfb99.svelte-rhfb99{margin-top:1px;margin-bottom:2px;display:flex;justify-content:space-evenly;align-items:center;height:20px}.two-lines.svelte-rhfb99.svelte-rhfb99{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;transition:color .3s;color:#000}.two-lines.svelte-rhfb99.svelte-rhfb99:hover{-webkit-line-clamp:100}.cl-center.svelte-rhfb99.svelte-rhfb99{display:flex;justify-content:space-evenly;align-items:center}.cl-tags.svelte-rhfb99.svelte-rhfb99{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:2px;padding-top:4px;padding-bottom:4px}.icon_holder.svelte-rhfb99.svelte-rhfb99{border-color:#2f4879;border-radius:100px;height:20px;width:20px;display:inline-flex;align-items:center;justify-content:center}.cl-btn.svelte-rhfb99.svelte-rhfb99{display:flex;justify-content:center;align-items:center;padding:1px 6px;border-radius:8px;background-color:#edf3ff}._tag.svelte-rhfb99.svelte-rhfb99{height:1.3em;line-height:1.3em;padding:0 .5em;border-radius:6px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}._tag_diy.svelte-rhfb99.svelte-rhfb99{color:#fff;background-color:#5abd48}._tag_dub.svelte-rhfb99.svelte-rhfb99{color:#fff;background-color:#5a3b14}._tag_sub.svelte-rhfb99.svelte-rhfb99{color:#fff;background-color:#3b4a7f}._tag_discount_50.svelte-rhfb99.svelte-rhfb99{background-color:#f50;color:#fff}._tag_discount_free.svelte-rhfb99.svelte-rhfb99{background-color:#108ee9;color:#fff}.card-details.svelte-rhfb99.svelte-rhfb99{display:flex;justify-content:center;align-items:center;flex-direction:column}.card-image.svelte-rhfb99.svelte-rhfb99{height:100%;position:relative}.card-image.svelte-rhfb99 img.svelte-rhfb99{width:100%;object-fit:cover}.card-description.svelte-rhfb99.svelte-rhfb99{padding:2px 4px}.card-description.svelte-rhfb99 a.svelte-rhfb99,.card-description.svelte-rhfb99 a.svelte-rhfb99:hover{color:#000}.card-index.svelte-rhfb99.svelte-rhfb99{position:absolute;top:0;left:0;padding-right:9px;padding-left:2px;margin:0;height:20px;line-height:16px;font-size:16px;background-color:#000;color:#ff0;border-top-right-radius:100px;border-bottom-right-radius:100px;display:flex;align-items:center;pointer-events:none}.hover-trigger.svelte-rhfb99.svelte-rhfb99{position:absolute;top:8px;right:8px;padding:0;width:42px;margin:0;height:40px;line-height:16px;font-size:16px;opacity:.75;border-radius:9999px;display:flex;align-items:center}.hover-trigger.svelte-rhfb99.svelte-rhfb99:hover{opacity:1}.masonry_Holder_unload_1st.svelte-11rmzun{height:96px;background:grey;position:relative}.masonry_Holder_loaded_1st.svelte-11rmzun{position:unset;background:transparent;padding:0}.masonry_Holder_unloaded.svelte-11rmzun{position:unset;background:transparent}.masonry_Holder_loaded.svelte-11rmzun{position:relative;background:transparent}.loading_Holder.svelte-11rmzun{background-color:#bccad6;position:absolute;width:100%;height:100%;z-index:10001;border-radius:8px;display:flex;justify-content:center}.loading_SubHolder.svelte-11rmzun{position:relative;padding:40px 0}.loading_Text.svelte-11rmzun{position:sticky;top:40px}div#_iframe.svelte-12ghpfg.svelte-12ghpfg{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#0026269b;z-index:30000;display:flex}div._iframe.svelte-12ghpfg.svelte-12ghpfg{height:96%;margin:auto;position:relative}div._iframe.svelte-12ghpfg iframe.svelte-12ghpfg{height:100%;border-radius:20px}._iframeCloseBtn.svelte-12ghpfg.svelte-12ghpfg{width:40px;height:40px;background:white;position:absolute;top:10px;right:10px;border-radius:40px} '); (function () { 'use strict'; function $(){}const hl=t=>t;function Xl(t,e){for(const i in e)t[i]=e[i];return t}function ql(t){return !!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function ml(t){return t()}function qi(){return Object.create(null)}function Ie(t){t.forEach(ml);}function pi(t){return typeof t=="function"}function xe(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Ft;function me(t,e){return Ft||(Ft=document.createElement("a")),Ft.href=e,t===Ft.href}function xl(t){return Object.keys(t).length===0}function pl(t,...e){if(t==null)return $;const i=t.subscribe(...e);return i.unsubscribe?()=>i.unsubscribe():i}function At(t){let e;return pl(t,i=>e=i)(),e}function B(t,e,i){t.$$.on_destroy.push(pl(e,i));}function $l(t,e,i,n){if(t){const l=Ml(t,e,i,n);return t[0](l)}}function Ml(t,e,i,n){return t[1]&&n?Xl(i.ctx.slice(),t[1](n(e))):i.ctx}function eo(t,e,i,n){if(t[2]&&n){const l=t[2](n(i));if(e.dirty===void 0)return l;if(typeof l=="object"){const o=[],s=Math.max(e.dirty.length,l.length);for(let r=0;r32){const e=[],i=t.ctx.length/32;for(let n=0;nwindow.performance.now():()=>Date.now(),Mi=vl?t=>requestAnimationFrame(t):$;const Et=new Set;function Il(t){Et.forEach(e=>{e.c(t)||(Et.delete(e),e.f());}),Et.size!==0&&Mi(Il);}function lo(t){let e;return Et.size===0&&Mi(Il),{promise:new Promise(i=>{Et.add(e={c:t,f:i});}),abort(){Et.delete(e);}}}const oo=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function _(t,e){t.appendChild(e);}function yl(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function so(t){const e=v("style");return ro(yl(t),e),e.sheet}function ro(t,e){return _(t.head||t,e),e.sheet}function T(t,e,i){t.insertBefore(e,i||null);}function w(t){t.parentNode&&t.parentNode.removeChild(t);}function bl(t,e){for(let i=0;it.removeEventListener(e,i,n)}function ao(t){return function(e){e.target===this&&t.call(this,e);}}function h(t,e,i){i==null?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i);}function ai(t){return t===""?null:+t}function co(t){return Array.from(t.childNodes)}function x(t,e){e=""+e,t.data!==e&&(t.data=e);}function jt(t,e){t.value=e??"";}function Y(t,e,i,n){i==null?t.style.removeProperty(e):t.style.setProperty(e,i,n?"important":"");}function Je(t,e,i){t.classList[i?"add":"remove"](e);}function uo(t,e,{bubbles:i=!1,cancelable:n=!1}={}){const l=document.createEvent("CustomEvent");return l.initCustomEvent(t,i,n,e),l}class Ee{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null;}c(e){this.h(e);}m(e,i,n=null){this.e||(this.is_svg?this.e=_t(i.nodeName):this.e=v(i.nodeType===11?"TEMPLATE":i.nodeName),this.t=i.tagName!=="TEMPLATE"?i:i.content,this.c(e)),this.i(n);}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes);}i(e){for(let i=0;i>>0}function _o(t,e){const i={stylesheet:so(e),rules:{}};return Kt.set(t,i),i}function xi(t,e,i,n,l,o,s,r=0){const u=16.666/n;let c=`{ `;for(let a=0;a<=1;a+=u){const p=e+(i-e)*o(a);c+=a*100+`%{${s(p,1-p)}} `;}const f=c+`100% {${s(i,1-i)}} }`,m=`__svelte_${fo(f)}_${r}`,g=yl(t),{stylesheet:d,rules:M}=Kt.get(g)||_o(g,t);M[m]||(M[m]=!0,d.insertRule(`@keyframes ${m} ${f}`,d.cssRules.length));const I=t.style.animation||"";return t.style.animation=`${I?`${I}, `:""}${m} ${n}ms linear ${l}ms 1 both`,Xt+=1,m}function go(t,e){const i=(t.style.animation||"").split(", "),n=i.filter(e?o=>o.indexOf(e)<0:o=>o.indexOf("__svelte")===-1),l=i.length-n.length;l&&(t.style.animation=n.join(", "),Xt-=l,Xt||ho());}function ho(){Mi(()=>{Xt||(Kt.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&w(e);}),Kt.clear());});}let Ut;function it(t){Ut=t;}function $t(){if(!Ut)throw new Error("Function called outside component initialization");return Ut}function ei(t){$t().$$.on_mount.push(t);}function mo(t){$t().$$.after_update.push(t);}function Nl(t){$t().$$.on_destroy.push(t);}const Lt=[],Ce=[];let zt=[];const _i=[],po=Promise.resolve();let gi=!1;function Mo(){gi||(gi=!0,po.then(vi));}function gt(t){zt.push(t);}function Ye(t){_i.push(t);}const ci=new Set;let kt=0;function vi(){if(kt!==0)return;const t=Ut;do{try{for(;ktt.indexOf(n)===-1?e.push(n):i.push(n)),i.forEach(n=>n()),zt=e;}let Rt;function yo(){return Rt||(Rt=Promise.resolve(),Rt.then(()=>{Rt=null;})),Rt}function ui(t,e,i){t.dispatchEvent(uo(`${e?"intro":"outro"}${i}`));}const Jt=new Set;let nt;function Xe(){nt={r:0,c:[],p:nt};}function qe(){nt.r||Ie(nt.c),nt=nt.p;}function Z(t,e){t&&t.i&&(Jt.delete(t),t.i(e));}function q(t,e,i,n){if(t&&t.o){if(Jt.has(t))return;Jt.add(t),nt.c.push(()=>{Jt.delete(t),n&&(i&&t.d(1),n());}),t.o(e);}else n&&n();}const bo={duration:0};function ht(t,e,i,n){const l={direction:"both"};let o=e(t,i,l),s=n?0:1,r=null,u=null,c=null;function f(){c&&go(t,c);}function m(d,M){const I=d.b-s;return M*=Math.abs(I),{a:s,b:d.b,d:I,duration:M,start:d.start,end:d.start+M,group:d.group}}function g(d){const{delay:M=0,duration:I=300,easing:a=hl,tick:p=$,css:y}=o||bo,b={start:no()+M,b:d};d||(b.group=nt,nt.r+=1),r||u?u=b:(y&&(f(),c=xi(t,s,d,I,M,a,y)),d&&p(0,1),r=m(b,I),gt(()=>ui(t,d,"start")),lo(N=>{if(u&&N>u.start&&(r=m(u,I),u=null,ui(t,r.b,"start"),y&&(f(),c=xi(t,s,r.b,r.duration,0,a,o.css))),r){if(N>=r.end)p(s=r.b,1-s),ui(t,r.b,"end"),u||(r.b?f():--r.group.r||Ie(r.group.c)),r=null;else if(N>=r.start){const O=N-r.start;s=r.a+r.d*a(O/r.duration),p(s,1-s);}}return !!(r||u)}));}return {run(d){pi(o)?yo().then(()=>{o=o(l),g(d);}):g(d);},end(){f(),r=u=null;}}}function qt(t,e){const i=e.token={};function n(l,o,s,r){if(e.token!==i)return;e.resolved=r;let u=e.ctx;s!==void 0&&(u=u.slice(),u[s]=r);const c=l&&(e.current=l)(u);let f=!1;e.block&&(e.blocks?e.blocks.forEach((m,g)=>{g!==o&&m&&(Xe(),q(m,1,1,()=>{e.blocks[g]===m&&(e.blocks[g]=null);}),qe());}):e.block.d(1),c.c(),Z(c,1),c.m(e.mount(),e.anchor),f=!0),e.block=c,e.blocks&&(e.blocks[o]=c),f&&vi();}if(ql(t)){const l=$t();if(t.then(o=>{it(l),n(e.then,1,e.value,o),it(null);},o=>{if(it(l),n(e.catch,2,e.error,o),it(null),!e.hasCatch)throw o}),e.current!==e.pending)return n(e.pending,0),!0}else {if(e.current!==e.then)return n(e.then,1,e.value,t),!0;e.resolved=t;}}function wl(t,e,i){const n=e.slice(),{resolved:l}=t;t.current===t.then&&(n[t.value]=l),t.current===t.catch&&(n[t.error]=l),t.block.p(n,i);}function Tl(t,e){q(t,1,1,()=>{e.delete(t.key);});}function Dl(t,e,i,n,l,o,s,r,u,c,f,m){let g=t.length,d=o.length,M=g;const I={};for(;M--;)I[t[M].key]=M;const a=[],p=new Map,y=new Map,b=[];for(M=d;M--;){const k=m(l,o,M),P=i(k);let D=s.get(P);D?n&&b.push(()=>D.p(k,e)):(D=c(P,k),D.c()),p.set(P,a[M]=D),P in I&&y.set(P,Math.abs(M-I[P]));}const N=new Set,O=new Set;function E(k){Z(k,1),k.m(r,f),s.set(k.key,k),f=k.first,d--;}for(;g&&d;){const k=a[d-1],P=t[g-1],D=k.key,A=P.key;k===P?(f=k.first,g--,d--):p.has(A)?!s.has(D)||N.has(D)?E(k):O.has(A)?g--:y.get(D)>y.get(A)?(O.add(D),E(k)):(N.add(A),g--):(u(P,s),g--);}for(;g--;){const k=t[g];p.has(k.key)||u(k,s);}for(;d;)E(a[d-1]);return Ie(b),a}function Ge(t,e,i){const n=t.$$.props[e];n!==void 0&&(t.$$.bound[n]=i,i(t.$$.ctx[n]));}function ke(t){t&&t.c();}function be(t,e,i,n){const{fragment:l,after_update:o}=t.$$;l&&l.m(e,i),n||gt(()=>{const s=t.$$.on_mount.map(ml).filter(pi);t.$$.on_destroy?t.$$.on_destroy.push(...s):Ie(s),t.$$.on_mount=[];}),o.forEach(gt);}function Ne(t,e){const i=t.$$;i.fragment!==null&&(Io(i.after_update),Ie(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[]);}function No(t,e){t.$$.dirty[0]===-1&&(Lt.push(t),Mo(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const M=d.length?d[0]:g;return c.ctx&&l(c.ctx[m],c.ctx[m]=M)&&(!c.skip_bound&&c.bound[m]&&c.bound[m](M),f&&No(t,m)),g}):[],c.update(),f=!0,Ie(c.before_update),c.fragment=n?n(c.ctx):!1,e.target){if(e.hydrate){const m=co(e.target);c.fragment&&c.fragment.l(m),m.forEach(w);}else c.fragment&&c.fragment.c();e.intro&&Z(t.$$.fragment),be(t,e.target,e.anchor,e.customElement),vi();}it(u);}class et{$destroy(){Ne(this,1),this.$destroy=$;}$on(e,i){if(!pi(i))return $;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(i),()=>{const l=n.indexOf(i);l!==-1&&n.splice(l,1);}}$set(e){this.$$set&&!xl(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1);}}function wo(t){let e,i,n,l,o,s,r,u;return {c(){e=v("div"),i=v("button"),n=C("检测到种子列表"),l=v("br"),o=C("刷新以显示瀑布流"),h(i,"style",s=t[0]?"display: block":"display:none"),h(i,"id","_Reload"),h(i,"class","svelte-1me98ya");},m(c,f){T(c,e,f),_(e,i),_(i,n),_(i,l),_(i,o),r||(u=V(i,"click",To),r=!0);},p(c,[f]){f&1&&s!==(s=c[0]?"display: block":"display:none")&&h(i,"style",s);},i:$,o:$,d(c){c&&w(e),r=!1,u();}}}function To(){location.reload();}function Do(t,e,i){let n,l,o=!0,s=!1;o&&(n=location.pathname.includes("/browse"),o=!1);let r=setInterval(()=>{l=location.pathname.includes("/browse"),i(0,s=!n&&l);},2e3);return Nl(()=>{clearInterval(r);}),[s]}class ko extends et{constructor(e){super(),$e(this,e,Do,wo,xe,{});}}/*! * Masonry PACKAGED v4.2.2 * Cascading grid layout library * https://masonry.desandro.com * MIT License * by David DeSandro */(function(t,e){typeof define=="function"&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):t.jQueryBridget=e(t,t.jQuery);})(window,function(e,i){var n=Array.prototype.slice,l=e.console,o=typeof l>"u"?function(){}:function(u){l.error(u);};function s(u,c,f){if(f=f||i||e.jQuery,!f)return;c.prototype.option||(c.prototype.option=function(d){f.isPlainObject(d)&&(this.options=f.extend(!0,this.options,d));}),f.fn[u]=function(d){if(typeof d=="string"){var M=n.call(arguments,1);return m(this,d,M)}return g(this,d),this};function m(d,M,I){var a,p="$()."+u+'("'+M+'")';return d.each(function(y,b){var N=f.data(b,u);if(!N){o(u+" not initialized. Cannot call methods, i.e. "+p);return}var O=N[M];if(!O||M.charAt(0)=="_"){o(p+" is not a valid method");return}var E=O.apply(N,I);a=a===void 0?E:a;}),a!==void 0?a:d}function g(d,M){d.each(function(I,a){var p=f.data(a,u);p?(p.option(M),p._init()):(p=new c(a,M),f.data(a,u,p));});}r(f);}function r(u){!u||u&&u.bridget||(u.bridget=s);}return r(i||e.jQuery),s});(function(t,e){typeof define=="function"&&define.amd?define("ev-emitter/ev-emitter",e):t.EvEmitter=e();})(typeof window<"u"?window:globalThis,function(){function t(){}var e=t.prototype;return e.on=function(i,n){if(!(!i||!n)){var l=this._events=this._events||{},o=l[i]=l[i]||[];return o.indexOf(n)==-1&&o.push(n),this}},e.once=function(i,n){if(!(!i||!n)){this.on(i,n);var l=this._onceEvents=this._onceEvents||{},o=l[i]=l[i]||{};return o[n]=!0,this}},e.off=function(i,n){var l=this._events&&this._events[i];if(!(!l||!l.length)){var o=l.indexOf(n);return o!=-1&&l.splice(o,1),this}},e.emitEvent=function(i,n){var l=this._events&&this._events[i];if(!(!l||!l.length)){l=l.slice(0),n=n||[];for(var o=this._onceEvents&&this._onceEvents[i],s=0;s"u"?i:function(g){console.error(g);},l=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],o=l.length;function s(){for(var g={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},d=0;d