@rive-app/canvas-advanced 2.10.1 → 2.10.3

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.
@@ -42,12 +42,12 @@ function Ka(){var a=Ba.buffer;l.HEAP8=z=new Int8Array(a);l.HEAP16=Ea=new Int16Ar
42
42
  function Aa(a){if(l.onAbort)l.onAbort(a);a="Aborted("+a+")";ya(a);Da=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}function Ta(a){return a.startsWith("data:application/octet-stream;base64,")}var Ua;Ua="canvas_advanced.wasm";if(!Ta(Ua)){var Va=Ua;Ua=l.locateFile?l.locateFile(Va,qa):qa+Va}function Wa(a){if(a==Ua&&za)return new Uint8Array(za);if(ta)return ta(a);throw"both async and sync fetching of the wasm failed";}
43
43
  function Xa(a){if(!za&&(oa||pa)){if("function"==typeof fetch&&!a.startsWith("file://"))return fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw"failed to load wasm binary file at '"+a+"'";return b.arrayBuffer()}).catch(()=>Wa(a));if(ra)return new Promise((b,c)=>{ra(a,d=>b(new Uint8Array(d)),c)})}return Promise.resolve().then(()=>Wa(a))}function Ya(a,b,c){return Xa(a).then(d=>WebAssembly.instantiate(d,b)).then(d=>d).then(c,d=>{ya("failed to asynchronously prepare wasm: "+d);Aa(d)})}
44
44
  function Za(a,b){var c=Ua;return za||"function"!=typeof WebAssembly.instantiateStreaming||Ta(c)||c.startsWith("file://")||"function"!=typeof fetch?Ya(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(e){ya("wasm streaming compile failed: "+e);ya("falling back to ArrayBuffer instantiation");return Ya(c,a,b)}))}
