@realsee/five 6.5.5 → 6.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/vue/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2025/8/15
5
- * Version: 6.5.5
4
+ * Generated: 8/18/2025
5
+ * Version: 6.5.7
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
package/vue/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2025/8/15
5
- * Version: 6.5.5
4
+ * Generated: 8/18/2025
5
+ * Version: 6.5.7
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2025/8/15
5
- * Version: 6.5.5
4
+ * Generated: 8/18/2025
5
+ * Version: 6.5.7
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,4 +252,4 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("node:fs"),$=require("node:fs/promises"),y=require("node:path"),A=require("node:stream"),G=require("sharp");function z(t,e,r,i){function s(n){return n instanceof r?n:new r(function(o){o(n)})}return new(r||(r=Promise))(function(n,o){function u(c){try{a(i.next(c))}catch(f){o(f)}}function l(c){try{a(i.throw(c))}catch(f){o(f)}}function a(c){c.done?n(c.value):s(c.value).then(u,l)}a((i=i.apply(t,e||[])).next())})}function P(t,e){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,s,n,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(a){return function(c){return l([a,c])}}function l(a){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(i=1,s&&(n=a[0]&2?s.return:a[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,a[1])).done)return n;switch(s=0,n&&(a=[a[0]&2,n.value]),a[0]){case 0:case 1:n=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,s=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(n=r.trys,!(n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){r.label=a[1];break}if(a[0]===6&&r.label<n[1]){r.label=n[1],n=a;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(a);break}n[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(c){a=[6,c],s=0}finally{i=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function O(t,e){if(e&&e[e.length-1]!=="/"&&(e+="/"),t.length>e.length&&t.startsWith(e))return t.slice(e.length);throw new Error("".concat(t," is not starting with ").concat(e))}var X=1024*1024*5;function S(t,e,r){return z(this,void 0,void 0,function(){var i,s,n,o;return P(this,function(u){switch(u.label){case 0:return q.existsSync(e)?[2,e]:[4,r(t)];case 1:return i=u.sent(),i.ok&&i.body?[4,$.mkdir(y.dirname(e),{recursive:!0})]:[3,6];case 2:return u.sent(),s=Number((o=i.headers.get("content-length"))!==null&&o!==void 0?o:"Infinity"),s>X?[2,new Promise(function(l,a){var c=A.Readable.fromWeb(i.body),f=q.createWriteStream(e);c.pipe(f),c.on("error",a),f.on("finish",function(){return l(e)})})]:[3,3];case 3:return[4,i.arrayBuffer()];case 4:return n=u.sent(),[4,$.writeFile(e,Buffer.from(n))];case 5:return u.sent(),[2,e];case 6:throw new Error("url: ".concat(t,"(").concat(i.statusText,")"))}})})}function D(t,e){return z(this,void 0,void 0,function(){var r,i,s,n,o,u,l,a,c,f;return P(this,function(h){return r=y.extname(t).slice(1)||"jpg",i=e.cut,s=e.size,n=e.format,o=n===void 0?r:n,u=G(t),i&&(u=u.extract({left:i[0],top:i[1],width:i[2],height:i[3]})),s&&(u=u.resize(s)),o&&(u=u.toFormat(o)),l="",e.toFilename?l=e.toFilename(t,{cut:e.cut,size:e.size,format:e.format}):(a="",c="",f=o,i&&(a=i.join("x")),s&&(c="".concat(s,"x")),f===r&&!c&&!a&&(f=""),l=[t,a,c,f].filter(function(v){return v.length>0}).join(".")),l!==t&&!q.existsSync(l)?[2,u.toFile(l).then(function(){return l})]:[2,l]})})}function W(t){var e=[];if(t.content&&(t.content.uri?e.push(t.content.uri):t.content.url&&e.push(t.content.url)),t.children)for(var r=0,i=t.children;r<i.length;r++){var s=i[r],n=W(s);n.length>0&&e.push.apply(e,n)}return e}function H(t,e,r){return z(this,void 0,void 0,function(){var i,s,n;return P(this,function(o){switch(o.label){case 0:return i=new URL(t,e).href,s=y.join(r.distPath,O(i,r.baseURL)),n=S(i,s,r.fetch),r.log(function(u){return"download: ".concat(i," -> ").concat(u)},n),[4,n];case 1:return o.sent(),/\.json$/.test(t)?[4,J(i,r)]:[3,3];case 2:o.sent(),o.label=3;case 3:return[2]}})})}function J(t,e){return z(this,void 0,void 0,function(){var r,i,s,n,o,u,l,a,c,f,h,v,w,m,d,p,k,j;return P(this,function(g){switch(g.label){case 0:return r=y.join(e.distPath,O(t,e.baseURL)),i=S(t,r,e.fetch),e.log(function(b){return"download: ".concat(t," -> ").concat(b)},i),[4,i];case 1:return g.sent(),o=(n=JSON).parse,[4,$.readFile(r,"utf8")];case 2:return s=o.apply(n,[g.sent()]),s.asset.overview?(u=new URL(s.asset.overview.imageFile,t).href,l=y.join(e.distPath,O(u,e.baseURL)),a=S(u,l,e.fetch),e.log(function(b){return"download: ".concat(u," -> ").concat(b)},a),[4,a]):[3,4];case 3:g.sent(),g.label=4;case 4:if(!s.asset.trajectories)return[3,8];c=function(b){var F,_,R;return P(this,function(I){switch(I.label){case 0:return F=new URL(b.file,t).href,_=y.join(e.distPath,O(F,e.baseURL)),R=S(F,_,e.fetch),e.log(function(T){return"download: ".concat(F," -> ").concat(T)},R),[4,R];case 1:return I.sent(),[2]}})},f=0,h=s.asset.trajectories.list,g.label=5;case 5:return f<h.length?(v=h[f],[5,c(v)]):[3,8];case 6:g.sent(),g.label=7;case 7:return f++,[3,5];case 8:for(w=W(s.root),m=[],d=0,p=w;d<p.length;d++)k=p[d],j=H(k,t,e),m.push(j);return[4,Promise.all(m)];case 9:return g.sent(),[2]}})})}function K(t,e){return z(this,void 0,void 0,function(){var r,i,s,n,o,u,l,a,c,f,h,v,w,m;return P(this,function(d){switch(d.label){case 0:return e.log("process model"),t.model?(r=t.model,i=r.textures,s=r.layers,n=r.file,n?(e.log("process model file"),o=y.join(e.distPath,O(n,e.baseURL)),u=S(n,o,e.fetch),e.log(function(p){return"download: ".concat(n," -> ").concat(p)},u),[4,u]):[3,5]):[3,9];case 1:if(d.sent(),!i)return[3,5];l=function(p){var k,j,g,b,F,_,R,I,T,N,M,C;return P(this,function(U){switch(U.label){case 0:return k=y.join(e.distPath,O(p,e.baseURL)),j=S(p,k,e.fetch),e.log(function(B){return"download: ".concat(p," -> ").concat(B)},j),[4,j];case 1:for(U.sent(),g=e.imageOptions.format,g.length===0&&g.push(void 0),b=e.imageOptions.size,b.length===0&&b.push(void 0),F=[],_=0,R=g;_<R.length;_++)for(I=R[_],T=0,N=b;T<N.length;T++)M=N[T],C=D(k,{format:I,size:M,toFilename:e.imageProcessingFilename}),e.log(function(B){return"imageProcessing: ".concat(k," -> ").concat(B)},C),F.push(C);return[4,Promise.all(F)];case 2:return U.sent(),[2]}})},a=0,c=i,d.label=2;case 2:return a<c.length?(f=c[a],[5,l(f)]):[3,5];case 3:d.sent(),d.label=4;case 4:return a++,[3,2];case 5:if(!s)return[3,9];h=0,v=s,d.label=6;case 6:return h<v.length?(w=v[h],m=w.tileset,e.log("process model layer"),[4,J(m,e)]):[3,9];case 7:d.sent(),d.label=8;case 8:return h++,[3,6];case 9:return[2]}})})}function E(t,e,r){return z(this,void 0,void 0,function(){var i,s,n,o,u,l,a,c,f,h,v,w,m;return P(this,function(d){switch(d.label){case 0:return i=y.join(r.distPath,O(t,r.baseURL)),s=S(t,i,r.fetch),r.log(function(p){return"download: ".concat(t," -> ").concat(p)},s),[4,s];case 1:if(d.sent(),n=Math.pow(2,e.level),o=r.imageOptions.format,o.length===0&&o.push(void 0),u=[],n>1)for(l=0;l<n;l++)for(a=0;a<n;a++)for(c=0,f=o;c<f.length;c++)h=f[c],v=[e.size/n*a,e.size/n*l,e.size/n,e.size/n],w=e.scale>=1?void 0:e.scale*e.size/n,e.level===1&&e.scale>=.5&&(h==="jpg"||/\.jpg$/.test(i))&&(w=void 0),m=D(i,{format:h,size:w,cut:v,toFilename:r.imageProcessingFilename}),r.log(function(p){return"imageProcessing: ".concat(i," -> ").concat(p)},m),u.push(m);return[4,Promise.all(u)];case 2:return d.sent(),[2]}})})}function Q(t,e){return z(this,void 0,void 0,function(){return P(this,function(r){switch(r.label){case 0:return[4,Promise.all([E(t.front,t,e),E(t.back,t,e),E(t.left,t,e),E(t.right,t,e),E(t.up,t,e),E(t.down,t,e)])];case 1:return r.sent(),[2]}})})}function L(t,e){return z(this,void 0,void 0,function(){var r,i,s,n,o,u,l,a,c,f,h,v;return P(this,function(w){switch(w.label){case 0:return r=y.join(e.distPath,O(t,e.baseURL)),i=S(t,r,e.fetch),e.log(function(m){return"download: ".concat(t," -> ").concat(m)},i),[4,i];case 1:for(w.sent(),s=e.imageOptions.format,s.length===0&&s.push(void 0),n=e.imageOptions.size,n.length===0&&n.push(void 0),o=[],u=0,l=s;u<l.length;u++)for(a=l[u],c=0,f=n;c<f.length;c++)h=f[c],v=D(r,{format:a,size:h,toFilename:e.imageProcessingFilename}),e.log(function(m){return"imageProcessing: ".concat(r," -> ").concat(m)},v),o.push(v);return[4,Promise.all(o)];case 2:return w.sent(),[2]}})})}function V(t,e){return z(this,void 0,void 0,function(){var r;return P(this,function(i){switch(i.label){case 0:return r=t.images,[4,Promise.all([L(r.front,e),L(r.back,e),L(r.left,e),L(r.right,e),L(r.up,e),L(r.down,e)])];case 1:return i.sent(),r.tiles?[4,Promise.all(r.tiles.map(function(s){return Q(s,e)}))]:[3,3];case 2:i.sent(),i.label=3;case 3:return[2]}})})}function Y(t,e){return z(this,void 0,void 0,function(){var r,i,s,n,o;return P(this,function(u){switch(u.label){case 0:r=t.observers,i=0,s=r,u.label=1;case 1:return i<s.length?(n=s[i],o=V(n,e),e.log("process observer #".concat(n.index," derived: ").concat(n.derivedIdStr),o),[4,o]):[3,4];case 2:u.sent(),u.label=3;case 3:return i++,[3,1];case 4:return[2]}})})}function Z(t,e){if(e){var r=Date.now();e.then(function(s){var n=Date.now()-r,o=typeof t=="function"?t(s):t;console.log(o+"(".concat(n,"ms)"))}).catch(function(){})}else{var i=typeof t=="function"?t(null):t;console.log(i)}}function x(t){return z(this,arguments,void 0,function(e,r){var i,s,n,o,u,l,a,c,f,h,v,w,m,d,p,k,j,g;return r===void 0&&(r={}),P(this,function(b){switch(b.label){case 0:if(i=e.baseURL,s="",r.distPath)s=y.resolve(process.cwd(),r.distPath);else for(s=y.resolve(process.cwd(),(f=e.workCode)!==null&&f!==void 0?f:"work-".concat(Date.now()));q.existsSync(s);)/.-(\d+)$/.test(s)?s=s.replace(/.-(\d+)$/,function(F,_){return"-"+(Number(_)+1)}):s=s+"-1";return n={baseURL:i,distPath:s,fetch:(h=r.fetch)!==null&&h!==void 0?h:fetch,imageOptions:{size:(w=(v=r.imageOptions)===null||v===void 0?void 0:v.size)!==null&&w!==void 0?w:[],format:(d=(m=r.imageOptions)===null||m===void 0?void 0:m.format)!==null&&d!==void 0?d:[]},textureOptions:{size:(k=(p=r.textureOptions)===null||p===void 0?void 0:p.size)!==null&&k!==void 0?k:[],format:(g=(j=r.textureOptions)===null||j===void 0?void 0:j.format)!==null&&g!==void 0?g:[]},log:r.log?Z:function(){return Promise.resolve()},imageProcessingFilename:r.imageProcessingFilename},n.log(JSON.stringify(n,null," ")),[4,$.mkdir(s,{recursive:!0})];case 1:b.sent(),o=0,b.label=2;case 2:return o<e.raw.works.length?(u=e.raw.works[o],l=o>0?"-".concat(o):"",a="work".concat(l,".json"),c=y.resolve(s,a),[4,$.writeFile(c,u)]):[3,5];case 3:b.sent(),b.label=4;case 4:return o++,[3,2];case 5:return[4,Y(e,n)];case 6:return b.sent(),[4,K(e,n)];case 7:return b.sent(),[2]}})})}exports.download=x;
255
+ */"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("node:fs"),q=require("node:fs/promises"),y=require("node:path"),A=require("node:stream"),G=require("sharp");function F(t,e,r,i){function s(n){return n instanceof r?n:new r(function(o){o(n)})}return new(r||(r=Promise))(function(n,o){function u(c){try{a(i.next(c))}catch(f){o(f)}}function l(c){try{a(i.throw(c))}catch(f){o(f)}}function a(c){c.done?n(c.value):s(c.value).then(u,l)}a((i=i.apply(t,e||[])).next())})}function P(t,e){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,s,n,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(a){return function(c){return l([a,c])}}function l(a){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(i=1,s&&(n=a[0]&2?s.return:a[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,a[1])).done)return n;switch(s=0,n&&(a=[a[0]&2,n.value]),a[0]){case 0:case 1:n=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,s=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(n=r.trys,!(n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){r.label=a[1];break}if(a[0]===6&&r.label<n[1]){r.label=n[1],n=a;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(a);break}n[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(c){a=[6,c],s=0}finally{i=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function S(t,e){if(e&&e[e.length-1]!=="/"&&(e+="/"),t.length>e.length&&t.startsWith(e))return t.slice(e.length);throw new Error("".concat(t," is not starting with ").concat(e))}var X=1024*1024*5;function _(t,e,r){return F(this,void 0,void 0,function(){var i,s,n,o;return P(this,function(u){switch(u.label){case 0:return C.existsSync(e)?[2,e]:[4,r(t)];case 1:return i=u.sent(),i.ok&&i.body?[4,q.mkdir(y.dirname(e),{recursive:!0})]:[3,6];case 2:return u.sent(),s=Number((o=i.headers.get("content-length"))!==null&&o!==void 0?o:"Infinity"),s>X?[2,new Promise(function(l,a){var c=A.Readable.fromWeb(i.body),f=C.createWriteStream(e);c.pipe(f),c.on("error",a),f.on("finish",function(){return l(e)})})]:[3,3];case 3:return[4,i.arrayBuffer()];case 4:return n=u.sent(),[4,q.writeFile(e,Buffer.from(n))];case 5:return u.sent(),[2,e];case 6:throw new Error("url: ".concat(t,"(").concat(i.statusText,")"))}})})}function D(t,e){return F(this,void 0,void 0,function(){var r,i,s,n,o,u,l,a,c,f;return P(this,function(v){return r=y.extname(t).slice(1)||"jpg",i=e.cut,s=e.size,n=e.format,o=n===void 0?r:n,u=G(t),i&&(u=u.extract({left:i[0],top:i[1],width:i[2],height:i[3]})),s&&(u=u.resize(s)),o&&(u=u.toFormat(o)),l="",e.toFilename?l=e.toFilename(t,{cut:e.cut,size:e.size,format:e.format}):(a="",c="",f=o,i&&(a=i.join("x")),s&&(c="".concat(s,"x")),f===r&&!c&&!a&&(f=""),l=[t,a,c,f].filter(function(m){return m.length>0}).join(".")),l!==t&&!C.existsSync(l)?[2,u.toFile(l).then(function(){return l})]:[2,l]})})}function W(t){var e=[];if(t.content&&(t.content.uri?e.push(t.content.uri):t.content.url&&e.push(t.content.url)),t.children)for(var r=0,i=t.children;r<i.length;r++){var s=i[r],n=W(s);n.length>0&&e.push.apply(e,n)}return e}function H(t,e,r){return F(this,void 0,void 0,function(){var i,s,n;return P(this,function(o){switch(o.label){case 0:return i=new URL(t,e).href,s=y.join(r.distPath,S(i,r.baseURL)),n=_(i,s,r.fetch),r.log(function(u){return"download: ".concat(i," -> ").concat(u)},n),[4,n];case 1:return o.sent(),/\.json$/.test(t)?[4,J(i,r)]:[3,3];case 2:o.sent(),o.label=3;case 3:return[2]}})})}function J(t,e){return F(this,void 0,void 0,function(){var r,i,s,n,o,u,l,a,c,f,v,m,g,b,d,w,p,k,j;return P(this,function(h){switch(h.label){case 0:return r=y.join(e.distPath,S(t,e.baseURL)),i=_(t,r,e.fetch),e.log(function(O){return"download: ".concat(t," -> ").concat(O)},i),[4,i];case 1:return h.sent(),o=(n=JSON).parse,[4,q.readFile(r,"utf8")];case 2:return s=o.apply(n,[h.sent()]),s.asset.overview?(u=new URL(s.asset.overview.imageFile,t).href,l=y.join(e.distPath,S(u,e.baseURL)),a=_(u,l,e.fetch),e.log(function(O){return"download: ".concat(u," -> ").concat(O)},a),[4,a]):[3,4];case 3:h.sent(),h.label=4;case 4:if(!s.asset.trajectories)return[3,8];c=function(O){var z,T,E;return P(this,function(R){switch(R.label){case 0:return z=new URL(O.file,t).href,T=y.join(e.distPath,S(z,e.baseURL)),E=_(z,T,e.fetch),e.log(function($){return"download: ".concat(z," -> ").concat($)},E),[4,E];case 1:return R.sent(),[2]}})},f=0,v=s.asset.trajectories.list,h.label=5;case 5:return f<v.length?(m=v[f],[5,c(m)]):[3,8];case 6:h.sent(),h.label=7;case 7:return f++,[3,5];case 8:g=W(s.root),b=6,d=0,h.label=9;case 9:if(!(d<g.length))return[3,12];for(w=[],p=0;p<b;p++)k=g[d+p],k&&(j=H(k,t,e),w.push(j));return[4,Promise.all(w)];case 10:h.sent(),h.label=11;case 11:return d+=b,[3,9];case 12:return[2]}})})}function K(t,e){return F(this,void 0,void 0,function(){var r,i,s,n,o,u,l,a,c,f,v,m,g,b;return P(this,function(d){switch(d.label){case 0:return e.log("process model"),t.model?(r=t.model,i=r.textures,s=r.layers,n=r.file,n?(e.log("process model file"),o=y.join(e.distPath,S(n,e.baseURL)),u=_(n,o,e.fetch),e.log(function(w){return"download: ".concat(n," -> ").concat(w)},u),[4,u]):[3,5]):[3,9];case 1:if(d.sent(),!i)return[3,5];l=function(w){var p,k,j,h,O,z,T,E,R,$,M,N;return P(this,function(U){switch(U.label){case 0:return p=y.join(e.distPath,S(w,e.baseURL)),k=_(w,p,e.fetch),e.log(function(B){return"download: ".concat(w," -> ").concat(B)},k),[4,k];case 1:for(U.sent(),j=e.imageOptions.format,j.length===0&&j.push(void 0),h=e.imageOptions.size,h.length===0&&h.push(void 0),O=[],z=0,T=j;z<T.length;z++)for(E=T[z],R=0,$=h;R<$.length;R++)M=$[R],N=D(p,{format:E,size:M,toFilename:e.imageProcessingFilename}),e.log(function(B){return"imageProcessing: ".concat(p," -> ").concat(B)},N),O.push(N);return[4,Promise.all(O)];case 2:return U.sent(),[2]}})},a=0,c=i,d.label=2;case 2:return a<c.length?(f=c[a],[5,l(f)]):[3,5];case 3:d.sent(),d.label=4;case 4:return a++,[3,2];case 5:if(!s)return[3,9];v=0,m=s,d.label=6;case 6:return v<m.length?(g=m[v],b=g.tileset,e.log("process model layer"),[4,J(b,e)]):[3,9];case 7:d.sent(),d.label=8;case 8:return v++,[3,6];case 9:return[2]}})})}function L(t,e,r){return F(this,void 0,void 0,function(){var i,s,n,o,u,l,a,c,f,v,m,g,b;return P(this,function(d){switch(d.label){case 0:return i=y.join(r.distPath,S(t,r.baseURL)),s=_(t,i,r.fetch),r.log(function(w){return"download: ".concat(t," -> ").concat(w)},s),[4,s];case 1:if(d.sent(),n=Math.pow(2,e.level),o=r.imageOptions.format,o.length===0&&o.push(void 0),u=[],n>1)for(l=0;l<n;l++)for(a=0;a<n;a++)for(c=0,f=o;c<f.length;c++)v=f[c],m=[e.size/n*a,e.size/n*l,e.size/n,e.size/n],g=e.scale>=1?void 0:e.scale*e.size/n,e.level===1&&e.scale>=.5&&(v==="jpg"||/\.jpg$/.test(i))&&(g=void 0),b=D(i,{format:v,size:g,cut:m,toFilename:r.imageProcessingFilename}),r.log(function(w){return"imageProcessing: ".concat(i," -> ").concat(w)},b),u.push(b);return[4,Promise.all(u)];case 2:return d.sent(),[2]}})})}function Q(t,e){return F(this,void 0,void 0,function(){return P(this,function(r){switch(r.label){case 0:return[4,Promise.all([L(t.front,t,e),L(t.back,t,e),L(t.left,t,e),L(t.right,t,e),L(t.up,t,e),L(t.down,t,e)])];case 1:return r.sent(),[2]}})})}function I(t,e){return F(this,void 0,void 0,function(){var r,i,s,n,o,u,l,a,c,f,v,m;return P(this,function(g){switch(g.label){case 0:return r=y.join(e.distPath,S(t,e.baseURL)),i=_(t,r,e.fetch),e.log(function(b){return"download: ".concat(t," -> ").concat(b)},i),[4,i];case 1:for(g.sent(),s=e.imageOptions.format,s.length===0&&s.push(void 0),n=e.imageOptions.size,n.length===0&&n.push(void 0),o=[],u=0,l=s;u<l.length;u++)for(a=l[u],c=0,f=n;c<f.length;c++)v=f[c],m=D(r,{format:a,size:v,toFilename:e.imageProcessingFilename}),e.log(function(b){return"imageProcessing: ".concat(r," -> ").concat(b)},m),o.push(m);return[4,Promise.all(o)];case 2:return g.sent(),[2]}})})}function V(t,e){return F(this,void 0,void 0,function(){var r;return P(this,function(i){switch(i.label){case 0:return r=t.images,[4,Promise.all([I(r.front,e),I(r.back,e),I(r.left,e),I(r.right,e),I(r.up,e),I(r.down,e)])];case 1:return i.sent(),r.tiles?[4,Promise.all(r.tiles.map(function(s){return Q(s,e)}))]:[3,3];case 2:i.sent(),i.label=3;case 3:return[2]}})})}function Y(t,e){return F(this,void 0,void 0,function(){var r,i,s,n,o;return P(this,function(u){switch(u.label){case 0:r=t.observers,i=0,s=r,u.label=1;case 1:return i<s.length?(n=s[i],o=V(n,e),e.log("process observer #".concat(n.index," derived: ").concat(n.derivedIdStr),o),[4,o]):[3,4];case 2:u.sent(),u.label=3;case 3:return i++,[3,1];case 4:return[2]}})})}function Z(t,e){if(e){var r=Date.now();e.then(function(s){var n=Date.now()-r,o=typeof t=="function"?t(s):t;console.log(o+"(".concat(n,"ms)"))}).catch(function(){})}else{var i=typeof t=="function"?t(null):t;console.log(i)}}function x(t){return F(this,arguments,void 0,function(e,r){var i,s,n,o,u,l,a,c,f,v,m,g,b,d,w,p,k,j;return r===void 0&&(r={}),P(this,function(h){switch(h.label){case 0:if(i=e.baseURL,s="",r.distPath)s=y.resolve(process.cwd(),r.distPath);else for(s=y.resolve(process.cwd(),(f=e.workCode)!==null&&f!==void 0?f:"work-".concat(Date.now()));C.existsSync(s);)/.-(\d+)$/.test(s)?s=s.replace(/.-(\d+)$/,function(O,z){return"-"+(Number(z)+1)}):s=s+"-1";return n={baseURL:i,distPath:s,fetch:(v=r.fetch)!==null&&v!==void 0?v:fetch,imageOptions:{size:(g=(m=r.imageOptions)===null||m===void 0?void 0:m.size)!==null&&g!==void 0?g:[],format:(d=(b=r.imageOptions)===null||b===void 0?void 0:b.format)!==null&&d!==void 0?d:[]},textureOptions:{size:(p=(w=r.textureOptions)===null||w===void 0?void 0:w.size)!==null&&p!==void 0?p:[],format:(j=(k=r.textureOptions)===null||k===void 0?void 0:k.format)!==null&&j!==void 0?j:[]},log:r.log?Z:function(){return Promise.resolve()},imageProcessingFilename:r.imageProcessingFilename},n.log(JSON.stringify(n,null," ")),[4,q.mkdir(s,{recursive:!0})];case 1:h.sent(),o=0,h.label=2;case 2:return o<e.raw.works.length?(u=e.raw.works[o],l=o>0?"-".concat(o):"",a="work".concat(l,".json"),c=y.resolve(s,a),[4,q.writeFile(c,u)]):[3,5];case 3:h.sent(),h.label=4;case 4:return o++,[3,2];case 5:return[4,Y(e,n)];case 6:return h.sent(),[4,K(e,n)];case 7:return h.sent(),[2]}})})}exports.download=x;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2025/8/15
5
- * Version: 6.5.5
4
+ * Generated: 8/18/2025
5
+ * Version: 6.5.7
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -254,10 +254,10 @@
254
254
  * Agreement and all related documents shall be drafted in English.
255
255
  */import { createWriteStream as q, existsSync as D } from "node:fs";
256
256
  import { writeFile as M, mkdir as A, readFile as H } from "node:fs/promises";
257
- import { dirname as K, extname as Q, join as _, resolve as B } from "node:path";
257
+ import { dirname as K, extname as Q, join as j, resolve as B } from "node:path";
258
258
  import { Readable as V } from "node:stream";
259
259
  import Y from "sharp";
260
- function k(t, e, r, i) {
260
+ function F(t, e, r, i) {
261
261
  function a(n) {
262
262
  return n instanceof r ? n : new r(function(o) {
263
263
  o(n);
@@ -344,14 +344,14 @@ function y(t, e) {
344
344
  return { value: s[0] ? s[1] : void 0, done: !0 };
345
345
  }
346
346
  }
347
- function j(t, e) {
347
+ function S(t, e) {
348
348
  if (e && e[e.length - 1] !== "/" && (e += "/"), t.length > e.length && t.startsWith(e))
349
349
  return t.slice(e.length);
350
350
  throw new Error("".concat(t, " is not starting with ").concat(e));
351
351
  }
352
352
  var Z = 1024 * 1024 * 5;
353
- function S(t, e, r) {
354
- return k(this, void 0, void 0, function() {
353
+ function _(t, e, r) {
354
+ return F(this, void 0, void 0, function() {
355
355
  var i, a, n, o;
356
356
  return y(this, function(u) {
357
357
  switch (u.label) {
@@ -379,16 +379,16 @@ function S(t, e, r) {
379
379
  });
380
380
  }
381
381
  function W(t, e) {
382
- return k(this, void 0, void 0, function() {
382
+ return F(this, void 0, void 0, function() {
383
383
  var r, i, a, n, o, u, f, s, c, l;
384
- return y(this, function(d) {
384
+ return y(this, function(m) {
385
385
  return r = Q(t).slice(1) || "jpg", i = e.cut, a = e.size, n = e.format, o = n === void 0 ? r : n, u = Y(t), i && (u = u.extract({
386
386
  left: i[0],
387
387
  top: i[1],
388
388
  width: i[2],
389
389
  height: i[3]
390
- })), a && (u = u.resize(a)), o && (u = u.toFormat(o)), f = "", e.toFilename ? f = e.toFilename(t, { cut: e.cut, size: e.size, format: e.format }) : (s = "", c = "", l = o, i && (s = i.join("x")), a && (c = "".concat(a, "x")), l === r && !c && !s && (l = ""), f = [t, s, c, l].filter(function(m) {
391
- return m.length > 0;
390
+ })), a && (u = u.resize(a)), o && (u = u.toFormat(o)), f = "", e.toFilename ? f = e.toFilename(t, { cut: e.cut, size: e.size, format: e.format }) : (s = "", c = "", l = o, i && (s = i.join("x")), a && (c = "".concat(a, "x")), l === r && !c && !s && (l = ""), f = [t, s, c, l].filter(function(v) {
391
+ return v.length > 0;
392
392
  }).join(".")), f !== t && !D(f) ? [2, u.toFile(f).then(function() {
393
393
  return f;
394
394
  })] : [2, f];
@@ -405,12 +405,12 @@ function G(t) {
405
405
  return e;
406
406
  }
407
407
  function x(t, e, r) {
408
- return k(this, void 0, void 0, function() {
408
+ return F(this, void 0, void 0, function() {
409
409
  var i, a, n;
410
410
  return y(this, function(o) {
411
411
  switch (o.label) {
412
412
  case 0:
413
- return i = new URL(t, e).href, a = _(r.distPath, j(i, r.baseURL)), n = S(i, a, r.fetch), r.log(function(u) {
413
+ return i = new URL(t, e).href, a = j(r.distPath, S(i, r.baseURL)), n = _(i, a, r.fetch), r.log(function(u) {
414
414
  return "download: ".concat(i, " -> ").concat(u);
415
415
  }, n), [4, n];
416
416
  case 1:
@@ -427,52 +427,59 @@ function x(t, e, r) {
427
427
  });
428
428
  }
429
429
  function X(t, e) {
430
- return k(this, void 0, void 0, function() {
431
- var r, i, a, n, o, u, f, s, c, l, d, m, w, v, h, p, P, z;
432
- return y(this, function(g) {
433
- switch (g.label) {
430
+ return F(this, void 0, void 0, function() {
431
+ var r, i, a, n, o, u, f, s, c, l, m, v, g, b, d, w, p, P, k;
432
+ return y(this, function(h) {
433
+ switch (h.label) {
434
434
  case 0:
435
- return r = _(e.distPath, j(t, e.baseURL)), i = S(t, r, e.fetch), e.log(function(b) {
436
- return "download: ".concat(t, " -> ").concat(b);
435
+ return r = j(e.distPath, S(t, e.baseURL)), i = _(t, r, e.fetch), e.log(function(O) {
436
+ return "download: ".concat(t, " -> ").concat(O);
437
437
  }, i), [4, i];
438
438
  case 1:
439
- return g.sent(), o = (n = JSON).parse, [4, H(r, "utf8")];
439
+ return h.sent(), o = (n = JSON).parse, [4, H(r, "utf8")];
440
440
  case 2:
441
- return a = o.apply(n, [g.sent()]), a.asset.overview ? (u = new URL(a.asset.overview.imageFile, t).href, f = _(e.distPath, j(u, e.baseURL)), s = S(u, f, e.fetch), e.log(function(b) {
442
- return "download: ".concat(u, " -> ").concat(b);
441
+ return a = o.apply(n, [h.sent()]), a.asset.overview ? (u = new URL(a.asset.overview.imageFile, t).href, f = j(e.distPath, S(u, e.baseURL)), s = _(u, f, e.fetch), e.log(function(O) {
442
+ return "download: ".concat(u, " -> ").concat(O);
443
443
  }, s), [4, s]) : [3, 4];
444
444
  case 3:
445
- g.sent(), g.label = 4;
445
+ h.sent(), h.label = 4;
446
446
  case 4:
447
447
  if (!a.asset.trajectories) return [3, 8];
448
- c = function(b) {
449
- var F, O, R;
450
- return y(this, function(I) {
451
- switch (I.label) {
448
+ c = function(O) {
449
+ var z, E, L;
450
+ return y(this, function(R) {
451
+ switch (R.label) {
452
452
  case 0:
453
- return F = new URL(b.file, t).href, O = _(e.distPath, j(F, e.baseURL)), R = S(F, O, e.fetch), e.log(function(E) {
454
- return "download: ".concat(F, " -> ").concat(E);
455
- }, R), [4, R];
453
+ return z = new URL(O.file, t).href, E = j(e.distPath, S(z, e.baseURL)), L = _(z, E, e.fetch), e.log(function($) {
454
+ return "download: ".concat(z, " -> ").concat($);
455
+ }, L), [4, L];
456
456
  case 1:
457
- return I.sent(), [
457
+ return R.sent(), [
458
458
  2
459
459
  /*return*/
460
460
  ];
461
461
  }
462
462
  });
463
- }, l = 0, d = a.asset.trajectories.list, g.label = 5;
463
+ }, l = 0, m = a.asset.trajectories.list, h.label = 5;
464
464
  case 5:
465
- return l < d.length ? (m = d[l], [5, c(m)]) : [3, 8];
465
+ return l < m.length ? (v = m[l], [5, c(v)]) : [3, 8];
466
466
  case 6:
467
- g.sent(), g.label = 7;
467
+ h.sent(), h.label = 7;
468
468
  case 7:
469
469
  return l++, [3, 5];
470
470
  case 8:
471
- for (w = G(a.root), v = [], h = 0, p = w; h < p.length; h++)
472
- P = p[h], z = x(P, t, e), v.push(z);
473
- return [4, Promise.all(v)];
471
+ g = G(a.root), b = 6, d = 0, h.label = 9;
474
472
  case 9:
475
- return g.sent(), [
473
+ if (!(d < g.length)) return [3, 12];
474
+ for (w = [], p = 0; p < b; p++)
475
+ P = g[d + p], P && (k = x(P, t, e), w.push(k));
476
+ return [4, Promise.all(w)];
477
+ case 10:
478
+ h.sent(), h.label = 11;
479
+ case 11:
480
+ return d += b, [3, 9];
481
+ case 12:
482
+ return [
476
483
  2
477
484
  /*return*/
478
485
  ];
@@ -481,58 +488,58 @@ function X(t, e) {
481
488
  });
482
489
  }
483
490
  function ee(t, e) {
484
- return k(this, void 0, void 0, function() {
485
- var r, i, a, n, o, u, f, s, c, l, d, m, w, v;
486
- return y(this, function(h) {
487
- switch (h.label) {
491
+ return F(this, void 0, void 0, function() {
492
+ var r, i, a, n, o, u, f, s, c, l, m, v, g, b;
493
+ return y(this, function(d) {
494
+ switch (d.label) {
488
495
  case 0:
489
- return e.log("process model"), t.model ? (r = t.model, i = r.textures, a = r.layers, n = r.file, n ? (e.log("process model file"), o = _(e.distPath, j(n, e.baseURL)), u = S(n, o, e.fetch), e.log(function(p) {
490
- return "download: ".concat(n, " -> ").concat(p);
496
+ return e.log("process model"), t.model ? (r = t.model, i = r.textures, a = r.layers, n = r.file, n ? (e.log("process model file"), o = j(e.distPath, S(n, e.baseURL)), u = _(n, o, e.fetch), e.log(function(w) {
497
+ return "download: ".concat(n, " -> ").concat(w);
491
498
  }, u), [4, u]) : [3, 5]) : [3, 9];
492
499
  case 1:
493
- if (h.sent(), !i) return [3, 5];
494
- f = function(p) {
495
- var P, z, g, b, F, O, R, I, E, $, J, N;
496
- return y(this, function(C) {
497
- switch (C.label) {
500
+ if (d.sent(), !i) return [3, 5];
501
+ f = function(w) {
502
+ var p, P, k, h, O, z, E, L, R, $, J, C;
503
+ return y(this, function(N) {
504
+ switch (N.label) {
498
505
  case 0:
499
- return P = _(e.distPath, j(p, e.baseURL)), z = S(p, P, e.fetch), e.log(function(U) {
500
- return "download: ".concat(p, " -> ").concat(U);
501
- }, z), [4, z];
506
+ return p = j(e.distPath, S(w, e.baseURL)), P = _(w, p, e.fetch), e.log(function(U) {
507
+ return "download: ".concat(w, " -> ").concat(U);
508
+ }, P), [4, P];
502
509
  case 1:
503
- for (C.sent(), g = e.imageOptions.format, g.length === 0 && g.push(void 0), b = e.imageOptions.size, b.length === 0 && b.push(void 0), F = [], O = 0, R = g; O < R.length; O++)
504
- for (I = R[O], E = 0, $ = b; E < $.length; E++)
505
- J = $[E], N = W(P, {
506
- format: I,
510
+ for (N.sent(), k = e.imageOptions.format, k.length === 0 && k.push(void 0), h = e.imageOptions.size, h.length === 0 && h.push(void 0), O = [], z = 0, E = k; z < E.length; z++)
511
+ for (L = E[z], R = 0, $ = h; R < $.length; R++)
512
+ J = $[R], C = W(p, {
513
+ format: L,
507
514
  size: J,
508
515
  toFilename: e.imageProcessingFilename
509
516
  }), e.log(function(U) {
510
- return "imageProcessing: ".concat(P, " -> ").concat(U);
511
- }, N), F.push(N);
512
- return [4, Promise.all(F)];
517
+ return "imageProcessing: ".concat(p, " -> ").concat(U);
518
+ }, C), O.push(C);
519
+ return [4, Promise.all(O)];
513
520
  case 2:
514
- return C.sent(), [
521
+ return N.sent(), [
515
522
  2
516
523
  /*return*/
517
524
  ];
518
525
  }
519
526
  });
520
- }, s = 0, c = i, h.label = 2;
527
+ }, s = 0, c = i, d.label = 2;
521
528
  case 2:
522
529
  return s < c.length ? (l = c[s], [5, f(l)]) : [3, 5];
523
530
  case 3:
524
- h.sent(), h.label = 4;
531
+ d.sent(), d.label = 4;
525
532
  case 4:
526
533
  return s++, [3, 2];
527
534
  case 5:
528
535
  if (!a) return [3, 9];
529
- d = 0, m = a, h.label = 6;
536
+ m = 0, v = a, d.label = 6;
530
537
  case 6:
531
- return d < m.length ? (w = m[d], v = w.tileset, e.log("process model layer"), [4, X(v, e)]) : [3, 9];
538
+ return m < v.length ? (g = v[m], b = g.tileset, e.log("process model layer"), [4, X(b, e)]) : [3, 9];
532
539
  case 7:
533
- h.sent(), h.label = 8;
540
+ d.sent(), d.label = 8;
534
541
  case 8:
535
- return d++, [3, 6];
542
+ return m++, [3, 6];
536
543
  case 9:
537
544
  return [
538
545
  2
@@ -542,36 +549,36 @@ function ee(t, e) {
542
549
  });
543
550
  });
544
551
  }
545
- function L(t, e, r) {
546
- return k(this, void 0, void 0, function() {
547
- var i, a, n, o, u, f, s, c, l, d, m, w, v;
548
- return y(this, function(h) {
549
- switch (h.label) {
552
+ function T(t, e, r) {
553
+ return F(this, void 0, void 0, function() {
554
+ var i, a, n, o, u, f, s, c, l, m, v, g, b;
555
+ return y(this, function(d) {
556
+ switch (d.label) {
550
557
  case 0:
551
- return i = _(r.distPath, j(t, r.baseURL)), a = S(t, i, r.fetch), r.log(function(p) {
552
- return "download: ".concat(t, " -> ").concat(p);
558
+ return i = j(r.distPath, S(t, r.baseURL)), a = _(t, i, r.fetch), r.log(function(w) {
559
+ return "download: ".concat(t, " -> ").concat(w);
553
560
  }, a), [4, a];
554
561
  case 1:
555
- if (h.sent(), n = Math.pow(2, e.level), o = r.imageOptions.format, o.length === 0 && o.push(void 0), u = [], n > 1)
562
+ if (d.sent(), n = Math.pow(2, e.level), o = r.imageOptions.format, o.length === 0 && o.push(void 0), u = [], n > 1)
556
563
  for (f = 0; f < n; f++)
557
564
  for (s = 0; s < n; s++)
558
565
  for (c = 0, l = o; c < l.length; c++)
559
- d = l[c], m = [
566
+ m = l[c], v = [
560
567
  e.size / n * s,
561
568
  e.size / n * f,
562
569
  e.size / n,
563
570
  e.size / n
564
- ], w = e.scale >= 1 ? void 0 : e.scale * e.size / n, e.level === 1 && e.scale >= 0.5 && (d === "jpg" || /\.jpg$/.test(i)) && (w = void 0), v = W(i, {
565
- format: d,
566
- size: w,
567
- cut: m,
571
+ ], g = e.scale >= 1 ? void 0 : e.scale * e.size / n, e.level === 1 && e.scale >= 0.5 && (m === "jpg" || /\.jpg$/.test(i)) && (g = void 0), b = W(i, {
572
+ format: m,
573
+ size: g,
574
+ cut: v,
568
575
  toFilename: r.imageProcessingFilename
569
- }), r.log(function(p) {
570
- return "imageProcessing: ".concat(i, " -> ").concat(p);
571
- }, v), u.push(v);
576
+ }), r.log(function(w) {
577
+ return "imageProcessing: ".concat(i, " -> ").concat(w);
578
+ }, b), u.push(b);
572
579
  return [4, Promise.all(u)];
573
580
  case 2:
574
- return h.sent(), [
581
+ return d.sent(), [
575
582
  2
576
583
  /*return*/
577
584
  ];
@@ -580,17 +587,17 @@ function L(t, e, r) {
580
587
  });
581
588
  }
582
589
  function re(t, e) {
583
- return k(this, void 0, void 0, function() {
590
+ return F(this, void 0, void 0, function() {
584
591
  return y(this, function(r) {
585
592
  switch (r.label) {
586
593
  case 0:
587
594
  return [4, Promise.all([
588
- L(t.front, t, e),
589
- L(t.back, t, e),
590
- L(t.left, t, e),
591
- L(t.right, t, e),
592
- L(t.up, t, e),
593
- L(t.down, t, e)
595
+ T(t.front, t, e),
596
+ T(t.back, t, e),
597
+ T(t.left, t, e),
598
+ T(t.right, t, e),
599
+ T(t.up, t, e),
600
+ T(t.down, t, e)
594
601
  ])];
595
602
  case 1:
596
603
  return r.sent(), [
@@ -601,28 +608,28 @@ function re(t, e) {
601
608
  });
602
609
  });
603
610
  }
604
- function T(t, e) {
605
- return k(this, void 0, void 0, function() {
606
- var r, i, a, n, o, u, f, s, c, l, d, m;
607
- return y(this, function(w) {
608
- switch (w.label) {
611
+ function I(t, e) {
612
+ return F(this, void 0, void 0, function() {
613
+ var r, i, a, n, o, u, f, s, c, l, m, v;
614
+ return y(this, function(g) {
615
+ switch (g.label) {
609
616
  case 0:
610
- return r = _(e.distPath, j(t, e.baseURL)), i = S(t, r, e.fetch), e.log(function(v) {
611
- return "download: ".concat(t, " -> ").concat(v);
617
+ return r = j(e.distPath, S(t, e.baseURL)), i = _(t, r, e.fetch), e.log(function(b) {
618
+ return "download: ".concat(t, " -> ").concat(b);
612
619
  }, i), [4, i];
613
620
  case 1:
614
- for (w.sent(), a = e.imageOptions.format, a.length === 0 && a.push(void 0), n = e.imageOptions.size, n.length === 0 && n.push(void 0), o = [], u = 0, f = a; u < f.length; u++)
621
+ for (g.sent(), a = e.imageOptions.format, a.length === 0 && a.push(void 0), n = e.imageOptions.size, n.length === 0 && n.push(void 0), o = [], u = 0, f = a; u < f.length; u++)
615
622
  for (s = f[u], c = 0, l = n; c < l.length; c++)
616
- d = l[c], m = W(r, {
623
+ m = l[c], v = W(r, {
617
624
  format: s,
618
- size: d,
625
+ size: m,
619
626
  toFilename: e.imageProcessingFilename
620
- }), e.log(function(v) {
621
- return "imageProcessing: ".concat(r, " -> ").concat(v);
622
- }, m), o.push(m);
627
+ }), e.log(function(b) {
628
+ return "imageProcessing: ".concat(r, " -> ").concat(b);
629
+ }, v), o.push(v);
623
630
  return [4, Promise.all(o)];
624
631
  case 2:
625
- return w.sent(), [
632
+ return g.sent(), [
626
633
  2
627
634
  /*return*/
628
635
  ];
@@ -631,18 +638,18 @@ function T(t, e) {
631
638
  });
632
639
  }
633
640
  function ne(t, e) {
634
- return k(this, void 0, void 0, function() {
641
+ return F(this, void 0, void 0, function() {
635
642
  var r;
636
643
  return y(this, function(i) {
637
644
  switch (i.label) {
638
645
  case 0:
639
646
  return r = t.images, [4, Promise.all([
640
- T(r.front, e),
641
- T(r.back, e),
642
- T(r.left, e),
643
- T(r.right, e),
644
- T(r.up, e),
645
- T(r.down, e)
647
+ I(r.front, e),
648
+ I(r.back, e),
649
+ I(r.left, e),
650
+ I(r.right, e),
651
+ I(r.up, e),
652
+ I(r.down, e)
646
653
  ])];
647
654
  case 1:
648
655
  return i.sent(), r.tiles ? [4, Promise.all(r.tiles.map(function(a) {
@@ -660,7 +667,7 @@ function ne(t, e) {
660
667
  });
661
668
  }
662
669
  function te(t, e) {
663
- return k(this, void 0, void 0, function() {
670
+ return F(this, void 0, void 0, function() {
664
671
  var r, i, a, n, o;
665
672
  return y(this, function(u) {
666
673
  switch (u.label) {
@@ -695,29 +702,29 @@ function ie(t, e) {
695
702
  }
696
703
  }
697
704
  function fe(t) {
698
- return k(this, arguments, void 0, function(e, r) {
699
- var i, a, n, o, u, f, s, c, l, d, m, w, v, h, p, P, z, g;
700
- return r === void 0 && (r = {}), y(this, function(b) {
701
- switch (b.label) {
705
+ return F(this, arguments, void 0, function(e, r) {
706
+ var i, a, n, o, u, f, s, c, l, m, v, g, b, d, w, p, P, k;
707
+ return r === void 0 && (r = {}), y(this, function(h) {
708
+ switch (h.label) {
702
709
  case 0:
703
710
  if (i = e.baseURL, a = "", r.distPath)
704
711
  a = B(process.cwd(), r.distPath);
705
712
  else
706
713
  for (a = B(process.cwd(), (l = e.workCode) !== null && l !== void 0 ? l : "work-".concat(Date.now())); D(a); )
707
- /.-(\d+)$/.test(a) ? a = a.replace(/.-(\d+)$/, function(F, O) {
708
- return "-" + (Number(O) + 1);
714
+ /.-(\d+)$/.test(a) ? a = a.replace(/.-(\d+)$/, function(O, z) {
715
+ return "-" + (Number(z) + 1);
709
716
  }) : a = a + "-1";
710
717
  return n = {
711
718
  baseURL: i,
712
719
  distPath: a,
713
- fetch: (d = r.fetch) !== null && d !== void 0 ? d : fetch,
720
+ fetch: (m = r.fetch) !== null && m !== void 0 ? m : fetch,
714
721
  imageOptions: {
715
- size: (w = (m = r.imageOptions) === null || m === void 0 ? void 0 : m.size) !== null && w !== void 0 ? w : [],
716
- format: (h = (v = r.imageOptions) === null || v === void 0 ? void 0 : v.format) !== null && h !== void 0 ? h : []
722
+ size: (g = (v = r.imageOptions) === null || v === void 0 ? void 0 : v.size) !== null && g !== void 0 ? g : [],
723
+ format: (d = (b = r.imageOptions) === null || b === void 0 ? void 0 : b.format) !== null && d !== void 0 ? d : []
717
724
  },
718
725
  textureOptions: {
719
- size: (P = (p = r.textureOptions) === null || p === void 0 ? void 0 : p.size) !== null && P !== void 0 ? P : [],
720
- format: (g = (z = r.textureOptions) === null || z === void 0 ? void 0 : z.format) !== null && g !== void 0 ? g : []
726
+ size: (p = (w = r.textureOptions) === null || w === void 0 ? void 0 : w.size) !== null && p !== void 0 ? p : [],
727
+ format: (k = (P = r.textureOptions) === null || P === void 0 ? void 0 : P.format) !== null && k !== void 0 ? k : []
721
728
  },
722
729
  log: r.log ? ie : function() {
723
730
  return Promise.resolve();
@@ -725,19 +732,19 @@ function fe(t) {
725
732
  imageProcessingFilename: r.imageProcessingFilename
726
733
  }, n.log(JSON.stringify(n, null, " ")), [4, A(a, { recursive: !0 })];
727
734
  case 1:
728
- b.sent(), o = 0, b.label = 2;
735
+ h.sent(), o = 0, h.label = 2;
729
736
  case 2:
730
737
  return o < e.raw.works.length ? (u = e.raw.works[o], f = o > 0 ? "-".concat(o) : "", s = "work".concat(f, ".json"), c = B(a, s), [4, M(c, u)]) : [3, 5];
731
738
  case 3:
732
- b.sent(), b.label = 4;
739
+ h.sent(), h.label = 4;
733
740
  case 4:
734
741
  return o++, [3, 2];
735
742
  case 5:
736
743
  return [4, te(e, n)];
737
744
  case 6:
738
- return b.sent(), [4, ee(e, n)];
745
+ return h.sent(), [4, ee(e, n)];
739
746
  case 7:
740
- return b.sent(), [
747
+ return h.sent(), [
741
748
  2
742
749
  /*return*/
743
750
  ];