gl-draw 0.8.16 → 0.8.18

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.
@@ -1 +1 @@
1
- (function(){var X={666:function(_){var g=function(p){"use strict";var R=Object.prototype,T=R.hasOwnProperty,d,O=typeof Symbol=="function"?Symbol:{},E=O.iterator||"@@iterator",P=O.asyncIterator||"@@asyncIterator",k=O.toStringTag||"@@toStringTag";function v(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{v({},"")}catch(e){v=function(t,n,u){return t[n]=u}}function C(e,t,n,u){var f=t&&t.prototype instanceof V?t:V,w=Object.create(f.prototype),S=new l(u||[]);return w._invoke=r(e,n,S),w}p.wrap=C;function z(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(u){return{type:"throw",arg:u}}}var x="suspendedStart",N="suspendedYield",Z="executing",B="completed",b={};function V(){}function y(){}function m(){}var L={};v(L,E,function(){return this});var D=Object.getPrototypeOf,G=D&&D(D(j([])));G&&G!==R&&T.call(G,E)&&(L=G);var o=m.prototype=V.prototype=Object.create(L);y.prototype=m,v(o,"constructor",m),v(m,"constructor",y),y.displayName=v(m,k,"GeneratorFunction");function i(e){["next","throw","return"].forEach(function(t){v(e,t,function(n){return this._invoke(t,n)})})}p.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return t?t===y||(t.displayName||t.name)==="GeneratorFunction":!1},p.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,v(e,k,"GeneratorFunction")),e.prototype=Object.create(o),e},p.awrap=function(e){return{__await:e}};function c(e,t){function n(w,S,A,H){var I=z(e[w],e,S);if(I.type==="throw")H(I.arg);else{var $=I.arg,F=$.value;return F&&typeof F=="object"&&T.call(F,"__await")?t.resolve(F.__await).then(function(W){n("next",W,A,H)},function(W){n("throw",W,A,H)}):t.resolve(F).then(function(W){$.value=W,A($)},function(W){return n("throw",W,A,H)})}}var u;function f(w,S){function A(){return new t(function(H,I){n(w,S,H,I)})}return u=u?u.then(A,A):A()}this._invoke=f}i(c.prototype),v(c.prototype,P,function(){return this}),p.AsyncIterator=c,p.async=function(e,t,n,u,f){f===void 0&&(f=Promise);var w=new c(C(e,t,n,u),f);return p.isGeneratorFunction(t)?w:w.next().then(function(S){return S.done?S.value:w.next()})};function r(e,t,n){var u=x;return function(w,S){if(u===Z)throw new Error("Generator is already running");if(u===B){if(w==="throw")throw S;return M()}for(n.method=w,n.arg=S;;){var A=n.delegate;if(A){var H=a(A,n);if(H){if(H===b)continue;return H}}if(n.method==="next")n.sent=n._sent=n.arg;else if(n.method==="throw"){if(u===x)throw u=B,n.arg;n.dispatchException(n.arg)}else n.method==="return"&&n.abrupt("return",n.arg);u=Z;var I=z(e,t,n);if(I.type==="normal"){if(u=n.done?B:N,I.arg===b)continue;return{value:I.arg,done:n.done}}else I.type==="throw"&&(u=B,n.method="throw",n.arg=I.arg)}}}function a(e,t){var n=e.iterator[t.method];if(n===d){if(t.delegate=null,t.method==="throw"){if(e.iterator.return&&(t.method="return",t.arg=d,a(e,t),t.method==="throw"))return b;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var u=z(n,e.iterator,t.arg);if(u.type==="throw")return t.method="throw",t.arg=u.arg,t.delegate=null,b;var f=u.arg;if(!f)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,b;if(f.done)t[e.resultName]=f.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=d);else return f;return t.delegate=null,b}i(o),v(o,k,"Generator"),v(o,E,function(){return this}),v(o,"toString",function(){return"[object Generator]"});function h(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function s(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function l(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(h,this),this.reset(!0)}p.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function u(){for(;t.length;){var f=t.pop();if(f in e)return u.value=f,u.done=!1,u}return u.done=!0,u}};function j(e){if(e){var t=e[E];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var n=-1,u=function f(){for(;++n<e.length;)if(T.call(e,n))return f.value=e[n],f.done=!1,f;return f.value=d,f.done=!0,f};return u.next=u}}return{next:M}}p.values=j;function M(){return{value:d,done:!0}}return l.prototype={constructor:l,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.method="next",this.arg=d,this.tryEntries.forEach(s),!e)for(var t in this)t.charAt(0)==="t"&&T.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=d)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(H,I){return w.type="throw",w.arg=e,t.next=H,I&&(t.method="next",t.arg=d),!!I}for(var u=this.tryEntries.length-1;u>=0;--u){var f=this.tryEntries[u],w=f.completion;if(f.tryLoc==="root")return n("end");if(f.tryLoc<=this.prev){var S=T.call(f,"catchLoc"),A=T.call(f,"finallyLoc");if(S&&A){if(this.prev<f.catchLoc)return n(f.catchLoc,!0);if(this.prev<f.finallyLoc)return n(f.finallyLoc)}else if(S){if(this.prev<f.catchLoc)return n(f.catchLoc,!0)}else if(A){if(this.prev<f.finallyLoc)return n(f.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var u=this.tryEntries[n];if(u.tryLoc<=this.prev&&T.call(u,"finallyLoc")&&this.prev<u.finallyLoc){var f=u;break}}f&&(e==="break"||e==="continue")&&f.tryLoc<=t&&t<=f.finallyLoc&&(f=null);var w=f?f.completion:{};return w.type=e,w.arg=t,f?(this.method="next",this.next=f.finallyLoc,b):this.complete(w)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),s(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var u=n.completion;if(u.type==="throw"){var f=u.arg;s(n)}return f}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=d),b}},p}(_.exports);try{regeneratorRuntime=g}catch(p){typeof globalThis=="object"?globalThis.regeneratorRuntime=g:Function("r","regeneratorRuntime = r")(g)}},584:function(_,g,p){"use strict";p.d(g,{makePromiseCreator:function(){return R.Z}});var R=p(282),T=p(666),d=p.n(T),O=null,E=p(644);function P(b){if(b.material){var V=Array.isArray(b.material)?b.material:[b.material];V.forEach(function(y){var m,L;(m=y.color)===null||m===void 0||m.convertSRGBToLinear(),(L=y.emissive)===null||L===void 0||L.convertSRGBToLinear(),y.map&&(y.map.encoding=THREE.sRGBEncoding),y.emissiveMap&&(y.emissiveMap.encoding=THREE.sRGBEncoding)})}}var k=p(568),v=p(924),C=p(360),z=p(484),x=null,N=null,Z=function(){var b=(0,k.Z)(d().mark(function V(y,m){var L,D,G,o,i,c,r,a,h;return d().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return L=m.type,D=L===void 0?"blob":L,G=m.version,o=G===void 0?"1":G,l.next=4,(0,C.get)(y);case 4:if(c=l.sent,!(c&&c[o])){l.next=9;break}i=c[o],l.next=15;break;case 9:return l.next=11,(0,z.Z)(fetch(y).then(function(j){if(j.ok)return j[D]();throw new Error}));case 11:r=l.sent,a=r.res,h=r.err,h||(i=a,(0,C.set)(y,(0,v.Z)({},o,a)));case 15:return l.abrupt("return",i?{url:D==="json"?y:URL.createObjectURL(i),store:i}:{url:y});case 16:case"end":return l.stop()}},V)}));return function(y,m){return b.apply(this,arguments)}}(),B=p(705)},282:function(_,g,p){"use strict";p.d(g,{Z:function(){return T}});var R=p(484);function T(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E={};return E.promise=new Promise(function(P,k){E.resolve=P,E.reject=k}),d&&(E.promise=(0,R.Z)(E.promise,O)),E}},484:function(_,g,p){"use strict";p.d(g,{Z:function(){return T}});var R=p(42);function T(d){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return d.then(function(E){return(0,R.Z)({err:null,res:E},O)}).catch(function(E){return(0,R.Z)({err:E,res:void 0},O)})}},705:function(_,g,p){"use strict";var R=p(644),T=p.n(R),d=new Map,O=function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{generateTopUV:function(k,v,C,z,x){var N=v[C*3],Z=v[C*3+1],B=v[z*3],b=v[z*3+1],V=v[x*3],y=v[x*3+1],m;if(d.has(k))m=d.get(k);else{var L=P.box3||new THREE.Box3;if(!P.box3){var D=k.parameters.shapes.getPoints();L.setFromArray(D.map(function(r){return[r.x,r.y,0]}).flat())}var G=L.getSize(new THREE.Vector3);P.split&&(G.y/=P.split),m={box:L,size:G},d.set(k,m)}var o=m.box,i=m.size,c=P.split?1-P.split:0;return[new THREE.Vector2((N-o.min.x)/i.x,(Z-o.min.y)/i.y+c),new THREE.Vector2((B-o.min.x)/i.x,(b-o.min.y)/i.y+c),new THREE.Vector2((V-o.min.x)/i.x,(y-o.min.y)/i.y+c)]},generateSideWallUV:function(k,v,C,z,x,N){var Z=v[C*3],B=v[C*3+1],b=v[C*3+2],V=v[z*3],y=v[z*3+1],m=v[z*3+2],L=v[x*3],D=v[x*3+1],G=v[x*3+2],o=v[N*3],i=v[N*3+1],c=v[N*3+2],r;if(d.has(v))r=d.get(v);else{var a=new THREE.Box3;a.setFromArray(v);var h=a.getSize(new THREE.Vector3);P.split&&(h.z/=1-P.split),r={box:a,size:h},d.set(v,r)}var s=r.box,l=r.size;return Math.abs(B-y)<Math.abs(Z-V)?[new THREE.Vector2((Z-s.min.x)/l.x,(b-s.min.z)/l.z),new THREE.Vector2((V-s.min.x)/l.x,(m-s.min.z)/l.z),new THREE.Vector2((L-s.min.x)/l.x,(G-s.min.z)/l.z),new THREE.Vector2((o-s.min.x)/l.x,(c-s.min.z)/l.z)]:[new THREE.Vector2((B-s.min.y)/l.y,(b-s.min.z)/l.z),new THREE.Vector2((y-s.min.y)/l.y,(m-s.min.z)/l.z),new THREE.Vector2((D-s.min.y)/l.y,(G-s.min.z)/l.z),new THREE.Vector2((i-s.min.y)/l.y,(c-s.min.z)/l.z)]}}},E=function(){d.clear()}},360:function(_){"use strict";_.exports=require("idb-keyval")},644:function(_){"use strict";_.exports=require("three")},568:function(_,g,p){"use strict";p.d(g,{Z:function(){return T}});function R(d,O,E,P,k,v,C){try{var z=d[v](C),x=z.value}catch(N){E(N);return}z.done?O(x):Promise.resolve(x).then(P,k)}function T(d){return function(){var O=this,E=arguments;return new Promise(function(P,k){var v=d.apply(O,E);function C(x){R(v,P,k,C,z,"next",x)}function z(x){R(v,P,k,C,z,"throw",x)}C(void 0)})}}},924:function(_,g,p){"use strict";p.d(g,{Z:function(){return R}});function R(T,d,O){return d in T?Object.defineProperty(T,d,{value:O,enumerable:!0,configurable:!0,writable:!0}):T[d]=O,T}},42:function(_,g,p){"use strict";p.d(g,{Z:function(){return T}});var R=p(924);function T(d){for(var O=1;O<arguments.length;O++){var E=arguments[O]!=null?arguments[O]:{},P=Object.keys(E);typeof Object.getOwnPropertySymbols=="function"&&(P=P.concat(Object.getOwnPropertySymbols(E).filter(function(k){return Object.getOwnPropertyDescriptor(E,k).enumerable}))),P.forEach(function(k){(0,R.Z)(d,k,E[k])})}return d}}},Y={};function U(_){var g=Y[_];if(g!==void 0)return g.exports;var p=Y[_]={exports:{}};return X[_](p,p.exports,U),p.exports}(function(){U.n=function(_){var g=_&&_.__esModule?function(){return _.default}:function(){return _};return U.d(g,{a:g}),g}})(),function(){U.d=function(_,g){for(var p in g)U.o(g,p)&&!U.o(_,p)&&Object.defineProperty(_,p,{enumerable:!0,get:g[p]})}}(),function(){U.o=function(_,g){return Object.prototype.hasOwnProperty.call(_,g)}}(),function(){U.r=function(_){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_,"__esModule",{value:!0})}}();var K={};(function(){"use strict";U.r(K),U.d(K,{Cache:function(){return p},Data:function(){return y},Draw:function(){return V},Wk:function(){return G}});function _(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}var g=U(584),p=function(){"use strict";function o(){_(this,o),this.cache=new Map}var i=o.prototype;return i.install=function(){},i.init=function(r){var a=(0,g.makePromiseCreator)();this.cache.set(r,a)},i.get=function(r){var a;return(a=this.cache.get(r))===null||a===void 0?void 0:a.promise},i.set=function(r,a){var h=this.cache.get(r);h?h.resolve(a):console.warn("init cache first")},i.dispose=function(){this.cache.forEach(function(r,a){r.reject("stop set cache:".concat(a))}),this.cache.clear()},o}(),R=U(568);function T(o,i){for(var c=0;c<i.length;c++){var r=i[c];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,r.key,r)}}function d(o,i,c){return i&&T(o.prototype,i),c&&T(o,c),o}function O(o){if(Array.isArray(o))return o}function E(o){if(typeof Symbol!="undefined"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}function P(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function k(o,i){(i==null||i>o.length)&&(i=o.length);for(var c=0,r=new Array(i);c<i;c++)r[c]=o[c];return r}function v(o,i){if(!!o){if(typeof o=="string")return k(o,i);var c=Object.prototype.toString.call(o).slice(8,-1);if(c==="Object"&&o.constructor&&(c=o.constructor.name),c==="Map"||c==="Set")return Array.from(c);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return k(o,i)}}function C(o,i){return O(o)||E(o,i)||v(o,i)||P()}function z(o){if(Array.isArray(o))return k(o)}function x(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function N(o){return z(o)||E(o)||v(o)||x()}var Z=U(666),B=U.n(Z),b=U(644),V=function(){"use strict";function o(c){_(this,o),this.onTopBase=new Map,this.objectNamesToFactories=new Map,this.objects=new Map,this.objects_=c}var i=o.prototype;return i.install=function(r){this.pencil=r,this.initObjectFactories()},i.initObjectFactories=function(){var r=this,a=this.objects_;Object.keys(a).forEach(function(h){var s=function(){function l(){_(this,l)}var j=l.prototype;return j.create=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new a[h](e)},l}();r.objectNamesToFactories.set(h,s)})},i.getObject=function(r,a){r.includes("#")&&console.warn("getObject:err:\u4E0D\u652F\u6301 #",r);var h=(a||{}).key,s="".concat(r).concat(h?"#".concat(h):""),l=this.objects.get(s);return l},i.getAllObject=function(r,a){r.includes("#")&&console.warn("getAllObject:err:\u4E0D\u652F\u6301 #",r);var h=(a||{}).key,s="".concat(r).concat(h?"#".concat(h):""),l=[];return this.objects.forEach(function(j,M){(M.startsWith("".concat(s,"#"))||M===s)&&l.push(j)}),l},i.draw=function(r,a,h){var s=this;return(0,R.Z)(B().mark(function l(){var j,M,e,t,n,u,f,w;return B().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(j=s.objectNamesToFactories.get(r),!j){A.next=16;break}return M=(a||{}).key,e="".concat(r).concat(M?"#".concat(M):""),s.objects.has(e)&&(t=b.MathUtils.generateUUID(),e+="#".concat(t)),n=(a==null?void 0:a.target)||h,u=(a==null?void 0:a.onTop)||0,typeof n=="string"?f=s.objects.get(n):(n==null?void 0:n.objecttype__)==="BaseObject"?f=n:f=s.pencil.scene,w=new j().create(a),w.pencil=s.pencil,w.key=e,s.objects.set(e,w),A.next=15,s.addMesh(w,f,u);case 15:return A.abrupt("return",w);case 16:throw new Error("Unrecognized:".concat(r));case 17:case"end":return A.stop()}},l)}))()},i.addMesh=function(r,a,h){var s=this;return(0,R.Z)(B().mark(function l(){var j,M,e,t;return B().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,r.create();case 2:r.object3d&&(r.object3d.userData.BaseObject_=r,h&&(j=1e3+h*2,s.onTopBase.has(j-1)||(M=new b.BufferGeometry,M.setFromPoints([new b.Vector3(0,0,0)]),e=new b.PointsMaterial({size:1,sizeAttenuation:!1,transparent:!0,opacity:.1}),t=new b.Points(M,e),t.renderOrder=j-1,t.onBeforeRender=function(){console.log(1),s.pencil.renderer.clearDepth()},s.onTopBase.set(j-1,!0),s.pencil.scene.add(t)),r.object3d.renderOrder=j,r.object3d.onBeforeRender=function(){console.log(2),s.pencil.renderer.clearDepth()}),a.add(r.object3d)),r.visible=!0,r.render(),r.pm.resolve();case 6:case"end":return u.stop()}},l)}))()},i.erase=function(){for(var r=arguments.length,a=new Array(r),h=0;h<r;h++)a[h]=arguments[h];var s=this;N(a).forEach(function(l){var j=[];if(typeof l=="string"){var M,e=C(l.split("#"),2),t=e[0],n=e[1];(M=j).push.apply(M,N(s.getAllObject(t,{key:n})))}else j.push(l);j.forEach(function(u){s.removeMesh(u)})})},i.removeMesh=function(r){var a=this,h=r.parent;r.object3d&&h.remove(r.object3d),r.traverse(function(s){s.visible=!1,s.dispose(),a.objects.delete(s.key)})},i.update=function(r,a){this.objects.forEach(function(h){h.update(r,a)})},i.setSize=function(r,a){this.objects.forEach(function(h){h.resize(r,a)})},i.dispose=function(){this.objects.forEach(function(r,a){r.dispose(),r.pm.reject("stop draw:".concat(a))}),this.objects.clear(),this.onTopBase.clear(),this.objectNamesToFactories.clear()},d(o,[{key:"objectsPromise",get:function(){var r=[];return this.objects.forEach(function(a){r.push(a.pm.promise)}),r}}]),o}(),y=function(){"use strict";function o(){_(this,o),this.data={}}var i=o.prototype;return i.install=function(){},i.setData=function(r,a){var h,s;this.data[r]=a,(s=(h=this).cb)===null||s===void 0||s.call(h,r)},i.runAll=function(){var r=this;Object.keys(this.data).forEach(function(a){var h,s;(s=(h=r).cb)===null||s===void 0||s.call(h,a)})},i.dispose=function(){this.data={},this.cb=void 0},o}(),m=U(924),L=U(42),D=U(360),G=function(){"use strict";function o(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_(this,o),this.messageList=[],this.options=(0,L.Z)({},{cache:!1,cacheVersion:"1"},c)}var i=o.prototype;return i.install=function(){},i.init=function(r,a){var h=this,s=this.options,l=s.cache,j=s.cacheVersion;this.workerList=Array.from({length:a},function(M,e){var t=typeof r=="string"?new Worker(r):r();return t.onmessage=function(n){var u=n.data,f=u.res,w=u.uuid,S=h.messageList.find(function(H){var I=H.uuid;return w===I});if(S==null||S.options.cb(f),h.workerList[e].inUse=!1,h.checkMessage(),l){var A=(S==null?void 0:S.options.cacheVersion)||j;(0,D.set)(w,(0,m.Z)({},A,f))}},{worker:t,inUse:!1}})},i.postMessage=function(r,a){var h=this,s=this.options,l=s.cache,j=s.cacheVersion;if(l&&!r.workerKey){console.warn("worker cache need workerKey");return}if(l&&r.workerKey&&r.delCache){console.warn("worker cache del: ".concat(r.workerKey)),(0,D.del)(r.workerKey);return}var M=r.workerKey||b.MathUtils.generateUUID();(l?(0,D.get)(M):Promise.resolve()).then(function(e){var t=a.cacheVersion||j;e&&e[t]?a.cb(e[t]):(h.messageList.push({req:r,options:a,uuid:M,inUse:!1}),h.checkMessage())}).catch(function(){console.warn("err:worker cache"),h.messageList.push({req:r,options:a,uuid:M,inUse:!1}),h.checkMessage()})},i.checkMessage=function(){var r=this.workerList.find(function(h){var s=h.inUse;return!s});if(r){var a=this.messageList.find(function(h){var s=h.inUse;return!s});a&&(a.inUse=!0,r.inUse=!0,r.worker.postMessage({req:a.req,uuid:a.uuid}))}},i.dispose=function(){this.workerList.forEach(function(r){var a=r.worker;a.terminate()}),this.workerList=[],this.messageList=[]},o}()})(),module.exports=K})();
1
+ (function(){var X={666:function(_){var g=function(p){"use strict";var C=Object.prototype,T=C.hasOwnProperty,d,O=typeof Symbol=="function"?Symbol:{},E=O.iterator||"@@iterator",P=O.asyncIterator||"@@asyncIterator",k=O.toStringTag||"@@toStringTag";function v(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{v({},"")}catch(e){v=function(t,n,u){return t[n]=u}}function R(e,t,n,u){var f=t&&t.prototype instanceof D?t:D,w=Object.create(f.prototype),S=new l(u||[]);return w._invoke=r(e,n,S),w}p.wrap=R;function x(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(u){return{type:"throw",arg:u}}}var z="suspendedStart",N="suspendedYield",Z="executing",H="completed",b={};function D(){}function y(){}function m(){}var L={};v(L,E,function(){return this});var V=Object.getPrototypeOf,G=V&&V(V(j([])));G&&G!==C&&T.call(G,E)&&(L=G);var a=m.prototype=D.prototype=Object.create(L);y.prototype=m,v(a,"constructor",m),v(m,"constructor",y),y.displayName=v(m,k,"GeneratorFunction");function i(e){["next","throw","return"].forEach(function(t){v(e,t,function(n){return this._invoke(t,n)})})}p.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return t?t===y||(t.displayName||t.name)==="GeneratorFunction":!1},p.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,v(e,k,"GeneratorFunction")),e.prototype=Object.create(a),e},p.awrap=function(e){return{__await:e}};function s(e,t){function n(w,S,M,B){var I=x(e[w],e,S);if(I.type==="throw")B(I.arg);else{var $=I.arg,F=$.value;return F&&typeof F=="object"&&T.call(F,"__await")?t.resolve(F.__await).then(function(W){n("next",W,M,B)},function(W){n("throw",W,M,B)}):t.resolve(F).then(function(W){$.value=W,M($)},function(W){return n("throw",W,M,B)})}}var u;function f(w,S){function M(){return new t(function(B,I){n(w,S,B,I)})}return u=u?u.then(M,M):M()}this._invoke=f}i(s.prototype),v(s.prototype,P,function(){return this}),p.AsyncIterator=s,p.async=function(e,t,n,u,f){f===void 0&&(f=Promise);var w=new s(R(e,t,n,u),f);return p.isGeneratorFunction(t)?w:w.next().then(function(S){return S.done?S.value:w.next()})};function r(e,t,n){var u=z;return function(w,S){if(u===Z)throw new Error("Generator is already running");if(u===H){if(w==="throw")throw S;return A()}for(n.method=w,n.arg=S;;){var M=n.delegate;if(M){var B=o(M,n);if(B){if(B===b)continue;return B}}if(n.method==="next")n.sent=n._sent=n.arg;else if(n.method==="throw"){if(u===z)throw u=H,n.arg;n.dispatchException(n.arg)}else n.method==="return"&&n.abrupt("return",n.arg);u=Z;var I=x(e,t,n);if(I.type==="normal"){if(u=n.done?H:N,I.arg===b)continue;return{value:I.arg,done:n.done}}else I.type==="throw"&&(u=H,n.method="throw",n.arg=I.arg)}}}function o(e,t){var n=e.iterator[t.method];if(n===d){if(t.delegate=null,t.method==="throw"){if(e.iterator.return&&(t.method="return",t.arg=d,o(e,t),t.method==="throw"))return b;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var u=x(n,e.iterator,t.arg);if(u.type==="throw")return t.method="throw",t.arg=u.arg,t.delegate=null,b;var f=u.arg;if(!f)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,b;if(f.done)t[e.resultName]=f.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=d);else return f;return t.delegate=null,b}i(a),v(a,k,"Generator"),v(a,E,function(){return this}),v(a,"toString",function(){return"[object Generator]"});function h(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function c(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function l(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(h,this),this.reset(!0)}p.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function u(){for(;t.length;){var f=t.pop();if(f in e)return u.value=f,u.done=!1,u}return u.done=!0,u}};function j(e){if(e){var t=e[E];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var n=-1,u=function f(){for(;++n<e.length;)if(T.call(e,n))return f.value=e[n],f.done=!1,f;return f.value=d,f.done=!0,f};return u.next=u}}return{next:A}}p.values=j;function A(){return{value:d,done:!0}}return l.prototype={constructor:l,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.method="next",this.arg=d,this.tryEntries.forEach(c),!e)for(var t in this)t.charAt(0)==="t"&&T.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=d)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(B,I){return w.type="throw",w.arg=e,t.next=B,I&&(t.method="next",t.arg=d),!!I}for(var u=this.tryEntries.length-1;u>=0;--u){var f=this.tryEntries[u],w=f.completion;if(f.tryLoc==="root")return n("end");if(f.tryLoc<=this.prev){var S=T.call(f,"catchLoc"),M=T.call(f,"finallyLoc");if(S&&M){if(this.prev<f.catchLoc)return n(f.catchLoc,!0);if(this.prev<f.finallyLoc)return n(f.finallyLoc)}else if(S){if(this.prev<f.catchLoc)return n(f.catchLoc,!0)}else if(M){if(this.prev<f.finallyLoc)return n(f.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var u=this.tryEntries[n];if(u.tryLoc<=this.prev&&T.call(u,"finallyLoc")&&this.prev<u.finallyLoc){var f=u;break}}f&&(e==="break"||e==="continue")&&f.tryLoc<=t&&t<=f.finallyLoc&&(f=null);var w=f?f.completion:{};return w.type=e,w.arg=t,f?(this.method="next",this.next=f.finallyLoc,b):this.complete(w)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),c(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var u=n.completion;if(u.type==="throw"){var f=u.arg;c(n)}return f}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=d),b}},p}(_.exports);try{regeneratorRuntime=g}catch(p){typeof globalThis=="object"?globalThis.regeneratorRuntime=g:Function("r","regeneratorRuntime = r")(g)}},584:function(_,g,p){"use strict";p.d(g,{makePromiseCreator:function(){return C.Z}});var C=p(282),T=p(666),d=p.n(T),O=null,E=p(644);function P(b){if(b.material){var D=Array.isArray(b.material)?b.material:[b.material];D.forEach(function(y){var m,L;(m=y.color)===null||m===void 0||m.convertSRGBToLinear(),(L=y.emissive)===null||L===void 0||L.convertSRGBToLinear(),y.map&&(y.map.encoding=THREE.sRGBEncoding),y.emissiveMap&&(y.emissiveMap.encoding=THREE.sRGBEncoding)})}}var k=p(568),v=p(924),R=p(360),x=p(484),z=null,N=null,Z=function(){var b=(0,k.Z)(d().mark(function D(y,m){var L,V,G,a,i,s,r,o,h;return d().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return L=m.type,V=L===void 0?"blob":L,G=m.version,a=G===void 0?"1":G,l.next=4,(0,R.get)(y);case 4:if(s=l.sent,!(s&&s[a])){l.next=9;break}i=s[a],l.next=15;break;case 9:return l.next=11,(0,x.Z)(fetch(y).then(function(j){if(j.ok)return j[V]();throw new Error}));case 11:r=l.sent,o=r.res,h=r.err,h||(i=o,(0,R.set)(y,(0,v.Z)({},a,o)));case 15:return l.abrupt("return",i?{url:V==="json"?y:URL.createObjectURL(i),store:i}:{url:y});case 16:case"end":return l.stop()}},D)}));return function(y,m){return b.apply(this,arguments)}}(),H=p(705)},282:function(_,g,p){"use strict";p.d(g,{Z:function(){return T}});var C=p(484);function T(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E={};return E.promise=new Promise(function(P,k){E.resolve=P,E.reject=k}),d&&(E.promise=(0,C.Z)(E.promise,O)),E}},484:function(_,g,p){"use strict";p.d(g,{Z:function(){return T}});var C=p(42);function T(d){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return d.then(function(E){return(0,C.Z)({err:null,res:E},O)}).catch(function(E){return(0,C.Z)({err:E,res:void 0},O)})}},705:function(_,g,p){"use strict";var C=p(644),T=p.n(C),d=new Map,O=function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{generateTopUV:function(k,v,R,x,z){var N=v[R*3],Z=v[R*3+1],H=v[x*3],b=v[x*3+1],D=v[z*3],y=v[z*3+1],m;if(d.has(k))m=d.get(k);else{var L=P.box3||new THREE.Box3;if(!P.box3){var V=k.parameters.shapes.getPoints();L.setFromArray(V.map(function(r){return[r.x,r.y,0]}).flat())}var G=L.getSize(new THREE.Vector3);P.split&&(G.y/=P.split),m={box:L,size:G},d.set(k,m)}var a=m.box,i=m.size,s=P.split?1-P.split:0;return[new THREE.Vector2((N-a.min.x)/i.x,(Z-a.min.y)/i.y+s),new THREE.Vector2((H-a.min.x)/i.x,(b-a.min.y)/i.y+s),new THREE.Vector2((D-a.min.x)/i.x,(y-a.min.y)/i.y+s)]},generateSideWallUV:function(k,v,R,x,z,N){var Z=v[R*3],H=v[R*3+1],b=v[R*3+2],D=v[x*3],y=v[x*3+1],m=v[x*3+2],L=v[z*3],V=v[z*3+1],G=v[z*3+2],a=v[N*3],i=v[N*3+1],s=v[N*3+2],r;if(d.has(v))r=d.get(v);else{var o=new THREE.Box3;o.setFromArray(v);var h=o.getSize(new THREE.Vector3);P.split&&(h.z/=1-P.split),r={box:o,size:h},d.set(v,r)}var c=r.box,l=r.size;return Math.abs(H-y)<Math.abs(Z-D)?[new THREE.Vector2((Z-c.min.x)/l.x,(b-c.min.z)/l.z),new THREE.Vector2((D-c.min.x)/l.x,(m-c.min.z)/l.z),new THREE.Vector2((L-c.min.x)/l.x,(G-c.min.z)/l.z),new THREE.Vector2((a-c.min.x)/l.x,(s-c.min.z)/l.z)]:[new THREE.Vector2((H-c.min.y)/l.y,(b-c.min.z)/l.z),new THREE.Vector2((y-c.min.y)/l.y,(m-c.min.z)/l.z),new THREE.Vector2((V-c.min.y)/l.y,(G-c.min.z)/l.z),new THREE.Vector2((i-c.min.y)/l.y,(s-c.min.z)/l.z)]}}},E=function(){d.clear()}},360:function(_){"use strict";_.exports=require("idb-keyval")},644:function(_){"use strict";_.exports=require("three")},568:function(_,g,p){"use strict";p.d(g,{Z:function(){return T}});function C(d,O,E,P,k,v,R){try{var x=d[v](R),z=x.value}catch(N){E(N);return}x.done?O(z):Promise.resolve(z).then(P,k)}function T(d){return function(){var O=this,E=arguments;return new Promise(function(P,k){var v=d.apply(O,E);function R(z){C(v,P,k,R,x,"next",z)}function x(z){C(v,P,k,R,x,"throw",z)}R(void 0)})}}},924:function(_,g,p){"use strict";p.d(g,{Z:function(){return C}});function C(T,d,O){return d in T?Object.defineProperty(T,d,{value:O,enumerable:!0,configurable:!0,writable:!0}):T[d]=O,T}},42:function(_,g,p){"use strict";p.d(g,{Z:function(){return T}});var C=p(924);function T(d){for(var O=1;O<arguments.length;O++){var E=arguments[O]!=null?arguments[O]:{},P=Object.keys(E);typeof Object.getOwnPropertySymbols=="function"&&(P=P.concat(Object.getOwnPropertySymbols(E).filter(function(k){return Object.getOwnPropertyDescriptor(E,k).enumerable}))),P.forEach(function(k){(0,C.Z)(d,k,E[k])})}return d}}},Y={};function U(_){var g=Y[_];if(g!==void 0)return g.exports;var p=Y[_]={exports:{}};return X[_](p,p.exports,U),p.exports}(function(){U.n=function(_){var g=_&&_.__esModule?function(){return _.default}:function(){return _};return U.d(g,{a:g}),g}})(),function(){U.d=function(_,g){for(var p in g)U.o(g,p)&&!U.o(_,p)&&Object.defineProperty(_,p,{enumerable:!0,get:g[p]})}}(),function(){U.o=function(_,g){return Object.prototype.hasOwnProperty.call(_,g)}}(),function(){U.r=function(_){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_,"__esModule",{value:!0})}}();var K={};(function(){"use strict";U.r(K),U.d(K,{Cache:function(){return p},Data:function(){return y},Draw:function(){return D},Wk:function(){return G}});function _(a,i){if(!(a instanceof i))throw new TypeError("Cannot call a class as a function")}var g=U(584),p=function(){"use strict";function a(){_(this,a),this.cache=new Map}var i=a.prototype;return i.install=function(){},i.init=function(r){var o=(0,g.makePromiseCreator)();this.cache.set(r,o)},i.get=function(r){var o;return(o=this.cache.get(r))===null||o===void 0?void 0:o.promise},i.set=function(r,o){var h=this.cache.get(r);h?h.resolve(o):console.warn("init cache first")},i.dispose=function(){this.cache.forEach(function(r,o){r.reject("stop set cache:".concat(o))}),this.cache.clear()},a}(),C=U(568);function T(a,i){for(var s=0;s<i.length;s++){var r=i[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(a,r.key,r)}}function d(a,i,s){return i&&T(a.prototype,i),s&&T(a,s),a}function O(a){if(Array.isArray(a))return a}function E(a){if(typeof Symbol!="undefined"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function P(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function k(a,i){(i==null||i>a.length)&&(i=a.length);for(var s=0,r=new Array(i);s<i;s++)r[s]=a[s];return r}function v(a,i){if(!!a){if(typeof a=="string")return k(a,i);var s=Object.prototype.toString.call(a).slice(8,-1);if(s==="Object"&&a.constructor&&(s=a.constructor.name),s==="Map"||s==="Set")return Array.from(s);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return k(a,i)}}function R(a,i){return O(a)||E(a,i)||v(a,i)||P()}function x(a){if(Array.isArray(a))return k(a)}function z(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function N(a){return x(a)||E(a)||v(a)||z()}var Z=U(666),H=U.n(Z),b=U(644),D=function(){"use strict";function a(s){_(this,a),this.onTopBase=new Map,this.objectNamesToFactories=new Map,this.objects=new Map,this.objects_=s}var i=a.prototype;return i.install=function(r){this.pencil=r,this.initObjectFactories()},i.initObjectFactories=function(){var r=this,o=this.objects_;Object.keys(o).forEach(function(h){var c=function(){function l(){_(this,l)}var j=l.prototype;return j.create=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new o[h](e)},l}();r.objectNamesToFactories.set(h,c)})},i.getObject=function(r,o){r.includes("#")&&console.warn("getObject:err:\u4E0D\u652F\u6301 #",r);var h=(o||{}).key,c="".concat(r).concat(h?"#".concat(h):""),l=this.objects.get(c);return l},i.getAllObject=function(r,o){r.includes("#")&&console.warn("getAllObject:err:\u4E0D\u652F\u6301 #",r);var h=(o||{}).key,c="".concat(r).concat(h?"#".concat(h):""),l=[];return this.objects.forEach(function(j,A){(A.startsWith("".concat(c,"#"))||A===c)&&l.push(j)}),l},i.draw=function(r,o,h){var c=this;return(0,C.Z)(H().mark(function l(){var j,A,e,t,n,u,f,w;return H().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(j=c.objectNamesToFactories.get(r),!j){M.next=16;break}return A=(o||{}).key,e="".concat(r).concat(A?"#".concat(A):""),c.objects.has(e)&&(t=b.MathUtils.generateUUID(),e+="#".concat(t)),n=(o==null?void 0:o.target)||h,u=(o==null?void 0:o.onTop)||0,typeof n=="string"?f=c.objects.get(n):(n==null?void 0:n.objecttype__)==="BaseObject"?f=n:f=c.pencil.scene,w=new j().create(o),w.pencil=c.pencil,w.key=e,c.objects.set(e,w),M.next=15,c.addMesh(w,f,u);case 15:return M.abrupt("return",w);case 16:throw new Error("Unrecognized:".concat(r));case 17:case"end":return M.stop()}},l)}))()},i.addMesh=function(r,o,h){var c=this;return(0,C.Z)(H().mark(function l(){var j,A,e,t;return H().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,r.create();case 2:r.object3d&&(r.object3d.userData.BaseObject_=r,h&&(j=1e3+h*2,c.onTopBase.has(j-1)||(A=new b.BufferGeometry,A.setFromPoints([new b.Vector3(0,0,0)]),e=new b.PointsMaterial({size:.01,transparent:!0,opacity:.01}),t=new b.Points(A,e),t.renderOrder=j-1,t.onBeforeRender=function(){console.log(1),c.pencil.renderer.clearDepth()},t.frustumCulled=!1,c.onTopBase.set(j-1,!0),c.pencil.scene.add(t)),r.object3d.renderOrder=j),o.add(r.object3d)),r.visible=!0,r.render(),r.pm.resolve();case 6:case"end":return u.stop()}},l)}))()},i.erase=function(){for(var r=arguments.length,o=new Array(r),h=0;h<r;h++)o[h]=arguments[h];var c=this;N(o).forEach(function(l){var j=[];if(typeof l=="string"){var A,e=R(l.split("#"),2),t=e[0],n=e[1];(A=j).push.apply(A,N(c.getAllObject(t,{key:n})))}else j.push(l);j.forEach(function(u){c.removeMesh(u)})})},i.removeMesh=function(r){var o=this,h=r.parent;r.object3d&&h.remove(r.object3d),r.traverse(function(c){c.visible=!1,c.dispose(),o.objects.delete(c.key)})},i.update=function(r,o){this.objects.forEach(function(h){h.update(r,o)})},i.setSize=function(r,o){this.objects.forEach(function(h){h.resize(r,o)})},i.dispose=function(){this.objects.forEach(function(r,o){r.dispose(),r.pm.reject("stop draw:".concat(o))}),this.objects.clear(),this.onTopBase.clear(),this.objectNamesToFactories.clear()},d(a,[{key:"objectsPromise",get:function(){var r=[];return this.objects.forEach(function(o){r.push(o.pm.promise)}),r}}]),a}(),y=function(){"use strict";function a(){_(this,a),this.data={}}var i=a.prototype;return i.install=function(){},i.setData=function(r,o){var h,c;this.data[r]=o,(c=(h=this).cb)===null||c===void 0||c.call(h,r)},i.runAll=function(){var r=this;Object.keys(this.data).forEach(function(o){var h,c;(c=(h=r).cb)===null||c===void 0||c.call(h,o)})},i.dispose=function(){this.data={},this.cb=void 0},a}(),m=U(924),L=U(42),V=U(360),G=function(){"use strict";function a(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_(this,a),this.messageList=[],this.options=(0,L.Z)({},{cache:!1,cacheVersion:"1"},s)}var i=a.prototype;return i.install=function(){},i.init=function(r,o){var h=this,c=this.options,l=c.cache,j=c.cacheVersion;this.workerList=Array.from({length:o},function(A,e){var t=typeof r=="string"?new Worker(r):r();return t.onmessage=function(n){var u=n.data,f=u.res,w=u.uuid,S=h.messageList.find(function(B){var I=B.uuid;return w===I});if(S==null||S.options.cb(f),h.workerList[e].inUse=!1,h.checkMessage(),l){var M=(S==null?void 0:S.options.cacheVersion)||j;(0,V.set)(w,(0,m.Z)({},M,f))}},{worker:t,inUse:!1}})},i.postMessage=function(r,o){var h=this,c=this.options,l=c.cache,j=c.cacheVersion;if(l&&!r.workerKey){console.warn("worker cache need workerKey");return}if(l&&r.workerKey&&r.delCache){console.warn("worker cache del: ".concat(r.workerKey)),(0,V.del)(r.workerKey);return}var A=r.workerKey||b.MathUtils.generateUUID();(l?(0,V.get)(A):Promise.resolve()).then(function(e){var t=o.cacheVersion||j;e&&e[t]?o.cb(e[t]):(h.messageList.push({req:r,options:o,uuid:A,inUse:!1}),h.checkMessage())}).catch(function(){console.warn("err:worker cache"),h.messageList.push({req:r,options:o,uuid:A,inUse:!1}),h.checkMessage()})},i.checkMessage=function(){var r=this.workerList.find(function(h){var c=h.inUse;return!c});if(r){var o=this.messageList.find(function(h){var c=h.inUse;return!c});o&&(o.inUse=!0,r.inUse=!0,r.worker.postMessage({req:o.req,uuid:o.uuid}))}},i.dispose=function(){this.workerList.forEach(function(r){var o=r.worker;o.terminate()}),this.workerList=[],this.messageList=[]},a}()})(),module.exports=K})();
@@ -1 +1 @@
1
- import*as Y from"idb-keyval";import*as K from"three";var Q={666:function(b){var g=function(l){"use strict";var O=Object.prototype,m=O.hasOwnProperty,v,E=typeof Symbol=="function"?Symbol:{},d=E.iterator||"@@iterator",x=E.asyncIterator||"@@asyncIterator",p=E.toStringTag||"@@toStringTag";function j(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{j({},"")}catch(e){j=function(t,n,f){return t[n]=f}}function R(e,t,n,f){var h=t&&t.prototype instanceof V?t:V,k=Object.create(h.prototype),A=new y(f||[]);return k._invoke=r(e,n,A),k}l.wrap=R;function z(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(f){return{type:"throw",arg:f}}}var U="suspendedStart",N="suspendedYield",W="executing",H="completed",w={};function V(){}function _(){}function T(){}var S={};j(S,d,function(){return this});var G=Object.getPrototypeOf,C=G&&G(G(L([])));C&&C!==O&&m.call(C,d)&&(S=C);var a=T.prototype=V.prototype=Object.create(S);_.prototype=T,j(a,"constructor",T),j(T,"constructor",_),_.displayName=j(T,p,"GeneratorFunction");function u(e){["next","throw","return"].forEach(function(t){j(e,t,function(n){return this._invoke(t,n)})})}l.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return t?t===_||(t.displayName||t.name)==="GeneratorFunction":!1},l.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,j(e,p,"GeneratorFunction")),e.prototype=Object.create(a),e},l.awrap=function(e){return{__await:e}};function o(e,t){function n(k,A,P,I){var D=z(e[k],e,A);if(D.type==="throw")I(D.arg);else{var X=D.arg,F=X.value;return F&&typeof F=="object"&&m.call(F,"__await")?t.resolve(F.__await).then(function(Z){n("next",Z,P,I)},function(Z){n("throw",Z,P,I)}):t.resolve(F).then(function(Z){X.value=Z,P(X)},function(Z){return n("throw",Z,P,I)})}}var f;function h(k,A){function P(){return new t(function(I,D){n(k,A,I,D)})}return f=f?f.then(P,P):P()}this._invoke=h}u(o.prototype),j(o.prototype,x,function(){return this}),l.AsyncIterator=o,l.async=function(e,t,n,f,h){h===void 0&&(h=Promise);var k=new o(R(e,t,n,f),h);return l.isGeneratorFunction(t)?k:k.next().then(function(A){return A.done?A.value:k.next()})};function r(e,t,n){var f=U;return function(k,A){if(f===W)throw new Error("Generator is already running");if(f===H){if(k==="throw")throw A;return M()}for(n.method=k,n.arg=A;;){var P=n.delegate;if(P){var I=i(P,n);if(I){if(I===w)continue;return I}}if(n.method==="next")n.sent=n._sent=n.arg;else if(n.method==="throw"){if(f===U)throw f=H,n.arg;n.dispatchException(n.arg)}else n.method==="return"&&n.abrupt("return",n.arg);f=W;var D=z(e,t,n);if(D.type==="normal"){if(f=n.done?H:N,D.arg===w)continue;return{value:D.arg,done:n.done}}else D.type==="throw"&&(f=H,n.method="throw",n.arg=D.arg)}}}function i(e,t){var n=e.iterator[t.method];if(n===v){if(t.delegate=null,t.method==="throw"){if(e.iterator.return&&(t.method="return",t.arg=v,i(e,t),t.method==="throw"))return w;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return w}var f=z(n,e.iterator,t.arg);if(f.type==="throw")return t.method="throw",t.arg=f.arg,t.delegate=null,w;var h=f.arg;if(!h)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,w;if(h.done)t[e.resultName]=h.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=v);else return h;return t.delegate=null,w}u(a),j(a,p,"Generator"),j(a,d,function(){return this}),j(a,"toString",function(){return"[object Generator]"});function s(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function c(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(s,this),this.reset(!0)}l.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function f(){for(;t.length;){var h=t.pop();if(h in e)return f.value=h,f.done=!1,f}return f.done=!0,f}};function L(e){if(e){var t=e[d];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var n=-1,f=function h(){for(;++n<e.length;)if(m.call(e,n))return h.value=e[n],h.done=!1,h;return h.value=v,h.done=!0,h};return f.next=f}}return{next:M}}l.values=L;function M(){return{value:v,done:!0}}return y.prototype={constructor:y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(c),!e)for(var t in this)t.charAt(0)==="t"&&m.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=v)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(I,D){return k.type="throw",k.arg=e,t.next=I,D&&(t.method="next",t.arg=v),!!D}for(var f=this.tryEntries.length-1;f>=0;--f){var h=this.tryEntries[f],k=h.completion;if(h.tryLoc==="root")return n("end");if(h.tryLoc<=this.prev){var A=m.call(h,"catchLoc"),P=m.call(h,"finallyLoc");if(A&&P){if(this.prev<h.catchLoc)return n(h.catchLoc,!0);if(this.prev<h.finallyLoc)return n(h.finallyLoc)}else if(A){if(this.prev<h.catchLoc)return n(h.catchLoc,!0)}else if(P){if(this.prev<h.finallyLoc)return n(h.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var f=this.tryEntries[n];if(f.tryLoc<=this.prev&&m.call(f,"finallyLoc")&&this.prev<f.finallyLoc){var h=f;break}}h&&(e==="break"||e==="continue")&&h.tryLoc<=t&&t<=h.finallyLoc&&(h=null);var k=h?h.completion:{};return k.type=e,k.arg=t,h?(this.method="next",this.next=h.finallyLoc,w):this.complete(k)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),w},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),c(n),w}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var f=n.completion;if(f.type==="throw"){var h=f.arg;c(n)}return h}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=v),w}},l}(b.exports);try{regeneratorRuntime=g}catch(l){typeof globalThis=="object"?globalThis.regeneratorRuntime=g:Function("r","regeneratorRuntime = r")(g)}},584:function(b,g,l){l.d(g,{Mf:function(){return O.Z}});var O=l(282),m=l(666),v=l.n(m),E=null,d=l(949);function x(w){if(w.material){var V=Array.isArray(w.material)?w.material:[w.material];V.forEach(function(_){var T,S;(T=_.color)===null||T===void 0||T.convertSRGBToLinear(),(S=_.emissive)===null||S===void 0||S.convertSRGBToLinear(),_.map&&(_.map.encoding=THREE.sRGBEncoding),_.emissiveMap&&(_.emissiveMap.encoding=THREE.sRGBEncoding)})}}var p=l(568),j=l(924),R=l(77),z=l(484),U=null,N=null,W=function(){var w=(0,p.Z)(v().mark(function V(_,T){var S,G,C,a,u,o,r,i,s;return v().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return S=T.type,G=S===void 0?"blob":S,C=T.version,a=C===void 0?"1":C,y.next=4,(0,R.get)(_);case 4:if(o=y.sent,!(o&&o[a])){y.next=9;break}u=o[a],y.next=15;break;case 9:return y.next=11,(0,z.Z)(fetch(_).then(function(L){if(L.ok)return L[G]();throw new Error}));case 11:r=y.sent,i=r.res,s=r.err,s||(u=i,(0,R.set)(_,(0,j.Z)({},a,i)));case 15:return y.abrupt("return",u?{url:G==="json"?_:URL.createObjectURL(u),store:u}:{url:_});case 16:case"end":return y.stop()}},V)}));return function(_,T){return w.apply(this,arguments)}}(),H=l(705)},282:function(b,g,l){l.d(g,{Z:function(){return m}});var O=l(484);function m(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d={};return d.promise=new Promise(function(x,p){d.resolve=x,d.reject=p}),v&&(d.promise=(0,O.Z)(d.promise,E)),d}},484:function(b,g,l){l.d(g,{Z:function(){return m}});var O=l(42);function m(v){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return v.then(function(d){return(0,O.Z)({err:null,res:d},E)}).catch(function(d){return(0,O.Z)({err:d,res:void 0},E)})}},705:function(b,g,l){var O=l(949),m=new Map,v=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{generateTopUV:function(x,p,j,R,z){var U=p[j*3],N=p[j*3+1],W=p[R*3],H=p[R*3+1],w=p[z*3],V=p[z*3+1],_;if(m.has(x))_=m.get(x);else{var T=d.box3||new THREE.Box3;if(!d.box3){var S=x.parameters.shapes.getPoints();T.setFromArray(S.map(function(o){return[o.x,o.y,0]}).flat())}var G=T.getSize(new THREE.Vector3);d.split&&(G.y/=d.split),_={box:T,size:G},m.set(x,_)}var C=_.box,a=_.size,u=d.split?1-d.split:0;return[new THREE.Vector2((U-C.min.x)/a.x,(N-C.min.y)/a.y+u),new THREE.Vector2((W-C.min.x)/a.x,(H-C.min.y)/a.y+u),new THREE.Vector2((w-C.min.x)/a.x,(V-C.min.y)/a.y+u)]},generateSideWallUV:function(x,p,j,R,z,U){var N=p[j*3],W=p[j*3+1],H=p[j*3+2],w=p[R*3],V=p[R*3+1],_=p[R*3+2],T=p[z*3],S=p[z*3+1],G=p[z*3+2],C=p[U*3],a=p[U*3+1],u=p[U*3+2],o;if(m.has(p))o=m.get(p);else{var r=new THREE.Box3;r.setFromArray(p);var i=r.getSize(new THREE.Vector3);d.split&&(i.z/=1-d.split),o={box:r,size:i},m.set(p,o)}var s=o.box,c=o.size;return Math.abs(W-V)<Math.abs(N-w)?[new THREE.Vector2((N-s.min.x)/c.x,(H-s.min.z)/c.z),new THREE.Vector2((w-s.min.x)/c.x,(_-s.min.z)/c.z),new THREE.Vector2((T-s.min.x)/c.x,(G-s.min.z)/c.z),new THREE.Vector2((C-s.min.x)/c.x,(u-s.min.z)/c.z)]:[new THREE.Vector2((W-s.min.y)/c.y,(H-s.min.z)/c.z),new THREE.Vector2((V-s.min.y)/c.y,(_-s.min.z)/c.z),new THREE.Vector2((S-s.min.y)/c.y,(G-s.min.z)/c.z),new THREE.Vector2((a-s.min.y)/c.y,(u-s.min.z)/c.z)]}}},E=function(){m.clear()}},77:function(b,g,l){var O=v=>{var E={};return l.d(E,v),E},m=v=>()=>v;b.exports=O({del:()=>Y.del,get:()=>Y.get,set:()=>Y.set})},949:function(b,g,l){var O=v=>{var E={};return l.d(E,v),E},m=v=>()=>v;b.exports=O({BufferGeometry:()=>K.BufferGeometry,MathUtils:()=>K.MathUtils,Points:()=>K.Points,PointsMaterial:()=>K.PointsMaterial,Vector3:()=>K.Vector3})},568:function(b,g,l){l.d(g,{Z:function(){return m}});function O(v,E,d,x,p,j,R){try{var z=v[j](R),U=z.value}catch(N){d(N);return}z.done?E(U):Promise.resolve(U).then(x,p)}function m(v){return function(){var E=this,d=arguments;return new Promise(function(x,p){var j=v.apply(E,d);function R(U){O(j,x,p,R,z,"next",U)}function z(U){O(j,x,p,R,z,"throw",U)}R(void 0)})}}},924:function(b,g,l){l.d(g,{Z:function(){return O}});function O(m,v,E){return v in m?Object.defineProperty(m,v,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[v]=E,m}},42:function(b,g,l){l.d(g,{Z:function(){return m}});var O=l(924);function m(v){for(var E=1;E<arguments.length;E++){var d=arguments[E]!=null?arguments[E]:{},x=Object.keys(d);typeof Object.getOwnPropertySymbols=="function"&&(x=x.concat(Object.getOwnPropertySymbols(d).filter(function(p){return Object.getOwnPropertyDescriptor(d,p).enumerable}))),x.forEach(function(p){(0,O.Z)(v,p,d[p])})}return v}}},J={};function B(b){var g=J[b];if(g!==void 0)return g.exports;var l=J[b]={exports:{}};return Q[b](l,l.exports,B),l.exports}(function(){B.n=function(b){var g=b&&b.__esModule?function(){return b.default}:function(){return b};return B.d(g,{a:g}),g}})(),function(){B.d=function(b,g){for(var l in g)B.o(g,l)&&!B.o(b,l)&&Object.defineProperty(b,l,{enumerable:!0,get:g[l]})}}(),function(){B.o=function(b,g){return Object.prototype.hasOwnProperty.call(b,g)}}();var $={};(function(){B.d($,{Ct:function(){return l},Vw:function(){return _},hG:function(){return V},Wk:function(){return C}});function b(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}var g=B(584),l=function(){"use strict";function a(){b(this,a),this.cache=new Map}var u=a.prototype;return u.install=function(){},u.init=function(r){var i=(0,g.Mf)();this.cache.set(r,i)},u.get=function(r){var i;return(i=this.cache.get(r))===null||i===void 0?void 0:i.promise},u.set=function(r,i){var s=this.cache.get(r);s?s.resolve(i):console.warn("init cache first")},u.dispose=function(){this.cache.forEach(function(r,i){r.reject("stop set cache:".concat(i))}),this.cache.clear()},a}(),O=B(568);function m(a,u){for(var o=0;o<u.length;o++){var r=u[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(a,r.key,r)}}function v(a,u,o){return u&&m(a.prototype,u),o&&m(a,o),a}function E(a){if(Array.isArray(a))return a}function d(a){if(typeof Symbol!="undefined"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function x(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(a,u){(u==null||u>a.length)&&(u=a.length);for(var o=0,r=new Array(u);o<u;o++)r[o]=a[o];return r}function j(a,u){if(!!a){if(typeof a=="string")return p(a,u);var o=Object.prototype.toString.call(a).slice(8,-1);if(o==="Object"&&a.constructor&&(o=a.constructor.name),o==="Map"||o==="Set")return Array.from(o);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return p(a,u)}}function R(a,u){return E(a)||d(a,u)||j(a,u)||x()}function z(a){if(Array.isArray(a))return p(a)}function U(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function N(a){return z(a)||d(a)||j(a)||U()}var W=B(666),H=B.n(W),w=B(949),V=function(){"use strict";function a(o){b(this,a),this.onTopBase=new Map,this.objectNamesToFactories=new Map,this.objects=new Map,this.objects_=o}var u=a.prototype;return u.install=function(r){this.pencil=r,this.initObjectFactories()},u.initObjectFactories=function(){var r=this,i=this.objects_;Object.keys(i).forEach(function(s){var c=function(){function y(){b(this,y)}var L=y.prototype;return L.create=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new i[s](e)},y}();r.objectNamesToFactories.set(s,c)})},u.getObject=function(r,i){r.includes("#")&&console.warn("getObject:err:\u4E0D\u652F\u6301 #",r);var s=(i||{}).key,c="".concat(r).concat(s?"#".concat(s):""),y=this.objects.get(c);return y},u.getAllObject=function(r,i){r.includes("#")&&console.warn("getAllObject:err:\u4E0D\u652F\u6301 #",r);var s=(i||{}).key,c="".concat(r).concat(s?"#".concat(s):""),y=[];return this.objects.forEach(function(L,M){(M.startsWith("".concat(c,"#"))||M===c)&&y.push(L)}),y},u.draw=function(r,i,s){var c=this;return(0,O.Z)(H().mark(function y(){var L,M,e,t,n,f,h,k;return H().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(L=c.objectNamesToFactories.get(r),!L){P.next=16;break}return M=(i||{}).key,e="".concat(r).concat(M?"#".concat(M):""),c.objects.has(e)&&(t=w.MathUtils.generateUUID(),e+="#".concat(t)),n=(i==null?void 0:i.target)||s,f=(i==null?void 0:i.onTop)||0,typeof n=="string"?h=c.objects.get(n):(n==null?void 0:n.objecttype__)==="BaseObject"?h=n:h=c.pencil.scene,k=new L().create(i),k.pencil=c.pencil,k.key=e,c.objects.set(e,k),P.next=15,c.addMesh(k,h,f);case 15:return P.abrupt("return",k);case 16:throw new Error("Unrecognized:".concat(r));case 17:case"end":return P.stop()}},y)}))()},u.addMesh=function(r,i,s){var c=this;return(0,O.Z)(H().mark(function y(){var L,M,e,t;return H().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,r.create();case 2:r.object3d&&(r.object3d.userData.BaseObject_=r,s&&(L=1e3+s*2,c.onTopBase.has(L-1)||(M=new w.BufferGeometry,M.setFromPoints([new w.Vector3(0,0,0)]),e=new w.PointsMaterial({size:1,sizeAttenuation:!1,transparent:!0,opacity:.1}),t=new w.Points(M,e),t.renderOrder=L-1,t.onBeforeRender=function(){console.log(1),c.pencil.renderer.clearDepth()},c.onTopBase.set(L-1,!0),c.pencil.scene.add(t)),r.object3d.renderOrder=L,r.object3d.onBeforeRender=function(){console.log(2),c.pencil.renderer.clearDepth()}),i.add(r.object3d)),r.visible=!0,r.render(),r.pm.resolve();case 6:case"end":return f.stop()}},y)}))()},u.erase=function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var c=this;N(i).forEach(function(y){var L=[];if(typeof y=="string"){var M,e=R(y.split("#"),2),t=e[0],n=e[1];(M=L).push.apply(M,N(c.getAllObject(t,{key:n})))}else L.push(y);L.forEach(function(f){c.removeMesh(f)})})},u.removeMesh=function(r){var i=this,s=r.parent;r.object3d&&s.remove(r.object3d),r.traverse(function(c){c.visible=!1,c.dispose(),i.objects.delete(c.key)})},u.update=function(r,i){this.objects.forEach(function(s){s.update(r,i)})},u.setSize=function(r,i){this.objects.forEach(function(s){s.resize(r,i)})},u.dispose=function(){this.objects.forEach(function(r,i){r.dispose(),r.pm.reject("stop draw:".concat(i))}),this.objects.clear(),this.onTopBase.clear(),this.objectNamesToFactories.clear()},v(a,[{key:"objectsPromise",get:function(){var r=[];return this.objects.forEach(function(i){r.push(i.pm.promise)}),r}}]),a}(),_=function(){"use strict";function a(){b(this,a),this.data={}}var u=a.prototype;return u.install=function(){},u.setData=function(r,i){var s,c;this.data[r]=i,(c=(s=this).cb)===null||c===void 0||c.call(s,r)},u.runAll=function(){var r=this;Object.keys(this.data).forEach(function(i){var s,c;(c=(s=r).cb)===null||c===void 0||c.call(s,i)})},u.dispose=function(){this.data={},this.cb=void 0},a}(),T=B(924),S=B(42),G=B(77),C=function(){"use strict";function a(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};b(this,a),this.messageList=[],this.options=(0,S.Z)({},{cache:!1,cacheVersion:"1"},o)}var u=a.prototype;return u.install=function(){},u.init=function(r,i){var s=this,c=this.options,y=c.cache,L=c.cacheVersion;this.workerList=Array.from({length:i},function(M,e){var t=typeof r=="string"?new Worker(r):r();return t.onmessage=function(n){var f=n.data,h=f.res,k=f.uuid,A=s.messageList.find(function(I){var D=I.uuid;return k===D});if(A==null||A.options.cb(h),s.workerList[e].inUse=!1,s.checkMessage(),y){var P=(A==null?void 0:A.options.cacheVersion)||L;(0,G.set)(k,(0,T.Z)({},P,h))}},{worker:t,inUse:!1}})},u.postMessage=function(r,i){var s=this,c=this.options,y=c.cache,L=c.cacheVersion;if(y&&!r.workerKey){console.warn("worker cache need workerKey");return}if(y&&r.workerKey&&r.delCache){console.warn("worker cache del: ".concat(r.workerKey)),(0,G.del)(r.workerKey);return}var M=r.workerKey||w.MathUtils.generateUUID();(y?(0,G.get)(M):Promise.resolve()).then(function(e){var t=i.cacheVersion||L;e&&e[t]?i.cb(e[t]):(s.messageList.push({req:r,options:i,uuid:M,inUse:!1}),s.checkMessage())}).catch(function(){console.warn("err:worker cache"),s.messageList.push({req:r,options:i,uuid:M,inUse:!1}),s.checkMessage()})},u.checkMessage=function(){var r=this.workerList.find(function(s){var c=s.inUse;return!c});if(r){var i=this.messageList.find(function(s){var c=s.inUse;return!c});i&&(i.inUse=!0,r.inUse=!0,r.worker.postMessage({req:i.req,uuid:i.uuid}))}},u.dispose=function(){this.workerList.forEach(function(r){var i=r.worker;i.terminate()}),this.workerList=[],this.messageList=[]},a}()})();var q=$.Ct,tt=$.Vw,et=$.hG,rt=$.Wk;export{q as Cache,tt as Data,et as Draw,rt as Wk};
1
+ import*as Y from"idb-keyval";import*as K from"three";var Q={666:function(w){var g=function(l){"use strict";var O=Object.prototype,m=O.hasOwnProperty,v,E=typeof Symbol=="function"?Symbol:{},d=E.iterator||"@@iterator",x=E.asyncIterator||"@@asyncIterator",p=E.toStringTag||"@@toStringTag";function j(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{j({},"")}catch(e){j=function(t,n,f){return t[n]=f}}function R(e,t,n,f){var h=t&&t.prototype instanceof V?t:V,k=Object.create(h.prototype),A=new y(f||[]);return k._invoke=r(e,n,A),k}l.wrap=R;function z(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(f){return{type:"throw",arg:f}}}var U="suspendedStart",N="suspendedYield",W="executing",H="completed",b={};function V(){}function _(){}function T(){}var C={};j(C,d,function(){return this});var G=Object.getPrototypeOf,S=G&&G(G(L([])));S&&S!==O&&m.call(S,d)&&(C=S);var a=T.prototype=V.prototype=Object.create(C);_.prototype=T,j(a,"constructor",T),j(T,"constructor",_),_.displayName=j(T,p,"GeneratorFunction");function u(e){["next","throw","return"].forEach(function(t){j(e,t,function(n){return this._invoke(t,n)})})}l.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return t?t===_||(t.displayName||t.name)==="GeneratorFunction":!1},l.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,j(e,p,"GeneratorFunction")),e.prototype=Object.create(a),e},l.awrap=function(e){return{__await:e}};function o(e,t){function n(k,A,P,I){var D=z(e[k],e,A);if(D.type==="throw")I(D.arg);else{var X=D.arg,F=X.value;return F&&typeof F=="object"&&m.call(F,"__await")?t.resolve(F.__await).then(function(Z){n("next",Z,P,I)},function(Z){n("throw",Z,P,I)}):t.resolve(F).then(function(Z){X.value=Z,P(X)},function(Z){return n("throw",Z,P,I)})}}var f;function h(k,A){function P(){return new t(function(I,D){n(k,A,I,D)})}return f=f?f.then(P,P):P()}this._invoke=h}u(o.prototype),j(o.prototype,x,function(){return this}),l.AsyncIterator=o,l.async=function(e,t,n,f,h){h===void 0&&(h=Promise);var k=new o(R(e,t,n,f),h);return l.isGeneratorFunction(t)?k:k.next().then(function(A){return A.done?A.value:k.next()})};function r(e,t,n){var f=U;return function(k,A){if(f===W)throw new Error("Generator is already running");if(f===H){if(k==="throw")throw A;return M()}for(n.method=k,n.arg=A;;){var P=n.delegate;if(P){var I=i(P,n);if(I){if(I===b)continue;return I}}if(n.method==="next")n.sent=n._sent=n.arg;else if(n.method==="throw"){if(f===U)throw f=H,n.arg;n.dispatchException(n.arg)}else n.method==="return"&&n.abrupt("return",n.arg);f=W;var D=z(e,t,n);if(D.type==="normal"){if(f=n.done?H:N,D.arg===b)continue;return{value:D.arg,done:n.done}}else D.type==="throw"&&(f=H,n.method="throw",n.arg=D.arg)}}}function i(e,t){var n=e.iterator[t.method];if(n===v){if(t.delegate=null,t.method==="throw"){if(e.iterator.return&&(t.method="return",t.arg=v,i(e,t),t.method==="throw"))return b;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var f=z(n,e.iterator,t.arg);if(f.type==="throw")return t.method="throw",t.arg=f.arg,t.delegate=null,b;var h=f.arg;if(!h)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,b;if(h.done)t[e.resultName]=h.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=v);else return h;return t.delegate=null,b}u(a),j(a,p,"Generator"),j(a,d,function(){return this}),j(a,"toString",function(){return"[object Generator]"});function s(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function c(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(s,this),this.reset(!0)}l.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function f(){for(;t.length;){var h=t.pop();if(h in e)return f.value=h,f.done=!1,f}return f.done=!0,f}};function L(e){if(e){var t=e[d];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var n=-1,f=function h(){for(;++n<e.length;)if(m.call(e,n))return h.value=e[n],h.done=!1,h;return h.value=v,h.done=!0,h};return f.next=f}}return{next:M}}l.values=L;function M(){return{value:v,done:!0}}return y.prototype={constructor:y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(c),!e)for(var t in this)t.charAt(0)==="t"&&m.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=v)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(I,D){return k.type="throw",k.arg=e,t.next=I,D&&(t.method="next",t.arg=v),!!D}for(var f=this.tryEntries.length-1;f>=0;--f){var h=this.tryEntries[f],k=h.completion;if(h.tryLoc==="root")return n("end");if(h.tryLoc<=this.prev){var A=m.call(h,"catchLoc"),P=m.call(h,"finallyLoc");if(A&&P){if(this.prev<h.catchLoc)return n(h.catchLoc,!0);if(this.prev<h.finallyLoc)return n(h.finallyLoc)}else if(A){if(this.prev<h.catchLoc)return n(h.catchLoc,!0)}else if(P){if(this.prev<h.finallyLoc)return n(h.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var f=this.tryEntries[n];if(f.tryLoc<=this.prev&&m.call(f,"finallyLoc")&&this.prev<f.finallyLoc){var h=f;break}}h&&(e==="break"||e==="continue")&&h.tryLoc<=t&&t<=h.finallyLoc&&(h=null);var k=h?h.completion:{};return k.type=e,k.arg=t,h?(this.method="next",this.next=h.finallyLoc,b):this.complete(k)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),c(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var f=n.completion;if(f.type==="throw"){var h=f.arg;c(n)}return h}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=v),b}},l}(w.exports);try{regeneratorRuntime=g}catch(l){typeof globalThis=="object"?globalThis.regeneratorRuntime=g:Function("r","regeneratorRuntime = r")(g)}},584:function(w,g,l){l.d(g,{Mf:function(){return O.Z}});var O=l(282),m=l(666),v=l.n(m),E=null,d=l(949);function x(b){if(b.material){var V=Array.isArray(b.material)?b.material:[b.material];V.forEach(function(_){var T,C;(T=_.color)===null||T===void 0||T.convertSRGBToLinear(),(C=_.emissive)===null||C===void 0||C.convertSRGBToLinear(),_.map&&(_.map.encoding=THREE.sRGBEncoding),_.emissiveMap&&(_.emissiveMap.encoding=THREE.sRGBEncoding)})}}var p=l(568),j=l(924),R=l(77),z=l(484),U=null,N=null,W=function(){var b=(0,p.Z)(v().mark(function V(_,T){var C,G,S,a,u,o,r,i,s;return v().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return C=T.type,G=C===void 0?"blob":C,S=T.version,a=S===void 0?"1":S,y.next=4,(0,R.get)(_);case 4:if(o=y.sent,!(o&&o[a])){y.next=9;break}u=o[a],y.next=15;break;case 9:return y.next=11,(0,z.Z)(fetch(_).then(function(L){if(L.ok)return L[G]();throw new Error}));case 11:r=y.sent,i=r.res,s=r.err,s||(u=i,(0,R.set)(_,(0,j.Z)({},a,i)));case 15:return y.abrupt("return",u?{url:G==="json"?_:URL.createObjectURL(u),store:u}:{url:_});case 16:case"end":return y.stop()}},V)}));return function(_,T){return b.apply(this,arguments)}}(),H=l(705)},282:function(w,g,l){l.d(g,{Z:function(){return m}});var O=l(484);function m(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d={};return d.promise=new Promise(function(x,p){d.resolve=x,d.reject=p}),v&&(d.promise=(0,O.Z)(d.promise,E)),d}},484:function(w,g,l){l.d(g,{Z:function(){return m}});var O=l(42);function m(v){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return v.then(function(d){return(0,O.Z)({err:null,res:d},E)}).catch(function(d){return(0,O.Z)({err:d,res:void 0},E)})}},705:function(w,g,l){var O=l(949),m=new Map,v=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{generateTopUV:function(x,p,j,R,z){var U=p[j*3],N=p[j*3+1],W=p[R*3],H=p[R*3+1],b=p[z*3],V=p[z*3+1],_;if(m.has(x))_=m.get(x);else{var T=d.box3||new THREE.Box3;if(!d.box3){var C=x.parameters.shapes.getPoints();T.setFromArray(C.map(function(o){return[o.x,o.y,0]}).flat())}var G=T.getSize(new THREE.Vector3);d.split&&(G.y/=d.split),_={box:T,size:G},m.set(x,_)}var S=_.box,a=_.size,u=d.split?1-d.split:0;return[new THREE.Vector2((U-S.min.x)/a.x,(N-S.min.y)/a.y+u),new THREE.Vector2((W-S.min.x)/a.x,(H-S.min.y)/a.y+u),new THREE.Vector2((b-S.min.x)/a.x,(V-S.min.y)/a.y+u)]},generateSideWallUV:function(x,p,j,R,z,U){var N=p[j*3],W=p[j*3+1],H=p[j*3+2],b=p[R*3],V=p[R*3+1],_=p[R*3+2],T=p[z*3],C=p[z*3+1],G=p[z*3+2],S=p[U*3],a=p[U*3+1],u=p[U*3+2],o;if(m.has(p))o=m.get(p);else{var r=new THREE.Box3;r.setFromArray(p);var i=r.getSize(new THREE.Vector3);d.split&&(i.z/=1-d.split),o={box:r,size:i},m.set(p,o)}var s=o.box,c=o.size;return Math.abs(W-V)<Math.abs(N-b)?[new THREE.Vector2((N-s.min.x)/c.x,(H-s.min.z)/c.z),new THREE.Vector2((b-s.min.x)/c.x,(_-s.min.z)/c.z),new THREE.Vector2((T-s.min.x)/c.x,(G-s.min.z)/c.z),new THREE.Vector2((S-s.min.x)/c.x,(u-s.min.z)/c.z)]:[new THREE.Vector2((W-s.min.y)/c.y,(H-s.min.z)/c.z),new THREE.Vector2((V-s.min.y)/c.y,(_-s.min.z)/c.z),new THREE.Vector2((C-s.min.y)/c.y,(G-s.min.z)/c.z),new THREE.Vector2((a-s.min.y)/c.y,(u-s.min.z)/c.z)]}}},E=function(){m.clear()}},77:function(w,g,l){var O=v=>{var E={};return l.d(E,v),E},m=v=>()=>v;w.exports=O({del:()=>Y.del,get:()=>Y.get,set:()=>Y.set})},949:function(w,g,l){var O=v=>{var E={};return l.d(E,v),E},m=v=>()=>v;w.exports=O({BufferGeometry:()=>K.BufferGeometry,MathUtils:()=>K.MathUtils,Points:()=>K.Points,PointsMaterial:()=>K.PointsMaterial,Vector3:()=>K.Vector3})},568:function(w,g,l){l.d(g,{Z:function(){return m}});function O(v,E,d,x,p,j,R){try{var z=v[j](R),U=z.value}catch(N){d(N);return}z.done?E(U):Promise.resolve(U).then(x,p)}function m(v){return function(){var E=this,d=arguments;return new Promise(function(x,p){var j=v.apply(E,d);function R(U){O(j,x,p,R,z,"next",U)}function z(U){O(j,x,p,R,z,"throw",U)}R(void 0)})}}},924:function(w,g,l){l.d(g,{Z:function(){return O}});function O(m,v,E){return v in m?Object.defineProperty(m,v,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[v]=E,m}},42:function(w,g,l){l.d(g,{Z:function(){return m}});var O=l(924);function m(v){for(var E=1;E<arguments.length;E++){var d=arguments[E]!=null?arguments[E]:{},x=Object.keys(d);typeof Object.getOwnPropertySymbols=="function"&&(x=x.concat(Object.getOwnPropertySymbols(d).filter(function(p){return Object.getOwnPropertyDescriptor(d,p).enumerable}))),x.forEach(function(p){(0,O.Z)(v,p,d[p])})}return v}}},J={};function B(w){var g=J[w];if(g!==void 0)return g.exports;var l=J[w]={exports:{}};return Q[w](l,l.exports,B),l.exports}(function(){B.n=function(w){var g=w&&w.__esModule?function(){return w.default}:function(){return w};return B.d(g,{a:g}),g}})(),function(){B.d=function(w,g){for(var l in g)B.o(g,l)&&!B.o(w,l)&&Object.defineProperty(w,l,{enumerable:!0,get:g[l]})}}(),function(){B.o=function(w,g){return Object.prototype.hasOwnProperty.call(w,g)}}();var $={};(function(){B.d($,{Ct:function(){return l},Vw:function(){return _},hG:function(){return V},Wk:function(){return S}});function w(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}var g=B(584),l=function(){"use strict";function a(){w(this,a),this.cache=new Map}var u=a.prototype;return u.install=function(){},u.init=function(r){var i=(0,g.Mf)();this.cache.set(r,i)},u.get=function(r){var i;return(i=this.cache.get(r))===null||i===void 0?void 0:i.promise},u.set=function(r,i){var s=this.cache.get(r);s?s.resolve(i):console.warn("init cache first")},u.dispose=function(){this.cache.forEach(function(r,i){r.reject("stop set cache:".concat(i))}),this.cache.clear()},a}(),O=B(568);function m(a,u){for(var o=0;o<u.length;o++){var r=u[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(a,r.key,r)}}function v(a,u,o){return u&&m(a.prototype,u),o&&m(a,o),a}function E(a){if(Array.isArray(a))return a}function d(a){if(typeof Symbol!="undefined"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function x(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(a,u){(u==null||u>a.length)&&(u=a.length);for(var o=0,r=new Array(u);o<u;o++)r[o]=a[o];return r}function j(a,u){if(!!a){if(typeof a=="string")return p(a,u);var o=Object.prototype.toString.call(a).slice(8,-1);if(o==="Object"&&a.constructor&&(o=a.constructor.name),o==="Map"||o==="Set")return Array.from(o);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return p(a,u)}}function R(a,u){return E(a)||d(a,u)||j(a,u)||x()}function z(a){if(Array.isArray(a))return p(a)}function U(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function N(a){return z(a)||d(a)||j(a)||U()}var W=B(666),H=B.n(W),b=B(949),V=function(){"use strict";function a(o){w(this,a),this.onTopBase=new Map,this.objectNamesToFactories=new Map,this.objects=new Map,this.objects_=o}var u=a.prototype;return u.install=function(r){this.pencil=r,this.initObjectFactories()},u.initObjectFactories=function(){var r=this,i=this.objects_;Object.keys(i).forEach(function(s){var c=function(){function y(){w(this,y)}var L=y.prototype;return L.create=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new i[s](e)},y}();r.objectNamesToFactories.set(s,c)})},u.getObject=function(r,i){r.includes("#")&&console.warn("getObject:err:\u4E0D\u652F\u6301 #",r);var s=(i||{}).key,c="".concat(r).concat(s?"#".concat(s):""),y=this.objects.get(c);return y},u.getAllObject=function(r,i){r.includes("#")&&console.warn("getAllObject:err:\u4E0D\u652F\u6301 #",r);var s=(i||{}).key,c="".concat(r).concat(s?"#".concat(s):""),y=[];return this.objects.forEach(function(L,M){(M.startsWith("".concat(c,"#"))||M===c)&&y.push(L)}),y},u.draw=function(r,i,s){var c=this;return(0,O.Z)(H().mark(function y(){var L,M,e,t,n,f,h,k;return H().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(L=c.objectNamesToFactories.get(r),!L){P.next=16;break}return M=(i||{}).key,e="".concat(r).concat(M?"#".concat(M):""),c.objects.has(e)&&(t=b.MathUtils.generateUUID(),e+="#".concat(t)),n=(i==null?void 0:i.target)||s,f=(i==null?void 0:i.onTop)||0,typeof n=="string"?h=c.objects.get(n):(n==null?void 0:n.objecttype__)==="BaseObject"?h=n:h=c.pencil.scene,k=new L().create(i),k.pencil=c.pencil,k.key=e,c.objects.set(e,k),P.next=15,c.addMesh(k,h,f);case 15:return P.abrupt("return",k);case 16:throw new Error("Unrecognized:".concat(r));case 17:case"end":return P.stop()}},y)}))()},u.addMesh=function(r,i,s){var c=this;return(0,O.Z)(H().mark(function y(){var L,M,e,t;return H().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,r.create();case 2:r.object3d&&(r.object3d.userData.BaseObject_=r,s&&(L=1e3+s*2,c.onTopBase.has(L-1)||(M=new b.BufferGeometry,M.setFromPoints([new b.Vector3(0,0,0)]),e=new b.PointsMaterial({size:.01,transparent:!0,opacity:.01}),t=new b.Points(M,e),t.renderOrder=L-1,t.onBeforeRender=function(){console.log(1),c.pencil.renderer.clearDepth()},t.frustumCulled=!1,c.onTopBase.set(L-1,!0),c.pencil.scene.add(t)),r.object3d.renderOrder=L),i.add(r.object3d)),r.visible=!0,r.render(),r.pm.resolve();case 6:case"end":return f.stop()}},y)}))()},u.erase=function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var c=this;N(i).forEach(function(y){var L=[];if(typeof y=="string"){var M,e=R(y.split("#"),2),t=e[0],n=e[1];(M=L).push.apply(M,N(c.getAllObject(t,{key:n})))}else L.push(y);L.forEach(function(f){c.removeMesh(f)})})},u.removeMesh=function(r){var i=this,s=r.parent;r.object3d&&s.remove(r.object3d),r.traverse(function(c){c.visible=!1,c.dispose(),i.objects.delete(c.key)})},u.update=function(r,i){this.objects.forEach(function(s){s.update(r,i)})},u.setSize=function(r,i){this.objects.forEach(function(s){s.resize(r,i)})},u.dispose=function(){this.objects.forEach(function(r,i){r.dispose(),r.pm.reject("stop draw:".concat(i))}),this.objects.clear(),this.onTopBase.clear(),this.objectNamesToFactories.clear()},v(a,[{key:"objectsPromise",get:function(){var r=[];return this.objects.forEach(function(i){r.push(i.pm.promise)}),r}}]),a}(),_=function(){"use strict";function a(){w(this,a),this.data={}}var u=a.prototype;return u.install=function(){},u.setData=function(r,i){var s,c;this.data[r]=i,(c=(s=this).cb)===null||c===void 0||c.call(s,r)},u.runAll=function(){var r=this;Object.keys(this.data).forEach(function(i){var s,c;(c=(s=r).cb)===null||c===void 0||c.call(s,i)})},u.dispose=function(){this.data={},this.cb=void 0},a}(),T=B(924),C=B(42),G=B(77),S=function(){"use strict";function a(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};w(this,a),this.messageList=[],this.options=(0,C.Z)({},{cache:!1,cacheVersion:"1"},o)}var u=a.prototype;return u.install=function(){},u.init=function(r,i){var s=this,c=this.options,y=c.cache,L=c.cacheVersion;this.workerList=Array.from({length:i},function(M,e){var t=typeof r=="string"?new Worker(r):r();return t.onmessage=function(n){var f=n.data,h=f.res,k=f.uuid,A=s.messageList.find(function(I){var D=I.uuid;return k===D});if(A==null||A.options.cb(h),s.workerList[e].inUse=!1,s.checkMessage(),y){var P=(A==null?void 0:A.options.cacheVersion)||L;(0,G.set)(k,(0,T.Z)({},P,h))}},{worker:t,inUse:!1}})},u.postMessage=function(r,i){var s=this,c=this.options,y=c.cache,L=c.cacheVersion;if(y&&!r.workerKey){console.warn("worker cache need workerKey");return}if(y&&r.workerKey&&r.delCache){console.warn("worker cache del: ".concat(r.workerKey)),(0,G.del)(r.workerKey);return}var M=r.workerKey||b.MathUtils.generateUUID();(y?(0,G.get)(M):Promise.resolve()).then(function(e){var t=i.cacheVersion||L;e&&e[t]?i.cb(e[t]):(s.messageList.push({req:r,options:i,uuid:M,inUse:!1}),s.checkMessage())}).catch(function(){console.warn("err:worker cache"),s.messageList.push({req:r,options:i,uuid:M,inUse:!1}),s.checkMessage()})},u.checkMessage=function(){var r=this.workerList.find(function(s){var c=s.inUse;return!c});if(r){var i=this.messageList.find(function(s){var c=s.inUse;return!c});i&&(i.inUse=!0,r.inUse=!0,r.worker.postMessage({req:i.req,uuid:i.uuid}))}},u.dispose=function(){this.workerList.forEach(function(r){var i=r.worker;i.terminate()}),this.workerList=[],this.messageList=[]},a}()})();var q=$.Ct,tt=$.Vw,et=$.hG,rt=$.Wk;export{q as Cache,tt as Data,et as Draw,rt as Wk};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gl-draw",
3
- "version": "0.8.16",
3
+ "version": "0.8.18",
4
4
  "author": "gitplus <hstits@gmail.com>",
5
5
  "scripts": {
6
6
  "start": "PORT=3003 bundler-dev",