PageSourceSearch

https://ankiweb.net/_app/immutable/nodes/21.CBOO6Tjp.mjs

js ankiweb.net collected 2026-09-24 08:35:21 UTC 3,300 bytes, 1 lines download raw bytes

1import{y as D,U as v}from"../chunks/frontend.Bv_Ahnfo.mjs";import{s as F,e as b,f as U,g,h as w,m as M,d,j as H,k as $,i as c,p as A,K as R,E as K,t as W,c as q}from"../chunks/scheduler.DmxKk_24.mjs";import{S as G,i as J,c as P,a as T,m as k,t as E,b as I,d as L}from"../chunks/index.ByJ5p5Iz.mjs";import{g as z}from"../chunks/entry.rELJ20C9.mjs";import{S as Q}from"../chunks/SubmitButton.BfPtIFnf.mjs";import{T as V}from"../chunks/Title.DbsuDpkS.mjs";import{S as X}from"../chunks/SharedList.Dgtp1108.mjs";async function Y({fetch:n,url:s}){const a=s.searchParams.get("search")||"",e=s.searchParams.get("sort")||"rating";return{search:a,sort:e,response:await D({search:a},{fetch:n})}}const lt=Object.freeze(Object.defineProperty({__proto__:null,load:Y},Symbol.toStringTag,{value:"Module"}));function B(n){let s,a;return{c(){s=U("a"),a=W("Upload Add-on"),this.h()},l(e){s=w(e,"A",{class:!0,href:!0});var u=M(s);a=q(u,"Upload Add-on"),u.forEach(d),this.h()},h(){$(s,"class","btn btn-outline-primary me-3 d-none d-sm-inline-block"),$(s,"href",n[2])},m(e,u){c(e,s,u),A(s,a)},p(e,u){u&4&&$(s,"href",e[2])},d(e){e&&d(s)}}}function Z(n){let s;return{c(){s=W("Search")},l(a){s=q(a,"Search")},m(a,e){c(a,s,e)},d(a){a&&d(s)}}}function x(n){let s,a,e,u,f,p,m,h,i,S="Add-ons",_,l,y,O,N;s=new V({props:{title:"Add-ons"}});let o=n[3]&&B(n);return m=new Q({props:{classList:"btn btn-primary",onSubmit:n[4],$$slots:{default:[Z]},$$scope:{ctx:n}}}),l=new X({props:{mode:"addons",rows:n[0].response.rows,sort:n[0].sort,updateSort:n[5]}}),{c(){P(s.$$.fragment),a=b(),e=U("form"),o&&o.c(),u=b(),f=U("input"),p=b(),P(m.$$.fragment),h=b(),i=U("h1"),i.textContent=S,_=b(),P(l.$$.fragment),this.h()},l(t){T(s.$$.fragment,t),a=g(t),e=w(t,"FORM",{class:!0});var r=M(e);o&&o.l(r),u=g(r),f=w(r,"INPUT",{type:!0}),p=g(r),T(m.$$.fragment,r),r.forEach(d),h=g(t),i=w(t,"H1",{class:!0,"data-svelte-h":!0}),H(i)!=="svelte-r3bzad"&&(i.textContent=S),_=g(t),T(l.$$.fragment,t),this.h()},h(){$(f,"type","text"),$(e,"class","float-end d-inline-block"),$(i,"class","mb-4")},m(t,r){k(s,t,r),c(t,a,r),c(t,e,r),o&&o.m(e,null),A(e,u),A(e,f),R(f,n[1]),A(e,p),k(m,e,null),c(t,h,r),c(t,i,r),c(t,_,r),k(l,t,r),y=!0,O||(N=K(f,"input",n[7]),O=!0)},p(t,[r]){t[3]?o?o.p(t,r):(o=B(t),o.c(),o.m(e,u)):o&&(o.d(1),o=null),r&2&&f.value!==t[1]&&R(f,t[1]);const j={};r&512&&(j.$$scope={dirty:r,ctx:t}),m.$set(j);const C={};r&1&&(C.rows=t[0].response.rows),r&1&&(C.sort=t[0].sort),l.$set(C)},i(t){y||(E(s.$$.fragment,t),E(m.$$.fragment,t),E(l.$$.fragment,t),y=!0)},o(t){I(s.$$.fragment,t),I(m.$$.fragment,t),I(l.$$.fragment,t),y=!1},d(t){t&&(d(a),d(e),d(h),d(i),d(_)),L(s,t),o&&o.d(),L(m),L(l,t),O=!1,N()}}}function tt(n,s,a){let e,u,f,{data:p}=s;async function m(){z("/shared/addons?search="+encodeURIComponent(i))}async function h(l){z("/shared/addons?search="+encodeURIComponent(i)+"&sort="+l)}let i=p.search;function S(l){a(1,i=l)}function _(){i=this.value,a(1,i)}return n.$$set=l=>{"data"in l&&a(0,p=l.data)},n.$$.update=()=>{n.$$.dirty&1&&S(p.search),n.$$.dirty&1&&a(6,e=p.response.userUploadStatus),n.$$.dirty&64&&a(3,u=e===v.CAN_UPLOAD||e===v.TOO_NEW),n.$$.dirty&64&&a(2,f=e===v.TOO_NEW?"/shared/too-new":"/shared/upload")},[p,i,f,u,m,h,e,_]}class ut extends G{constructor(s){super(),J(this,s,tt,x,F,{data:0})}}export{ut as component,lt as universal};

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.