1const __vite__fileDeps=["./Canvas3D-CEWOfsOn.js","./index-C_QmXOlO.js","./index-DXDVh5aS.css","./file-url-DWZEuit0.js","./Index-DZ8pD6u3.js","./Index-BEyjvDG_.css","./Canvas3DGS-NUEGcWTy.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); 2import{_ as oe}from"./index-C_QmXOlO.js";import{I as Ce,S as Ie}from"./Index-DZ8pD6u3.js";import{B as ge}from"./BlockLabel-DFIB9MfI.js";import{D as Oe}from"./Download-DVtk-Jv3.js";import{F as ae}from"./File-BQ_9P3Ye.js";import{U as Te}from"./Undo-CpmTQw3B.js";import{U as Pe}from"./Upload-C9zfaTxb.js";import{M as Ve}from"./ModifyUpload-Ba3wyGdi.js";import{B as Se}from"./Button-CBm22jT_.js";import{E as Re}from"./Empty-DCv_MjjF.js";import{U as Ge}from"./UploadText-n6URT0Ta.js";import{default as sn}from"./Example-uQ8MuYg6.js";import"./svelte/svelte.js";/* empty css */import"./DownloadLink-B2yi3aID.js";import"./file-url-DWZEuit0.js";import"./Upload-Cp8Go_XF.js";var ke=Object.prototype.hasOwnProperty;function $e(l,e,n){for(n of l.keys())if(J(n,e))return n}function J(l,e){var n,t,s;if(l===e)return!0;if(l&&e&&(n=l.constructor)===e.constructor){if(n===Date)return l.getTime()===e.getTime();if(n===RegExp)return l.toString()===e.toString();if(n===Array){if((t=l.length)===e.length)for(;t--&&J(l[t],e[t]););return t===-1}if(n===Set){if(l.size!==e.size)return!1;for(t of l)if(s=t,s&&typeof s=="object"&&(s=$e(e,s),!s)||!e.has(s))return!1;return!0}if(n===Map){if(l.size!==e.size)return!1;for(t of l)if(s=t[0],s&&typeof s=="object"&&(s=$e(e,s),!s)||!J(t[1],e.get(s)))return!1;return!0}if(n===ArrayBuffer)l=new Uint8Array(l),e=new Uint8Array(e);else if(n===DataView){if((t=l.byteLength)===e.byteLength)for(;t--&&l.getInt8(t)===e.getInt8(t););return t===-1}if(ArrayBuffer.isView(l)){if((t=l.byteLength)===e.byteLength)for(;t--&&l[t]===e[t];);return t===-1}if(!n||typeof l=="object"){t=0;for(n in l)if(ke.call(l,n)&&++t&&!ke.call(e,n)||!(n in e)||!J(l[n],e[n]))return!1;return Object.keys(e).length===t}}return l!==l&&e!==e}const{SvelteComponent:We,add_flush_callback:Ee,append:ne,attr:N,bind:le,binding_callbacks:K,check_outros:Q,construct_svelte_component:se,create_component:O,destroy_component:T,detach:X,element:de,empty:pe,flush:B,group_outros:Y,init:Fe,insert:Z,mount_component:P,noop:He,safe_not_equal:Je,space:he,transition_in:w,transition_out:C}=window.__gradio__svelte__internal;function ve(l){let e,n,t,s,a,o,_,i,f,r,c=!l[9]&&ze(l);a=new Ce({props:{Icon:Oe,label:l[5]("common.download")}});const m=[Qe,Ke],d=[];function z(g,p){return g[9]?0:1}return i=z(l),f=d[i]=m[i](l),{c(){e=de("div"),n=de("div"),c&&c.c(),t=he(),s=de("a"),O(a.$$.fragment),_=he(),f.c(),N(s,"href",l[13]),N(s,"target",window.__is_colab__?"_blank":null),N(s,"download",o=window.__is_colab__?null:l[0].orig_name||l[0].path),N(n,"class","buttons svelte-1yz3qf4"),N(e,"class","model3D svelte-1yz3qf4")},m(g,p){Z(g,e,p),ne(e,n),c&&c.m(n,null),ne(n,t),ne(n,s),P(a,s,null),ne(e,_),d[i].m(e,null),r=!0},p(g,p){g[9]?c&&(Y(),C(c,1,1,()=>{c=null}),Q()):c?(c.p(g,p),p&512&&w(c,1)):(c=ze(g),c.c(),w(c,1),c.m(n,t));const E={};p&32&&(E.label=g[5]("common.download")),a.$set(E),(!r||p&8192)&&N(s,"href",g[13]),(!r||p&1&&o!==(o=window.__is_colab__?null:g[0].orig_name||g[0].path))&&N(s,"download",o);let k=i;i=z(g),i===k?d[i].p(g,p):(Y(),C(d[k],1,1,()=>{d[k]=null}),Q(),f=d[i],f?f.p(g,p):(f=d[i]=m[i](g),f.c()),w(f,1),f.m(e,null))},i(g){r||(w(c),w(a.$$.fragment,g),w(f),r=!0)},o(g){C(c),C(a.$$.fragment,g),C(f),r=!1},d(g){g&&X(e),c&&c.d(),T(a),d[i].d()}}}function ze(l){let e,n;return e=new Ce({props:{Icon:Te,label:"Undo"}}),e.$on("click",l[16]),{c(){O(e.$$.fragment)},m(t,s){P(e,t,s),n=!0},p:He,i(t){n||(w(e.$$.fragment,t),n=!0)},o(t){C(e.$$.fragment,t),n=!1},d(t){T(e,t)}}}function Ke(l){let e,n,t,s;function a(i){l[19](i)}var o=l[12];function _(i,f){let r={value:i[0],display_mode:i[1],clear_color:i[2],camera_position:i[8],zoom_speed:i[6],pan_speed:i[7]};return i[13]!==void 0&&(r.resolved_url=i[13]),{props:r}}return o&&(e=se(o,_(l)),l[18](e),K.push(()=>le(e,"resolved_url",a))),{c(){e&&O(e.$$.fragment),t=pe()},m(i,f){e&&P(e,i,f),Z(i,t,f),s=!0},p(i,f){if(f&4096&&o!==(o=i[12])){if(e){Y();const r=e;C(r.$$.fragment,1,0,()=>{T(r,1)}),Q()}o?(e=se(o,_(i)),i[18](e),K.push(()=>le(e,"resolved_url",a)),O(e.$$.fragment),w(e.$$.fragment,1),P(e,t.parentNode,t)):e=null}else if(o){const r={};f&1&&(r.value=i[0]),f&2&&(r.display_mode=i[1]),f&4&&(r.clear_color=i[2]),f&256&&(r.camera_position=i[8]),f&64&&(r.zoom_speed=i[6]),f&128&&(r.pan_speed=i[7]),!n&&f&8192&&(n=!0,r.resolved_url=i[13],Ee(()=>n=!1)),e.$set(r)}},i(i){s||(e&&w(e.$$.fragment,i),s=!0)},o(i){e&&C(e.$$.fragment,i),s=!1},d(i){i&&X(t),l[18](null),e&&T(e,i)}}}function Qe(l){let e,n,t,s;function a(i){l[17](i)}var o=l[11];function _(i,f){let r={value:i[0],zoom_speed:i[6],pan_speed:i[7]};return i[13]!==void 0&&(r.resolved_url=i[13]),{props:r}}return o&&(e=se(o,_(l)),K.push(()=>le(e,"resolved_url",a))),{c(){e&&O(e.$$.fragment),t=pe()},m(i,f){e&&P(e,i,f),Z(i,t,f),s=!0},p(i,f){if(f&2048&&o!==(o=i[11])){if(e){Y();const r=e;C(r.$$.fragment,1,0,()=>{T(r,1)}),Q()}o?(e=se(o,_(i)),K.push(()=>le(e,"resolved_url",a)),O(e.$$.fragment),w(e.$$.fragment,1),P(e,t.parentNode,t)):e=null}else if(o){const r={};f&1&&(r.value=i[0]),f&64&&(r.zoom_speed=i[6]),f&128&&(r.pan_speed=i[7]),!n&&f&8192&&(n=!0,r.resolved_url=i[13],Ee(()=>n=!1)),e.$set(r)}},i(i){s||(e&&w(e.$$.fragment,i),s=!0)},o(i){e&&C(e.$$.fragment,i),s=!1},d(i){i&&X(t),e&&T(e,i)}}}function Xe(l){let e,n,t,s;e=new ge({props:{show_label:l[4],Icon:ae,label:l[3]||l[5]("3D_model.3d_model")}});let a=l[0]&&ve(l);return{c(){O(e.$$.fragment),n=he(),a&&a.c(),t=pe()}
vendor: 11,799 bytes, line 2
2,m(o,_){P(e,o,_),Z(o,n,_),a&&a.m(o,_),Z(o,t,_),s=!0},p(o,[_]){const i={};_&16&&(i.show_label=o[4]),_&40&&(i.label=o[3]||o[5]("3D_model.3d_model")),e.$set(i),o[0]?a?(a.p(o,_),_&1&&w(a,1)):(a=ve(o),a.c(),w(a,1),a.m(t.parentNode,t)):a&&(Y(),C(a,1,1,()=>{a=null}),Q())},i(o){s||(w(e.$$.fragment,o),w(a),s=!0)},o(o){C(e.$$.fragment,o),C(a),s=!1},d(o){o&&(X(n),X(t)),T(e,o),a&&a.d(o)}}}async function Ye(){return(await oe(()=>import("./Canvas3D-CEWOfsOn.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).default}async function Ze(){return(await oe(()=>import("./Canvas3DGS-NUEGcWTy.js"),__vite__mapDeps([6,3,4,1,2,5]),import.meta.url)).default}function ye(l,e,n){let{value:t}=e,{display_mode:s="solid"}=e,{clear_color:a=[0,0,0,0]}=e,{label:o=""}=e,{show_label:_}=e,{i18n:i}=e,{zoom_speed:f=1}=e,{pan_speed:r=1}=e,{camera_position:c=[null,null,null]}=e,m={camera_position:c,zoom_speed:f,pan_speed:r},d=!1,z,g,p;function E(){p?.reset_camera_position(c,f,r)}let k;const W=()=>E();function A(h){k=h,n(13,k)}function L(h){K[h?"unshift":"push"](()=>{p=h,n(10,p)})}function F(h){k=h,n(13,k)}return l.$$set=h=>{"value"in h&&n(0,t=h.value),"display_mode"in h&&n(1,s=h.display_mode),"clear_color"in h&&n(2,a=h.clear_color),"label"in h&&n(3,o=h.label),"show_label"in h&&n(4,_=h.show_label),"i18n"in h&&n(5,i=h.i18n),"zoom_speed"in h&&n(6,f=h.zoom_speed),"pan_speed"in h&&n(7,r=h.pan_speed),"camera_position"in h&&n(8,c=h.camera_position)},l.$$.update=()=>{l.$$.dirty&513&&t&&(n(9,d=t.path.endsWith(".splat")||t.path.endsWith(".ply")),d?Ze().then(h=>{n(11,z=h)}):Ye().then(h=>{n(12,g=h)})),l.$$.dirty&34240&&(!J(m.camera_position,c)||m.zoom_speed!==f||m.pan_speed!==r)&&(p?.reset_camera_position(c,f,r),n(15,m={camera_position:c,zoom_speed:f,pan_speed:r}))},[t,s,a,o,_,i,f,r,c,d,p,z,g,k,E,m,W,A,L,F]}class xe extends We{constructor(e){super(),Fe(this,e,ye,Xe,Je,{value:0,display_mode:1,clear_color:2,label:3,show_label:4,i18n:5,zoom_speed:6,pan_speed:7,camera_position:8})}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),B()}get display_mode(){return this.$$.ctx[1]}set display_mode(e){this.$$set({display_mode:e}),B()}get clear_color(){return this.$$.ctx[2]}set clear_color(e){this.$$set({clear_color:e}),B()}get label(){return this.$$.ctx[3]}set label(e){this.$$set({label:e}),B()}get show_label(){return this.$$.ctx[4]}set show_label(e){this.$$set({show_label:e}),B()}get i18n(){return this.$$.ctx[5]}set i18n(e){this.$$set({i18n:e}),B()}get zoom_speed(){return this.$$.ctx[6]}set zoom_speed(e){this.$$set({zoom_speed:e}),B()}get pan_speed(){return this.$$.ctx[7]}set pan_speed(e){this.$$set({pan_speed:e}),B()}get camera_position(){return this.$$.ctx[8]}set camera_position(e){this.$$set({camera_position:e}),B()}}const et=xe,{SvelteComponent:tt,add_flush_callback:nt,append:lt,attr:st,bind:it,binding_callbacks:Me,bubble:ot,check_outros:re,construct_svelte_component:ie,create_component:V,create_slot:at,destroy_component:R,detach:y,element:rt,empty:be,flush:D,get_all_dirty_from_scope:_t,get_slot_changes:ut,group_outros:_e,init:ft,insert:x,mount_component:G,safe_not_equal:ct,space:Ue,transition_in:I,transition_out:S,update_slot_base:mt}=window.__gradio__svelte__internal,{createEventDispatcher:dt,tick:De}=window.__gradio__svelte__internal;function ht(l){let e,n,t,s,a,o;n=new Ve({props:{undoable:!l[13],i18n:l[6],absolute:!0}}),n.$on("clear",l[19]),n.$on("undo",l[20]);const _=[bt,pt],i=[];function f(r,c){return r[13]?0:1}return s=f(l),a=i[s]=_[s](l),{c(){e=rt("div"),V(n.$$.fragment),t=Ue(),a.c(),st(e,"class","input-model svelte-jub4pj")},m(r,c){x(r,e,c),G(n,e,null),lt(e,t),i[s].m(e,null),o=!0},p(r,c){const m={};c&8192&&(m.undoable=!r[13]),c&64&&(m.i18n=r[6]),n.$set(m);let d=s;s=f(r),s===d?i[s].p(r,c):(_e(),S(i[d],1,1,()=>{i[d]=null}),re(),a=i[s],a?a.p(r,c):(a=i[s]=_[s](r),a.c()),I(a,1),a.m(e,null))},i(r){o||(I(n.$$.fragment,r),I(a),o=!0)},o(r){S(n.$$.fragment,r),S(a),o=!1},d(r){r&&y(e),R(n),i[s].d()}}}function gt(l){let e,n,t;function s(o){l[22](o)}let a={upload:l[11],stream_handler:l[12],root:l[5],max_file_size:l[9],filetype:[".stl",".obj",".gltf",".glb","model/obj",".splat",".ply"],$$slots:{default:[wt]},$$scope:{ctx:l}};return l[14]!==void 0&&(a.dragging=l[14]),e=new Pe({props:a}),Me.push(()=>it(e,"dragging",s)),e.$on("load",l[18]),e.$on("error",l[23]),{c(){V(e.$$.fragment)},m(o,_){G(e,o,_),t=!0},p(o,_){const i={};_&2048&&(i.upload=o[11]),_&4096&&(i.stream_handler=o[12]),_&32&&(i.root=o[5]),_&512&&(i.max_file_size=o[9]),_&33554432&&(i.$$scope={dirty:_,ctx:o}),!n&&_&16384&&(n=!0,i.dragging=o[14],nt(()=>n=!1)),e.$set(i)},i(o){t||(I(e.$$.fragment,o),t=!0)},o(o){S(e.$$.fragment,o),t=!1},d(o){R(e,o)}}}function pt(l){let e,n,t;var s=l[16];function a(o,_){return{props:{value:o[0],display_mode:o[1],clear_color:o[2],camera_position:o[10],zoom_speed:o[7],pan_speed:o[8]}}}return s&&(e=ie(s,a(l)),l[24](e)),{c(){e&&V(e.$$.fragment),n=be()},m(o,_){e&&G(e,o,_),x(o,n,_),t=!0},p(o,_){if(_&65536&&s!==(s=o[16])){if(e){_e();const i=e;S(i.$$.fragment,1,0,()=>{R(i,1)}),re()}s?(e=ie(s,a(o)),o[24](e),V(e.$$.fragment),I(e.$$.fragment,1),G(e,n.parentNode,n)):e=null}else if(s){const i={};_&1&&(i.value=o[0]),_&2&&(i.display_mode=o[1]),_&4&&(i.clear_color=o[2]),_&1024&&(i.camera_position=o[10]),_&128&&(i.zoom_speed=o[7]),_&256&&(i.pan_speed=o[8]),e.$set(i)}},i(o){t||(e&&I(e.$$.fragment,o),t=!0)},o(o){e&&S(e.$$.fragment,o),t=!1},d(o){o&&y(n),l[24](null),e&&R(e,o)}}}function bt(l){let e,n,t;var s=l[15];function a(o,_){return{props:{value:o[0],zoom_speed:o[7],pan_speed:o[8]}}}return s&&(e=ie(s,a(l))),{c(){e&&V(e.$$.fragment),n=be()},m(o,_){e&&G(e,o,_),x(o,n,_),t=!0},p(o,_){if(_&32768&&s!==(s=o[15])){if(e){_e();const i=e;S(i.$$.fragment,1,0,()=>{R(i,1)}),re()}s?(e=ie(s,a(o)),V(e.$$.fragment),I(e.$$.fragment,1),G(e,n.parentNode,n)):e=null}else if(s){const i={};_&1&&(i.value=o[0]),_&128&&(i.zoom_speed=o[7]),_&256&&(i.pan_speed=o[8]),e.$set(i)}},i(o){t||(e&&I(e.$$.fragment,o),t=!0)},o(o){e&&S(e.$$.fragment,o),t=!1},d(o){o&&y(n),e&&R(e,o)}}}function wt(l){let e;const n=l[21].default,t=at(n,l,l[25],null);return{c(){t&&t.c()},m(s,a){t&&t.m(s,a),e=!0},p(s,a){t&&t.p&&(!e||a&33554432)&&mt(t,n,s,s[25],e?ut(n,s[25],a,null):_t(s[25]),null)},i(s){e||(I(t,s),e=!0)},o(s){S(t,s),e=!1},d(s){t&&t.d(s)}}}function kt(l){let e,n,t,s,a,o;e=new ge({props:{show_label:l[4],Icon:ae,label:l[3]||"3D Model"}});const _=[gt,ht],i=[];function f(r,c){return r[0]===null?0:1}return t=f(l),s=i[t]=_[t](l),{c(){V(e.$$.fragment),n=Ue(),s.c(),a=be()},m(r,c){G(e,r,c),x(r,n,c),i[t].m(r,c),x(r,a,c),o=!0},p(r,[c]){const m={};c&16&&(m.show_label=r[4]),c&8&&(m.label=r[3]||"3D Model"),e.$set(m);let d=t;t=f(r),t===d?i[t].p(r,c):(_e(),S(i[d],1,1,()=>{i[d]=null}),re(),s=i[t],s?s.p(r,c):(s=i[t]=_[t](r),s.c()),I(s,1),s.m(a.parentNode,a))},i(r){o||(I(e.$$.fragment,r),I(s),o=!0)},o(r){S(e.$$.fragment,r),S(s),o=!1},d(r){r&&(y(n),y(a)),R(e,r),i[t].d(r)}}}async function $t(){return(await oe(()=>import("./Canvas3D-CEWOfsOn.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).default}async function vt(){return(await oe(()=>import("./Canvas3DGS-NUEGcWTy.js"),__vite__mapDeps([6,3,4,1,2,5]),import.meta.url)).default}function zt(l,e,n){let{$$slots:t={},$$scope:s}=e,{value:a}=e,{display_mode:o="solid"}=e,{clear_color:_=[0,0,0,0]}=e,{label:i=""}=e,{show_label:f}=e,{root:r}=e,{i18n:c}=e,{zoom_speed:m=1}=e,{pan_speed:d=1}=e,{max_file_size:z=null}=e,{camera_position:g=[null,null,null]}=e,{upload:p}=e,{stream_handler:E}=e;async function k({detail:u}){n(0,a=u),await De(),q("change",a),q("load",a)}async function W(){n(0,a=null),await De(),q("clear"),q("change")}let A=!1,L,F,h;async function ue(){h?.reset_camera_position(g,m,d)}const q=dt();let H=!1;function fe(u){H=u,n(14,H)}function ce(u){ot.call(this,l,u)}function me(u){Me[u?"unshift":"push"](()=>{h=u,n(17,h)})}return l.$$set=u=>{"value"in u&&n(0,a=u.value),"display_mode"in u&&n(1,o=u.display_mode),"clear_color"in u&&n(2,_=u.clear_color),"label"in u&&n(3,i=u.label),"show_label"in u&&n(4,f=u.show_label),"root"in u&&n(5,r=u.root),"i18n"in u&&n(6,c=u.i18n),"zoom_speed"in u&&n(7,m=u.zoom_speed),"pan_speed"in u&&n(8,d=u.pan_speed),"max_file_size"in u&&n(9,z=u.max_file_size),"camera_position"in u&&n(10,g=u.camera_position),"upload"in u&&n(11,p=u.upload),"stream_handler"in u&&n(12,E=u.stream_handler),"$$scope"in u&&n(25,s=u.$$scope)},l.$$.update=()=>{l.$$.dirty&8193&&a&&(n(13,A=a.path.endsWith(".splat")||a.path.endsWith(".ply")),A?vt().then(u=>{n(15,L=u)}):$t().then(u=>{n(16,F=u)})),l.$$.dirty&16384&&q("drag",H)},[a,o,_,i,f,r,c,m,d,z,g,p,E,A,H,L,F,h,k,W,ue,t,fe,ce,me,s]}class Dt extends tt{constructor(e){super(),ft(this,e,zt,kt,ct,{value:0,display_mode:1,clear_color:2,label:3,show_label:4,root:5,i18n:6,zoom_speed:7,pan_speed:8,max_file_size:9,camera_position:10,upload:11,stream_handler:12})}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),D()}get display_mode(){return this.$$.ctx[1]}set display_mode(e){this.$$set({display_mode:e}),D()}get clear_color(){return this.$$.ctx[2]}set clear_color(e){this.$$set({clear_color:e}),D()}get label(){return this.$$.ctx[3]}set label(e){this.$$set({label:e}),D()}get show_label(){return this.$$.ctx[4]}set show_label(e){this.$$set({show_label:e}),D()}get root(){return this.$$.ctx[5]}set root(e){this.$$set({root:e}),D()}get i18n(){return this.$$.ctx[6]}set i18n(e){this.$$set({i18n:e}),D()}get zoom_speed(){return this.$$.ctx[7]}set zoom_speed(e){this.$$set({zoom_speed:e}),D()}get pan_speed(){return this.$$.ctx[8]}set pan_speed(e){this.$$set({pan_speed:e}),D()}get max_file_size(){return this.$$.ctx[9]}set max_file_size(e){this.$$set({max_file_size:e}),D()}get camera_position(){return this.$$.ctx[10]}set camera_position(e){this.$$set({camera_position:e}),D()}get upload(){return this.$$.ctx[11]}set upload(e){this.$$set({upload:e}),D()}get stream_handler(){return this.$$.ctx[12]}set stream_handler(e){this.$$set({stream_handler:e}),D()}}const Ct=Dt,{SvelteComponent:It,assign:je,check_outros:Be,create_component:M,destroy_component:U,detach:ee,empty:Ae,flush:b,get_spread_object:Le,get_spread_update:qe,group_outros:Ne,init:St,insert:te,mount_component:j,safe_not_equal:Et,space:we,transition_in:$,transition_out:v}=window.__gradio__svelte__internal;function Mt(l){let e,n;return e=new Se({props:{visible:l[4],variant:l[0]===null?"dashed":"solid",border_mode:l[18]?"focus":"base",padding:!1,elem_id:l[2],elem_classes:l[3],container:l[10],scale:l[11],min_width:l[12],height:l[14],$$slots:{default:[Bt]},$$scope:{ctx:l}}}),{c(){M(e.$$.fragment)},m(t,s){j(e,t,s),n=!0},p(t,s){const a={};s&16&&(a.visible=t[4]),s&1&&(a.variant=t[0]===null?"dashed":"solid"),s&262144&&(a.border_mode=t[18]?"focus":"base"),s&4&&(a.elem_id=t[2]),s&8&&(a.elem_classes=t[3]),s&1024&&(a.container=t[10]),s&2048&&(a.scale=t[11]),s&4096&&(a.min_width=t[12]),s&16384&&(a.height=t[14]),s&134587363&&(a.$$scope={dirty:s,ctx:t}),e.$set(a)},i(t){n||($(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function Ut(l){let e,n;return e=new Se({props:{visible:l[4],variant:l[0]===null?"dashed":"solid",border_mode:l[18]?"focus":"base",padding:!1,elem_id:l[2],elem_classes:l[3],container:l[10],scale:l[11],min_width:l[12],height:l[14],$$slots:{default:[Nt]},$$scope:{ctx:l}}}),{c(){M(e.$$.fragment)},m(t,s){j(e,t,s),n=!0},p(t,s){const a={};s&16&&(a.visible=t[4]),s&1&&(a.variant=t[0]===null?"dashed":"solid"),s&262144&&(a.border_mode=t[18]?"focus":"base"),s&4&&(a.elem_id=t[2]),s&8&&(a.elem_classes=t[3]),s&1024&&(a.container=t[10]),s&2048&&(a.scale=t[11]),s&4096&&(a.min_width=t[12]),s&16384&&(a.height=t[14]),s&134325187&&(a.$$scope={dirty:s,ctx:t}),e.$set(a)},i(t){n||($(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function jt(l){let e,n;return e=new Ge({props:{i18n:l[13].i18n,type:"file"}}),{c(){M(e.$$.fragment)},m(t,s){j(e,t,s),n=!0},p(t,s){const a={};
2s&8192&&(a.i18n=t[13].i18n),e.$set(a)},i(t){n||($(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function Bt(l){let e,n,t,s;const a=[{autoscroll:l[13].autoscroll},{i18n:l[13].i18n},l[1]];let o={};for(let _=0;_<a.length;_+=1)o=je(o,a[_]);return e=new Ie({props:o}),e.$on("clear_status",l[20]),t=new Ct({props:{label:l[8],show_label:l[9],root:l[5],display_mode:l[6],clear_color:l[7],value:l[0],camera_position:l[16],zoom_speed:l[15],i18n:l[13].i18n,max_file_size:l[13].max_file_size,upload:l[13].client.upload,stream_handler:l[13].client.stream,$$slots:{default:[jt]},$$scope:{ctx:l}}}),t.$on("change",l[21]),t.$on("drag",l[22]),t.$on("change",l[23]),t.$on("clear",l[24]),t.$on("load",l[25]),t.$on("error",l[26]),{c(){M(e.$$.fragment),n=we(),M(t.$$.fragment)},m(_,i){j(e,_,i),te(_,n,i),j(t,_,i),s=!0},p(_,i){const f=i&8194?qe(a,[i&8192&&{autoscroll:_[13].autoscroll},i&8192&&{i18n:_[13].i18n},i&2&&Le(_[1])]):{};e.$set(f);const r={};i&256&&(r.label=_[8]),i&512&&(r.show_label=_[9]),i&32&&(r.root=_[5]),i&64&&(r.display_mode=_[6]),i&128&&(r.clear_color=_[7]),i&1&&(r.value=_[0]),i&65536&&(r.camera_position=_[16]),i&32768&&(r.zoom_speed=_[15]),i&8192&&(r.i18n=_[13].i18n),i&8192&&(r.max_file_size=_[13].max_file_size),i&8192&&(r.upload=_[13].client.upload),i&8192&&(r.stream_handler=_[13].client.stream),i&134225920&&(r.$$scope={dirty:i,ctx:_}),t.$set(r)},i(_){s||($(e.$$.fragment,_),$(t.$$.fragment,_),s=!0)},o(_){v(e.$$.fragment,_),v(t.$$.fragment,_),s=!1},d(_){_&&ee(n),U(e,_),U(t,_)}}}function At(l){let e,n,t,s;return e=new ge({props:{show_label:l[9],Icon:ae,label:l[8]||"3D Model"}}),t=new Re({props:{unpadded_box:!0,size:"large",$$slots:{default:[qt]},$$scope:{ctx:l}}}),{c(){M(e.$$.fragment),n=we(),M(t.$$.fragment)},m(a,o){j(e,a,o),te(a,n,o),j(t,a,o),s=!0},p(a,o){const _={};o&512&&(_.show_label=a[9]),o&256&&(_.label=a[8]||"3D Model"),e.$set(_);const i={};o&134217728&&(i.$$scope={dirty:o,ctx:a}),t.$set(i)},i(a){s||($(e.$$.fragment,a),$(t.$$.fragment,a),s=!0)},o(a){v(e.$$.fragment,a),v(t.$$.fragment,a),s=!1},d(a){a&&ee(n),U(e,a),U(t,a)}}}function Lt(l){let e,n;return e=new et({props:{value:l[0],i18n:l[13].i18n,display_mode:l[6],clear_color:l[7],label:l[8],show_label:l[9],camera_position:l[16],zoom_speed:l[15]}}),{c(){M(e.$$.fragment)},m(t,s){j(e,t,s),n=!0},p(t,s){const a={};s&1&&(a.value=t[0]),s&8192&&(a.i18n=t[13].i18n),s&64&&(a.display_mode=t[6]),s&128&&(a.clear_color=t[7]),s&256&&(a.label=t[8]),s&512&&(a.show_label=t[9]),s&65536&&(a.camera_position=t[16]),s&32768&&(a.zoom_speed=t[15]),e.$set(a)},i(t){n||($(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function qt(l){let e,n;return e=new ae({}),{c(){M(e.$$.fragment)},m(t,s){j(e,t,s),n=!0},i(t){n||($(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function Nt(l){let e,n,t,s,a,o;const _=[{autoscroll:l[13].autoscroll},{i18n:l[13].i18n},l[1]];let i={};for(let m=0;m<_.length;m+=1)i=je(i,_[m]);e=new Ie({props:i}),e.$on("clear_status",l[19]);const f=[Lt,At],r=[];function c(m,d){return m[0]?0:1}return t=c(l),s=r[t]=f[t](l),{c(){M(e.$$.fragment),n=we(),s.c(),a=Ae()},m(m,d){j(e,m,d),te(m,n,d),r[t].m(m,d),te(m,a,d),o=!0},p(m,d){const z=d&8194?qe(_,[d&8192&&{autoscroll:m[13].autoscroll},d&8192&&{i18n:m[13].i18n},d&2&&Le(m[1])]):{};e.$set(z);let g=t;t=c(m),t===g?r[t].p(m,d):(Ne(),v(r[g],1,1,()=>{r[g]=null}),Be(),s=r[t],s?s.p(m,d):(s=r[t]=f[t](m),s.c()),$(s,1),s.m(a.parentNode,a))},i(m){o||($(e.$$.fragment,m),$(s),o=!0)},o(m){v(e.$$.fragment,m),v(s),o=!1},d(m){m&&(ee(n),ee(a)),U(e,m),r[t].d(m)}}}function Ot(l){let e,n,t,s;const a=[Ut,Mt],o=[];function _(i,f){return i[17]?1:0}return e=_(l),n=o[e]=a[e](l),{c(){n.c(),t=Ae()},m(i,f){o[e].m(i,f),te(i,t,f),s=!0},p(i,[f]){let r=e;e=_(i),e===r?o[e].p(i,f):(Ne(),v(o[r],1,1,()=>{o[r]=null}),Be(),n=o[e],n?n.p(i,f):(n=o[e]=a[e](i),n.c()),$(n,1),n.m(t.parentNode,t))},i(i){s||($(n),s=!0)},o(i){v(n),s=!1},d(i){i&&ee(t),o[e].d(i)}}}function Tt(l,e,n){let{elem_id:t=""}=e,{elem_classes:s=[]}=e,{visible:a=!0}=e,{value:o=null}=e,{root:_}=e,{display_mode:i="solid"}=e,{clear_color:f}=e,{loading_status:r}=e,{label:c}=e,{show_label:m}=e,{container:d=!0}=e,{scale:z=null}=e,{min_width:g=void 0}=e,{gradio:p}=e,{height:E=void 0}=e,{zoom_speed:k=1}=e,{camera_position:W=[null,null,null]}=e,{interactive:A}=e,L=!1;const F=()=>p.dispatch("clear_status",r),h=()=>p.dispatch("clear_status",r),ue=({detail:u})=>n(0,o=u),q=({detail:u})=>n(18,L=u),H=({detail:u})=>p.dispatch("change",u),fe=()=>{n(0,o=null),p.dispatch("clear")},ce=({detail:u})=>{n(0,o=u),p.dispatch("upload")},me=({detail:u})=>{n(1,r=r||{}),n(1,r.status="error",r),p.dispatch("error",u)};return l.$$set=u=>{"elem_id"in u&&n(2,t=u.elem_id),"elem_classes"in u&&n(3,s=u.elem_classes),"visible"in u&&n(4,a=u.visible),"value"in u&&n(0,o=u.value),"root"in u&&n(5,_=u.root),"display_mode"in u&&n(6,i=u.display_mode),"clear_color"in u&&n(7,f=u.clear_color),"loading_status"in u&&n(1,r=u.loading_status),"label"in u&&n(8,c=u.label),"show_label"in u&&n(9,m=u.show_label),"container"in u&&n(10,d=u.container),"scale"in u&&n(11,z=u.scale),"min_width"in u&&n(12,g=u.min_width),"gradio"in u&&n(13,p=u.gradio),"he
2ight"in u&&n(14,E=u.height),"zoom_speed"in u&&n(15,k=u.zoom_speed),"camera_position"in u&&n(16,W=u.camera_position),"interactive"in u&&n(17,A=u.interactive)},[o,r,t,s,a,_,i,f,c,m,d,z,g,p,E,k,W,A,L,F,h,ue,q,H,fe,ce,me]}class tn extends It{constructor(e){super(),St(this,e,Tt,Ot,Et,{elem_id:2,elem_classes:3,visible:4,value:0,root:5,display_mode:6,clear_color:7,loading_status:1,label:8,show_label:9,container:10,scale:11,min_width:12,gradio:13,height:14,zoom_speed:15,camera_position:16,interactive:17})}get elem_id(){return this.$$.ctx[2]}set elem_id(e){this.$$set({elem_id:e}),b()}get elem_classes(){return this.$$.ctx[3]}set elem_classes(e){this.$$set({elem_classes:e}),b()}get visible(){return this.$$.ctx[4]}set visible(e){this.$$set({visible:e}),b()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),b()}get root(){return this.$$.ctx[5]}set root(e){this.$$set({root:e}),b()}get display_mode(){return this.$$.ctx[6]}set display_mode(e){this.$$set({display_mode:e}),b()}get clear_color(){return this.$$.ctx[7]}set clear_color(e){this.$$set({clear_color:e}),b()}get loading_status(){return this.$$.ctx[1]}set loading_status(e){this.$$set({loading_status:e}),b()}get label(){return this.$$.ctx[8]}set label(e){this.$$set({label:e}),b()}get show_label(){return this.$$.ctx[9]}set show_label(e){this.$$set({show_label:e}),b()}get container(){return this.$$.ctx[10]}set container(e){this.$$set({container:e}),b()}get scale(){return this.$$.ctx[11]}set scale(e){this.$$set({scale:e}),b()}get min_width(){return this.$$.ctx[12]}set min_width(e){this.$$set({min_width:e}),b()}get gradio(){return this.$$.ctx[13]}set gradio(e){this.$$set({gradio:e}),b()}get height(){return this.$$.ctx[14]}set height(e){this.$$set({height:e}),b()}get zoom_speed(){return this.$$.ctx[15]}set zoom_speed(e){this.$$set({zoom_speed:e}),b()}get camera_position(){return this.$$.ctx[16]}set camera_position(e){this.$$set({camera_position:e}),b()}get interactive(){return this.$$.ctx[17]}set interactive(e){this.$$set({interactive:e}),b()}}export{sn as BaseExample,et as BaseModel3D,Ct as BaseModel3DUpload,tn as default}; 3//# sourceMappingURL=Index-CssWkVVb.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.