!function e(n,t,r){function i(u,f){if(!t[u]){if(!n[u]){var a="function"==typeof require&&require;if(!f&&a)return a(u,!0);if(o)return o(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var c=t[u]={exports:{}};n[u][0].call(c.exports,function(e){var t=n[u][1][e];return i(t?t:e)},c,c.exports,e,n,t,r)}return t[u].exports}for(var o="function"==typeof require&&require,u=0;u0)for(var t=n=0,r=e.length;t>=8;return t},n.pack=function(e,n,t){var r=null;return"n"==n||"N"==n?t>=0&&t<=2147483647&&(r=this.bytesFromInt(t,"n"==n?2:4)):"a"==n&&(r=new Uint8Array(e),r.set(this.enc.encode(t),0)),r},n.unpack=function(e,n,t){var r=null;if("n"==n||"N"==n){var i=t.slice(0,e*("n"==n?2:4));r=this.intFromBytes(i)}else"a"==n&&(r=this.dec.decode(t.slice(0,e)).removeEndNullBytes());return r},n.mergeBuffers=function(e){for(var n=0,t=0,r=e.length;t55295&&t<57344){if(!i){if(t>56319){(n-=3)>-1&&o.push(239,191,189);continue}if(u+1===r){(n-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(n-=3)>-1&&o.push(239,191,189),i=t;continue}t=i-55296<<10|t-56320|65536,i=null}else i&&((n-=3)>-1&&o.push(239,191,189),i=null);if(t<128){if((n-=1)<0)break;o.push(t)}else if(t<2048){if((n-=2)<0)break;o.push(t>>6|192,63&t|128)}else if(t<65536){if((n-=3)<0)break;o.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<2097152))throw new Error("Invalid code point");if((n-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return o}function n(e,n,r){var i="",o="";r=Math.min(e.length,r||1/0),n=n||0;for(var u=n;u=this.header.def.length&&this.header.def.map.forEach(function(t){var r=e.slice(t.offset,t.offset+t.length),i=n.unpack(t.size,t.type,r);t.value=i})},this.buildProperties=function(e){var t=[];this.header.buildProperties(e),this.header.def.map.forEach(function(e){var r=n.pack(e.size,e.type,e.value);t.push(r)}),t=n.mergeBuffers(t)},this.extractProperties(e)},n.smpFile=function(e){return new n.File(e,new n.Header([["signature","a",9,"∢SMP0.2"],["size","N",1,""],["id","N",1,""],["from","a",32,""],["to","a",32,""],["channel","a",32,""],["command","n",1,""],["index","n",1,""],["split","n",1,""]]))},n.smpsFile=function(e){return new n.File(e,new n.Header([["signature","a",13,"ﷸSMPS0.2∢"],["size","N",1,""],["nonce","a",12,""],["cypher","a",135,""]]))},n.smpaFile=function(e){return new n.BaseFile(e,new n.Header([["signature","a",13,"ﷸSMPA0.2∢"],["size","N",1,""],["nonce","a",24,""],["cypher","a",199,""]]))}}},{"./header":5}],5:[function(e,n,t){n.exports=function(e){var n=function(e,n,t,r){this.name=e,this.type=n,this.size=t,this.length="N"==n?4*t:"n"==n?2*t:t,this.value=r},t=function(e){var t=[];e.forEach(function(e){t.push(new n(e[0],e[1],e[2],e[3]))}),this.map=t;var r=[],i={},o=0,u=0;this.map.forEach(function(e){e.offset=o,r[r.length]=e.name,o+=e.length,i[e.name]=u++}),this.indexes=i,this.keys=r,this.length=o,this.getProperty=function(e){return this.map[this.indexes[e]]}};e.Header=function(e){this.def=new t(e),this.value=function(e){return this.def.getProperty(e).value},this.buildProperties=function(e){this.def.map.forEach(function(n){"signature"!=n.name&&"undefined"!=typeof e[n.name]&&(n.value=e[n.name])})}}}},{}]},{},[1]);