45
- var M,O,cb={176708:(a,b,c,d,e)=>{if("undefined"===typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if("undefined"===typeof window.sa){window.sa={Ab:0};window.sa.Ha={};window.sa.Ha.zb=a;window.sa.Ha.capture=b;window.sa.Ha.Lb=c;window.sa.gb={};window.sa.gb.stopped=d;window.sa.gb.yc=e;let f=window.sa;f.Ea=[];f.Gd=function(g){for(var m=0;m<f.Ea.length;++m)if(null==f.Ea[m])return f.Ea[m]=g,m;f.Ea.push(g);return f.Ea.length-1};f.Dc=function(g){for(f.Ea[g]=null;0<f.Ea.length;)if(null==
45
+ var M,O,cb={177276:(a,b,c,d,e)=>{if("undefined"===typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if("undefined"===typeof window.sa){window.sa={Ab:0};window.sa.Ha={};window.sa.Ha.zb=a;window.sa.Ha.capture=b;window.sa.Ha.Lb=c;window.sa.gb={};window.sa.gb.stopped=d;window.sa.gb.yc=e;let f=window.sa;f.Ea=[];f.Gd=function(g){for(var m=0;m<f.Ea.length;++m)if(null==f.Ea[m])return f.Ea[m]=g,m;f.Ea.push(g);return f.Ea.length-1};f.Dc=function(g){for(f.Ea[g]=null;0<f.Ea.length;)if(null==
46
46
  f.Ea[f.Ea.length-1])f.Ea.pop();else break};f.Sd=function(g){for(var m=0;m<f.Ea.length;++m)if(f.Ea[m]==g)return f.Dc(m)};f.sb=function(g){return f.Ea[g]};f.Cc=["touchend","click"];f.unlock=function(){for(var g=0;g<f.Ea.length;++g){var m=f.Ea[g];null!=m&&null!=m.Ia&&m.state===f.gb.yc&&m.Ia.resume().then(()=>{$a(m.qc)},n=>{console.error("Failed to resume audiocontext",n)})}f.Cc.map(function(n){document.removeEventListener(n,f.unlock,!0)})};f.Cc.map(function(g){document.addEventListener(g,f.unlock,!0)})}window.sa.Ab+=
47
- 1;return 1},178886:()=>{"undefined"!==typeof window.sa&&(--window.sa.Ab,0===window.sa.Ab&&delete window.sa)},179050:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,179154:()=>{try{var a=new (window.AudioContext||window.webkitAudioContext),b=a.sampleRate;a.close();return b}catch(c){return 0}},179325:(a,b,c,d,e,f)=>{if("undefined"===typeof window.sa)return-1;var g={},m={};a==window.sa.Ha.zb&&0!=c&&(m.sampleRate=c);g.Ia=new (window.AudioContext||window.webkitAudioContext)(m);
47
+ 1;return 1},179454:()=>{"undefined"!==typeof window.sa&&(--window.sa.Ab,0===window.sa.Ab&&delete window.sa)},179618:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,179722:()=>{try{var a=new (window.AudioContext||window.webkitAudioContext),b=a.sampleRate;a.close();return b}catch(c){return 0}},179893:(a,b,c,d,e,f)=>{if("undefined"===typeof window.sa)return-1;var g={},m={};a==window.sa.Ha.zb&&0!=c&&(m.sampleRate=c);g.Ia=new (window.AudioContext||window.webkitAudioContext)(m);
48
48
  g.Ia.suspend();g.state=window.sa.gb.stopped;c=0;a!=window.sa.Ha.zb&&(c=b);g.Za=g.Ia.createScriptProcessor(d,c,b);g.Za.onaudioprocess=function(n){if(null==g.tb||0==g.tb.length)g.tb=new Float32Array(Ga.buffer,e,d*b);if(a==window.sa.Ha.capture||a==window.sa.Ha.Lb){for(var k=0;k<b;k+=1)for(var t=n.inputBuffer.getChannelData(k),u=g.tb,x=0;x<d;x+=1)u[x*b+k]=t[x];ab(f,d,e)}if(a==window.sa.Ha.zb||a==window.sa.Ha.Lb)for(bb(f,d,e),k=0;k<n.outputBuffer.numberOfChannels;++k)for(t=n.outputBuffer.getChannelData(k),
49
- u=g.tb,x=0;x<d;x+=1)t[x]=u[x*b+k];else for(k=0;k<n.outputBuffer.numberOfChannels;++k)n.outputBuffer.getChannelData(k).fill(0)};a!=window.sa.Ha.capture&&a!=window.sa.Ha.Lb||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(n){g.Db=g.Ia.createMediaStreamSource(n);g.Db.connect(g.Za);g.Za.connect(g.Ia.destination)}).catch(function(n){console.log("Failed to get user media: "+n)});a==window.sa.Ha.zb&&g.Za.connect(g.Ia.destination);g.qc=f;return window.sa.Gd(g)},182202:a=>window.sa.sb(a).Ia.sampleRate,
50
- 182275:a=>{a=window.sa.sb(a);void 0!==a.Za&&(a.Za.onaudioprocess=function(){},a.Za.disconnect(),a.Za=void 0);void 0!==a.Db&&(a.Db.disconnect(),a.Db=void 0);a.Ia.close();a.Ia=void 0;a.qc=void 0},182675:a=>{window.sa.Dc(a)},182725:a=>{a=window.sa.sb(a);a.Ia.resume();a.state=window.sa.gb.yc},182864:a=>{a=window.sa.sb(a);a.Ia.suspend();a.state=window.sa.gb.stopped}},db=a=>{for(;0<a.length;)a.shift()(l)},eb=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,
49
+ u=g.tb,x=0;x<d;x+=1)t[x]=u[x*b+k];else for(k=0;k<n.outputBuffer.numberOfChannels;++k)n.outputBuffer.getChannelData(k).fill(0)};a!=window.sa.Ha.capture&&a!=window.sa.Ha.Lb||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(n){g.Db=g.Ia.createMediaStreamSource(n);g.Db.connect(g.Za);g.Za.connect(g.Ia.destination)}).catch(function(n){console.log("Failed to get user media: "+n)});a==window.sa.Ha.zb&&g.Za.connect(g.Ia.destination);g.qc=f;return window.sa.Gd(g)},182770:a=>window.sa.sb(a).Ia.sampleRate,
50
+ 182843:a=>{a=window.sa.sb(a);void 0!==a.Za&&(a.Za.onaudioprocess=function(){},a.Za.disconnect(),a.Za=void 0);void 0!==a.Db&&(a.Db.disconnect(),a.Db=void 0);a.Ia.close();a.Ia=void 0;a.qc=void 0},183243:a=>{window.sa.Dc(a)},183293:a=>{a=window.sa.sb(a);a.Ia.resume();a.state=window.sa.gb.yc},183432:a=>{a=window.sa.sb(a);a.Ia.suspend();a.state=window.sa.gb.stopped}},db=a=>{for(;0<a.length;)a.shift()(l)},eb=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,
51
51
  1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},fb=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=eb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},gb=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},hb=a=>{if("/"===a)return"/";a=fb(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},
52
52
  ib=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);Aa("initRandomDevice")},jb=a=>(jb=ib())(a);function kb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!=typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=eb(a.split("/").filter(d=>!!d),!b).join("/");return(b?"/":"")+a||"."}
53
53
  var lb="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,mb=(a,b,c)=>{var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&lb)return lb.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var f=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{var g=a[b++]&63;e=224==(e&240)?(e&15)<<12|f<<6|g:(e&7)<<18|f<<12|g<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/canvas-advanced",
3
- "version": "2.10.1",
3
+ "version": "2.10.3",
4
4
  "description": "Rive's lightweight low-level canvas based web api.",
5
5
  "main": "canvas_advanced.mjs",
6
6
  "homepage": "https://rive.app",
package/rive.wasm CHANGED
Binary file