PageSourceSearch

https://youben44-unlimited-ocr.hf.space/assets/Login-BMGWFjDF.js

js youben44-unlimited-ocr.hf.space collected 2026-10-03 17:32:16 UTC 5,646 bytes, 2 lines download raw bytes

vendor: 5,646 bytes, lines 1-2
1import G from"./Index-cwl6r4yK.js";import{BaseTextbox as P}from"./Index-CHBVi5hu.js";import{BaseButton as J}from"./Index-Dwn46RCV.js";import K from"./Index-DcuC0IYx.js";import{c as q}from"./FullscreenButton-D7DmzQQ9.js";import{$ as Q}from"./init-CYI6iZYC.js";import"./StreamingBar-BtwDBaPl.js";import"./MarkdownCode-DTX-UkhB.js";import"./index-DputZZxm.js";import"./svelte/svelte.js";import"./prism-python-oCRsS_S4.js";import"./Example-Bdcw8sPw.js";import"./Image-0bVIZe-w.js";import"./ImagePreview-BiSVoKtP.js";const{SvelteComponent:R,add_flush_callback:j,append:I,attr:T,bind:A,binding_callbacks:E,component_subscribe:U,create_component:v,destroy_component:w,detach:c,element:L,flush:N,init:V,insert:$,mount_component:h,safe_not_equal:W,set_data:D,space:B,text:H,toggle_class:z,transition_in:k,transition_out:x}=window.__gradio__svelte__internal;function C(i){let e;return{c(){e=L("p"),T(e,"class","auth svelte-1ogxbi0")},m(t,n){$(t,e,n),e.innerHTML=i[0]},p(t,n){n&1&&(e.innerHTML=t[0])},d(t){t&&c(e)}}}function F(i){let e,t=i[6]("login.enable_cookies")+"",n;return{c(){e=L("p"),n=H(t),T(e,"class","auth svelte-1ogxbi0")},m(l,o){$(l,e,o),I(e,n)},p(l,o){o&64&&t!==(t=l[6]("login.enable_cookies")+"")&&D(n,t)},d(l){l&&c(e)}}}function O(i){let e,t=i[6]("login.incorrect_credentials")+"",n;return{c(){e=L("p"),n=H(t),T(e,"class","creds svelte-1ogxbi0")},m(l,o){$(l,e,o),I(e,n)},p(l,o){o&64&&t!==(t=l[6]("login.incorrect_credentials")+"")&&D(n,t)},d(l){l&&c(e)}}}function X(i){let e,t,n;function l(s){i[9](s)}let o={label:i[6]("login.username"),lines:1,show_label:!0,max_lines:1};return i[3]!==void 0&&(o.value=i[3]),e=new P({props:o}),E.push(()=>A(e,"value",l)),e.$on("submit",i[7]),{c(){v(e.$$.fragment)},m(s,u){h(e,s,u),n=!0},p(s,u){const f={};u&64&&(f.label=s[6]("login.username")),!t&&u&8&&(t=!0,f.value=s[3],j(()=>t=!1)),e.$set(f)},i(s){n||(k(e.$$.fragment,s),n=!0)},o(s){x(e.$$.fragment,s),n=!1},d(s){w(e,s)}}}function Y(i){let e,t,n;function l(s){i[10](s)}let o={label:i[6]("login.password"),lines:1,show_label:!0,max_lines:1,type:"password"};return i[4]!==void 0&&(o.value=i[4]),e=new P({props:o}),E.push(()=>A(e,"value",l)),e.$on("submit",i[7]),{c(){v(e.$$.fragment)},m(s,u){h(e,s,u),n=!0},p(s,u){const f={};u&64&&(f.label=s[6]("login.password")),!t&&u&16&&(t=!0,f.value=s[4],j(()=>t=!1)),e.$set(f)},i(s){n||(k(e.$$.fragment,s),n=!0)},o(s){x(e.$$.fragment,s),n=!1},d(s){w(e,s)}}}function Z(i){let e,t,n,l;return e=new q({props:{$$slots:{default:[X]},$$scope:{ctx:i}}}),n=new q({props:{$$slots:{default:[Y]},$$scope:{ctx:i}}}),{c(){v(e.$$.fragment),t=B(),v(n.$$.fragment)},m(o,s){h(e,o,s),$(o,t,s),h(n,o,s),l=!0},p(o,s){const u={};s&2120&&(u.$$scope={dirty:s,ctx:o}),e.$set(u);const f={};s&2128&&(f.$$scope={dirty:s,ctx:o}),n.$set(f)},i(o){l||(k(e.$$.fragment,o),k(n.$$.fragment,o),l=!0)},o(o){x(e.$$.fragment,o),x(n.$$.fragment,o),l=!1},d(o){o&&c(t),w(e,o),w(n,o)}}}function y(i){let e=i[6]("login.login")+"",t;return{c(){t=H(e)},m(n,l){$(n,t,l)},p(n,l){l&64&&e!==(e=n[6]("login.login")+"")&&D(t,e)},d(n){n&&c(t)}}}function ee(i){let e,t=i[6]("login.login")+"",n,l,o,s,u,f,b,g,d,m=i[0]&&C(i),p=i[2]&&F(i),a=i[5]&&O(i);return f=new G({props:{$$slots:{default:[Z]},$$scope:{ctx:i}}}),g=new J({props:{size:"lg",variant:"primary",$$slots:{default:[y]},$$scope:{ctx:i}}}),g.$on("click",i[7]),{c(){e=L("h2"),n=H(t),l=B(),m&&m.c(),o=B(),p&&p.c(),s=B(),a&&a.c(),u=B(),v(f.$$.fragment),b=B(),v(g.$$.fragment),T(e,"class","svelte-1ogxbi0")},m(r,_){$(r,e,_),I(e,n),$(r,l,_),m&&m.m(r,_),$(r,o,_),p&&p.m(r,_),$(r,s,_),a&&a.m(r,_),$(r,u,_),h(f,r,_),$(r,b,_),h(g,r,_),d=!0},p(r,_){(!d||_&64)&&t!==(t=r[6]("login.login")+"")&&D(n,t),r[0]?m?m.p(r,_):(m=C(r),m.c(),m.m(o.parentNode,o)):m&&(m.d(1),m=null),r[2]?p?p.p(r,_):(p=F(r),p.c(),p.m(s.parentNode,s)):p&&(p.d(1),p=null),r[5]?a?a.p(r,_):(a=O(r),a.c(),a.m(u.parentNode,u)):a&&(a.d(1),a=null);const M={};_&2136&&(M.$$scope={dirty:_,ctx:r}),f.$set(M);const S={};_&2112&&(S.$$scope={dirty:_,ctx:r}),g.$set(S)},i(r){d||(k(f.$$.fragment,r),k(g.$$.fragment,r),d=!0)},o(r){x(f.$$.fragment,r),x(g.$$.fragment,r),d=!1},d(r){r&&(c(e),c(l),c(o),c(s),c(u),c(b)),m&&m.d(r),p&&p.d(r),a&&a.d(r),w(f,r),w(g,r)}}}function te(i){let e,t,n;return t=new K({props:{variant:"panel",min_width:480,$$slots:{default:[ee]},$$scope:{ctx:i}}}),{c(){e=L("div"),v(t.$$.fragment),T(e,"class","wrap svelte-1ogxbi0"),z(e,"min-h-screen",i[1])},m(l,o){$(l,e,o),h(t,e,null),n=!0},p(l,[o]){const s={};o&2173&&(s.$$scope={dirty:o,ctx:l}),t.$set(s),(!n||o&2)&&z(e,"min-h-screen",l[1])},i(l){n||(k(t.$$.fragment,l),n=!0)},o(l){x(t.$$.fragment,l),n=!1},d(l){l&&c(e),w(t)}}}function ne(i,e,t){let n;U(i,Q,a=>t(6,n=a));let{root:l}=e,{auth_message:o}=e,{app_mode:s}=e,{space_id:u}=e,f="",b="",g=!1;const d=async()=>{const a=new FormData;a.append("username",f),a.append("password",b);let r=await fetch(l+"/login",{method:"POST",body:a});r.status===400?(t(5,g=!0),t(3,f=""),t(4,b="")):r.status==200&&location.reload()};function m(a){f=a,t(3,f)}function p(a){b=a,t(4,b)}return i.$$set=a=>{"root"in a&&t(8,l=a.root),"auth_message"in a&&t(0,o=a.auth_message),"app_mode"in a&&t(1,s=a.app_mode),"space_id"in a&&t(2,u=a.space_id)},[o,s,u,f,b,g,n,d,l,m,p]}class be extends R{constructor(e){super(),V(this,e,ne,te,W,{root:8,auth_message:0,app_mode:1,space_id:2})}get root(){return this.$$.ctx[8]}set root(e){this.$$set({root:e}),N()}get auth_message(){return this.$$.ctx[0]}set auth_message(e){this.$$set({auth_message:e}),N()}get app_mode(){return this.$$.ctx[1]}set app_mode(e){this.$$set({app_mode:e}),N()}get space_id(){return this.$$.ctx[2]}set space_id(e){this.$$set({space_id:e}),N()}}export{be as default};
2//# sourceMappingURL=Login-BMGWFjDF.js.map

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.