@rive-app/canvas 2.43.1 → 2.44.1
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/package.json +1 -1
- package/rive.d.ts +15 -4
- package/rive.js +1755 -384
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +87 -3
- package/rive_fallback.wasm +0 -0
- package/semantics/accessibilityOverlay.d.ts +56 -1
- package/semantics/claimedKeyEvents.d.ts +7 -0
- package/semantics/semanticTreeModel.d.ts +2 -0
- package/utils/canvasOffset.d.ts +8 -0
- package/utils/keyMap.d.ts +141 -0
- package/utils/registerKeyboardInteractions.d.ts +42 -7
- package/utils/registerTouchInteractions.d.ts +9 -4
- package/utils/textInputProxy.d.ts +61 -0
package/rive.js
CHANGED
|
@@ -349,149 +349,267 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
349
349
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
350
350
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
351
351
|
/* harmony export */ });
|
|
352
|
-
var Rive=(()=>{var _scriptName=globalThis.document?.currentScript?.src;return async function(moduleArg={}){var moduleRtn;var
|
|
353
|
-
function
|
|
354
|
-
"fixed",
|
|
355
|
-
function
|
|
356
|
-
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
loadContents:function(
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
c
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
{
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
q,
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
q)}}
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
a
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
a.
|
|
406
|
-
a.
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
b.
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
0
|
|
445
|
-
(
|
|
446
|
-
(
|
|
447
|
-
(
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
(
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
"
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
352
|
+
var Rive=(()=>{var _scriptName=globalThis.document?.currentScript?.src;return async function(moduleArg={}){var moduleRtn;var D=moduleArg,ba=!!globalThis.window,ca=!!globalThis.WorkerGlobalScope;
|
|
353
|
+
function da(){function d(y){const B=t;l=e=0;t=new Map;B.forEach(F=>{try{F(y)}catch(I){console.error(I)}});this.Ib();x&&x.xc()}let e=0,l=0,t=new Map,x=null,z=null;this.requestAnimationFrame=function(y){e||=requestAnimationFrame(d.bind(this));const B=++l;t.set(B,y);return B};this.cancelAnimationFrame=function(y){t.delete(y);e&&0==t.size&&(cancelAnimationFrame(e),e=0)};this.tc=function(y){z&&(document.body.remove(z),z=null);y||(z=document.createElement("div"),z.style.backgroundColor="black",z.style.position=
|
|
354
|
+
"fixed",z.style.right=0,z.style.top=0,z.style.color="white",z.style.padding="4px",z.innerHTML="RIVE FPS",y=function(B){z.innerHTML="RIVE FPS "+B.toFixed(1)},document.body.appendChild(z));x=new function(){let B=0,F=0;this.xc=function(){var I=performance.now();F?(++B,I-=F,1E3<I&&(y(1E3*B/I),B=F=0)):(F=I,B=0)}}};this.qc=function(){z&&(document.body.remove(z),z=null);x=null};this.Ib=function(){}}
|
|
355
|
+
function ha(){console.assert(!0);const d=new Map;let e=-Infinity;this.push=function(l){l=l+255>>8;d.has(l)&&clearTimeout(d.get(l));d.set(l,setTimeout(function(){d.delete(l);0==d.length?e=-Infinity:l==e&&(e=Math.max(...d.keys()),console.assert(e<l))},1E3));e=Math.max(l,e);return e<<8}}const ia=D.onRuntimeInitialized;
|
|
356
|
+
D.onRuntimeInitialized=function(){ia&&ia();D.startFileScripts=function(y){const B=D.riveScripting;return y&&B&&y.startScripts?B.prepare().then(function(){y.startScripts();return y}):Promise.resolve(y)};let d=D.decodeAudio;D.decodeAudio=function(y,B,F=null){y=d(y,F??null);B(y)};let e=D.decodeFont;D.decodeFont=function(y,B,F=null){y=e(y,F??null);B(y)};const l=D.FileAsset.prototype.decode;D.FileAsset.prototype.decode=function(y,B){return l.call(this,y,B??null)};let t=D.setFallbackFontCb;D.setFallbackFontCallback=
|
|
357
|
+
"function"===typeof t?function(y){t(y)}:function(){console.warn("Module.setFallbackFontCallback called, but text support is not enabled in this build.")};const x=D.FileAssetLoader;D.ptrToAsset=y=>{let B=D.ptrToFileAsset(y);return B.isImage?D.ptrToImageAsset(y):B.isFont?D.ptrToFontAsset(y):B.isAudio?D.ptrToAudioAsset(y):B};D.CustomFileAssetLoader=x.extend("CustomFileAssetLoader",{__construct:function({loadContents:y}){this.__parent.__construct.call(this);this.cc=y},loadContents:function(y,B){y=D.ptrToAsset(y);
|
|
358
|
+
return this.cc(y,B)}});D.CDNFileAssetLoader=x.extend("CDNFileAssetLoader",{__construct:function(y){this.__parent.__construct.call(this);this.fc=y??null},loadContents:function(y){let B=D.ptrToAsset(y);y=B.cdnUuid;if(""===y)return!1;const F=this.fc??null;(function(I,u){var a=new XMLHttpRequest;a.responseType="arraybuffer";a.onreadystatechange=function(){4==a.readyState&&200==a.status&&u(a)};a.open("GET",I,!0);a.send(null)})(B.cdnBaseUrl+"/"+y,I=>{B.decode(new Uint8Array(I.response),F)});return!0}});
|
|
359
|
+
D.FallbackFileAssetLoader=x.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this);this.Gb=[]},addLoader:function(y){this.Gb.push(y)},loadContents:function(y,B){for(let F of this.Gb)if(F.loadContents(y,B))return!0;return!1}});let z=D.computeAlignment;D.computeAlignment=function(y,B,F,I,u=1){return z.call(this,y,B,F,I,u)}};
|
|
360
|
+
(function(){function d(u,a){const c=u.kc,p=u.ra,q=u.qa,v=u.ab??{i:!1},f=(k,h)=>{k=new Uint8Array(a().buffer,k,h);const m=4096<h?u.gb(h):u.Na(h);if(0===m)throw Error(`could not stage ${h} bytes for the host`);u.ia().set(k,m);v.i&&(v.Aa+=h);return m},b=(k,h)=>{0!==k&&4096<h&&u.cb(k)},g=(k,h,m)=>{(new Uint8Array(a().buffer,h,m)).set(u.ia().subarray(k,k+m));v.i&&(v.ya+=m)},n=k=>h=>{const m=(new Uint32Array(a().buffer,h-4,1))[0],w=p();let r=0;try{r=f(h,m),c.re(k,r,m)}finally{b(r,m),q(w)}};return{env:{seed:()=>
|
|
361
|
+
Date.now()*Math.random(),emscripten_get_now:()=>performance.now(),emscripten_date_now:()=>Date.now(),trace:(k,h,m,w,r,C,G)=>{var N=console,U=N.log;const aa=a().buffer,fa=(new Uint32Array(aa,k-4,1))[0];k=(new TextDecoder("utf-16le")).decode(new Uint8Array(aa,k,fa));return U.call(N,"trace: "+k,...[m,w,r,C,G].slice(0,h))},"console.log":n(0),"console.debug":n(0),"console.info":n(0),"console.warn":n(0),"console.error":n(0),"console.time":n(1),"console.timeLog":n(2),"console.timeEnd":n(3)},rive_rt_v1:{log:(k,
|
|
362
|
+
h,m)=>{const w=p();let r=0;try{r=f(h,m),c.ei(k,r,m)}finally{b(r,m),q(w)}},mark_needs_update:c.fi,budget_exceeded:c.Zh,error:(k,h)=>{const m=p();let w=0;try{w=f(k,h),c.ci(w,h)}finally{b(w,h),q(m)}},now:()=>performance.now(),date_now:()=>Date.now(),debug_enter:c.$h,debug_line:c.bi,debug_leave:c.ai,utc_offset:c.gi,is_dst:c.di,zone_name:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m);const C=c.hi(k,r,m);g(r,h,m);return C}finally{b(r,m),q(w)}}},rive_data_v1:{view_model:c.pf,root_view_model:c.hf,global_view_model:(k,
|
|
363
|
+
h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.Oe(k,r,m)}finally{b(r,m),q(w)}},global_view_model_names:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m);const C=c.Pe(k,r,m);g(r,h,m);return C}finally{b(r,m),q(w)}},context:c.De,context_parent:c.Ee,context_view_model:c.Ge,context_release:c.Fe,has_view_model:(k,h)=>{const m=p();let w=0;try{return w=f(k,h),c.Qe(w,h)}finally{b(w,h),q(m)}},new_view_model:(k,h,m,w)=>{const r=p();let C=0,G=0;try{return C=f(k,h),G=f(m,w),c.df(C,h,G,w)}finally{b(G,w),b(C,h),q(r)}},
|
|
364
|
+
vmi_release:c.Ef,vmi_number:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.Cf(k,r,m)}finally{b(r,m),q(w)}},vmi_boolean:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.uf(k,r,m)}finally{b(r,m),q(w)}},vmi_string:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.Ff(k,r,m)}finally{b(r,m),q(w)}},vmi_trigger:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.Hf(k,r,m)}finally{b(r,m),q(w)}},vmi_color:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.vf(k,r,m)}finally{b(r,m),q(w)}},vmi_view_model:(k,
|
|
365
|
+
h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.If(k,r,m)}finally{b(r,m),q(w)}},vmi_property:(k,h,m,w,r)=>{const C=p();let G=0,N=0;try{G=f(h,m);N=f(w,4*r);const U=c.Df(k,G,m,N,r);g(N,w,4*r);return U}finally{b(N,4*r),b(G,m),q(C)}},vmi_instance:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.Af(k,r,m)}finally{b(r,m),q(w)}},vmi_symbol_index:c.Gf,vmi_equal:c.xf,view_model_get:c.qf,vmi_list:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.Bf(k,r,m)}finally{b(r,m),q(w)}},vmi_enum:(k,h,m)=>{const w=
|
|
366
|
+
p();let r=0;try{return r=f(h,m),c.wf(k,r,m)}finally{b(r,m),q(w)}},vmi_image:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.zf(k,r,m)}finally{b(r,m),q(w)}},vmi_font:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.yf(k,r,m)}finally{b(r,m),q(w)}},vmi_blob:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.tf(k,r,m)}finally{b(r,m),q(w)}},vmi_artboard:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.sf(k,r,m)}finally{b(r,m),q(w)}},image_get:c.Re,image_set:c.Se,font_get:c.Le,font_set:c.Ne,
|
|
367
|
+
font_release:c.Me,blob_present:c.xe,blob_get:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m);const C=c.ve(k,r,m);g(r,h,m);return C}finally{b(r,m),q(w)}},blob_name:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m);const C=c.we(k,r,m);g(r,h,m);return C}finally{b(r,m),q(w)}},blob_set:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m),c.ye(k,r,m)}finally{b(r,m),q(w)}},blob_clear:c.ue,artboard_get:c.se,artboard_set:c.te,enum_get:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m);const C=c.Ie(k,r,m);g(r,h,m);return C}finally{b(r,
|
|
368
|
+
m),q(w)}},enum_set:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m),c.Je(k,r,m)}finally{b(r,m),q(w)}},enum_values:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m);const C=c.Ke(k,r,m);g(r,h,m);return C}finally{b(r,m),q(w)}},prop_release:c.gf,trigger_fire:c.mf,list_length:c.We,list_push:c.Ye,list_pop:c.Xe,list_shift:c.bf,list_clear:c.Te,list_swap:c.cf,list_insert:c.Ve,list_remove:c.Ze,list_remove_at:c.af,list_remove_all_of:c.$e,list_get:c.Ue,view_model_set:c.rf,color_get:c.Be,color_set:c.Ce,number_get:c.ef,number_set:c.ff,
|
|
369
|
+
boolean_get:c.ze,boolean_set:c.Ae,string_get:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m);const C=c.kf(k,r,m);g(r,h,m);return C}finally{b(r,m),q(w)}},string_changed:c.jf,string_set:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m),c.lf(k,r,m)}finally{b(r,m),q(w)}},watch:c.Jf,unwatch:c.nf,convert_result:(k,h,m,w,r,C)=>{const G=p();let N=0;try{N=f(r,C),c.He(k,h,m,w,N,C)}finally{b(N,C),q(G)}}},rive_artboard_v1:{release:c.Bd,advance:c.Uc,draw:c.bd,instance:c.md,data:c.ad,width:c.Gd,height:c.ld,set_width:c.Fd,
|
|
370
|
+
set_height:c.Ed,frame_origin:c.jd,set_frame_origin:c.Dd,bounds:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m),c.$c(k,r,m),g(r,h,4*m)}finally{b(r,4*m),q(w)}},pointer_event:c.zd,scroll_event:c.Cd,gamepad_event:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.kd(k,r,m)}finally{b(r,m),q(w)}},animation:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.Vc(k,r,m)}finally{b(r,m),q(w)}},animation_release:c.Yc,animation_duration:c.Xc,animation_advance:c.Wc,animation_set_time:c.Zc,add_to_path:c.Tc,node:(k,
|
|
371
|
+
h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.nd(k,r,m)}finally{b(r,m),q(w)}},node_release:c.ud,node_transform:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m),c.xd(k,r,m),g(r,h,4*m)}finally{b(r,4*m),q(w)}},node_set:c.vd,node_world_transform:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m),c.yd(k,r,m),g(r,h,4*m)}finally{b(r,4*m),q(w)}},node_set_world_transform:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m),c.wd(k,r,m)}finally{b(r,4*m),q(w)}},node_decompose:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m),c.pd(k,
|
|
372
|
+
r,m)}finally{b(r,4*m),q(w)}},node_path_verbs:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m);const C=c.td(k,r,m);g(r,h,m);return C}finally{b(r,m),q(w)}},node_path_points:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m);const C=c.sd(k,r,m);g(r,h,4*m);return C}finally{b(r,4*m),q(w)}},node_paint:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m);const C=c.qd(k,r,m);g(r,h,4*m);return C}finally{b(r,4*m),q(w)}},node_children:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m);const C=c.od(k,r,m);g(r,h,4*m);return C}finally{b(r,
|
|
373
|
+
4*m),q(w)}},node_parent:c.rd,property_key:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.Ad(k,r,m)}finally{b(r,m),q(w)}},draw_visit:c.dd,draw_modulated:c.cd,drawable_draw:c.ed,drawable_value:(k,h,m,w)=>{const r=p();let C=0;try{C=f(m,4*w);const G=c.hd(k,h,C,w);g(C,m,4*w);return G}finally{b(C,4*w),q(r)}},drawable_string:(k,h,m,w)=>{const r=p();let C=0;try{C=f(m,w);const G=c.gd(k,h,C,w);g(C,m,w);return G}finally{b(C,w),q(r)}},drawable_properties:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m);const C=
|
|
374
|
+
c.fd(k,r,m);g(r,h,m);return C}finally{b(r,m),q(w)}}},rive_audio_v1:{source:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.Zd(k,r,m)}finally{b(r,m),q(w)}},source_release:c.be,source_duration:c.ae,source_sample_rate:c.ce,source_channels:c.$d,play:c.Hd,play_at_time:c.Jd,play_in_time:c.Ld,play_at_frame:c.Id,play_in_frame:c.Kd,time:c.de,time_frame:c.ee,sample_rate:c.Md,sound_release:c.Qd,sound_play:c.Pd,sound_pause:c.Od,sound_resume:c.Rd,sound_stop:c.Vd,sound_seek:c.Sd,sound_seek_frame:c.Td,sound_completed:c.Nd,
|
|
375
|
+
sound_time:c.Wd,sound_time_frame:c.Xd,sound_volume:c.Yd,sound_set_volume:c.Ud},rive_path_v1:{"new":c.Kh,update:(k,h,m,w,r,C)=>{const G=p();let N=0,U=0;try{N=f(h,m),U=f(w,4*r),c.Nh(k,N,m,U,r,C)}finally{b(U,4*r),b(N,m),q(G)}},release:c.Mh,add:c.Ih,verbs:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m);const C=c.Oh(k,r,m);g(r,h,m);return C}finally{b(r,m),q(w)}},points:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m);const C=c.Lh(k,r,m);g(r,h,4*m);return C}finally{b(r,4*m),q(w)}},effect_result:(k,h,m,w)=>{const r=
|
|
376
|
+
p();let C=0,G=0;try{C=f(k,h),G=f(m,4*w),c.Jh(C,h,G,w)}finally{b(G,4*w),b(C,h),q(r)}}},rive_measure_v1:{path_new:(k,h,m,w)=>{const r=p();let C=0,G=0;try{return C=f(k,h),G=f(m,4*w),c.nh(C,h,G,w)}finally{b(G,4*w),b(C,h),q(r)}},contours_new:(k,h,m,w)=>{const r=p();let C=0,G=0;try{return C=f(k,h),G=f(m,4*w),c.ih(C,h,G,w)}finally{b(G,4*w),b(C,h),q(r)}},contour_next:c.hh,length:c.mh,is_closed:c.lh,pos_tan:(k,h,m,w)=>{const r=p();let C=0;try{C=f(m,4*w),c.oh(k,h,C,w),g(C,m,4*w)}finally{b(C,4*w),q(r)}},warp:(k,
|
|
377
|
+
h,m,w,r)=>{const C=p();let G=0;try{G=f(w,4*r),c.qh(k,h,m,G,r),g(G,w,4*r)}finally{b(G,4*r),q(C)}},extract:c.jh,extract_read:(k,h,m,w,r)=>{const C=p();let G=0,N=0;try{G=f(h,m);N=f(w,4*r);const U=c.kh(k,G,m,N,r);g(G,h,m);g(N,w,4*r);return U}finally{b(N,4*r),b(G,m),q(C)}},release:c.ph},rive_paint_v1:{"new":c.Ch,release:c.Dh,style:c.Gh,color:c.zh,thickness:c.Hh,join:c.Bh,cap:c.yh,blend_mode:c.xh,feather:c.Ah,shader:c.Eh,shader_transform:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m),c.Fh(k,r,m)}finally{b(r,
|
|
378
|
+
4*m),q(w)}}},rive_canvas_v1:{"new":c.ne,release:c.oe,width:c.qe,height:c.le,resize:c.pe,image:c.me,begin_frame:c.je,end_frame:c.ke},rive_gpu_v1:{features:(k,h)=>{const m=p();let w=0;try{w=f(k,4*h);const r=c.ug(w,h);g(w,k,4*h);return r}finally{b(w,4*h),q(m)}},canvas_new:c.rg,canvas_release:c.sg,canvas_color_view:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m);const C=c.pg(k,r,m);g(r,h,4*m);return C}finally{b(r,4*m),q(w)}},canvas_image:c.qg,canvas_resize:(k,h,m,w,r)=>{const C=p();let G=0;try{G=f(w,4*r);
|
|
379
|
+
const N=c.tg(k,h,m,G,r);g(G,w,4*r);return N}finally{b(G,4*r),q(C)}},target_view:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m);const C=c.Tg(k,r,m);g(r,h,4*m);return C}finally{b(r,4*m),q(w)}},pass_begin:(k,h,m,w)=>{const r=p();let C=0,G=0;try{return C=f(k,h),G=f(m,w),c.wg(C,h,G,w)}finally{b(G,w),b(C,h),q(r)}},pass_set_pipeline:c.Eg,pass_set_vertex_buffer:c.Hg,pass_set_index_buffer:c.Dg,pass_set_bind_group:(k,h,m,w,r)=>{const C=p();let G=0;try{G=f(w,r),c.Bg(k,h,m,G,r)}finally{b(G,r),q(C)}},pass_set_viewport:c.Ig,
|
|
380
|
+
pass_set_scissor:c.Fg,pass_set_stencil_reference:c.Gg,pass_set_blend_color:c.Cg,pass_draw:c.xg,pass_draw_indexed:c.yg,pass_finish:c.zg,pass_release:c.Ag,image_view:c.vg,buffer_new:(k,h,m,w,r)=>{const C=p();let G=0;try{return G=f(w,r),c.mg(k,h,m,G,r)}finally{b(G,r),q(C)}},buffer_update:(k,h,m,w)=>{const r=p();let C=0;try{C=f(m,w),c.og(k,h,C,w)}finally{b(C,w),q(r)}},buffer_release:c.ng,texture_new:(k,h)=>{const m=p();let w=0;try{return w=f(k,h),c.Ug(w,h)}finally{b(w,h),q(m)}},texture_upload:(k,h,m,
|
|
381
|
+
w,r)=>{const C=p();let G=0,N=0;try{G=f(h,m),N=f(w,r),c.Wg(k,G,m,N,r)}finally{b(N,r),b(G,m),q(C)}},texture_release:c.Vg,sampler_new:(k,h)=>{const m=p();let w=0;try{return w=f(k,h),c.Lg(w,h)}finally{b(w,h),q(m)}},sampler_release:c.Mg,texture_view_new:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.Xg(k,r,m)}finally{b(r,m),q(w)}},texture_view_release:c.Yg,shader_target:c.Sg,shader_asset_bytes:(k,h,m,w,r)=>{const C=p();let G=0,N=0;try{G=f(h,m);N=f(w,r);const U=c.Ng(k,G,m,N,r);g(N,w,r);return U}finally{b(N,
|
|
382
|
+
r),b(G,m),q(C)}},shader_asset_id:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.Og(k,r,m)}finally{b(r,m),q(w)}},shader_module_from_asset:(k,h,m,w)=>{const r=p();let C=0;try{return C=f(h,m),c.Pg(k,C,m,w)}finally{b(C,m),q(r)}},shader_module_new:(k,h,m,w)=>{const r=p();let C=0,G=0;try{return C=f(k,h),G=f(m,w),c.Qg(C,h,G,w)}finally{b(G,w),b(C,h),q(r)}},shader_module_release:c.Rg,bind_group_layout_new:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.ig(k,r,m)}finally{b(r,m),q(w)}},bind_group_layout_release:c.jg,
|
|
383
|
+
bind_group_layout_from_shader:(k,h,m,w)=>{const r=p();let C=0;try{return C=f(m,4*w),c.gg(k,h,C,w)}finally{b(C,4*w),q(r)}},bind_group_layout_from_shaders:(k,h,m,w,r)=>{const C=p();let G=0;try{return G=f(w,4*r),c.hg(k,h,m,G,r)}finally{b(G,4*r),q(C)}},bind_group_new:(k,h,m,w,r,C,G)=>{const N=p();let U=0,aa=0,fa=0;try{return U=f(h,m),aa=f(w,r),fa=f(C,G),c.kg(k,U,m,aa,r,fa,G)}finally{b(fa,G),b(aa,r),b(U,m),q(N)}},bind_group_release:c.lg,pipeline_new:(k,h,m,w)=>{const r=p();let C=0,G=0;try{return C=f(k,
|
|
384
|
+
h),G=f(m,w),c.Jg(C,h,G,w)}finally{b(G,w),b(C,h),q(r)}},pipeline_release:c.Kg},rive_mat4_v1:{multiply:(k,h,m,w,r,C)=>{const G=p();let N=0,U=0,aa=0;try{N=f(k,h),U=f(m,w),aa=f(r,C),c.gh(N,h,U,w,aa,C),g(N,k,h)}finally{b(aa,C),b(U,w),b(N,h),q(G)}},invert:(k,h,m,w)=>{const r=p();let C=0,G=0;try{C=f(k,h);G=f(m,w);const N=c.fh(C,h,G,w);g(C,k,h);return N}finally{b(G,w),b(C,h),q(r)}}},rive_buffer_v1:{"new":c.ge,update:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m),c.ie(k,r,m)}finally{b(r,m),q(w)}},release:c.he},
|
|
385
|
+
rive_mesh_instances_v1:{"new":c.rh,resize:c.th,update:(k,h,m,w)=>{const r=p();let C=0;try{C=f(m,w),c.uh(k,h,C,w)}finally{b(C,w),q(r)}},release:c.sh},rive_blob_v1:{asset_bytes:(k,h,m,w,r)=>{const C=p();let G=0,N=0;try{G=f(h,m);N=f(w,r);const U=c.fe(k,G,m,N,r);g(N,w,r);return U}finally{b(N,r),b(G,m),q(C)}}},rive_image_v1:{from_asset:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.ah(k,r,m)}finally{b(r,m),q(w)}},width:c.eh,height:c.bh,release:c.dh,decode:(k,h,m)=>{const w=p();let r=0;try{return r=
|
|
386
|
+
f(k,h),c.Zg(r,h,m)}finally{b(r,h),q(w)}},decode_cancel:c.$g},rive_font_v1:{from_asset:(k,h,m)=>{const w=p();let r=0;try{return r=f(h,m),c.Yf(k,r,m)}finally{b(r,m),q(w)}},decode:(k,h)=>{const m=p();let w=0;try{return w=f(k,h),c.Wf(w,h)}finally{b(w,h),q(m)}},release:c.dg,metrics:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m),c.cg(k,r,m),g(r,h,4*m)}finally{b(r,4*m),q(w)}},weight:c.eg,is_italic:c.bg,axis_count:c.Uf,axis:(k,h,m,w)=>{const r=p();let C=0;try{C=f(m,4*w),c.Tf(k,h,C,w),g(C,m,4*w)}finally{b(C,
|
|
387
|
+
4*w),q(r)}},axis_value:c.Vf,features:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m);const C=c.Xf(k,r,m);g(r,h,4*m);return C}finally{b(r,4*m),q(w)}},has_glyph:c.ag,with_options:(k,h,m,w,r)=>{const C=p();let G=0,N=0;try{return G=f(h,4*m),N=f(w,4*r),c.fg(k,G,m,N,r)}finally{b(N,4*r),b(G,4*m),q(C)}},glyph_verbs:(k,h,m,w)=>{const r=p();let C=0;try{C=f(m,w);const G=c.$f(k,h,C,w);g(C,m,w);return G}finally{b(C,w),q(r)}},glyph_points:(k,h,m,w)=>{const r=p();let C=0;try{C=f(m,4*w);const G=c.Zf(k,h,C,w);g(C,m,
|
|
388
|
+
4*w);return G}finally{b(C,4*w),q(r)}}},rive_text_v1:{"new":c.yi,release:c.zi,append:(k,h,m,w,r,C,G,N,U)=>{const aa=p();let fa=0;try{fa=f(h,m),c.ni(k,fa,m,w,r,C,G,N,U)}finally{b(fa,m),q(aa)}},clear:c.ri,layout:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m),c.vi(k,r,m)}finally{b(r,m),q(w)}},draw:c.si,bounds:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m),c.oi(k,r,m),g(r,h,4*m)}finally{b(r,4*m),q(w)}},length:c.wi,lines:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m);const C=c.xi(k,r,m);g(r,h,4*m);return C}finally{b(r,
|
|
389
|
+
4*m),q(w)}},runs:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m);const C=c.Ai(k,r,m);g(r,h,4*m);return C}finally{b(r,4*m),q(w)}},glyphs:(k,h,m)=>{const w=p();let r=0;try{r=f(h,4*m);const C=c.ti(k,r,m);g(r,h,4*m);return C}finally{b(r,4*m),q(w)}},hit_test:c.ui,caret:(k,h,m,w)=>{const r=p();let C=0;try{C=f(m,4*w);const G=c.pi(k,h,C,w);g(C,m,4*w);return G}finally{b(C,4*w),q(r)}},selection_rects:(k,h,m,w,r)=>{const C=p();let G=0;try{G=f(w,4*r);const N=c.Bi(k,h,m,G,r);g(G,w,4*r);return N}finally{b(G,4*r),
|
|
390
|
+
q(C)}}},rive_shader_v1:{linear:c.ii,radial:c.ki,release:c.li},rive_test_v1:{blob:(k,h,m,w)=>{const r=p();let C=0,G=0;try{C=f(k,h);G=f(m,w);const N=c.mi(C,h,G,w);g(G,m,w);return N}finally{b(G,w),b(C,h),q(r)}}},rive_transition_v1:{child_draw:c.Ci,child_width:c.Ei,child_height:c.Di},rive_renderer_v1:{save:c.Xh,restore:c.Wh,transform:c.Yh,draw_path:c.Th,clip_path:c.Ph,modulate_opacity:c.Vh,modulate_color:c.Uh,draw_image:c.Qh,draw_image_mesh:c.Rh,draw_image_mesh_instanced:c.Sh},rive_net_v1:{fetch:(k,h,
|
|
391
|
+
m)=>{const w=p();let r=0;try{return r=f(k,h),c.vh(r,h,m)}finally{b(r,h),q(w)}},fetch_cancel:c.wh},rive_file_v1:{decode:(k,h,m,w)=>{const r=p();let C=0,G=0;try{C=f(k,h);G=f(m,4*w);const N=c.Rf(C,h,G,w);g(G,m,4*w);return N}finally{b(G,4*w),b(C,h),q(r)}},release:c.Sf,artboard_count:c.Kf,artboard_name:(k,h,m,w)=>{const r=p();let C=0;try{C=f(m,w);const G=c.Lf(k,h,C,w);g(C,m,w);return G}finally{b(C,w),q(r)}},bindable:(k,h,m,w)=>{const r=p();let C=0;try{return C=f(h,m),c.Mf(k,C,m,w)}finally{b(C,m),q(r)}},
|
|
392
|
+
bindable_release:c.Qf,bindable_name:(k,h,m)=>{const w=p();let r=0;try{r=f(h,m);const C=c.Pf(k,r,m);g(r,h,m);return C}finally{b(r,m),q(w)}},bindable_data:c.Nf,bindable_equal:c.Of}}}function e(u,a){const c=a.ab??{i:!1},p=()=>{const f=Error(a.j);a.j=null;throw f;},q=()=>{throw Error("librive faulted in a nested script call");},v=()=>{throw Error("script VM was released");};return{ei:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(0)),fi:(f=>
|
|
393
|
+
b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(1)),Zh:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(2)),ci:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(3)),$h:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(4)),bi:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=
|
|
394
|
+
n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(5)),ai:(f=>()=>{0===a.g&&v();c.i&&c.l++;try{f(a.g)}catch(g){var b=g;a.h=!0;throw b;}a.h&&q();null!==a.j&&p()})(u(6)),gi:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(7)),di:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(8)),hi:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=
|
|
395
|
+
h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(9)),pf:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(10)),hf:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(11)),Oe:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(12)),Pe:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=
|
|
396
|
+
f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(13)),De:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(14)),Ee:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(15)),Ge:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(16)),Fe:(f=>b=>{0===a.g&&v();c.i&&c.l++;
|
|
397
|
+
try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(17)),Qe:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(18)),df:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(19)),Ef:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(20)),Cf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;
|
|
398
|
+
let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(21)),uf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(22)),Ff:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(23)),Hf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(24)),
|
|
399
|
+
vf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(25)),If:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(26)),Df:(f=>(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;let m;try{m=f(a.g,b,g,n,k,h)}catch(w){throw b=w,a.h=!0,b;}a.h&&q();null!==a.j&&p();return m})(u(27)),Af:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=
|
|
400
|
+
h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(28)),Gf:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(29)),xf:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(30)),qf:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(31)),Bf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,
|
|
401
|
+
b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(32)),wf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(33)),zf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(34)),yf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(35)),tf:(f=>(b,
|
|
402
|
+
g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(36)),sf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(37)),Re:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(38)),Se:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(39)),
|
|
403
|
+
Le:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(40)),Ne:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(41)),Me:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(42)),xe:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(43)),ve:(f=>(b,g,n)=>{0===
|
|
404
|
+
a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(44)),we:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(45)),ye:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(46)),ue:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(47)),se:(f=>b=>{0===
|
|
405
|
+
a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(48)),te:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(49)),Ie:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(50)),Je:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(51)),Ke:(f=>(b,g,
|
|
406
|
+
n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(52)),gf:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(53)),mf:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(54)),We:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(55)),Ye:(f=>(b,g)=>{0===a.g&&v();
|
|
407
|
+
c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(56)),Xe:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(57)),bf:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(58)),Te:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(59)),cf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,
|
|
408
|
+
b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(60)),Ve:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(61)),Ze:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(62)),af:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(63)),$e:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=
|
|
409
|
+
!0,b;}a.h&&q();null!==a.j&&p()})(u(64)),Ue:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(65)),rf:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(66)),Be:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(67)),Ce:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;
|
|
410
|
+
}a.h&&q();null!==a.j&&p()})(u(68)),ef:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(69)),ff:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(70)),ze:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(71)),Ae:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==
|
|
411
|
+
a.j&&p()})(u(72)),kf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(73)),jf:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(74)),lf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(75)),Jf:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==
|
|
412
|
+
a.j&&p()})(u(76)),nf:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(77)),He:(f=>(b,g,n,k,h,m)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h,m)}catch(w){throw b=w,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(78)),Bd:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(79)),Uc:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(80)),
|
|
413
|
+
bd:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(81)),md:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(82)),ad:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(83)),Gd:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(84)),
|
|
414
|
+
ld:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(85)),Fd:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(86)),Ed:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(87)),jd:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(88)),Dd:(f=>(b,g)=>
|
|
415
|
+
{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(89)),$c:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(90)),zd:(f=>(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;let m;try{m=f(a.g,b,g,n,k,h)}catch(w){throw b=w,a.h=!0,b;}a.h&&q();null!==a.j&&p();return m})(u(91)),Cd:(f=>(b,g,n,k,h,m,w,r,C)=>{0===a.g&&v();c.i&&c.l++;let G;try{G=f(a.g,b,g,n,k,h,m,w,r,C)}catch(N){throw b=N,a.h=!0,b;}a.h&&q();null!==
|
|
416
|
+
a.j&&p();return G})(u(92)),kd:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(93)),Vc:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(94)),Yc:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(95)),Xc:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&
|
|
417
|
+
q();null!==a.j&&p();return g})(u(96)),Wc:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(97)),Zc:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(98)),Tc:(f=>(b,g,n,k,h,m,w,r)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h,m,w,r)}catch(C){throw b=C,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(99)),nd:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=
|
|
418
|
+
h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(100)),ud:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(101)),xd:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(102)),vd:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(103)),yd:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;
|
|
419
|
+
}a.h&&q();null!==a.j&&p()})(u(104)),wd:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(105)),pd:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(106)),td:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(107)),sd:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=
|
|
420
|
+
h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(108)),qd:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(109)),od:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(110)),rd:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(111)),Ad:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;
|
|
421
|
+
let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(112)),dd:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(113)),cd:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(114)),ed:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(115)),hd:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;
|
|
422
|
+
try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(116)),gd:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(117)),fd:(f=>void 0===f?l("rive_artboard_v1","drawable_properties"):(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(118)),Zd:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=
|
|
423
|
+
h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(119)),be:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(120)),ae:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(121)),ce:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(122)),$d:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,
|
|
424
|
+
a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(123)),Hd:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(124)),Jd:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(125)),Ld:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(126)),Id:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=
|
|
425
|
+
f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(127)),Kd:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(128)),de:(f=>()=>{0===a.g&&v();c.i&&c.l++;try{var b=f(a.g)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p();return b})(u(129)),ee:(f=>()=>{0===a.g&&v();c.i&&c.l++;try{var b=f(a.g)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p();return b})(u(130)),Md:(f=>()=>{0===a.g&&v();c.i&&
|
|
426
|
+
c.l++;try{var b=f(a.g)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p();return b})(u(131)),Qd:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(132)),Pd:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(133)),Od:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(134)),Rd:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=
|
|
427
|
+
!0,b;}a.h&&q();null!==a.j&&p()})(u(135)),Vd:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(136)),Sd:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(137)),Td:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(138)),Nd:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=
|
|
428
|
+
n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(139)),Wd:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(140)),Xd:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(141)),Yd:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(142)),Ud:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=
|
|
429
|
+
n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(143)),Kh:(f=>()=>{0===a.g&&v();c.i&&c.l++;try{var b=f(a.g)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p();return b})(u(144)),Nh:(f=>(b,g,n,k,h,m)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h,m)}catch(w){throw b=w,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(145)),Mh:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(146)),Ih:(f=>(b,g,n,k,h,m,w,r)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h,m,w,r)}catch(C){throw b=
|
|
430
|
+
C,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(147)),Oh:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(148)),Lh:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(149)),Jh:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(150)),nh:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=
|
|
431
|
+
f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(151)),ih:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(152)),hh:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(153)),mh:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(154)),lh:(f=>b=>{0===
|
|
432
|
+
a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(155)),oh:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(156)),qh:(f=>(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(157)),jh:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(158)),
|
|
433
|
+
kh:(f=>(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;let m;try{m=f(a.g,b,g,n,k,h)}catch(w){throw b=w,a.h=!0,b;}a.h&&q();null!==a.j&&p();return m})(u(159)),ph:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(160)),Ch:(f=>()=>{0===a.g&&v();c.i&&c.l++;try{var b=f(a.g)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p();return b})(u(161)),Dh:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(162)),Gh:(f=>
|
|
434
|
+
(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(163)),zh:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(164)),Hh:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(165)),Bh:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(166)),yh:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;
|
|
435
|
+
try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(167)),xh:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(168)),Ah:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(169)),Eh:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(170)),Fh:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=
|
|
436
|
+
k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(171)),ne:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(172)),oe:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(173)),qe:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(174)),le:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=
|
|
437
|
+
!0,b;}a.h&&q();null!==a.j&&p();return g})(u(175)),pe:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(176)),me:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(177)),je:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(178)),ke:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=
|
|
438
|
+
g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(179)),ug:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(180)),rg:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(181)),sg:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(182)),pg:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=
|
|
439
|
+
h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(183)),qg:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(184)),tg:(f=>(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;let m;try{m=f(a.g,b,g,n,k,h)}catch(w){throw b=w,a.h=!0,b;}a.h&&q();null!==a.j&&p();return m})(u(185)),Tg:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(186)),wg:(f=>(b,g,n,k)=>{0===a.g&&v();
|
|
440
|
+
c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(187)),Eg:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(188)),Hg:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(189)),Dg:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(190)),Bg:(f=>(b,g,n,k,h)=>
|
|
441
|
+
{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(191)),Ig:(f=>(b,g,n,k,h,m,w)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h,m,w)}catch(r){throw b=r,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(192)),Fg:(f=>(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(193)),Gg:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(194)),Cg:(f=>
|
|
442
|
+
(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(195)),xg:(f=>(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(196)),yg:(f=>(b,g,n,k,h,m)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h,m)}catch(w){throw b=w,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(197)),zg:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(198)),Ag:(f=>
|
|
443
|
+
b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(199)),vg:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(200)),mg:(f=>(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;let m;try{m=f(a.g,b,g,n,k,h)}catch(w){throw b=w,a.h=!0,b;}a.h&&q();null!==a.j&&p();return m})(u(201)),og:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&
|
|
444
|
+
p()})(u(202)),ng:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(203)),Ug:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(204)),Wg:(f=>(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(205)),Vg:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(206)),
|
|
445
|
+
Lg:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(207)),Mg:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(208)),Xg:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(209)),Yg:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(210)),Sg:(f=>
|
|
446
|
+
()=>{0===a.g&&v();c.i&&c.l++;try{var b=f(a.g)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p();return b})(u(211)),Ng:(f=>(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;let m;try{m=f(a.g,b,g,n,k,h)}catch(w){throw b=w,a.h=!0,b;}a.h&&q();null!==a.j&&p();return m})(u(212)),Og:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(213)),Pg:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,
|
|
447
|
+
b;}a.h&&q();null!==a.j&&p();return h})(u(214)),Qg:(f=>void 0===f?l("rive_gpu_v1","shader_module_new"):(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(215)),Rg:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(216)),ig:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(217)),jg:(f=>b=>{0===
|
|
448
|
+
a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(218)),gg:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(219)),hg:(f=>(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;let m;try{m=f(a.g,b,g,n,k,h)}catch(w){throw b=w,a.h=!0,b;}a.h&&q();null!==a.j&&p();return m})(u(220)),kg:(f=>(b,g,n,k,h,m,w)=>{0===a.g&&v();c.i&&c.l++;let r;try{r=f(a.g,b,g,n,k,h,m,w)}catch(C){throw b=C,a.h=!0,b;}a.h&&
|
|
449
|
+
q();null!==a.j&&p();return r})(u(221)),lg:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(222)),Jg:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(223)),Kg:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(224)),gh:(f=>(b,g,n,k,h,m)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h,m)}catch(w){throw b=w,a.h=!0,
|
|
450
|
+
b;}a.h&&q();null!==a.j&&p()})(u(225)),fh:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(226)),ge:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(227)),ie:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(228)),he:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=
|
|
451
|
+
g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(229)),rh:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(230)),th:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(231)),uh:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(232)),sh:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&
|
|
452
|
+
q();null!==a.j&&p()})(u(233)),fe:(f=>(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;let m;try{m=f(a.g,b,g,n,k,h)}catch(w){throw b=w,a.h=!0,b;}a.h&&q();null!==a.j&&p();return m})(u(234)),ah:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(235)),eh:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(236)),bh:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=
|
|
453
|
+
n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(237)),dh:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(238)),Zg:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(239)),$g:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(240)),Yf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=
|
|
454
|
+
h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(241)),Wf:(f=>void 0===f?l("rive_font_v1","decode"):(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(242)),dg:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(243)),cg:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(244)),eg:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;
|
|
455
|
+
try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(245)),bg:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(246)),Uf:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(247)),Tf:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(248)),Vf:(f=>(b,g)=>{0===a.g&&v();c.i&&
|
|
456
|
+
c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(249)),Xf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(250)),ag:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(251)),fg:(f=>(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;let m;try{m=f(a.g,b,g,n,k,h)}catch(w){throw b=w,a.h=!0,b;}a.h&&q();null!==a.j&&p();
|
|
457
|
+
return m})(u(252)),$f:(f=>void 0===f?l("rive_font_v1","glyph_verbs"):(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(253)),Zf:(f=>void 0===f?l("rive_font_v1","glyph_points"):(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(254)),yi:(f=>void 0===f?l("rive_text_v1","new"):()=>{0===a.g&&v();c.i&&c.l++;try{var b=f(a.g)}catch(g){throw b=g,a.h=
|
|
458
|
+
!0,b;}a.h&&q();null!==a.j&&p();return b})(u(255)),zi:(f=>void 0===f?l("rive_text_v1","release"):b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(256)),ni:(f=>void 0===f?l("rive_text_v1","append"):(b,g,n,k,h,m,w,r,C)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h,m,w,r,C)}catch(G){throw b=G,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(257)),ri:(f=>void 0===f?l("rive_text_v1","clear"):b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&
|
|
459
|
+
q();null!==a.j&&p()})(u(258)),vi:(f=>void 0===f?l("rive_text_v1","layout"):(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(259)),si:(f=>void 0===f?l("rive_text_v1","draw"):(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(260)),oi:(f=>void 0===f?l("rive_text_v1","bounds"):(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(261)),
|
|
460
|
+
wi:(f=>void 0===f?l("rive_text_v1","length"):b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(262)),xi:(f=>void 0===f?l("rive_text_v1","lines"):(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(263)),Ai:(f=>void 0===f?l("rive_text_v1","runs"):(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(264)),
|
|
461
|
+
ti:(f=>void 0===f?l("rive_text_v1","glyphs"):(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(265)),ui:(f=>void 0===f?l("rive_text_v1","hit_test"):(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(266)),pi:(f=>void 0===f?l("rive_text_v1","caret"):(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();
|
|
462
|
+
null!==a.j&&p();return h})(u(267)),Bi:(f=>void 0===f?l("rive_text_v1","selection_rects"):(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;let m;try{m=f(a.g,b,g,n,k,h)}catch(w){throw b=w,a.h=!0,b;}a.h&&q();null!==a.j&&p();return m})(u(268)),ii:(f=>(b,g,n,k,h,m,w)=>{0===a.g&&v();c.i&&c.l++;let r;try{r=f(a.g,b,g,n,k,h,m,w)}catch(C){throw b=C,a.h=!0,b;}a.h&&q();null!==a.j&&p();return r})(u(269)),ki:(f=>(b,g,n,k,h,m)=>{0===a.g&&v();c.i&&c.l++;let w;try{w=f(a.g,b,g,n,k,h,m)}catch(r){throw b=r,a.h=!0,b;}a.h&&q();null!==
|
|
463
|
+
a.j&&p();return w})(u(270)),li:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(271)),mi:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(272)),Ci:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(273)),Ei:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==
|
|
464
|
+
a.j&&p();return g})(u(274)),Di:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(275)),Xh:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(276)),Wh:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(277)),Yh:(f=>(b,g,n,k,h,m,w)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h,m,w)}catch(r){throw b=r,a.h=!0,b;}a.h&&q();null!==a.j&&
|
|
465
|
+
p()})(u(278)),Th:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(279)),Ph:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(280)),Vh:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(281)),Uh:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(282)),Qh:(f=>
|
|
466
|
+
(b,g,n,k,h)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(283)),Rh:(f=>(b,g,n,k,h,m,w,r)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h,m,w,r)}catch(C){throw b=C,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(284)),Sh:(f=>(b,g,n,k,h,m,w)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n,k,h,m,w)}catch(r){throw b=r,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(285)),vh:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=h,a.h=!0,b;}a.h&&
|
|
467
|
+
q();null!==a.j&&p();return k})(u(286)),wh:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(287)),Rf:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(288)),Sf:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(289)),Kf:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==
|
|
468
|
+
a.j&&p();return g})(u(290)),Lf:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(291)),Mf:(f=>(b,g,n,k)=>{0===a.g&&v();c.i&&c.l++;let h;try{h=f(a.g,b,g,n,k)}catch(m){throw b=m,a.h=!0,b;}a.h&&q();null!==a.j&&p();return h})(u(292)),Qf:(f=>b=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b)}catch(g){throw b=g,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(293)),Pf:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;let k;try{k=f(a.g,b,g,n)}catch(h){throw b=
|
|
469
|
+
h,a.h=!0,b;}a.h&&q();null!==a.j&&p();return k})(u(294)),Nf:(f=>b=>{0===a.g&&v();c.i&&c.l++;let g;try{g=f(a.g,b)}catch(n){throw b=n,a.h=!0,b;}a.h&&q();null!==a.j&&p();return g})(u(295)),Of:(f=>(b,g)=>{0===a.g&&v();c.i&&c.l++;let n;try{n=f(a.g,b,g)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p();return n})(u(296)),re:(f=>(b,g,n)=>{0===a.g&&v();c.i&&c.l++;try{f(a.g,b,g,n)}catch(k){throw b=k,a.h=!0,b;}a.h&&q();null!==a.j&&p()})(u(297))}}function l(u,a){return()=>{throw Error("failed to call unlinked import function "+
|
|
470
|
+
u+"."+a);}}function t(u){u=[0,...u,11];return new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,u.length+2,1,u.length,...u])}function x(u,a){let c=0,p=0,q;do q=u[a++],c|=(q&127)<<p,p+=7;while(q&128);return[c>>>0,a]}function z(u){const a=[];do{const c=u&127;u>>>=7;a.push(u?c|128:c)}while(u);return a}function y(u){var a=[],c=-1;for(var p=8;p<u.length;){const [q,v]=x(u,p+1);8===u[p]?c=x(u,v)[0]:a.push({id:u[p],at:p,body:v,end:v+q});p=v+q}if(0>c||!a.some(q=>7===q.id))return u;p=[u.subarray(0,
|
|
471
|
+
8)];for(const q of a){if(7!==q.id){p.push(u.subarray(q.at,q.end));continue}const [v,f]=x(u,q.body);a=Array.from("__riveLiftedStart",n=>n.charCodeAt(0));a=[...z(a.length),...a,0,...z(c)];const b=z(v+1),g=u.subarray(f,q.end);p.push(Uint8Array.from([7,...z(b.length+g.length+a.length),...b]),g,Uint8Array.from(a))}u=new Uint8Array(p.reduce((q,v)=>q+v.length,0));c=0;for(const q of p)u.set(q,c),c+=q.length;return u}const B=[253,12,...Array(16).fill(0)],F=t([...B]),I=t([...B,...B,253,128,2]);(function(u){function a(h,
|
|
472
|
+
m){const w=d({kc:e(v.Fc,h.U),ia:v.ia,ra:v.ra,Na:v.Na,qa:v.qa,gb:v.gb,cb:v.cb,ab:b},()=>{if(null===h.memory)throw Error("script passed memory to the host while its module was still starting");return h.memory});for(const r of WebAssembly.Module.imports(m))if("function"===r.kind){let C,G,N,U;(N=(C=w)[G=r.module]??(C[G]={}))[U=r.name]??(N[U]=l(r.module,r.name))}return w}function c(h,m){const w=v.ra();for(const {name:r}of WebAssembly.Module.exports(m)){if(!r.startsWith("__rive"))continue;m=3*r.length+
|
|
473
|
+
1;const C=v.Na(m);v.Wb(r,C,m);v.exports._rive_web_vm_module_export(h.U.g,C)}v.qa(w)}function p(h,m){h.memory=m.exports.memory;h.$a=null;const w=v.exports._rive_web_vm_booting;w(h.U.g);const r=v.ra();try{m.exports.__riveLiftedStart?.()}catch(C){throw v.qa(r),h.U.j=null,C;}finally{w(0)}h.instance=m}async function q(h){try{const w=await WebAssembly.compile(y(h.$a));if(0!==h.U.g){c(h,w);var m=await WebAssembly.instantiate(w,a(h,w));0!==h.U.g&&p(h,m)}}catch(w){h.error=String(w?.message??w)}}let v=null;
|
|
474
|
+
const f=new Map,b={i:!1,l:0,Aa:0,ya:0,za:0,Ba:0},g=u.riveScriptingValidate??(h=>WebAssembly.validate(h));let n=null;const k={ic(h){v??=h},register(h,m){m=m.slice();var w=f.set;n??={Ob:g(F),Rc:g(I)};var r=n.Ob&&n.Rc||g(m)?null:n.Ob?"this browser lacks WebAssembly relaxed SIMD, so this file's scripts are off; bake with wasmSimd: on to support it":"this browser lacks WebAssembly SIMD, so this file's scripts are off; bake with wasmSimd: off to support it";w.call(f,h,{U:{g:h,j:null,h:!1,ab:b},$a:m,instance:null,
|
|
475
|
+
memory:null,ba:null,error:r,names:new Map})},release(h){const m=f.get(h);m&&(m.U.g=0,f.delete(h))},Oc(){const h=[];for(const m of f.values())if(null===m.instance&&null===m.error){let w;(w=m).ba??(w.ba=q(m));h.push(m.ba)}return Promise.all(h)},start(h){h=f.get(h);if(!h)return"script module was never registered";if(null===h.instance&&null===h.error){if(null!==h.ba)return"script module is still being prepared";try{const m=new WebAssembly.Module(y(h.$a));c(h,m);p(h,new WebAssembly.Instance(m,a(h,m)))}catch(m){h.error=
|
|
476
|
+
String(m?.message??m)}}return h.error},ba(h){h=f.get(h);return null===h?.instance&&null===h.error&&null!==h.ba?1:0},Dc(h,m){return"function"===typeof f.get(h)?.instance?.exports[v.nb(m)]?1:0},call(h,m,w,r,C,G,N){h=f.get(h);if(!h||null===h.instance)return 1;let U=h.names.get(m);void 0===U&&(U=h.instance.exports[v.nb(m)]??null,h.names.set(m,U));if("function"!==typeof U)return 1;try{m=r>>3;const aa=U(...v.Eb().subarray(m,m+w));v.Eb()[C>>3]="number"===typeof aa?aa:0;return 0}catch(aa){return h.U.j=null,
|
|
477
|
+
v.Wb(String(aa?.message??aa),G,N),h.U.h?3:2}},Pc(h,m){if(h=f.get(h))h.U.j=v.nb(m)},read(h,m,w,r){h=f.get(h)?.memory;if(!h||m+r>h.buffer.byteLength)return 0;v.ia().set(new Uint8Array(h.buffer,m,r),w);b.i&&(b.za+=r);return 1},write(h,m,w,r){h=f.get(h)?.memory;if(!h||m+r>h.buffer.byteLength)return 0;(new Uint8Array(h.buffer,m,r)).set(v.ia().subarray(w,w+r));b.i&&(b.Ba+=r);return 1},Ji(h,m){h=f.get(h)?.memory;if(!h||m>=h.buffer.byteLength)return-1;h=(new Uint8Array(h.buffer)).indexOf(0,m);return 0>h?
|
|
478
|
+
-1:h-m},Mc(h){return(h=f.get(h)?.memory)?h.buffer.byteLength>>>16:0},oc(h){b.i=!!h;b.l=0;b.Aa=0;b.ya=0;b.za=0;b.Ba=0},Gc(){return{hostCalls:b.l,bytesStaged:b.Aa,bytesCopiedOut:b.ya,bytesRead:b.za,bytesWritten:b.Ba}}};k.prepare=k.Oc;k.countHostCalls=k.oc;k.hostCallCounts=k.Gc;return u.riveScripting=k})(D)})();function ja(){}const H=new Int32Array(5);
|
|
479
|
+
function ka(d,e,l,t,x){d(e,l,H);d=Math.max(H[0],0);const z=Math.max(H[1],0);e=Math.min(H[2],Math.ceil(t*e));l=Math.min(H[3],Math.ceil(x*l));H[4]=d!==H[0]||z!==H[1]||e!==H[2]||l!==H[3]?1:0;H[0]=d;H[1]=z;H[2]=e;H[3]=l;return e>d&&l>z}function la(){var d=(d=na())?d.dc:0;return 0===d?0:d}
|
|
480
|
+
function oa(d,e,l,t,x,z,y,B,F,I,u){var a=la(),c=a-1,p=c-6;if(!(0<p))return I(),ja;let q=1,v=1;if(!ka(B,q,v,l,t))return I(),ja;const f=H[2]-H[0],b=H[3]-H[1];if(f>c||b>c)if(q*=Math.min(1,p/f),v*=Math.min(1,p/b),!ka(B,q,v,l,t))return I(),ja;l=H[0];t=H[1];c=H[2];p=H[3];B=0!==H[4];if(1>q||1>v)--l,--t,c+=1,p+=1;const g=c-l,n=p-t;d.s||(d.s=new D.DynamicRectanizer(a),d.s.reset(512,512));a=d.s.addRect(g+1,n+1);if(0>a&&(u(),a=d.s.addRect(g+1,n+1),0>a))return console.assert(!1,"draw does not fit in an empty atlas"),
|
|
481
|
+
I(),ja;const k=a&65535,h=a>>16;d.A.push({hc:[q*x[0],v*x[1],q*x[2],v*x[3],q*x[4]-l+k,v*x[5]-t+h],vb:k,wb:h,Mi:g,Ec:n,Hb:B,nc:F,Sc:()=>{I()}});const m=l/q,w=t/v,r=g/q,C=n/v,G=d.T;return function(){const N=G.canvas();N&&(e.save(),e.resetTransform(),e.globalCompositeOperation=z,e.globalAlpha=y,e.drawImage(N,k,h,g,n,m,w,r,C),e.restore())}}class pa{constructor(){this.T=new qa;this.s=null;this.A=[];this.Ha=new ha;this.W=new ha}}let ra=null,sa=!1,ta=!1,ua=null;
|
|
482
|
+
function va(d){const e=document.createElement("canvas");e.width=1;e.height=1;var l={alpha:!0,depth:d,stencil:d,antialias:d,premultipliedAlpha:!0,preserveDrawingBuffer:0,powerPreference:"high-performance",failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:!1,explicitSwapControl:0,renderViaOffscreenBackBuffer:0};d=e.getContext("webgl2",l);if(!d)return null;e.addEventListener("webglcontextlost",function(){ta||(ta=!0,console.error("WebGL context lost. Draws that rely on the WebGL2 renderer will be dropped."))});
|
|
483
|
+
l=wa(d,l);xa(l);const t=D.makeWebGL2Renderer(e.width,e.height);if(!t)return ya(l),null;t.Ta=l;t.la=e;t.ac=d;t.ub=e.width;t.rb=e.height;t.bc=!!d.getExtension("WEBGL_shader_pixel_local_storage");t.dc=Math.min(d.getParameter(d.MAX_RENDERBUFFER_SIZE),d.getParameter(d.MAX_TEXTURE_SIZE));return t}
|
|
484
|
+
function na(){if(ta)return null;if(sa)return ra;sa=!0;var d=va(!0);if(!d)return console.log("No WebGL2 support. Draws that Canvas2D can't make will be dropped."),null;if(d.bc)var e=!0;else{e=d.ac;var l=e.getExtension("WEBGL_debug_renderer_info");if(l){var t=e.getParameter(l.UNMASKED_RENDERER_WEBGL);e=e.getParameter(l.UNMASKED_VENDOR_WEBGL).includes("Google")&&t.includes("ANGLE Metal Renderer")}else e=!1}return e&&(xa(d.Ta),d["delete"](),ya(d.Ta),d=va(!1),!d)?null:ra=d}
|
|
485
|
+
class za{constructor(d){this.ca=d;this.path=D.makeWebGL2Path();this.path.fillRule(d)}moveTo(d,e){this.path.moveTo(d,e)}lineTo(d,e){this.path.lineTo(d,e)}xb(d,e,l,t,x,z){this.path.cubicTo(d,e,l,t,x,z)}close(){this.path.close()}addPath(d,e,l,t,x,z,y){const B=new za(this.ca);for(const F of d)F(B);B.Da();this.path.addPath(B.path,e,l,t,x,z,y);B.dispose()}Da(){}Vb(){return!1}dispose(){this.path.unref();this.path=null}}class qa{constructor(){this.Pb=!0}canvas(){return ta||!ra?null:ra.la}}const Ba=new pa;
|
|
486
|
+
function Ca(d,e,l,t,x,z){const y=new DOMMatrix;y.a=d;y.b=e;y.c=l;y.d=t;y.e=x;y.f=z;return y}const Da="createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "),Ea=D.onRuntimeInitialized;
|
|
487
|
+
D.onRuntimeInitialized=function(){function d(A){switch(A){case p.srcOver:return"source-over";case p.Ni:return"plus-lighter";case p.screen:return"screen";case p.overlay:return"overlay";case p.darken:return"darken";case p.lighten:return"lighten";case p.colorDodge:return"color-dodge";case p.colorBurn:return"color-burn";case p.hardLight:return"hard-light";case p.softLight:return"soft-light";case p.difference:return"difference";case p.exclusion:return"exclusion";case p.multiply:return"multiply";case p.hue:return"hue";
|
|
488
|
+
case p.saturation:return"saturation";case p.color:return"color";case p.luminosity:return"luminosity"}}function e(A){return"rgba("+((16711680&A)>>>16)+","+((65280&A)>>>8)+","+((255&A)>>>0)+","+((4278190080&A)>>>24)/255+")"}function l(A,E,L,J,K){return{Qb:A,Rb:E,Ab:L,Bb:J,Fb:K,lb:[],ha:null}}function t(A,E,L,J){if(E.fa===v&&!(0<E.ga))return null;L=1===L;return{ib:A.ob(L?E.Va:null),gradientTransform:L?E.ma:null,Ki:L?E.ga*E.Ya:E.ga,fillRule:A.ca===f?"evenodd":"nonzero",opacity:J,style:E.fa,color:E.Ra,
|
|
489
|
+
Db:E.R,lc:E.Qa,join:E.Wa,jc:E.Pa}}function x(A,E){return E.fa!==v||0<E.ga?{path:A.Yb(A.ca),hb:E.Zb()}:null}function z(){if(0!==g.A.length){var A=la();if(0!==A){var E=Math.min(g.Ha.push(g.s.drawWidth()),A),L=Math.min(g.W.push(g.s.drawHeight()),A),J=g.A;if(A=na()){xa(A.Ta);const K=A.la;if(K.width!==E||K.height!==L)K.width=E,K.height=L;if(A.ub!==E||A.rb!==L)A.resize(E,L),A.ub=E,A.rb=L;A.clear();ua||=new D.Mat2D;E=ua;for(const M of J)A.save(),M.Hb&&A.saveClipRect(M.vb,M.wb,M.vb+M.Mi,M.wb+M.Ec),J=M.hc,
|
|
490
|
+
E.xx=J[0],E.xy=J[1],E.yx=J[2],E.yy=J[3],E.tx=J[4],E.ty=J[5],A.transform(E),M.nc(A),M.Hb&&A.restoreClipRect(),A.restore();A.flush()}}}for(const K of G){for(const M of K.L)M();K.L=[]}G.clear();for(const K of g.A)K.Sc();g.A=[];g.s&&g.s.reset(512,512)}Ea&&Ea();var y=D.RenderPaintStyle;const B=D.FillRule,F=D.RenderPath,I=D.RenderPaint,u=D.Renderer,a=D.StrokeCap,c=D.StrokeJoin,p=D.BlendMode,q=y.fill,v=y.stroke,f=B.evenOdd,b=B.nonZero,g=Ba,n=g.T;var k=D.RenderImage.extend("CanvasRenderImage",{__construct:function({pa:A,
|
|
491
|
+
La:E}={}){this.__parent.__construct.call(this);this.pa=A;this.La=E;this.ec=this.na=this.va=this.sb=null},__destruct:function(){this.na&&(this.na.unref(),this.na=null);this.va&&URL.revokeObjectURL(this.va);this.__parent.__destruct.call(this)},decode:function(A){var E=this;E.La&&E.La(E);var L=new Image;E.va=URL.createObjectURL(new Blob([A],{type:"image/png"}));L.onload=function(){E.sb=L;E.na=D.adoptWebGL2Image(L,L.width,L.height);E.size(L.width,L.height);E.pa&&E.pa(E)};L.src=E.va}});class h{constructor(A){this.s=
|
|
492
|
+
A;this.path=new Path2D;this.A=null;this.W=!1}T(){null!==this.A&&(this.path.lineTo(this.A.x,this.A.y),this.A=null)}moveTo(A,E){this.T();let L=A,J=E;null!==this.s&&(A=this.s.transformPoint({x:A,y:E}),L=A.x,J=A.y);this.path.moveTo(L,J);this.A={x:L,y:J}}lineTo(A,E){this.A=null;null!==this.s?(A=this.s.transformPoint({x:A,y:E}),this.path.lineTo(A.x,A.y)):this.path.lineTo(A,E)}xb(A,E,L,J,K,M){this.A=null;null!==this.s?(A=this.s.transformPoint({x:A,y:E}),L=this.s.transformPoint({x:L,y:J}),K=this.s.transformPoint({x:K,
|
|
493
|
+
y:M}),this.path.bezierCurveTo(A.x,A.y,L.x,L.y,K.x,K.y)):this.path.bezierCurveTo(A,E,L,J,K,M)}close(){this.A=null;this.path.closePath()}addPath(A,E,L,J,K,M,R){this.T();const P=new h(null);for(const O of A)O(P);P.Da();A=Ca(E,L,J,K,M,R);null!==this.s&&(A=this.s.multiply(A));this.path.addPath(P.path,A)}Da(){null===this.A||this.W||(this.T(),this.W=!0)}Vb(){return this.W}dispose(){}}class m{constructor(A){this.Kc=A;this.W=this.T=0;this.A=null;this.s=A(null)}clear(){this.Ha(null)}Za(A,E){for(((null===E?
|
|
494
|
+
null!==this.A:null===this.A||this.A.a!==E.a||this.A.b!==E.b||this.A.c!==E.c||this.A.d!==E.d||this.A.e!==E.e||this.A.f!==E.f)||this.W<A.length&&(0<this.T||this.s.Vb()))&&this.Ha(E);this.W<A.length;)A[this.W++](this.s);this.s.Da();this.T++;return this.s.path}kb(A){null!==this.s&&A===this.s.path&&this.T--}dispose(){this.s.dispose();this.s=null}Ha(A){this.s.dispose();this.W=this.T=0;this.A=A;this.s=this.Kc(A)}}var w=F.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this);
|
|
495
|
+
this.da=[];this.wa=new m(A=>new h(A));this.xa=new m(A=>new h(A));this.ea=new Map;this.ca=b;this.Ua=!1},__destruct:function(){this.wa.dispose();this.xa.dispose();for(const A of this.ea.values())A.dispose();this.ea.clear();this.__parent.__destruct.call(this)},rewind:function(){this.da.length=0;this.wa.clear();this.xa.clear();for(const A of this.ea.values())A.clear();this.Ua=!1},addPath:function(A,E,L,J,K,M,R){const P=A.da.slice();this.ka(O=>O.addPath(P,E,L,J,K,M,R))},fillRule:function(A){this.ca=A},
|
|
496
|
+
moveTo:function(A,E){this.Ua=!0;this.ka(L=>L.moveTo(A,E))},lineTo:function(A,E){this.qb();this.ka(L=>L.lineTo(A,E))},cubicTo:function(A,E,L,J,K,M){this.qb();this.ka(R=>R.xb(A,E,L,J,K,M))},close:function(){this.ka(A=>A.close())},qb:function(){this.Ua||this.moveTo(0,0)},ka:function(A){this.da.push(A)},ob:function(A){A=null===A?this.wa.Za(this.da,null):this.xa.Za(this.da,A);A.ref&&A.ref();return A},Yb:function(A){var E=this.ea.get(A);void 0===E&&(E=new m(()=>new za(A)),this.ea.set(A,E));E=E.Za(this.da,
|
|
497
|
+
null);E.ref&&E.ref();return E},Xa:function(A){this.wa.kb(A);this.xa.kb(A);for(const E of this.ea.values())E.kb(A);A.unref&&A.unref()}});const r=l(0,0,0,0,!1);var C=I.extend("CanvasRenderPaint",{__construct:function(){this.__parent.__construct.call(this);this.fa=q;this.Ra=4278190080;this.ga=1;this.Wa=c.miter;this.Qa=a.butt;this.Sa=0;this.Pa=d(p.srcOver);this.Va=this.ma=this.R=null;this.Ya=1;this.K=0;this.Z=null;this.tb=-1},__destruct:function(){null!==this.Z&&(D.unrefWebGL2Paint(this.Z),this.Z=null);
|
|
498
|
+
this.__parent.__destruct.call(this)},color:function(A){this.Ra=A;this.R=null;this.K++},thickness:function(A){this.ga=Math.abs(A);this.K++},join:function(A){this.Wa=A;this.K++},cap:function(A){this.Qa=A;this.K++},feather:function(A){this.Sa=Math.abs(A);this.K++},style:function(A){this.fa=A;this.K++},blendMode:function(A){this.Pa=d(A);this.K++},clearGradient:function(){this.R=null;this.K++},linearGradient:function(A,E,L,J){this.R=l(A,E,L,J,!1);this.K++},radialGradient:function(A,E,L,J){this.R=l(A,E,
|
|
499
|
+
L,J,!0);this.K++},addStop:function(A,E){this.R.lb.push({color:A,stop:E});this.R.ha=null;this.K++},completeGradient:function(){},_setGradientTransform:function(A,E,L,J,K,M,R,P,O,T,V,ea,ma){1===A&&0===E&&0===L&&1===J&&0===K&&0===M?this.Va=this.ma=null:(this.ma=Ca(A,E,L,J,K,M),this.Va=Ca(R,P,O,T,V,ea));this.Ya=ma;this.K++},Zb:function(){if(this.tb!==this.K){null!==this.Z&&D.unrefWebGL2Paint(this.Z);const E=null!==this.R?this.R:r;let L=null,J=null;if(null!==this.R){var A=E.lb;L=new Uint32Array(A.length);
|
|
500
|
+
J=new Float32Array(A.length);for(let V=0,ea=A.length;V<ea;V++)L[V]=A[V].color,J[V]=A[V].stop}A=1;let K=0,M=0,R=1,P=0,O=0;const T=this.ma;null!==T&&(A=T.a,K=T.b,M=T.c,R=T.d,P=T.e,O=T.f);this.Z=D.makeWebGL2Paint(this.fa,this.Ra,this.ga,this.Wa,this.Qa,this.Sa,L,J,E.Fb,E.Qb,E.Rb,E.Ab,E.Bb,A,K,M,R,P,O);this.tb=this.K}D.refWebGL2Paint(this.Z);return this.Z}});const G=new Set,N=Object.prototype.hasOwnProperty;var U=D.CanvasRenderer=u.extend("Renderer",{__construct:function(A){this.__parent.__construct.call(this);
|
|
501
|
+
this.S=[1,0,0,1,0,0];this.J=[1];this.C=A.getContext("2d");this.la=A;this.L=[]},save:function(){this.S.push(...this.S.slice(this.S.length-6));this.J.push(this.J[this.J.length-1]);this.L.push(this.C.save.bind(this.C))},restore:function(){const A=this.S.length-6;if(6>A)throw"restore() called without matching save().";this.S.splice(A);this.J.pop();this.L.push(this.C.restore.bind(this.C))},transform:function(A,E,L,J,K,M){const R=this.S,P=R.length-6;R.splice(P,6,R[P]*A+R[P+2]*E,R[P+1]*A+R[P+3]*E,R[P]*L+
|
|
502
|
+
R[P+2]*J,R[P+1]*L+R[P+3]*J,R[P]*K+R[P+2]*M+R[P+4],R[P+1]*K+R[P+3]*M+R[P+5]);this.L.push(this.C.transform.bind(this.C,A,E,L,J,K,M))},rotate:function(A){const E=Math.sin(A);A=Math.cos(A);this.transform(A,E,-E,A,0,0)},modulateOpacity:function(A){this.J[this.J.length-1]*=A},_drawPath:function(A,E){const L=Math.max(0,this.J[this.J.length-1]),J=0!==E.Sa?n.Pb?2:0:null===E.R||null===E.ma?0:E.fa!==v||0<E.Ya?1:n.Pb?2:0;if(2===J)this.$b(A,E,L);else{var K=t(A,E,J,L);null!==K&&this.L.push(()=>{var M=this.C;const R=
|
|
503
|
+
M.globalCompositeOperation,P=M.globalAlpha;M.globalCompositeOperation=K.jc;M.globalAlpha=K.opacity;if(null!==K.Db){var O=K.Db;if(null===O.ha){var T=O.Qb;const ma=O.Rb;var V=O.Ab,ea=O.Bb;O.Fb?(V-=T,ea-=ma,O.ha=M.createRadialGradient(T,ma,0,T,ma,Math.sqrt(V*V+ea*ea))):O.ha=M.createLinearGradient(T,ma,V,ea);T=O.lb;for(let Aa=0,nb=T.length;Aa<nb;Aa++)O.ha.addColorStop(T[Aa].stop,e(T[Aa].color))}O=O.ha}else O=e(K.color);null!==K.gradientTransform&&(M.save(),M.transform(K.gradientTransform.a,K.gradientTransform.b,
|
|
504
|
+
K.gradientTransform.c,K.gradientTransform.d,K.gradientTransform.e,K.gradientTransform.f));switch(K.style){case v:M.strokeStyle=O;M.lineWidth=K.Ki;a:{switch(K.lc){case a.butt:O="butt";break a;case a.round:O="round";break a;case a.square:O="square";break a}O=void 0}M.lineCap=O;a:{switch(K.join){case c.miter:O="miter";break a;case c.round:O="round";break a;case c.bevel:O="bevel";break a}O=void 0}M.lineJoin=O;M.miterLimit=4;M.stroke(K.ib);break;case q:M.fillStyle=O,M.fill(K.ib,K.fillRule)}null!==K.gradientTransform&&
|
|
505
|
+
M.restore();M.globalCompositeOperation=R;M.globalAlpha=P;A.Xa(K.ib)})}},$b:function(A,E,L){const J=x(A,E);if(null!==J){var K=this.S.slice(this.S.length-6);E=oa(g,this.C,this.C.canvas.width,this.C.canvas.height,K,E.Pa,L,(M,R,P)=>D.webGL2PathPixelBounds(J.path,J.hb,M*K[0],R*K[1],M*K[2],R*K[3],M*K[4],R*K[5],P),M=>M.drawPath(J.path,J.hb),()=>{A.Xa(J.path);D.unrefWebGL2Paint(J.hb)},z);G.add(this);this.L.push(E)}},_drawRiveImage:function(A,E,L){var J=A.sb;if(J){var K=this.C,M=d(E),R=Math.max(0,L*this.J[this.J.length-
|
|
506
|
+
1]);this.L.push(function(){K.globalCompositeOperation=M;K.globalAlpha=R;K.drawImage(J,0,0);K.globalAlpha=1})}},_getMatrix:function(A){const E=this.S,L=E.length-6;for(let J=0;6>J;++J)A[J]=E[L+J]},_drawImageMesh:function(A,E,L,J,K,M,R,P){const O=A.na;O?this.pb(L,J,K,M,R,P,T=>D.drawWebGL2PendingMesh(T,E,O),()=>E.unref()):E.unref()},_drawImageMeshFromHeap:function(A,E,L,J,K,M,R,P,O,T,V,ea,ma){if(A.ec){try{var Aa=D.HEAPF32.slice(J>>2,(J>>2)+K);var nb=D.HEAPF32.slice(M>>2,(M>>2)+R);var Vc=D.HEAPU16.slice(P>>
|
|
507
|
+
1,(P>>1)+O)}catch(Ld){console.error("[Rive] _drawImageMesh: failed to read mesh data from WASM heap. Mesh skipped for this frame.");return}this.pb(E,L,T,V,ea,ma,{image:A,Ti:Aa,Si:nb,indices:Vc},()=>{})}},pb:function(A,E,L,J,K,M,R,P){A=oa(g,this.C,this.C.canvas.width,this.C.canvas.height,this.S.slice(this.S.length-6),d(A),Math.max(0,E*this.J[this.J.length-1]),(O,T,V)=>{V[0]=Math.floor(L*O);V[1]=Math.floor(J*T);V[2]=Math.ceil(K*O);V[3]=Math.ceil(M*T)},R,P,z);G.add(this);this.L.push(A)},_clipPath:function(A){const E=
|
|
508
|
+
A.ca===f?"evenodd":"nonzero",L=A.ob(null);this.L.push(()=>{this.C.clip(L,E);A.Xa(L)})},beginFrame:function(A=!0){G.add(this);A&&this.L.push(this.C.clearRect.bind(this.C,0,0,this.la.width,this.la.height))},clear:function(){this.beginFrame(!0)},flush:function(){},translate:function(A,E){this.transform(1,0,0,1,A,E)}});D.makeRenderer=function(A){const E=new U(A),L=E.C;let J=null,K=null;const M={attachSession:function(P){if(P&&J===P)return!0;if(!P||J||"function"!==typeof D.c2dDeferredClaim||"function"!==
|
|
509
|
+
typeof D.c2dDeferredRenderer||!D.c2dDeferredClaim(P))return!1;const O=D.c2dDeferredRenderer(P);if(!O)return!1;J=P;K=O;return!0},detachSession:function(){J&&D.c2dDeferredDetach(J);K=J=null},deferredActive:function(){return null!==K}},R={save:function(){D.c2dDeferredSave(J)},restore:function(){D.c2dDeferredRestore(J)},transform:function(P,O,T,V,ea,ma){D.c2dDeferredTransform(J,P,O,T,V,ea,ma)},translate:function(P,O){D.c2dDeferredTransform(J,1,0,0,1,P,O)},rotate:function(P){const O=Math.sin(P);P=Math.cos(P);
|
|
510
|
+
D.c2dDeferredTransform(J,P,O,-O,P,0,0)},align:function(P,O,T,V,ea){D.c2dDeferredAlign(J,P,O,T.minX,T.minY,T.maxX,T.maxY,V.minX,V.minY,V.maxX,V.maxY,void 0===ea?1:ea)},beginFrame:function(P=!0){E.beginFrame(P);D.c2dDeferredBeginFrame(J)},clear:function(){E.beginFrame(!0);D.c2dDeferredBeginFrame(J)},flush:function(){D.c2dDeferredReplay(J,E)}};return new Proxy(E,{get(P,O){if(N.call(M,O))return M[O];if("_deferredRecorder"===O)return K;if(null!==K&&N.call(R,O))return R[O];if("function"===typeof P[O])return function(...T){return P[O].apply(P,
|
|
511
|
+
T)};if("function"===typeof L[O]){if(-1<Da.indexOf(O))throw Error("RiveException: Method call to '"+O+"()' is not allowed, as the renderer cannot immediately pass through the return values of any canvas 2d context methods.");return function(...T){E.L.push(L[O].bind(L,...T))}}return P[O]},set(P,O,T){if(O in L)return E.L.push(()=>{L[O]=T}),!0}})};D.decodeImage=function(A,E){(new k({pa:E})).decode(A)};D.renderFactory={makeRenderPaint:function(){return new C},makeRenderPath:function(){return new w},
|
|
512
|
+
makeRenderImage:function(){let A=fa;return new k({La:()=>{A.total++},pa:()=>{A.loaded++;if(A.loaded===A.total){const E=A.ready;E&&(E(),A.ready=null)}}})}};let aa=D.load,fa=null;D.load=function(A,E,L=!0,J=null){const K=new D.FallbackFileAssetLoader;void 0!==E&&K.addLoader(E);L&&(E=new D.CDNFileAssetLoader(J),K.addLoader(E));return(new Promise(function(M){let R=null;fa={total:0,loaded:0,ready:function(){M(R)}};R=aa(A,K,J??null);const P=D.riveScripting;P&&P.prepare();0==fa.total&&M(R)})).then(D.startFileScripts)};
|
|
513
|
+
const Wc=D.Artboard.prototype.draw;D.Artboard.prototype.draw=function(A){Wc.call(this,A._deferredRecorder||A)};let Xc=D.RendererWrapper.prototype.align;D.RendererWrapper.prototype.align=function(A,E,L,J,K=1){Xc.call(this,A,E,L,J,K)};y=new da;D.requestAnimationFrame=y.requestAnimationFrame.bind(y);D.cancelAnimationFrame=y.cancelAnimationFrame.bind(y);D.enableFPSCounter=y.tc.bind(y);D.disableFPSCounter=y.qc;y.Ib=z;D.resolveAnimationFrame=z;D.cleanup=function(){g.s&&(g.s["delete"](),g.s=null)}};
|
|
514
|
+
var Fa="./this.program";ca&&(_scriptName=self.location.href);var Ga="",Ha,Ia;
|
|
515
|
+
if(ba||ca){try{Ga=(new URL(".",_scriptName)).href}catch{}ca&&(Ia=d=>{var e=new XMLHttpRequest;e.open("GET",d,!1);e.responseType="arraybuffer";e.send(null);return new Uint8Array(e.response)});Ha=async d=>{if(Ja(d))return new Promise((l,t)=>{var x=new XMLHttpRequest;x.open("GET",d,!0);x.responseType="arraybuffer";x.onload=()=>{200==x.status||0==x.status&&x.response?l(x.response):t(x.status)};x.onerror=t;x.send(null)});var e=await fetch(d,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw Error(e.status+
|
|
516
|
+
" : "+e.url);}}var Ka=console.log.bind(console),La=console.error.bind(console),Ma,Na=!1,Ja=d=>d.startsWith("file://"),Oa,Pa,Qa,Q,Ra,Sa,S,W,Ta,Ua,Va=!1;function Wa(){var d=Xa.buffer;D.HEAP8=Qa=new Int8Array(d);Ra=new Int16Array(d);D.HEAPU8=Q=new Uint8Array(d);D.HEAPU16=Sa=new Uint16Array(d);D.HEAP32=S=new Int32Array(d);D.HEAPU32=W=new Uint32Array(d);D.HEAPF32=Ta=new Float32Array(d);Ua=new Float64Array(d)}
|
|
517
|
+
function Ya(d){D.onAbort?.(d);d="Aborted("+d+")";La(d);Na=!0;d=new WebAssembly.RuntimeError(d+". Build with -sASSERTIONS for more info.");Pa?.(d);throw d;}var Za;async function $a(d){if(!Ma)try{var e=await Ha(d);return new Uint8Array(e)}catch{}if(d==Za&&Ma)d=new Uint8Array(Ma);else if(Ia)d=Ia(d);else throw"both async and sync fetching of the wasm failed";return d}
|
|
518
|
+
async function ab(d,e){try{var l=await $a(d);return await WebAssembly.instantiate(l,e)}catch(t){La(`failed to asynchronously prepare wasm: ${t}`),Ya(t)}}async function bb(d){var e=Za;if(!Ma&&!Ja(e))try{var l=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(l,d)}catch(t){La(`wasm streaming compile failed: ${t}`),La("falling back to ArrayBuffer instantiation")}return ab(e,d)}
|
|
519
|
+
var cb,db,eb=d=>{for(;0<d.length;)d.shift()(D)},fb=[],gb=[],hb=()=>{var d=D.preRun.shift();gb.push(d)},jb=d=>ib(d),lb=()=>kb(),mb=globalThis.TextDecoder&&new TextDecoder,ob=(d,e,l,t)=>{l=e+l;if(t)return l;for(;d[e]&&!(e>=l);)++e;return e},pb=(d,e=0,l,t)=>{l=ob(d,e,l,t);if(16<l-e&&d.buffer&&mb)return mb.decode(d.subarray(e,l));for(t="";e<l;){var x=d[e++];if(x&128){var z=d[e++]&63;if(192==(x&224))t+=String.fromCharCode((x&31)<<6|z);else{var y=d[e++]&63;x=224==(x&240)?(x&15)<<12|z<<6|y:(x&7)<<18|z<<
|
|
520
|
+
12|y<<6|d[e++]&63;65536>x?t+=String.fromCharCode(x):(x-=65536,t+=String.fromCharCode(55296|x>>10,56320|x&1023))}}else t+=String.fromCharCode(x)}return t},qb=(d,e)=>Object.defineProperty(e,"name",{value:d}),rb=[],sb=[0,1,,1,null,1,!0,1,!1,1],X=class extends Error{constructor(d){super(d);this.name="BindingError"}},tb=d=>{if(!d)throw new X(`Cannot use deleted val. handle = ${d}`);return sb[d]},ub=d=>{switch(d){case void 0:return 2;case null:return 4;case !0:return 6;case !1:return 8;default:const e=
|
|
521
|
+
rb.pop()||sb.length;sb[e]=d;sb[e+1]=1;return e}};class vb extends Error{}
|
|
522
|
+
var Y=d=>{for(var e="";;){var l=Q[d++];if(!l)return e;e+=String.fromCharCode(l)}},wb={},xb=(d,e)=>{if(void 0===e)throw new X("ptr should not be undefined");for(;d.G;)e=d.ta(e),d=d.G;return e},yb={},Bb=d=>{d=zb(d);var e=Y(d);Ab(d);return e},Cb=(d,e)=>{var l=yb[d];if(void 0===l)throw d=`${e} has unknown type ${Bb(d)}`,new X(d);return l},Db=()=>{},Eb=!1,Fb=d=>{if(!globalThis.FinalizationRegistry)return Fb=e=>e,d;Eb=new FinalizationRegistry(e=>{e=e.m;--e.count.value;0===e.count.value&&(e.H?e.O.X(e.H):
|
|
523
|
+
e.B.o.X(e.v))});Fb=e=>{var l=e.m;l.H&&Eb.register(e,{m:l},e);return e};Db=e=>{Eb.unregister(e)};return Fb(d)},Gb={},Hb=d=>{for(;d.length;){var e=d.pop();d.pop()(e)}};function Ib(d){return this.u(W[d>>2])}
|
|
524
|
+
var Jb={},Kb={},Lb=class extends Error{constructor(d){super(d);this.name="InternalError"}},Nb=(d,e,l)=>{function t(B){B=l(B);if(B.length!==d.length)throw new Lb("Mismatched type converter count");for(var F=0;F<d.length;++F)Mb(d[F],B[F])}d.forEach(B=>Kb[B]=e);var x=Array(e.length),z=[],y=0;for(let [B,F]of e.entries())yb.hasOwnProperty(F)?x[B]=yb[F]:(z.push(F),Jb.hasOwnProperty(F)||(Jb[F]=[]),Jb[F].push(()=>{x[B]=yb[F];++y;y===z.length&&t(x)}));0===z.length&&t(x)};
|
|
525
|
+
function Ob(d,e,l={}){var t=e.name;if(!d)throw new X(`type "${t}" must have a positive integer typeid pointer`);if(yb.hasOwnProperty(d)){if(l.Hc)return;throw new X(`Cannot register type '${t}' twice`);}yb[d]=e;delete Kb[d];Jb.hasOwnProperty(d)&&(e=Jb[d],delete Jb[d],e.forEach(x=>x()))}function Mb(d,e,l={}){return Ob(d,e,l)}var Pb=d=>{throw new X(d.m.B.o.name+" instance already deleted");},Qb=[];function Rb(){}
|
|
526
|
+
var Sb={},Tb=(d,e,l)=>{if(void 0===d[e].D){var t=d[e];d[e]=function(...x){if(!d[e].D.hasOwnProperty(x.length))throw new X(`Function '${l}' called with an invalid number of arguments (${x.length}) - expects one of (${d[e].D})!`);return d[e].D[x.length].apply(this,x)};d[e].D=[];d[e].D[t.Y]=t}},Ub=(d,e,l)=>{if(D.hasOwnProperty(d)){if(void 0===l||void 0!==D[d].D&&void 0!==D[d].D[l])throw new X(`Cannot register public name '${d}' twice`);Tb(D,d,d);if(D[d].D.hasOwnProperty(l))throw new X(`Cannot register multiple overloads of a function with the same number of arguments (${l})!`);
|
|
527
|
+
D[d].D[l]=e}else D[d]=e,D[d].Y=l},Vb=d=>{d=d.replace(/[^a-zA-Z0-9_]/g,"$");var e=d.charCodeAt(0);return 48<=e&&57>=e?`_${d}`:d};function Wb(d,e,l,t,x,z,y,B){this.name=d;this.constructor=e;this.V=l;this.X=t;this.G=x;this.yc=z;this.ta=y;this.rc=B;this.Kb=[]}
|
|
528
|
+
var Xb=(d,e,l)=>{for(;e!==l;){if(!e.ta)throw new X(`Expected null or instance of ${l.name}, got an instance of ${e.name}`);d=e.ta(d);e=e.G}return d},Yb=d=>{if(null===d)return"null";var e=typeof d;return"object"===e||"array"===e||"function"===e?d.toString():""+d};
|
|
529
|
+
function Zb(d,e){if(null===e){if(this.eb)throw new X(`null is not a valid ${this.name}`);return 0}if(!e.m)throw new X(`Cannot pass "${Yb(e)}" as a ${this.name}`);if(!e.m.v)throw new X(`Cannot pass deleted object as a pointer of type ${this.name}`);return Xb(e.m.v,e.m.B.o,this.o)}
|
|
530
|
+
function $b(d,e){if(null===e){if(this.eb)throw new X(`null is not a valid ${this.name}`);if(this.Ga){var l=this.jb();null!==d&&d.push(this.X,l);return l}return 0}if(!e||!e.m)throw new X(`Cannot pass "${Yb(e)}" as a ${this.name}`);if(!e.m.v)throw new X(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Fa&&e.m.B.Fa)throw new X(`Cannot convert argument of type ${e.m.O?e.m.O.name:e.m.B.name} to parameter type ${this.name}`);l=Xb(e.m.v,e.m.B.o,this.o);if(this.Ga){if(void 0===e.m.H)throw new X("Passing raw pointer to smart pointer is illegal");
|
|
531
|
+
switch(this.Ii){case 0:if(e.m.O===this)l=e.m.H;else throw new X(`Cannot convert argument of type ${e.m.O?e.m.O.name:e.m.B.name} to parameter type ${this.name}`);break;case 1:l=e.m.H;break;case 2:if(e.m.O===this)l=e.m.H;else{var t=e.clone();l=this.Qc(l,ub(()=>t["delete"]()));null!==d&&d.push(this.X,l)}break;default:throw new X("Unsupported sharing policy");}}return l}
|
|
532
|
+
function ac(d,e){if(null===e){if(this.eb)throw new X(`null is not a valid ${this.name}`);return 0}if(!e.m)throw new X(`Cannot pass "${Yb(e)}" as a ${this.name}`);if(!e.m.v)throw new X(`Cannot pass deleted object as a pointer of type ${this.name}`);if(e.m.B.Fa)throw new X(`Cannot convert argument of type ${e.m.B.name} to parameter type ${this.name}`);return Xb(e.m.v,e.m.B.o,this.o)}
|
|
533
|
+
var bc=(d,e,l)=>{if(e===l)return d;if(void 0===l.G)return null;d=bc(d,e,l.G);return null===d?null:l.rc(d)},cc=(d,e)=>{e=xb(d,e);return wb[e]},dc=(d,e)=>{if(!e.B||!e.v)throw new Lb("makeClassHandle requires ptr and ptrType");if(!!e.O!==!!e.H)throw new Lb("Both smartPtrType and smartPtr must be specified");e.count={value:1};return Fb(Object.create(d,{m:{value:e,writable:!0}}))};
|
|
534
|
+
function ec(d,e,l,t,x,z,y,B,F,I,u){this.name=d;this.o=e;this.eb=l;this.Fa=t;this.Ga=x;this.Nc=z;this.Ii=y;this.Mb=B;this.jb=F;this.Qc=I;this.X=u;x||void 0!==e.G?this.F=$b:(this.F=t?Zb:ac,this.M=null)}
|
|
535
|
+
var fc=(d,e,l)=>{if(!D.hasOwnProperty(d))throw new Lb("Replacing nonexistent public symbol");void 0!==D[d].D&&void 0!==l?D[d].D[l]=e:(D[d]=e,D[d].Y=l)},gc={},ic=(d,e,l=[])=>{d.includes("j")?(d=d.replace(/p/g,"i"),e=(0,gc[d])(e,...l)):e=hc.get(e)(...l);return e},jc=(d,e)=>(...l)=>ic(d,e,l),kc=(d,e)=>{d=Y(d);var l=d.includes("j")?jc(d,e):hc.get(e);if("function"!=typeof l)throw new X(`unknown function pointer with signature ${d}: ${e}`);return l};class lc extends Error{}
|
|
536
|
+
var mc=(d,e)=>{function l(z){x[z]||yb[z]||(Kb[z]?Kb[z].forEach(l):(t.push(z),x[z]=!0))}var t=[],x={};e.forEach(l);throw new lc(`${d}: `+t.map(Bb).join([", "]));};function nc(d){for(var e=1;e<d.length;++e)if(null!==d[e]&&void 0===d[e].M)return!0;return!1}
|
|
537
|
+
function oc(d,e,l,t,x){var z=e.length;if(2>z)throw new X("argTypes array size mismatch! Must at least get return value and 'this' types!");var y=null!==e[1]&&null!==l,B=nc(e),F=!e[0].Jc,I=z-2,u=Array(I),a=[],c=[];return qb(d,function(...p){c.length=0;a.length=y?2:1;a[0]=x;if(y){var q=e[1].F(c,this);a[1]=q}for(var v=0;v<I;++v)u[v]=e[v+2].F(c,p[v]),a.push(u[v]);p=t(...a);if(B)Hb(c);else for(v=y?1:2;v<e.length;v++){var f=1===v?q:u[v-2];null!==e[v].M&&e[v].M(f)}q=F?e[0].u(p):void 0;return q})}
|
|
538
|
+
var pc=(d,e)=>{for(var l=[],t=0;t<d;t++)l.push(W[e+4*t>>2]);return l},qc=d=>{d=d.trim();const e=d.indexOf("(");return-1===e?d:d.slice(0,e)},rc=(d,e,l)=>{if(!(d instanceof Object))throw new X(`${l} with invalid "this": ${d}`);if(!(d instanceof e.o.constructor))throw new X(`${l} incompatible with "this" of type ${d.constructor.name}`);if(!d.m.v)throw new X(`cannot call emscripten binding method ${l} on deleted object`);return Xb(d.m.v,d.m.B.o,e.o)},sc=d=>{9<d&&0===--sb[d+1]&&(sb[d]=void 0,rb.push(d))},
|
|
539
|
+
tc={name:"emscripten::val",u:d=>{var e=tb(d);sc(d);return e},F:(d,e)=>ub(e),N:Ib,M:null},uc=(d,e,l)=>{switch(e){case 1:return l?function(t){return this.u(Qa[t])}:function(t){return this.u(Q[t])};case 2:return l?function(t){return this.u(Ra[t>>1])}:function(t){return this.u(Sa[t>>1])};case 4:return l?function(t){return this.u(S[t>>2])}:function(t){return this.u(W[t>>2])};default:throw new TypeError(`invalid integer width (${e}): ${d}`);}},vc=(d,e)=>{switch(e){case 4:return function(l){return this.u(Ta[l>>
|
|
540
|
+
2])};case 8:return function(l){return this.u(Ua[l>>3])};default:throw new TypeError(`invalid float width (${e}): ${d}`);}},wc=(d,e,l)=>{switch(e){case 1:return l?t=>Qa[t]:t=>Q[t];case 2:return l?t=>Ra[t>>1]:t=>Sa[t>>1];case 4:return l?t=>S[t>>2]:t=>W[t>>2];default:throw new TypeError(`invalid integer width (${e}): ${d}`);}},xc=(d,e,l)=>{var t=Q;if(!(0<l))return 0;var x=e;l=e+l-1;for(var z=0;z<d.length;++z){var y=d.codePointAt(z);if(127>=y){if(e>=l)break;t[e++]=y}else if(2047>=y){if(e+1>=l)break;t[e++]=
|
|
541
|
+
192|y>>6;t[e++]=128|y&63}else if(65535>=y){if(e+2>=l)break;t[e++]=224|y>>12;t[e++]=128|y>>6&63;t[e++]=128|y&63}else{if(e+3>=l)break;t[e++]=240|y>>18;t[e++]=128|y>>12&63;t[e++]=128|y>>6&63;t[e++]=128|y&63;z++}}t[e]=0;return e-x},yc=d=>{for(var e=0,l=0;l<d.length;++l){var t=d.charCodeAt(l);127>=t?e++:2047>=t?e+=2:55296<=t&&57343>=t?(e+=4,++l):e+=3}return e},zc=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,Ac=(d,e,l)=>{d>>=1;e=ob(Sa,d,e/2,l);if(16<e-d&&zc)return zc.decode(Sa.subarray(d,e));
|
|
542
|
+
for(l="";d<e;++d)l+=String.fromCharCode(Sa[d]);return l},Bc=(d,e,l)=>{l??=2147483647;if(2>l)return 0;l-=2;var t=e;l=l<2*d.length?l/2:d.length;for(var x=0;x<l;++x)Ra[e>>1]=d.charCodeAt(x),e+=2;Ra[e>>1]=0;return e-t},Cc=d=>2*d.length,Dc=(d,e,l)=>{var t="";d>>=2;for(var x=0;!(x>=e/4);x++){var z=W[d+x];if(!z&&!l)break;t+=String.fromCodePoint(z)}return t},Ec=(d,e,l)=>{l??=2147483647;if(4>l)return 0;var t=e;l=t+l-4;for(var x=0;x<d.length;++x){var z=d.codePointAt(x);65535<z&&x++;S[e>>2]=z;e+=4;if(e+4>l)break}S[e>>
|
|
543
|
+
2]=0;return e-t},Fc=d=>{for(var e=0,l=0;l<d.length;++l)65535<d.codePointAt(l)&&l++,e+=4;return e},Gc=[],Hc=d=>{var e=Gc.length;Gc.push(d);return e},Ic=(d,e)=>{for(var l=Array(d),t=0;t<d;++t)l[t]=Cb(W[e+4*t>>2],`parameter ${t}`);return l},Jc={},Kc=d=>{var e=Jc[d];return void 0===e?Y(d):e},Lc=[0,31,60,91,121,152,182,213,244,274,305,335],Mc=[0,31,59,90,120,151,181,212,243,273,304,334],Nc=[],Oc=d=>{d.Oi=d.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")},Pc=d=>{d.Qi=d.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")},
|
|
544
|
+
Z,Qc=d=>{var e="EXT_color_buffer_float EXT_conservative_depth EXT_disjoint_timer_query_webgl2 EXT_texture_norm16 NV_shader_noperspective_interpolation WEBGL_clip_cull_distance EXT_clip_control EXT_color_buffer_half_float EXT_depth_clamp EXT_float_blend EXT_polygon_offset_clamp EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_blend_func_extended WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw WEBGL_polygon_mode".split(" ");
|
|
545
|
+
return(d.getSupportedExtensions()||[]).filter(l=>e.includes(l))},Rc=1,Sc=[],Tc=[],Uc=[],Yc=[],Zc=[],$c=[],ad=[],bd=[],cd=[],dd={},ed=4,fd=0,gd=d=>{for(var e=Rc++,l=d.length;l<e;l++)d[l]=null;return e},jd=(d,e,l,t)=>{for(var x=0;x<d;x++){var z=Z[l](),y=z&&gd(t);z?(z.name=y,t[y]=z):hd||=1282;S[e+4*x>>2]=y}},wa=(d,e)=>{var l=gd(bd),t={handle:l,attributes:e,version:e.Pi,I:d};d.canvas&&(d.canvas.Xb=t);bd[l]=t;if("undefined"==typeof e.sc||e.sc)if((d=t)||(d=kd),!d.Ic){d.Ic=!0;e=d.I;e.Lc=e.getExtension("WEBGL_multi_draw");
|
|
546
|
+
e.vc=e.getExtension("EXT_polygon_offset_clamp");e.uc=e.getExtension("EXT_clip_control");e.Li=e.getExtension("WEBGL_polygon_mode");Oc(e);Pc(e);2<=d.version&&(e.zb=e.getExtension("EXT_disjoint_timer_query_webgl2"));if(2>d.version||!e.zb)e.zb=e.getExtension("EXT_disjoint_timer_query");for(var x of Qc(e))x.includes("lose_context")||x.includes("debug")||e.getExtension(x)}return l},xa=d=>{kd=bd[d];D.ctx=Z=kd?.I;return!(d&&!Z)},ya=d=>{kd===bd[d]&&(kd=null);"object"==typeof JSEvents&&JSEvents.Ri(bd[d].I.canvas);
|
|
547
|
+
bd[d]?.I.canvas&&(bd[d].I.canvas.Xb=void 0);bd[d]=null},hd,kd,ld={},nd=()=>{if(!md){var d={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:Fa||"./this.program"},e;for(e in ld)void 0===ld[e]?delete d[e]:d[e]=ld[e];var l=[];for(e in d)l.push(`${e}=${d[e]}`);md=l}return md},md,od=[null,[],[]],pd=[],qd=()=>{var d=Qc(Z);return d=d.concat(d.map(e=>"GL_"+e))},rd=(d,e)=>{if(e){var l=void 0;switch(d){case 36346:l=
|
|
548
|
+
1;break;case 36344:return;case 34814:case 36345:l=0;break;case 34466:var t=Z.getParameter(34467);l=t?t.length:0;break;case 33309:if(2>kd.version){hd||=1282;return}l=qd().length;break;case 33307:case 33308:if(2>kd.version){hd||=1280;return}l=33307==d?3:0}if(void 0===l)switch(t=Z.getParameter(d),typeof t){case "number":l=t;break;case "boolean":l=t?1:0;break;case "string":hd||=1280;return;case "object":if(null===t)switch(d){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:l=
|
|
549
|
+
0;break;default:hd||=1280;return}else{if(t instanceof Float32Array||t instanceof Uint32Array||t instanceof Int32Array||t instanceof Array){for(d=0;d<t.length;++d)S[e+4*d>>2]=t[d];return}try{l=t.name|0}catch(x){hd||=1280;La(`GL_INVALID_ENUM in glGet${0}v: Unknown object returned from WebGL getParameter(${d})! (error: ${x})`);return}}break;default:hd||=1280;La(`GL_INVALID_ENUM in glGet${0}v: Native code calling glGet${0}v(${d}) and it returns ${t} of type ${typeof t}!`);return}S[e>>2]=l}else hd||=1281},
|
|
550
|
+
td=d=>{var e=yc(d)+1,l=sd(e);l&&xc(d,l,e);return l},ud=d=>"]"==d.slice(-1)&&d.lastIndexOf("["),vd=d=>{d-=5120;return 0==d?Qa:1==d?Q:2==d?Ra:4==d?S:6==d?Ta:5==d||28922==d||28520==d||30779==d||30782==d?W:Sa},xd=d=>wd(d);
|
|
551
|
+
(()=>{let d=Rb.prototype;Object.assign(d,{isAliasOf:function(l){if(!(this instanceof Rb&&l instanceof Rb))return!1;var t=this.m.B.o,x=this.m.v;l.m=l.m;var z=l.m.B.o;for(l=l.m.v;t.G;)x=t.ta(x),t=t.G;for(;z.G;)l=z.ta(l),z=z.G;return t===z&&x===l},clone:function(){this.m.v||Pb(this);if(this.m.ja)return this.m.count.value+=1,this;var l=Fb,t=Object,x=t.create,z=Object.getPrototypeOf(this),y=this.m;l=l(x.call(t,z,{m:{value:{count:y.count,oa:y.oa,ja:y.ja,v:y.v,B:y.B,H:y.H,O:y.O}}}));l.m.count.value+=1;l.m.oa=
|
|
552
|
+
!1;return l},["delete"](){this.m.v||Pb(this);if(this.m.oa&&!this.m.ja)throw new X("Object already scheduled for deletion");Db(this);var l=this.m;--l.count.value;0===l.count.value&&(l.H?l.O.X(l.H):l.B.o.X(l.v));this.m.ja||(this.m.H=void 0,this.m.v=void 0)},isDeleted:function(){return!this.m.v},deleteLater:function(){this.m.v||Pb(this);if(this.m.oa&&!this.m.ja)throw new X("Object already scheduled for deletion");Qb.push(this);this.m.oa=!0;return this}});const e=Symbol.dispose;e&&(d[e]=d["delete"])})();
|
|
553
|
+
Object.assign(ec.prototype,{zc(d){this.Mb&&(d=this.Mb(d));return d},yb(d){this.X?.(d)},N:Ib,u:function(d){function e(){return this.Ga?dc(this.o.V,{B:this.Nc,v:l,O:this,H:d}):dc(this.o.V,{B:this,v:d})}var l=this.zc(d);if(!l)return this.yb(d),null;var t=cc(this.o,l);if(void 0!==t){if(0===t.m.count.value)return t.m.v=l,t.m.H=d,t.clone();t=t.clone();this.yb(d);return t}t=this.o.yc(l);t=Sb[t];if(!t)return e.call(this);t=this.Fa?t.mc:t.pointerType;var x=bc(l,this.o,t.o);return null===x?e.call(this):this.Ga?
|
|
554
|
+
dc(t.o.V,{B:t,v:x,O:this,H:d}):dc(t.o.V,{B:t,v:x})}});for(let d=0;32>d;++d)pd.push(Array(d));D.print&&(Ka=D.print);D.printErr&&(La=D.printErr);D.wasmBinary&&(Ma=D.wasmBinary);D.thisProgram&&(Fa=D.thisProgram);if(D.preInit)for("function"==typeof D.preInit&&(D.preInit=[D.preInit]);0<D.preInit.length;)D.preInit.shift()();
|
|
555
|
+
var Bd={329366:(d,e,l,t,x)=>{if("undefined"===typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if("undefined"===typeof window.miniaudio){window.miniaudio={referenceCount:0};window.miniaudio.device_type={};window.miniaudio.device_type.playback=d;window.miniaudio.device_type.capture=e;window.miniaudio.device_type.duplex=l;window.miniaudio.device_state={};window.miniaudio.device_state.stopped=t;window.miniaudio.device_state.started=x;let z=window.miniaudio;z.devices=
|
|
556
|
+
[];z.track_device=function(y){for(var B=0;B<z.devices.length;++B)if(null==z.devices[B])return z.devices[B]=y,B;z.devices.push(y);return z.devices.length-1};z.untrack_device_by_index=function(y){for(z.devices[y]=null;0<z.devices.length;)if(null==z.devices[z.devices.length-1])z.devices.pop();else break};z.untrack_device=function(y){for(var B=0;B<z.devices.length;++B)if(z.devices[B]==y)return z.untrack_device_by_index(B)};z.get_device_by_index=function(y){return z.devices[y]};z.unlock_event_types=["touchend",
|
|
557
|
+
"click"];z.unlock=function(){for(var y=0;y<z.devices.length;++y){var B=z.devices[y];null!=B&&null!=B.P&&B.state===z.device_state.started&&B.P.resume().then(()=>{yd(B.Jb)},F=>{console.error("Failed to resume audiocontext",F)})}z.unlock_event_types.map(function(F){document.removeEventListener(F,z.unlock,!0)})};z.unlock_event_types.map(function(y){document.addEventListener(y,z.unlock,!0)})}window.miniaudio.referenceCount+=1;return 1},331544:()=>{"undefined"!==typeof window.miniaudio&&(window.miniaudio.unlock_event_types.map(function(d){document.removeEventListener(d,
|
|
558
|
+
window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},331848:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,331952:()=>{try{var d=new (window.AudioContext||window.webkitAudioContext),e=d.sampleRate;d.close();return e}catch(l){return 0}},332123:(d,e,l,t,x,z)=>{if("undefined"===typeof window.miniaudio)return-1;var y={},B={};d==window.miniaudio.device_type.playback&&0!=l&&(B.sampleRate=l);y.P=
|
|
559
|
+
new (window.AudioContext||window.webkitAudioContext)(B);y.P.suspend();y.state=window.miniaudio.device_state.stopped;l=0;d!=window.miniaudio.device_type.playback&&(l=e);y.$=y.P.createScriptProcessor(t,l,e);y.$.onaudioprocess=function(F){if(null==y.Ea||0==y.Ea.length)y.Ea=new Float32Array(Ta.buffer,x,t*e);if(d==window.miniaudio.device_type.capture||d==window.miniaudio.device_type.duplex){for(var I=0;I<e;I+=1)for(var u=F.inputBuffer.getChannelData(I),a=y.Ea,c=0;c<t;c+=1)a[c*e+I]=u[c];zd(z,t,x)}if(d==
|
|
560
|
+
window.miniaudio.device_type.playback||d==window.miniaudio.device_type.duplex)for(Ad(z,t,x),I=0;I<F.outputBuffer.numberOfChannels;++I)for(u=F.outputBuffer.getChannelData(I),a=y.Ea,c=0;c<t;c+=1)u[c]=a[c*e+I];else for(I=0;I<F.outputBuffer.numberOfChannels;++I)F.outputBuffer.getChannelData(I).fill(0)};d!=window.miniaudio.device_type.capture&&d!=window.miniaudio.device_type.duplex||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(F){y.Oa=y.P.createMediaStreamSource(F);y.Oa.connect(y.$);
|
|
561
|
+
y.$.connect(y.P.destination)}).catch(function(F){console.log("Failed to get user media: "+F)});d==window.miniaudio.device_type.playback&&y.$.connect(y.P.destination);y.Jb=z;return window.miniaudio.track_device(y)},335E3:d=>window.miniaudio.get_device_by_index(d).P.sampleRate,335073:d=>{d=window.miniaudio.get_device_by_index(d);void 0!==d.$&&(d.$.onaudioprocess=function(){},d.$.disconnect(),d.$=void 0);void 0!==d.Oa&&(d.Oa.disconnect(),d.Oa=void 0);d.P.close();d.P=void 0;d.Jb=void 0},335473:d=>{window.miniaudio.untrack_device_by_index(d)},
|
|
562
|
+
335523:d=>{d=window.miniaudio.get_device_by_index(d);d.P.resume();d.state=window.miniaudio.device_state.started},335662:d=>{d=window.miniaudio.get_device_by_index(d);d.P.suspend();d.state=window.miniaudio.device_state.stopped}},Ab,sd,zb,Cd,Dd,Ed,Fd,yd,zd,Ad,Gd,Hd,ib,wd,kb,Xa,hc,Jd={__syscall_fcntl64:function(){return 0},__syscall_ioctl:function(){return 0},__syscall_openat:function(){},_abort_js:()=>Ya(""),_embind_create_inheriting_constructor:(d,e,l)=>{d=Y(d);e=Cb(e,"wrapper");l=tb(l);var t=e.o,
|
|
563
|
+
x=t.V,z=t.G.V,y=t.G.constructor;d=qb(d,function(...B){for(var F of t.G.Kb)if(this[F]===z[F])throw new vb(`Pure virtual function ${F} must be implemented in JavaScript`);Object.defineProperty(this,"__parent",{value:x});this.__construct(...B)});x.__construct=function(...B){if(this===x)throw new X("Pass correct 'this' to __construct");B=y.implement(this,...B);Db(B);var F=B.m;B.notifyOnDestruction();F.ja=!0;Object.defineProperties(this,{m:{value:F}});Fb(this);B=F.v;B=xb(t,B);if(wb.hasOwnProperty(B))throw new X(`Tried to register registered instance: ${B}`);
|
|
564
|
+
wb[B]=this};x.__destruct=function(){if(this===x)throw new X("Pass correct 'this' to __destruct");Db(this);var B=this.m.v;B=xb(t,B);if(wb.hasOwnProperty(B))delete wb[B];else throw new X(`Tried to unregister unregistered instance: ${B}`);};d.prototype=Object.create(x);Object.assign(d.prototype,l);return ub(d)},_embind_finalize_value_object:d=>{var e=Gb[d];delete Gb[d];var l=e.jb,t=e.X,x=e.Cb,z=x.map(y=>y.Cc).concat(x.map(y=>y.Gi));Nb([d],z,y=>{var B={},F,I;for([F,I]of x.entries()){const u=y[F],a=I.Ac,
|
|
565
|
+
c=I.Bc,p=y[F+x.length],q=I.Fi,v=I.Hi;B[I.wc]={read:f=>u.u(a(c,f)),write:(f,b)=>{var g=[];q(v,f,p.F(g,b));Hb(g)},optional:u.optional}}return[{name:e.name,u:u=>{var a={},c;for(c in B)a[c]=B[c].read(u);t(u);return a},F:(u,a)=>{for(var c in B)if(!(c in a||B[c].optional))throw new TypeError(`Missing field: "${c}"`);var p=l();for(c in B)B[c].write(p,a[c]);null!==u&&u.push(t,p);return p},N:Ib,M:t}]})},_embind_register_bigint:()=>{},_embind_register_bool:(d,e,l,t)=>{e=Y(e);Mb(d,{name:e,u:function(x){return!!x},
|
|
566
|
+
F:function(x,z){return z?l:t},N:function(x){return this.u(Q[x])},M:null})},_embind_register_class:(d,e,l,t,x,z,y,B,F,I,u,a,c)=>{u=Y(u);z=kc(x,z);B&&=kc(y,B);I&&=kc(F,I);c=kc(a,c);var p=Vb(u);Ub(p,function(){mc(`Cannot construct ${u} due to unbound types`,[t])});Nb([d,e,l],t?[t]:[],q=>{q=q[0];if(t){var v=q.o;var f=v.V}else f=Rb.prototype;q=qb(u,function(...k){if(Object.getPrototypeOf(this)!==b)throw new X(`Use 'new' to construct ${u}`);if(void 0===g.aa)throw new X(`${u} has no accessible constructor`);
|
|
567
|
+
var h=g.aa[k.length];if(void 0===h)throw new X(`Tried to invoke ctor of ${u} with invalid number of parameters (${k.length}) - expected (${Object.keys(g.aa).toString()}) parameters instead!`);return h.apply(this,k)});var b=Object.create(f,{constructor:{value:q}});q.prototype=b;var g=new Wb(u,q,b,c,v,z,B,I);if(g.G){var n;(n=g.G).ua??(n.ua=[]);g.G.ua.push(g)}v=new ec(u,g,!0,!1,!1);n=new ec(u+"*",g,!1,!1,!1);f=new ec(u+" const*",g,!1,!0,!1);Sb[d]={pointerType:n,mc:f};fc(p,q);return[v,n,f]})},_embind_register_class_class_function:(d,
|
|
568
|
+
e,l,t,x,z,y)=>{var B=pc(l,t);e=Y(e);e=qc(e);z=kc(x,z);Nb([],[d],F=>{function I(){mc(`Cannot call ${u} due to unbound types`,B)}F=F[0];var u=`${F.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]);var a=F.o.constructor;void 0===a[e]?(I.Y=l-1,a[e]=I):(Tb(a,e,u),a[e].D[l-1]=I);Nb([],B,c=>{c=oc(u,[c[0],null].concat(c.slice(1)),null,z,y);void 0===a[e].D?(c.Y=l-1,a[e]=c):a[e].D[l-1]=c;if(F.o.ua)for(const p of F.o.ua)p.constructor.hasOwnProperty(e)||(p.constructor[e]=c);return[]});return[]})},_embind_register_class_class_property:(d,
|
|
569
|
+
e,l,t,x,z,y,B)=>{e=Y(e);z=kc(x,z);Nb([],[d],F=>{F=F[0];var I=`${F.name}.${e}`,u={get(){mc(`Cannot access ${I} due to unbound types`,[l])},enumerable:!0,configurable:!0};u.set=B?()=>{mc(`Cannot access ${I} due to unbound types`,[l])}:()=>{throw new X(`${I} is a read-only property`);};Object.defineProperty(F.o.constructor,e,u);Nb([],[l],a=>{a=a[0];var c={get(){return a.u(z(t))},enumerable:!0};B&&(B=kc(y,B),c.set=p=>{var q=[];B(t,a.F(q,p));Hb(q)});Object.defineProperty(F.o.constructor,e,c);return[]});
|
|
570
|
+
return[]})},_embind_register_class_constructor:(d,e,l,t,x,z)=>{var y=pc(e,l);x=kc(t,x);Nb([],[d],B=>{B=B[0];var F=`constructor ${B.name}`;void 0===B.o.aa&&(B.o.aa=[]);if(void 0!==B.o.aa[e-1])throw new X(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${B.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);B.o.aa[e-1]=()=>{mc(`Cannot construct ${B.name} due to unbound types`,y)};Nb([],y,I=>{I.splice(1,
|
|
571
|
+
0,null);B.o.aa[e-1]=oc(F,I,null,x,z);return[]});return[]})},_embind_register_class_function:(d,e,l,t,x,z,y,B)=>{var F=pc(l,t);e=Y(e);e=qc(e);z=kc(x,z);Nb([],[d],I=>{function u(){mc(`Cannot call ${a} due to unbound types`,F)}I=I[0];var a=`${I.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]);B&&I.o.Kb.push(e);var c=I.o.V,p=c[e];void 0===p||void 0===p.D&&p.className!==I.name&&p.Y===l-2?(u.Y=l-2,u.className=I.name,c[e]=u):(Tb(c,e,a),c[e].D[l-2]=u);Nb([],F,q=>{q=oc(a,q,I,z,y);void 0===c[e].D?
|
|
572
|
+
(q.Y=l-2,c[e]=q):c[e].D[l-2]=q;return[]});return[]})},_embind_register_class_property:(d,e,l,t,x,z,y,B,F,I)=>{e=Y(e);x=kc(t,x);Nb([],[d],u=>{u=u[0];var a=`${u.name}.${e}`,c={get(){mc(`Cannot access ${a} due to unbound types`,[l,y])},enumerable:!0,configurable:!0};c.set=F?()=>mc(`Cannot access ${a} due to unbound types`,[l,y]):()=>{throw new X(a+" is a read-only property");};Object.defineProperty(u.o.V,e,c);Nb([],F?[l,y]:[l],p=>{var q=p[0],v={get(){var b=rc(this,u,a+" getter");return q.u(x(z,b))},
|
|
573
|
+
enumerable:!0};if(F){F=kc(B,F);var f=p[1];v.set=function(b){var g=rc(this,u,a+" setter"),n=[];F(I,g,f.F(n,b));Hb(n)}}Object.defineProperty(u.o.V,e,v);return[]});return[]})},_embind_register_emval:d=>Mb(d,tc),_embind_register_enum:(d,e,l,t,x)=>{e=Y(e);x=0===x?"object":1===x?"number":"string";switch(x){case "object":function y(){}y.values={};Mb(d,{name:e,constructor:y,valueType:x,u:function(B){return this.constructor.values[B]},F:(B,F)=>F.value,N:uc(e,l,t),M:null});Ub(e,y);break;case "number":var z=
|
|
574
|
+
{};Mb(d,{name:e,fb:z,valueType:x,u:B=>B,F:(B,F)=>F,N:uc(e,l,t),M:null});Ub(e,z);delete D[e].Y;break;case "string":z={},Mb(d,{name:e,Ub:{},Nb:{},fb:z,valueType:x,u:function(B){return this.Nb[B]},F:function(B,F){return this.Ub[F]},N:uc(e,l,t),M:null}),Ub(e,z),delete D[e].Y}},_embind_register_enum_value:(d,e,l)=>{var t=Cb(d,"enum");e=Y(e);switch(t.valueType){case "object":d=t.constructor;t=Object.create(t.constructor.prototype,{value:{value:l},constructor:{value:qb(`${t.name}_${e}`,function(){})}});
|
|
575
|
+
d.values[l]=t;d[e]=t;break;case "number":t.fb[e]=l;break;case "string":t.Ub[e]=l,t.Nb[l]=e,t.fb[e]=e}},_embind_register_float:(d,e,l)=>{e=Y(e);Mb(d,{name:e,u:t=>t,F:(t,x)=>x,N:vc(e,l),M:null})},_embind_register_function:(d,e,l,t,x,z)=>{var y=pc(e,l);d=Y(d);d=qc(d);x=kc(t,x);Ub(d,function(){mc(`Cannot call ${d} due to unbound types`,y)},e-1);Nb([],y,B=>{fc(d,oc(d,[B[0],null].concat(B.slice(1)),null,x,z),e-1);return[]})},_embind_register_integer:(d,e,l,t,x)=>{e=Y(e);let z=B=>B;if(0===t){var y=32-8*
|
|
576
|
+
l;z=B=>B<<y>>>y;x=z(x)}Mb(d,{name:e,u:z,F:(B,F)=>F,N:wc(e,l,0!==t),M:null})},_embind_register_memory_view:(d,e,l)=>{function t(z){return new x(Qa.buffer,W[z+4>>2],W[z>>2])}var x=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];l=Y(l);Mb(d,{name:l,u:t,N:t},{Hc:!0})},_embind_register_std_string:(d,e)=>{e=Y(e);Mb(d,{name:e,u(l){var t=(t=l+4)?pb(Q,t,W[l>>2],!0):"";Ab(l);return t},F(l,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var x="string"==typeof t;
|
|
577
|
+
if(!(x||ArrayBuffer.isView(t)&&1==t.BYTES_PER_ELEMENT))throw new X("Cannot pass non-string to std::string");var z=x?yc(t):t.length;var y=sd(4+z+1),B=y+4;W[y>>2]=z;x?xc(t,B,z+1):Q.set(t,B);null!==l&&l.push(Ab,y);return y},N:Ib,M(l){Ab(l)}})},_embind_register_std_wstring:(d,e,l)=>{l=Y(l);if(2===e){var t=Ac;var x=Bc;var z=Cc}else t=Dc,x=Ec,z=Fc;Mb(d,{name:l,u:y=>{var B=t(y+4,W[y>>2]*e,!0);Ab(y);return B},F:(y,B)=>{if("string"!=typeof B)throw new X(`Cannot pass non-string to C++ string type ${l}`);var F=
|
|
578
|
+
z(B),I=sd(4+F+e);W[I>>2]=F/e;x(B,I+4,F+e);null!==y&&y.push(Ab,I);return I},N:Ib,M(y){Ab(y)}})},_embind_register_value_object:(d,e,l,t,x,z)=>{Gb[d]={name:Y(e),jb:kc(l,t),X:kc(x,z),Cb:[]}},_embind_register_value_object_field:(d,e,l,t,x,z,y,B,F,I)=>{Gb[d].Cb.push({wc:Y(e),Cc:l,Ac:kc(t,x),Bc:z,Gi:y,Fi:kc(B,F),Hi:I})},_embind_register_void:(d,e)=>{e=Y(e);Mb(d,{Jc:!0,name:e,u:()=>{},F:()=>{}})},_emscripten_throw_longjmp:()=>{throw Infinity;},_emval_create_invoker:(d,e,l)=>{var [t,...x]=Ic(d,e),z=t.F.bind(t),
|
|
579
|
+
y=x.map(F=>F.N.bind(F));d--;var B=Array(d);e=`methodCaller<(${x.map(F=>F.name)}) => ${t.name}>`;return Hc(qb(e,(F,I,u,a)=>{for(var c=0,p=0;p<d;++p)B[p]=y[p](a+c),c+=8;switch(l){case 0:var q=tb(F).apply(null,B);break;case 2:q=Reflect.construct(tb(F),B);break;case 3:q=B[0];break;case 1:q=tb(F)[Kc(I)](...B)}F=[];q=z(F,q);F.length&&(W[u>>2]=ub(F));return q}))},_emval_decref:sc,_emval_get_module_property:d=>{d=Kc(d);return ub(D[d])},_emval_get_property:(d,e)=>{d=tb(d);e=tb(e);return ub(d[e])},_emval_incref:d=>
|
|
580
|
+
{9<d&&(sb[d+1]+=1)},_emval_invoke:(d,e,l,t,x)=>Gc[d](e,l,t,x),_emval_new_array:()=>ub([]),_emval_new_cstring:d=>ub(Kc(d)),_emval_new_object:()=>ub({}),_emval_run_destructors:d=>{var e=tb(d);Hb(e);sc(d)},_emval_set_property:(d,e,l)=>{d=tb(d);e=tb(e);l=tb(l);d[e]=l},_gmtime_js:function(d,e,l){d=new Date(1E3*(e+2097152>>>0<4194305-!!d?(d>>>0)+4294967296*e:NaN));S[l>>2]=d.getUTCSeconds();S[l+4>>2]=d.getUTCMinutes();S[l+8>>2]=d.getUTCHours();S[l+12>>2]=d.getUTCDate();S[l+16>>2]=d.getUTCMonth();S[l+20>>
|
|
581
|
+
2]=d.getUTCFullYear()-1900;S[l+24>>2]=d.getUTCDay();S[l+28>>2]=(d.getTime()-Date.UTC(d.getUTCFullYear(),0,1,0,0,0,0))/864E5|0},_localtime_js:function(d,e,l){d=new Date(1E3*(e+2097152>>>0<4194305-!!d?(d>>>0)+4294967296*e:NaN));S[l>>2]=d.getSeconds();S[l+4>>2]=d.getMinutes();S[l+8>>2]=d.getHours();S[l+12>>2]=d.getDate();S[l+16>>2]=d.getMonth();S[l+20>>2]=d.getFullYear()-1900;S[l+24>>2]=d.getDay();e=d.getFullYear();S[l+28>>2]=(0!==e%4||0===e%100&&0!==e%400?Mc:Lc)[d.getMonth()]+d.getDate()-1|0;S[l+36>>
|
|
582
|
+
2]=-(60*d.getTimezoneOffset());e=(new Date(d.getFullYear(),6,1)).getTimezoneOffset();var t=(new Date(d.getFullYear(),0,1)).getTimezoneOffset();S[l+32>>2]=(e!=t&&d.getTimezoneOffset()==Math.min(t,e))|0},_timegm_js:function(d){var e=new Date(Date.UTC(S[d+20>>2]+1900,S[d+16>>2],S[d+12>>2],S[d+8>>2],S[d+4>>2],S[d>>2],0));S[d+24>>2]=e.getUTCDay();S[d+28>>2]=(e.getTime()-Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0))/864E5|0;d=e.getTime()/1E3;Hd((cb=d,1<=+Math.abs(cb)?0<cb?+Math.floor(cb/4294967296)>>>0:~~+Math.ceil((cb-
|
|
583
|
+
+(~~cb>>>0))/4294967296)>>>0:0));return d>>>0},_tzset_js:(d,e,l,t)=>{var x=(new Date).getFullYear(),z=(new Date(x,0,1)).getTimezoneOffset();x=(new Date(x,6,1)).getTimezoneOffset();W[d>>2]=60*Math.max(z,x);S[e>>2]=Number(z!=x);e=y=>{var B=Math.abs(y);return`UTC${0<=y?"-":"+"}${String(Math.floor(B/60)).padStart(2,"0")}${String(B%60).padStart(2,"0")}`};d=e(z);e=e(x);x<z?(xc(d,l,17),xc(e,t,17)):(xc(d,t,17),xc(e,l,17))},beginPixelLocalStorageWEBGL:function(d,e,l){(d=bd[d].I.Ma)&&d.beginPixelLocalStorageWEBGL(new Uint32Array(Xa.buffer,
|
|
584
|
+
4*l,e))},clock_time_get:function(d,e,l,t){if(!(0<=d&&3>=d))return 28;d=Math.round(1E6*(0===d?Date.now():performance.now()));db=[d>>>0,(cb=d,1<=+Math.abs(cb)?0<cb?+Math.floor(cb/4294967296)>>>0:~~+Math.ceil((cb-+(~~cb>>>0))/4294967296)>>>0:0)];S[t>>2]=db[0];S[t+4>>2]=db[1];return 0},decode_image:function(d,e,l){var t=D.images;t||(t=new Map,D.images=t);var x=new Image;t.set(d,x);e=D.HEAP8.subarray(e,e+l);l=new Uint8Array(l);l.set(e);x.src=URL.createObjectURL(new Blob([l],{type:"image/png"}));x.onload=
|
|
585
|
+
function(){D._setWebImage(d,x.width,x.height)}},delete_image:function(d){var e=D.images;e&&e.get(d)&&e.delete(d)},emscripten_asm_const_int:(d,e,l)=>{Nc.length=0;for(var t;t=Q[e++];){var x=105!=t;x&=112!=t;l+=x&&l%8?4:0;Nc.push(112==t?W[l>>2]:105==t?S[l>>2]:Ua[l>>3]);l+=x?8:4}return Bd[d](...Nc)},emscripten_date_now:()=>Date.now(),emscripten_get_now:()=>performance.now(),emscripten_resize_heap:d=>{var e=Q.length;d>>>=0;if(2147483648<d)return!1;for(var l=1;4>=l;l*=2){var t=e*(1+.2/l);t=Math.min(t,d+
|
|
586
|
+
100663296);a:{t=(Math.min(2147483648,65536*Math.ceil(Math.max(d,t)/65536))-Xa.buffer.byteLength+65535)/65536|0;try{Xa.grow(t);Wa();var x=1;break a}catch(z){}x=void 0}if(x)return!0}return!1},emscripten_webgl_enable_extension:(d,e)=>{d=bd[d];e=e?pb(Q,e):"";e.startsWith("GL_")&&(e=e.slice(3));"WEBGL_draw_instanced_base_vertex_base_instance"==e&&Oc(Z);"WEBGL_multi_draw_instanced_base_vertex_base_instance"==e&&Pc(Z);"WEBGL_multi_draw"==e&&(Z.Lc=Z.getExtension("WEBGL_multi_draw"));"EXT_polygon_offset_clamp"==
|
|
587
|
+
e&&(Z.vc=Z.getExtension("EXT_polygon_offset_clamp"));"EXT_clip_control"==e&&(Z.uc=Z.getExtension("EXT_clip_control"));"WEBGL_polygon_mode"==e&&(Z.Li=Z.getExtension("WEBGL_polygon_mode"));return!!d.I.getExtension(e)},emscripten_webgl_get_current_context:()=>kd?kd.handle:0,emscripten_webgl_make_context_current:d=>xa(d)?0:-5,enable_WEBGL_provoking_vertex:function(d){d=bd[d].I;d.Lb=d.getExtension("WEBGL_provoking_vertex");return!!d.Lb},enable_WEBGL_shader_pixel_local_storage_coherent:function(d){d=bd[d].I;
|
|
588
|
+
const e=d.getExtension("WEBGL_shader_pixel_local_storage");if(e&&e.isCoherent()){if(5==e.framebufferTexturePixelLocalStorageWEBGL.length)return d.Ma=e,!0;console.warn("WEBGL_shader_pixel_local_storage is advertised, but a deprecated version has been detected. Disabling.")}return!1},endPixelLocalStorageWEBGL:function(d,e,l){(d=bd[d].I.Ma)&&d.endPixelLocalStorageWEBGL(new Uint32Array(Xa.buffer,4*l,e))},ensure_images_map:function(){D.images||(D.images=new Map)},environ_get:(d,e)=>{var l=0,t=0,x;for(x of nd()){var z=
|
|
589
|
+
e+l;W[d+t>>2]=z;l+=xc(x,z,Infinity)+1;t+=4}return 0},environ_sizes_get:(d,e)=>{var l=nd();W[d>>2]=l.length;d=0;for(var t of l)d+=yc(t)+1;W[e>>2]=d;return 0},fd_close:()=>52,fd_read:()=>52,fd_seek:function(){return 70},fd_write:(d,e,l,t)=>{for(var x=0,z=0;z<l;z++){var y=W[e>>2],B=W[e+4>>2];e+=8;for(var F=0;F<B;F++){var I=d,u=Q[y+F],a=od[I];0===u||10===u?((1===I?Ka:La)(pb(a)),a.length=0):a.push(u)}x+=B}W[t>>2]=x;return 0},framebufferPixelLocalClearValuefvWEBGL:function(d,e,l,t,x,z){(d=bd[d].I.Ma)&&
|
|
590
|
+
d.framebufferPixelLocalClearValuefvWEBGL(e,[l,t,x,z])},framebufferTexturePixelLocalStorageWEBGL:function(d,e,l,t,x,z){(d=bd[d].I.Ma)&&d.framebufferTexturePixelLocalStorageWEBGL(e,Zc[l],t,x,z)},glActiveTexture:d=>Z.activeTexture(d),glAttachShader:(d,e)=>{Z.attachShader(Tc[d],$c[e])},glBindBuffer:(d,e)=>{35051==d?Z.bb=e:35052==d&&(Z.Ca=e);Z.bindBuffer(d,Sc[e])},glBindBufferRange:(d,e,l,t,x)=>{Z.bindBufferRange(d,e,Sc[l],t,x)},glBindFramebuffer:(d,e)=>{Z.bindFramebuffer(d,Uc[e])},glBindRenderbuffer:(d,
|
|
591
|
+
e)=>{Z.bindRenderbuffer(d,Yc[e])},glBindSampler:(d,e)=>{Z.bindSampler(d,cd[e])},glBindTexture:(d,e)=>{Z.bindTexture(d,Zc[e])},glBindVertexArray:d=>{Z.bindVertexArray(ad[d])},glBlendEquation:d=>Z.blendEquation(d),glBlendFunc:(d,e)=>Z.blendFunc(d,e),glBlitFramebuffer:(d,e,l,t,x,z,y,B,F,I)=>Z.blitFramebuffer(d,e,l,t,x,z,y,B,F,I),glBufferData:(d,e,l,t)=>{l&&e?Z.bufferData(d,Q,t,l,e):Z.bufferData(d,e,t)},glBufferSubData:(d,e,l,t)=>{l&&Z.bufferSubData(d,e,Q,t,l)},glClear:d=>Z.clear(d),glClearBufferfv:(d,
|
|
592
|
+
e,l)=>{Z.clearBufferfv(d,e,Ta,l>>2)},glClearBufferuiv:(d,e,l)=>{Z.clearBufferuiv(d,e,W,l>>2)},glClearColor:(d,e,l,t)=>Z.clearColor(d,e,l,t),glClearDepthf:d=>Z.clearDepth(d),glClearStencil:d=>Z.clearStencil(d),glColorMask:(d,e,l,t)=>{Z.colorMask(!!d,!!e,!!l,!!t)},glCompileShader:d=>{Z.compileShader($c[d])},glCompressedTexSubImage2D:(d,e,l,t,x,z,y,B,F)=>{Z.Ca||!B?Z.compressedTexSubImage2D(d,e,l,t,x,z,y,B,F):Z.compressedTexSubImage2D(d,e,l,t,x,z,y,Q,F,B)},glCreateProgram:()=>{var d=gd(Tc),e=Z.createProgram();
|
|
593
|
+
e.name=d;e.Ka=e.Ia=e.Ja=0;e.mb=1;Tc[d]=e;return d},glCreateShader:d=>{var e=gd($c);$c[e]=Z.createShader(d);return e},glCullFace:d=>Z.cullFace(d),glDeleteBuffers:(d,e)=>{for(var l=0;l<d;l++){var t=S[e+4*l>>2],x=Sc[t];x&&(Z.deleteBuffer(x),x.name=0,Sc[t]=null,t==Z.bb&&(Z.bb=0),t==Z.Ca&&(Z.Ca=0))}},glDeleteFramebuffers:(d,e)=>{for(var l=0;l<d;++l){var t=S[e+4*l>>2],x=Uc[t];x&&(Z.deleteFramebuffer(x),x.name=0,Uc[t]=null)}},glDeleteProgram:d=>{if(d){var e=Tc[d];e?(Z.deleteProgram(e),e.name=0,Tc[d]=null):
|
|
594
|
+
hd||=1281}},glDeleteRenderbuffers:(d,e)=>{for(var l=0;l<d;l++){var t=S[e+4*l>>2],x=Yc[t];x&&(Z.deleteRenderbuffer(x),x.name=0,Yc[t]=null)}},glDeleteShader:d=>{if(d){var e=$c[d];e?(Z.deleteShader(e),$c[d]=null):hd||=1281}},glDeleteTextures:(d,e)=>{for(var l=0;l<d;l++){var t=S[e+4*l>>2],x=Zc[t];x&&(Z.deleteTexture(x),x.name=0,Zc[t]=null)}},glDeleteVertexArrays:(d,e)=>{for(var l=0;l<d;l++){var t=S[e+4*l>>2];Z.deleteVertexArray(ad[t]);ad[t]=null}},glDepthFunc:d=>Z.depthFunc(d),glDepthMask:d=>{Z.depthMask(!!d)},
|
|
595
|
+
glDepthRangef:(d,e)=>Z.depthRange(d,e),glDisable:d=>Z.disable(d),glDrawArrays:(d,e,l)=>{Z.drawArrays(d,e,l)},glDrawArraysInstanced:(d,e,l,t)=>{Z.drawArraysInstanced(d,e,l,t)},glDrawBuffers:(d,e)=>{for(var l=pd[d],t=0;t<d;t++)l[t]=S[e+4*t>>2];Z.drawBuffers(l)},glDrawElements:(d,e,l,t)=>{Z.drawElements(d,e,l,t)},glDrawElementsInstanced:(d,e,l,t,x)=>{Z.drawElementsInstanced(d,e,l,t,x)},glEnable:d=>Z.enable(d),glEnableVertexAttribArray:d=>{Z.enableVertexAttribArray(d)},glFinish:()=>Z.finish(),glFlush:()=>
|
|
596
|
+
Z.flush(),glFramebufferRenderbuffer:(d,e,l,t)=>{Z.framebufferRenderbuffer(d,e,l,Yc[t])},glFramebufferTexture2D:(d,e,l,t,x)=>{Z.framebufferTexture2D(d,e,l,Zc[t],x)},glFrontFace:d=>Z.frontFace(d),glGenBuffers:(d,e)=>{jd(d,e,"createBuffer",Sc)},glGenFramebuffers:(d,e)=>{jd(d,e,"createFramebuffer",Uc)},glGenRenderbuffers:(d,e)=>{jd(d,e,"createRenderbuffer",Yc)},glGenTextures:(d,e)=>{jd(d,e,"createTexture",Zc)},glGenVertexArrays:(d,e)=>{jd(d,e,"createVertexArray",ad)},glGenerateMipmap:d=>Z.generateMipmap(d),
|
|
597
|
+
glGetFramebufferAttachmentParameteriv:(d,e,l,t)=>{d=Z.getFramebufferAttachmentParameter(d,e,l);if(d instanceof WebGLRenderbuffer||d instanceof WebGLTexture)d=d.name|0;S[t>>2]=d},glGetIntegerv:(d,e)=>rd(d,e),glGetProgramiv:(d,e,l)=>{if(l)if(d>=Rc)hd||=1281;else if(d=Tc[d],35716==e)d=Z.getProgramInfoLog(d),null===d&&(d="(unknown error)"),S[l>>2]=d.length+1;else if(35719==e){if(!d.Ka){var t=Z.getProgramParameter(d,35718);for(e=0;e<t;++e)d.Ka=Math.max(d.Ka,Z.getActiveUniform(d,e).name.length+1)}S[l>>
|
|
598
|
+
2]=d.Ka}else if(35722==e){if(!d.Ia)for(t=Z.getProgramParameter(d,35721),e=0;e<t;++e)d.Ia=Math.max(d.Ia,Z.getActiveAttrib(d,e).name.length+1);S[l>>2]=d.Ia}else if(35381==e){if(!d.Ja)for(t=Z.getProgramParameter(d,35382),e=0;e<t;++e)d.Ja=Math.max(d.Ja,Z.getActiveUniformBlockName(d,e).length+1);S[l>>2]=d.Ja}else S[l>>2]=Z.getProgramParameter(d,e);else hd||=1281},glGetString:d=>{var e=dd[d];if(!e){switch(d){case 7939:e=td(qd().join(" "));break;case 7936:case 7937:case 37445:case 37446:(e=Z.getParameter(d))||
|
|
599
|
+
(hd||=1280);e=e?td(e):0;break;case 7938:e=td(`OpenGL ES 3.0 (${Z.getParameter(7938)})`);break;case 35724:e=Z.getParameter(35724);var l=e.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==l&&(3==l[1].length&&(l[1]+="0"),e=`OpenGL ES GLSL ES ${l[1]} (${e})`);e=td(e);break;default:hd||=1280}dd[d]=e}return e},glGetUniformBlockIndex:(d,e)=>Z.getUniformBlockIndex(Tc[d],e?pb(Q,e):""),glGetUniformLocation:(d,e)=>{e=e?pb(Q,e):"";if(d=Tc[d]){var l=d,t=l.sa,x=l.Tb,z;if(!t){l.sa=t={};l.Sb={};var y=
|
|
600
|
+
Z.getProgramParameter(l,35718);for(z=0;z<y;++z){var B=Z.getActiveUniform(l,z);var F=B.name;B=B.size;var I=ud(F);I=0<I?F.slice(0,I):F;var u=l.mb;l.mb+=B;x[I]=[B,u];for(F=0;F<B;++F)t[u]=F,l.Sb[u++]=I}}l=d.sa;t=0;x=e;z=ud(e);0<z&&(t=parseInt(e.slice(z+1))>>>0,x=e.slice(0,z));if((x=d.Tb[x])&&t<x[0]&&(t+=x[1],l[t]=l[t]||Z.getUniformLocation(d,e)))return t}else hd||=1281;return-1},glInvalidateFramebuffer:(d,e,l)=>{for(var t=pd[e],x=0;x<e;x++)t[x]=S[l+4*x>>2];Z.invalidateFramebuffer(d,t)},glLinkProgram:d=>
|
|
601
|
+
{d=Tc[d];Z.linkProgram(d);d.sa=0;d.Tb={}},glPixelStorei:(d,e)=>{3317==d?ed=e:3314==d&&(fd=e);Z.pixelStorei(d,e)},glReadPixels:(d,e,l,t,x,z,y)=>{if(Z.bb)Z.readPixels(d,e,l,t,x,z,y);else{var B=vd(z);y>>>=31-Math.clz32(B.BYTES_PER_ELEMENT);Z.readPixels(d,e,l,t,x,z,B,y)}},glRenderbufferStorage:(d,e,l,t)=>Z.renderbufferStorage(d,e,l,t),glRenderbufferStorageMultisample:(d,e,l,t,x)=>Z.renderbufferStorageMultisample(d,e,l,t,x),glScissor:(d,e,l,t)=>Z.scissor(d,e,l,t),glShaderSource:(d,e,l,t)=>{for(var x="",
|
|
602
|
+
z=0;z<e;++z){var y=(y=W[l+4*z>>2])?pb(Q,y,t?W[t+4*z>>2]:void 0):"";x+=y}Z.shaderSource($c[d],x)},glStencilFunc:(d,e,l)=>Z.stencilFunc(d,e,l),glStencilFuncSeparate:(d,e,l,t)=>Z.stencilFuncSeparate(d,e,l,t),glStencilMask:d=>Z.stencilMask(d),glStencilOp:(d,e,l)=>Z.stencilOp(d,e,l),glStencilOpSeparate:(d,e,l,t)=>Z.stencilOpSeparate(d,e,l,t),glTexParameteri:(d,e,l)=>Z.texParameteri(d,e,l),glTexStorage2D:(d,e,l,t,x)=>Z.texStorage2D(d,e,l,t,x),glTexStorage3D:(d,e,l,t,x,z)=>Z.texStorage3D(d,e,l,t,x,z),glTexSubImage2D:(d,
|
|
603
|
+
e,l,t,x,z,y,B,F)=>{if(Z.Ca)Z.texSubImage2D(d,e,l,t,x,z,y,B,F);else if(F){var I=vd(B);Z.texSubImage2D(d,e,l,t,x,z,y,B,I,F>>>31-Math.clz32(I.BYTES_PER_ELEMENT))}else{if(F){I=vd(B);var u=z*((fd||x)*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[y-6402]||1)*I.BYTES_PER_ELEMENT+ed-1&-ed);F=I.subarray(F>>>31-Math.clz32(I.BYTES_PER_ELEMENT),F+u>>>31-Math.clz32(I.BYTES_PER_ELEMENT))}else F=null;Z.texSubImage2D(d,e,l,t,x,z,y,B,F)}},glUniform1i:(d,e)=>{var l=Z,t=l.uniform1i;var x=Z.pc;if(x){var z=
|
|
604
|
+
x.sa[d];"number"==typeof z&&(x.sa[d]=z=Z.getUniformLocation(x,x.Sb[d]+(0<z?`[${z}]`:"")));d=z}else hd||=1282,d=void 0;t.call(l,d,e)},glUniformBlockBinding:(d,e,l)=>{d=Tc[d];Z.uniformBlockBinding(d,e,l)},glUseProgram:d=>{d=Tc[d];Z.useProgram(d);Z.pc=d},glVertexAttribDivisor:(d,e)=>{Z.vertexAttribDivisor(d,e)},glVertexAttribIPointer:(d,e,l,t,x)=>{Z.vertexAttribIPointer(d,e,l,t,x)},glVertexAttribPointer:(d,e,l,t,x,z)=>{Z.vertexAttribPointer(d,e,l,!!t,x,z)},glViewport:(d,e,l,t)=>Z.viewport(d,e,l,t),invoke_vii:Id,
|
|
605
|
+
isWindowsBrowser:function(){return-1<navigator.platform.indexOf("Win")},provokingVertexWEBGL:function(d,e){(d=bd[d].I.Lb)&&d.provokingVertexWEBGL(e)},riveWebCall:function(d,e,l,t,x,z,y){return D.riveScripting.call(d,e,l,t,x,z,y)},riveWebHasExport:function(d,e){return D.riveScripting.Dc(d,e)},riveWebMemoryPages:function(d){return D.riveScripting.Mc(d)},riveWebPreparing:function(d){return D.riveScripting.ba(d)},riveWebRaise:function(d,e){D.riveScripting.Pc(d,e)},riveWebReadMemory:function(d,e,l,t){return D.riveScripting.read(d,
|
|
606
|
+
e,l,t)},riveWebRegister:function(d,e,l){const t=D.riveScripting;if(!t)return 0;t.ic({exports:D,Fc:x=>{x=W[(Fd()>>2)+x];return 0===x?void 0:hc.get(x)},ia:()=>Q,Eb:()=>Ua,ra:lb,Na:xd,qa:jb,gb:sd,cb:Ab,nb:x=>x?pb(Q,x):"",Wb:(x,z,y)=>xc(x,z,y)});t.register(d,Q.subarray(e,e+l));return 1},riveWebRelease:function(d){D.riveScripting?.release(d)},riveWebStart:function(d){d=D.riveScripting.start(d);return null===d?0:td(d)},riveWebStringLength:function(d,e){return D.riveScripting.Ji(d,e)},riveWebWriteMemory:function(d,
|
|
607
|
+
e,l,t){return D.riveScripting.write(d,e,l,t)},upload_image:function(d,e){var l=D.images;l&&(e=l.get(e))&&(d=bd[d].I,d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,e),d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1))},wasm_start_image_decode:function(d,e,l){e=new Uint8Array(Xa.buffer,e,l);var t=new Uint8Array(l);t.set(e);Promise.resolve().then(function(){return createImageBitmap(new Blob([t]))}).then(function(x){var z=(new OffscreenCanvas(x.width,
|
|
608
|
+
x.height)).getContext("2d");z.drawImage(x,0,0);z=z.getImageData(0,0,x.width,x.height);var y=z.data.length,B=Cd(y);B?((new Uint8Array(Xa.buffer,B,y)).set(z.data),Dd(d,x.width,x.height,B,y)):Ed(d)}).catch(function(){Ed(d)})}};function Id(d,e,l){var t=kb();try{hc.get(d)(e,l)}catch(x){ib(t);if(x!==x+0)throw x;Gd(1,0)}}var Kd;
|
|
609
|
+
Kd=await (async function(){function d(l){l=Kd=l.exports;Ab=l.free;sd=l.malloc;D._setWebImage=l.setWebImage;zb=l.__getTypeName;Cd=D._wasm_image_decode_alloc=l.wasm_image_decode_alloc;Dd=D._wasm_image_decode_complete=l.wasm_image_decode_complete;Ed=D._wasm_image_decode_error=l.wasm_image_decode_error;D._rive_web_vm_module_export=l.rive_web_vm_module_export;D._rive_web_vm_booting=l.rive_web_vm_booting;Fd=D._rive_web_calls=l.rive_web_calls;yd=D._ma_device__on_notification_unlocked=l.ma_device__on_notification_unlocked;
|
|
610
|
+
D._ma_malloc_emscripten=l.ma_malloc_emscripten;D._ma_free_emscripten=l.ma_free_emscripten;zd=D._ma_device_process_pcm_frames_capture__webaudio=l.ma_device_process_pcm_frames_capture__webaudio;Ad=D._ma_device_process_pcm_frames_playback__webaudio=l.ma_device_process_pcm_frames_playback__webaudio;Gd=l.setThrew;Hd=l._emscripten_tempret_set;ib=l._emscripten_stack_restore;wd=l._emscripten_stack_alloc;kb=l.emscripten_stack_get_current;gc.vij=l.dynCall_vij;gc.iij=l.dynCall_iij;gc.ji=l.dynCall_ji;gc.iiiji=
|
|
611
|
+
l.dynCall_iiiji;gc.iiji=l.dynCall_iiji;gc.jii=l.dynCall_jii;gc.vijj=l.dynCall_vijj;gc.jiji=l.dynCall_jiji;Xa=l.memory;hc=l.__indirect_function_table;Wa();return Kd}var e={env:Jd,wasi_snapshot_preview1:Jd};if(D.instantiateWasm)return new Promise(l=>{D.instantiateWasm(e,(t,x)=>{l(d(t,x))})});Za??=D.locateFile?D.locateFile("canvas_advanced.wasm",Ga):Ga+"canvas_advanced.wasm";return d((await bb(e)).instance)}());
|
|
612
|
+
(function(){function d(){D.calledRun=!0;if(!Na){Va=!0;Kd.__wasm_call_ctors();Oa?.(D);D.onRuntimeInitialized?.();if(D.postRun)for("function"==typeof D.postRun&&(D.postRun=[D.postRun]);D.postRun.length;){var e=D.postRun.shift();fb.push(e)}eb(fb)}}if(D.preRun)for("function"==typeof D.preRun&&(D.preRun=[D.preRun]);D.preRun.length;)hb();eb(gb);D.setStatus?(D.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>D.setStatus(""),1);d()},1)):d()})();Va?moduleRtn=D:moduleRtn=new Promise((d,e)=>{Oa=d;Pa=e});
|
|
495
613
|
;return moduleRtn}})();
|
|
496
614
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Rive);
|
|
497
615
|
|
|
@@ -500,7 +618,7 @@ Ta.push(d)}Sa(Ta)}}if(k.preRun)for("function"==typeof k.preRun&&(k.preRun=[k.pre
|
|
|
500
618
|
/* 5 */
|
|
501
619
|
/***/ ((module) => {
|
|
502
620
|
|
|
503
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas","version":"2.
|
|
621
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas","version":"2.44.1","description":"Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts","runtimeLoader.d.ts","utils","semantics"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
504
622
|
|
|
505
623
|
/***/ }),
|
|
506
624
|
/* 6 */
|
|
@@ -626,6 +744,17 @@ var SemanticTreeModel = /** @class */ (function () {
|
|
|
626
744
|
SemanticTreeModel.prototype.nodeById = function (id) {
|
|
627
745
|
return this._nodesById.get(id);
|
|
628
746
|
};
|
|
747
|
+
/** The node with SemanticState.Focused, or undefined. */
|
|
748
|
+
SemanticTreeModel.prototype.focusedNode = function () {
|
|
749
|
+
// Manual iteration: runs every frame and must stop at the first hit (the
|
|
750
|
+
// TS target forbids for-of over Map iterators).
|
|
751
|
+
var it = this._nodesById.values();
|
|
752
|
+
for (var r = it.next(); !r.done; r = it.next()) {
|
|
753
|
+
if ((0,_types__WEBPACK_IMPORTED_MODULE_0__.hasState)(r.value.stateFlags, _types__WEBPACK_IMPORTED_MODULE_0__.SemanticState.Focused))
|
|
754
|
+
return r.value;
|
|
755
|
+
}
|
|
756
|
+
return;
|
|
757
|
+
};
|
|
629
758
|
/** Current index of a node among its siblings (or roots), or -1 if absent. */
|
|
630
759
|
SemanticTreeModel.prototype.siblingIndexOf = function (id) {
|
|
631
760
|
var node = this._nodesById.get(id);
|
|
@@ -1173,8 +1302,42 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1173
1302
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1174
1303
|
/* harmony export */ AccessibilityOverlay: () => (/* binding */ AccessibilityOverlay)
|
|
1175
1304
|
/* harmony export */ });
|
|
1176
|
-
/* harmony import */ var
|
|
1305
|
+
/* harmony import */ var _claimedKeyEvents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
|
|
1306
|
+
/* harmony import */ var _utils_canvasOffset__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
|
|
1307
|
+
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8);
|
|
1308
|
+
|
|
1177
1309
|
|
|
1310
|
+
|
|
1311
|
+
var warnedUnpositionedWrapper = false;
|
|
1312
|
+
/**
|
|
1313
|
+
* Warns once per page when no positioned element sits at or inside the canvas's
|
|
1314
|
+
* nearest scroll container: the overlay then can't scroll with the canvas. Reads only.
|
|
1315
|
+
*/
|
|
1316
|
+
function warnIfWrapperUnpositioned(canvas) {
|
|
1317
|
+
if (warnedUnpositionedWrapper)
|
|
1318
|
+
return;
|
|
1319
|
+
// Null when detached (or display:none / fixed); nothing to judge yet.
|
|
1320
|
+
var offsetParent = canvas.offsetParent;
|
|
1321
|
+
if (!offsetParent)
|
|
1322
|
+
return;
|
|
1323
|
+
var scrolls = function (v) { return v === "auto" || v === "scroll" || v === "overlay"; };
|
|
1324
|
+
var scroller = null;
|
|
1325
|
+
var el = canvas.parentElement;
|
|
1326
|
+
// Bounds pathological nesting.
|
|
1327
|
+
var MAX_ANCESTOR_WALK = 32;
|
|
1328
|
+
for (var i = 0; el && el !== document.documentElement && i < MAX_ANCESTOR_WALK; i++, el = el.parentElement) {
|
|
1329
|
+
var style = getComputedStyle(el);
|
|
1330
|
+
if (scrolls(style.overflowX) || scrolls(style.overflowY)) {
|
|
1331
|
+
scroller = el;
|
|
1332
|
+
break;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
// Only the viewport scrolls: any offsetParent scrolls with the page.
|
|
1336
|
+
if (!scroller || scroller.contains(offsetParent))
|
|
1337
|
+
return;
|
|
1338
|
+
warnedUnpositionedWrapper = true;
|
|
1339
|
+
console.warn('[Rive] Semantics: give the element wrapping the <canvas> "position: relative" (or another positioned value) so the semantic overlay scrolls with the canvas. Without it, screen readers may scroll to stale positions when the canvas is inside a scrolling container.');
|
|
1340
|
+
}
|
|
1178
1341
|
/**
|
|
1179
1342
|
* Creates and manages an invisible DOM tree overlaying a Rive canvas. This is for
|
|
1180
1343
|
* screen readers to discover and interact with the Rive content.
|
|
@@ -1192,7 +1355,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1192
1355
|
var AccessibilityOverlay = /** @class */ (function () {
|
|
1193
1356
|
function AccessibilityOverlay(options) {
|
|
1194
1357
|
var _this = this;
|
|
1195
|
-
var _a;
|
|
1358
|
+
var _a, _b;
|
|
1196
1359
|
this.elements = new Map();
|
|
1197
1360
|
/** Visually-hidden description spans keyed by node ID, referenced by aria-describedby. */
|
|
1198
1361
|
this.descElements = new Map();
|
|
@@ -1202,6 +1365,8 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1202
1365
|
this.pendingTextGeometry = [];
|
|
1203
1366
|
/** Last measured box-size|text key per text element, to skip redundant re-measures. */
|
|
1204
1367
|
this.textGeometryKeys = new WeakMap();
|
|
1368
|
+
/** Node data last passed to applyAttributes per element; see {@link setEditingHostNode}. */
|
|
1369
|
+
this.appliedNodes = new WeakMap();
|
|
1205
1370
|
this.lastCanvasPositioning = {
|
|
1206
1371
|
width: -1, height: -1, offsetTop: -1, offsetLeft: -1,
|
|
1207
1372
|
};
|
|
@@ -1214,6 +1379,10 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1214
1379
|
this._geometryDirty = true;
|
|
1215
1380
|
/** True while reconciling the DOM (reserved for future focus-sync guards). */
|
|
1216
1381
|
this.isUpdating = false;
|
|
1382
|
+
/** Node whose element the editing host stands in for, or null. */
|
|
1383
|
+
this.editingHostNodeId = null;
|
|
1384
|
+
/** Semantic version last folded into the editing host's decoration. */
|
|
1385
|
+
this.editingHostSemanticVersion = -1;
|
|
1217
1386
|
/**
|
|
1218
1387
|
* Single child div of the overlay container that carries the artboard→CSS
|
|
1219
1388
|
* transform. All semantic node elements are children of this div and express
|
|
@@ -1238,9 +1407,116 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1238
1407
|
this.canvas = options.canvas;
|
|
1239
1408
|
this.semanticsOptions = options.semanticsOptions;
|
|
1240
1409
|
this.allowFocusInterrupt = (_a = options.allowFocusInterrupt) !== null && _a !== void 0 ? _a : false;
|
|
1410
|
+
this.isEditingHostFocused = (_b = options.isEditingHostFocused) !== null && _b !== void 0 ? _b : (function () { return false; });
|
|
1241
1411
|
this.container = this.createContainer(options.canvas);
|
|
1242
1412
|
this.attachPositionObservers();
|
|
1413
|
+
warnIfWrapperUnpositioned(options.canvas);
|
|
1243
1414
|
}
|
|
1415
|
+
/**
|
|
1416
|
+
* Hide the stood-in node's element (no duplicate textbox for AT); re-derive the previous
|
|
1417
|
+
* one's aria-hidden.
|
|
1418
|
+
*/
|
|
1419
|
+
AccessibilityOverlay.prototype.setEditingHostNode = function (nodeId) {
|
|
1420
|
+
if (this.editingHostNodeId === nodeId)
|
|
1421
|
+
return;
|
|
1422
|
+
var previous = this.editingHostNodeId;
|
|
1423
|
+
this.editingHostNodeId = nodeId;
|
|
1424
|
+
if (previous !== null) {
|
|
1425
|
+
var previousEl = this.elements.get(previous);
|
|
1426
|
+
// Re-derive rather than un-hide: the node may have become Hidden mid-session.
|
|
1427
|
+
if (previousEl) {
|
|
1428
|
+
var previousNode = this.appliedNodes.get(previousEl);
|
|
1429
|
+
if (previousNode && this.isAriaHidden(previousNode)) {
|
|
1430
|
+
setAttr(previousEl, "aria-hidden", "true");
|
|
1431
|
+
}
|
|
1432
|
+
else {
|
|
1433
|
+
removeAttr(previousEl, "aria-hidden");
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
if (nodeId !== null) {
|
|
1438
|
+
var el = this.elements.get(nodeId);
|
|
1439
|
+
if (el)
|
|
1440
|
+
setAttr(el, "aria-hidden", "true");
|
|
1441
|
+
}
|
|
1442
|
+
};
|
|
1443
|
+
/**
|
|
1444
|
+
* Describe the focused text field on the host and hide its element; no-op unless
|
|
1445
|
+
* semantics changed.
|
|
1446
|
+
* @param force - apply even if semantics are unchanged (session start).
|
|
1447
|
+
*/
|
|
1448
|
+
AccessibilityOverlay.prototype.syncEditingHost = function (tree, host, force) {
|
|
1449
|
+
var _a;
|
|
1450
|
+
if (!force && tree.semanticVersion === this.editingHostSemanticVersion)
|
|
1451
|
+
return;
|
|
1452
|
+
this.editingHostSemanticVersion = tree.semanticVersion;
|
|
1453
|
+
var node = tree.focusedNode();
|
|
1454
|
+
if (node === undefined || node.role !== _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.textField) {
|
|
1455
|
+
// Nothing to describe; drop the stale description rather than misname the host.
|
|
1456
|
+
if (this.editingHostNodeId !== null) {
|
|
1457
|
+
host.resetDecoration();
|
|
1458
|
+
this.setEditingHostNode(null);
|
|
1459
|
+
}
|
|
1460
|
+
return;
|
|
1461
|
+
}
|
|
1462
|
+
// Every key is passed on every call, nulls included, so nothing survives from
|
|
1463
|
+
// the previously described field.
|
|
1464
|
+
host.setSecure((0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(node.stateFlags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Obscured));
|
|
1465
|
+
host.decorate({
|
|
1466
|
+
"aria-label": node.label || null,
|
|
1467
|
+
"aria-readonly": (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(node.stateFlags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.ReadOnly) ? "true" : null,
|
|
1468
|
+
"aria-multiline": (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(node.stateFlags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Multiline) ? "true" : null,
|
|
1469
|
+
// Trait-gated to match applyAttributes.
|
|
1470
|
+
"aria-required": (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasTrait)(node.traitFlags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticTrait.Requirable) &&
|
|
1471
|
+
(0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(node.stateFlags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Required)
|
|
1472
|
+
? "true"
|
|
1473
|
+
: null,
|
|
1474
|
+
// The hint span applyAttributes maintains (update() runs earlier in the frame).
|
|
1475
|
+
"aria-describedby": (node.hint && ((_a = this.descElements.get(node.id)) === null || _a === void 0 ? void 0 : _a.id)) || null,
|
|
1476
|
+
});
|
|
1477
|
+
this.setEditingHostNode(node.id);
|
|
1478
|
+
};
|
|
1479
|
+
/** True while the editing host stands in for a node's element. */
|
|
1480
|
+
AccessibilityOverlay.prototype.hasEditingHost = function () {
|
|
1481
|
+
return this.editingHostNodeId !== null;
|
|
1482
|
+
};
|
|
1483
|
+
/**
|
|
1484
|
+
* Undo the stand-in; if the host still has DOM focus, move it to the focused node's
|
|
1485
|
+
* element so AT announces it.
|
|
1486
|
+
*/
|
|
1487
|
+
AccessibilityOverlay.prototype.releaseEditingHost = function (tree, host) {
|
|
1488
|
+
var _a;
|
|
1489
|
+
host === null || host === void 0 ? void 0 : host.resetDecoration();
|
|
1490
|
+
this.setEditingHostNode(null);
|
|
1491
|
+
this.editingHostSemanticVersion = -1;
|
|
1492
|
+
if (!(host === null || host === void 0 ? void 0 : host.hasDomFocus()))
|
|
1493
|
+
return;
|
|
1494
|
+
var focusedNodeId = (_a = tree === null || tree === void 0 ? void 0 : tree.focusedNode()) === null || _a === void 0 ? void 0 : _a.id;
|
|
1495
|
+
if (focusedNodeId !== undefined)
|
|
1496
|
+
this.focusNodeElement(focusedNodeId);
|
|
1497
|
+
};
|
|
1498
|
+
/** Move DOM focus onto a node's element. No-op for a node with no element. */
|
|
1499
|
+
AccessibilityOverlay.prototype.focusNodeElement = function (nodeId) {
|
|
1500
|
+
var el = this.elements.get(nodeId);
|
|
1501
|
+
if (!el)
|
|
1502
|
+
return;
|
|
1503
|
+
this.focusElementInPlace(el);
|
|
1504
|
+
};
|
|
1505
|
+
// The overlay is positioned outside the canvas's scroll chain, so a plain focus()
|
|
1506
|
+
// would scroll the root instead; scroll the canvas into view through its real ancestors.
|
|
1507
|
+
AccessibilityOverlay.prototype.focusElementInPlace = function (el) {
|
|
1508
|
+
var _a, _b;
|
|
1509
|
+
this.syncContainerBeforeFocus();
|
|
1510
|
+
el.focus({ preventScroll: true });
|
|
1511
|
+
(_b = (_a = this.canvas).scrollIntoView) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
1512
|
+
block: "nearest",
|
|
1513
|
+
inline: "nearest",
|
|
1514
|
+
behavior: "instant",
|
|
1515
|
+
});
|
|
1516
|
+
// The scroll moved the canvas; re-align now rather than after the observer throttle.
|
|
1517
|
+
this.syncContainerGeometry();
|
|
1518
|
+
this.observePosition();
|
|
1519
|
+
};
|
|
1244
1520
|
AccessibilityOverlay.prototype.getSemanticOverlayContainer = function () {
|
|
1245
1521
|
return this.container;
|
|
1246
1522
|
};
|
|
@@ -1318,15 +1594,16 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1318
1594
|
_this.observePosition();
|
|
1319
1595
|
}, 500); // Throttle to avoid rapid style recalculations
|
|
1320
1596
|
};
|
|
1597
|
+
/** Returns true when the container's size changed (node transforms need recomputing). */
|
|
1321
1598
|
AccessibilityOverlay.prototype.syncContainerGeometry = function () {
|
|
1322
1599
|
var rect = this.canvas.getBoundingClientRect();
|
|
1323
|
-
var
|
|
1324
|
-
var
|
|
1325
|
-
|
|
1326
|
-
|
|
1600
|
+
var _a = (0,_utils_canvasOffset__WEBPACK_IMPORTED_MODULE_1__.canvasOffset)(this.canvas), top = _a.top, left = _a.left;
|
|
1601
|
+
var sizeChanged = rect.width !== this.lastCanvasPositioning.width ||
|
|
1602
|
+
rect.height !== this.lastCanvasPositioning.height;
|
|
1603
|
+
if (!sizeChanged &&
|
|
1327
1604
|
top === this.lastCanvasPositioning.offsetTop &&
|
|
1328
1605
|
left === this.lastCanvasPositioning.offsetLeft)
|
|
1329
|
-
return;
|
|
1606
|
+
return false;
|
|
1330
1607
|
this.container.style.top = top + "px";
|
|
1331
1608
|
this.container.style.left = left + "px";
|
|
1332
1609
|
this.container.style.width = rect.width + "px";
|
|
@@ -1336,6 +1613,16 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1336
1613
|
this.lastCanvasPositioning.height = rect.height;
|
|
1337
1614
|
this.lastCanvasPositioning.offsetTop = top;
|
|
1338
1615
|
this.lastCanvasPositioning.offsetLeft = left;
|
|
1616
|
+
return sizeChanged;
|
|
1617
|
+
};
|
|
1618
|
+
/**
|
|
1619
|
+
* Re-align the container right before focusing one of its elements. The position
|
|
1620
|
+
* observer re-syncs after scrolling on a throttle; focusing an element while the
|
|
1621
|
+
* container is stale would make the browser scroll the page to where it sits.
|
|
1622
|
+
*/
|
|
1623
|
+
AccessibilityOverlay.prototype.syncContainerBeforeFocus = function () {
|
|
1624
|
+
if (this.syncContainerGeometry())
|
|
1625
|
+
this._geometryDirty = true;
|
|
1339
1626
|
};
|
|
1340
1627
|
AccessibilityOverlay.prototype.createContainer = function (canvas) {
|
|
1341
1628
|
var _a, _b;
|
|
@@ -1345,10 +1632,13 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1345
1632
|
container.setAttribute("aria-label", (_b = (_a = this.semanticsOptions) === null || _a === void 0 ? void 0 : _a.riveCanvasLabel) !== null && _b !== void 0 ? _b : "Rive animation");
|
|
1346
1633
|
// Size to the canvas's CSS layout box, not the parent container.
|
|
1347
1634
|
var rect = canvas.getBoundingClientRect();
|
|
1635
|
+
var _c = (0,_utils_canvasOffset__WEBPACK_IMPORTED_MODULE_1__.canvasOffset)(this.canvas), top = _c.top, left = _c.left;
|
|
1348
1636
|
container.style.cssText = [
|
|
1349
1637
|
"position:absolute",
|
|
1350
|
-
"top:".concat(
|
|
1351
|
-
"left:".concat(
|
|
1638
|
+
"top:".concat(top, "px"),
|
|
1639
|
+
"left:".concat(left, "px"),
|
|
1640
|
+
"line-height:normal",
|
|
1641
|
+
"font-size:16px",
|
|
1352
1642
|
"width:".concat(rect.width, "px"),
|
|
1353
1643
|
"height:".concat(rect.height, "px"),
|
|
1354
1644
|
"overflow:hidden",
|
|
@@ -1525,8 +1815,8 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1525
1815
|
// The cheap trait/state flag checks gate the (per-node) DOM queries below,
|
|
1526
1816
|
// so the activeElement/closest/contains walks only run for a node that is
|
|
1527
1817
|
// actually focusable + focused — not for every node on every frame.
|
|
1528
|
-
if ((0,
|
|
1529
|
-
(0,
|
|
1818
|
+
if ((0,_types__WEBPACK_IMPORTED_MODULE_2__.hasTrait)(nodeData.traitFlags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticTrait.Focusable) &&
|
|
1819
|
+
(0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(nodeData.stateFlags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Focused)) {
|
|
1530
1820
|
var active = document.activeElement;
|
|
1531
1821
|
// While focus is inside one of our modal dialogs, don't pull it back
|
|
1532
1822
|
// out to a background node.
|
|
@@ -1534,8 +1824,16 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1534
1824
|
var trappedByModal = !!focusedModal &&
|
|
1535
1825
|
this.container.contains(focusedModal) &&
|
|
1536
1826
|
!focusedModal.contains(el);
|
|
1537
|
-
|
|
1538
|
-
|
|
1827
|
+
// Not while the proxy has focus (would steal the caret, drop the keyboard) nor onto
|
|
1828
|
+
// its aria-hidden stand-in.
|
|
1829
|
+
if (nodeId !== this.editingHostNodeId &&
|
|
1830
|
+
active !== el &&
|
|
1831
|
+
!trappedByModal &&
|
|
1832
|
+
!this.isEditingHostFocused() &&
|
|
1833
|
+
this.canMoveFocus()) {
|
|
1834
|
+
// No scrollIntoView: this runs on semantic diffs and must not drag the page.
|
|
1835
|
+
this.syncContainerBeforeFocus();
|
|
1836
|
+
el.focus({ preventScroll: true });
|
|
1539
1837
|
}
|
|
1540
1838
|
}
|
|
1541
1839
|
// Recurse into children with this node's absolute artboard position.
|
|
@@ -1674,7 +1972,7 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1674
1972
|
var el = document.createElement(tag);
|
|
1675
1973
|
el.id = "".concat(this.nodeIdPrefix).concat(node.id);
|
|
1676
1974
|
el.style.cssText = BASE_NODE_STYLE;
|
|
1677
|
-
if (node.role ===
|
|
1975
|
+
if (node.role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.text) {
|
|
1678
1976
|
// The positioned outer div is the AX element
|
|
1679
1977
|
// VoiceOver uses for its highlight box; an inner <span> carries the text
|
|
1680
1978
|
// without position:absolute (which would strip the span from VoiceOver's
|
|
@@ -1706,7 +2004,7 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1706
2004
|
target = "last";
|
|
1707
2005
|
if (!target)
|
|
1708
2006
|
return;
|
|
1709
|
-
|
|
2007
|
+
(0,_claimedKeyEvents__WEBPACK_IMPORTED_MODULE_0__.claimKeyEvent)(e);
|
|
1710
2008
|
var members = opts.members();
|
|
1711
2009
|
var idx = members.indexOf(el);
|
|
1712
2010
|
if (idx < 0)
|
|
@@ -1717,10 +2015,10 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1717
2015
|
: target === "first" ? members[0]
|
|
1718
2016
|
: members[n - 1];
|
|
1719
2017
|
if (next && next !== el) {
|
|
1720
|
-
|
|
2018
|
+
_this.focusElementInPlace(next);
|
|
1721
2019
|
var nextId = _this.nodeIdFromElement(next);
|
|
1722
2020
|
if (nextId !== null)
|
|
1723
|
-
_this.fireAction(nextId,
|
|
2021
|
+
_this.fireAction(nextId, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticActionType.tap);
|
|
1724
2022
|
}
|
|
1725
2023
|
});
|
|
1726
2024
|
};
|
|
@@ -1730,31 +2028,31 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1730
2028
|
var nodeId = node.id;
|
|
1731
2029
|
if (isClickableRole(role)) {
|
|
1732
2030
|
el.addEventListener("click", function () {
|
|
1733
|
-
_this.fireAction(nodeId,
|
|
2031
|
+
_this.fireAction(nodeId, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticActionType.tap);
|
|
1734
2032
|
});
|
|
1735
2033
|
// Links activate on Enter only (Space scrolls the page per browser
|
|
1736
2034
|
// convention). All other clickable roles accept both Enter and Space.
|
|
1737
|
-
var activationKeys_1 = role ===
|
|
2035
|
+
var activationKeys_1 = role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.link ? ["Enter"] : ["Enter", " "];
|
|
1738
2036
|
el.addEventListener("keydown", function (e) {
|
|
1739
2037
|
if (activationKeys_1.includes(e.key)) {
|
|
1740
|
-
|
|
1741
|
-
_this.fireAction(nodeId,
|
|
2038
|
+
(0,_claimedKeyEvents__WEBPACK_IMPORTED_MODULE_0__.claimKeyEvent)(e);
|
|
2039
|
+
_this.fireAction(nodeId, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticActionType.tap);
|
|
1742
2040
|
}
|
|
1743
2041
|
});
|
|
1744
2042
|
}
|
|
1745
|
-
if (role ===
|
|
2043
|
+
if (role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.slider) {
|
|
1746
2044
|
el.addEventListener("keydown", function (e) {
|
|
1747
2045
|
if (e.key === "ArrowRight" || e.key === "ArrowUp") {
|
|
1748
|
-
|
|
1749
|
-
_this.fireAction(nodeId,
|
|
2046
|
+
(0,_claimedKeyEvents__WEBPACK_IMPORTED_MODULE_0__.claimKeyEvent)(e);
|
|
2047
|
+
_this.fireAction(nodeId, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticActionType.increase);
|
|
1750
2048
|
}
|
|
1751
2049
|
else if (e.key === "ArrowLeft" || e.key === "ArrowDown") {
|
|
1752
|
-
|
|
1753
|
-
_this.fireAction(nodeId,
|
|
2050
|
+
(0,_claimedKeyEvents__WEBPACK_IMPORTED_MODULE_0__.claimKeyEvent)(e);
|
|
2051
|
+
_this.fireAction(nodeId, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticActionType.decrease);
|
|
1754
2052
|
}
|
|
1755
2053
|
});
|
|
1756
2054
|
}
|
|
1757
|
-
if (role ===
|
|
2055
|
+
if (role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.tab) {
|
|
1758
2056
|
this.attachRovingNav(el, {
|
|
1759
2057
|
includeHomeEnd: true,
|
|
1760
2058
|
members: function () {
|
|
@@ -1767,7 +2065,7 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1767
2065
|
},
|
|
1768
2066
|
});
|
|
1769
2067
|
}
|
|
1770
|
-
if (role ===
|
|
2068
|
+
if (role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.radioButton) {
|
|
1771
2069
|
this.attachRovingNav(el, {
|
|
1772
2070
|
includeHomeEnd: false,
|
|
1773
2071
|
members: function () {
|
|
@@ -1782,15 +2080,31 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1782
2080
|
// Focus handler for nodes with the Focusable trait. When AT focuses an
|
|
1783
2081
|
// element, notify the C++ runtime so it can update internal focus state
|
|
1784
2082
|
// (visual focus rings, etc.). Gated on Focusable trait
|
|
1785
|
-
if ((0,
|
|
2083
|
+
if ((0,_types__WEBPACK_IMPORTED_MODULE_2__.hasTrait)(node.traitFlags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticTrait.Focusable)) {
|
|
1786
2084
|
el.addEventListener("focus", function () {
|
|
1787
2085
|
_this.requestFocus(nodeId);
|
|
1788
2086
|
});
|
|
1789
2087
|
}
|
|
1790
2088
|
};
|
|
1791
2089
|
// ---- Attribute application ----
|
|
2090
|
+
AccessibilityOverlay.prototype.isAriaHidden = function (node) {
|
|
2091
|
+
var role = node.role;
|
|
2092
|
+
var flags = node.stateFlags;
|
|
2093
|
+
// Hide from AT when explicitly hidden, or when an image has no accessible
|
|
2094
|
+
// name — a nameless role="img" is a WCAG 1.1.1 violation; treat it as
|
|
2095
|
+
// decorative instead.
|
|
2096
|
+
var isDecorativeImage = role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.image && !node.label;
|
|
2097
|
+
// The <input> proxy is the accessible element for the node it stands in for.
|
|
2098
|
+
var isEditingHostStandIn = node.id === this.editingHostNodeId;
|
|
2099
|
+
return ((0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Hidden) ||
|
|
2100
|
+
// Obscured text fields stay reachable (value withheld, like a native password input).
|
|
2101
|
+
((0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Obscured) && role !== _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.textField) ||
|
|
2102
|
+
isDecorativeImage ||
|
|
2103
|
+
isEditingHostStandIn);
|
|
2104
|
+
};
|
|
1792
2105
|
AccessibilityOverlay.prototype.applyAttributes = function (el, node) {
|
|
1793
2106
|
var _a, _b, _c;
|
|
2107
|
+
this.appliedNodes.set(el, node);
|
|
1794
2108
|
var role = node.role;
|
|
1795
2109
|
var flags = node.stateFlags;
|
|
1796
2110
|
var traits = node.traitFlags;
|
|
@@ -1804,7 +2118,7 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1804
2118
|
}
|
|
1805
2119
|
// Links: a bare <a> with no href has no link semantics, so set the role
|
|
1806
2120
|
// explicitly (ariaRoleForSemantic returns null for link → native <a>).
|
|
1807
|
-
if (role ===
|
|
2121
|
+
if (role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.link) {
|
|
1808
2122
|
setAttr(el, "role", "link");
|
|
1809
2123
|
}
|
|
1810
2124
|
// Tabindex — keep the screen-reader overlay out of the browser's sequential
|
|
@@ -1812,8 +2126,8 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1812
2126
|
// so AT/runtime focus sync can still target them when needed. List items are
|
|
1813
2127
|
// included because Mobile Safari won't iterate them otherwise.
|
|
1814
2128
|
if (isInteractiveRole(role) ||
|
|
1815
|
-
(0,
|
|
1816
|
-
role ===
|
|
2129
|
+
(0,_types__WEBPACK_IMPORTED_MODULE_2__.hasTrait)(traits, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticTrait.Focusable) ||
|
|
2130
|
+
role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.listItem) {
|
|
1817
2131
|
setAttr(el, "tabindex", "-1");
|
|
1818
2132
|
}
|
|
1819
2133
|
else {
|
|
@@ -1826,7 +2140,7 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1826
2140
|
else {
|
|
1827
2141
|
removeAttr(el, "aria-label");
|
|
1828
2142
|
}
|
|
1829
|
-
if (role ===
|
|
2143
|
+
if (role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.slider) {
|
|
1830
2144
|
if (node.value) {
|
|
1831
2145
|
// aria-valuenow must be numeric; keep the display string (e.g. "75%")
|
|
1832
2146
|
// in aria-valuetext only.
|
|
@@ -1846,7 +2160,7 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1846
2160
|
// TODO: aria-valuemin / aria-valuemax are required by ARIA.
|
|
1847
2161
|
// Defaulting to horizontal; vertical sliders need orientation data from C++.
|
|
1848
2162
|
setAttr(el, "aria-orientation", "horizontal");
|
|
1849
|
-
setBoolAttr(el, "aria-readonly", (0,
|
|
2163
|
+
setBoolAttr(el, "aria-readonly", (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.ReadOnly));
|
|
1850
2164
|
}
|
|
1851
2165
|
else {
|
|
1852
2166
|
removeAttr(el, "aria-valuenow");
|
|
@@ -1880,7 +2194,7 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1880
2194
|
// Text nodes: use textContent rather than aria-label so screen readers
|
|
1881
2195
|
// announce the text in virtual/browse mode (aria-label on a bare <span>
|
|
1882
2196
|
// with no widget role is ignored by some AT in document browse mode).
|
|
1883
|
-
if (role ===
|
|
2197
|
+
if (role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.text) {
|
|
1884
2198
|
var textSpan = (_a = el.querySelector(":scope > span")) !== null && _a !== void 0 ? _a : el;
|
|
1885
2199
|
var text = (_b = node.label) !== null && _b !== void 0 ? _b : "";
|
|
1886
2200
|
if (textSpan.textContent !== text)
|
|
@@ -1900,77 +2214,73 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1900
2214
|
// Only set the ARIA property when the trait is present. When the trait
|
|
1901
2215
|
// is absent, remove the attribute so AT sees "not applicable" rather
|
|
1902
2216
|
// than "false".
|
|
1903
|
-
if ((0,
|
|
1904
|
-
setBoolAttr(el, "aria-expanded", (0,
|
|
2217
|
+
if ((0,_types__WEBPACK_IMPORTED_MODULE_2__.hasTrait)(traits, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticTrait.Expandable) && ARIA_EXPANDED_ROLES.has(role)) {
|
|
2218
|
+
setBoolAttr(el, "aria-expanded", (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Expanded));
|
|
1905
2219
|
}
|
|
1906
2220
|
else {
|
|
1907
2221
|
removeAttr(el, "aria-expanded");
|
|
1908
2222
|
}
|
|
1909
2223
|
// aria-selected is required on ALL tabs per ARIA spec regardless of trait;
|
|
1910
2224
|
// for other roles it is trait-gated and guarded to ARIA_SELECTED_ROLES.
|
|
1911
|
-
if (role ===
|
|
1912
|
-
setBoolAttr(el, "aria-selected", (0,
|
|
2225
|
+
if (role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.tab) {
|
|
2226
|
+
setBoolAttr(el, "aria-selected", (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Selected));
|
|
1913
2227
|
}
|
|
1914
|
-
else if ((0,
|
|
1915
|
-
setBoolAttr(el, "aria-selected", (0,
|
|
2228
|
+
else if ((0,_types__WEBPACK_IMPORTED_MODULE_2__.hasTrait)(traits, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticTrait.Selectable) && ARIA_SELECTED_ROLES.has(role)) {
|
|
2229
|
+
setBoolAttr(el, "aria-selected", (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Selected));
|
|
1916
2230
|
}
|
|
1917
2231
|
else {
|
|
1918
2232
|
removeAttr(el, "aria-selected");
|
|
1919
2233
|
}
|
|
1920
|
-
if ((0,
|
|
2234
|
+
if ((0,_types__WEBPACK_IMPORTED_MODULE_2__.hasTrait)(traits, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticTrait.Checkable) && ARIA_CHECKED_ROLES.has(role)) {
|
|
1921
2235
|
// Check state is a tri-state field, but not every checkable role
|
|
1922
2236
|
// accepts all three values — see ARIA_MIXED_ROLES.
|
|
1923
|
-
var checkState = (0,
|
|
1924
|
-
if (checkState ===
|
|
2237
|
+
var checkState = (0,_types__WEBPACK_IMPORTED_MODULE_2__.checkStateOf)(flags);
|
|
2238
|
+
if (checkState === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticCheckState.Mixed &&
|
|
1925
2239
|
ARIA_MIXED_ROLES.has(role)) {
|
|
1926
2240
|
setAttr(el, "aria-checked", "mixed");
|
|
1927
2241
|
}
|
|
1928
2242
|
else {
|
|
1929
|
-
setBoolAttr(el, "aria-checked", checkState ===
|
|
2243
|
+
setBoolAttr(el, "aria-checked", checkState === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticCheckState.Checked);
|
|
1930
2244
|
}
|
|
1931
2245
|
}
|
|
1932
2246
|
else {
|
|
1933
2247
|
removeAttr(el, "aria-checked");
|
|
1934
2248
|
}
|
|
1935
|
-
if ((0,
|
|
2249
|
+
if ((0,_types__WEBPACK_IMPORTED_MODULE_2__.hasTrait)(traits, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticTrait.Toggleable)) {
|
|
1936
2250
|
if (ARIA_PRESSED_ROLES.has(role)) {
|
|
1937
|
-
setBoolAttr(el, "aria-pressed", (0,
|
|
2251
|
+
setBoolAttr(el, "aria-pressed", (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Toggled));
|
|
1938
2252
|
}
|
|
1939
2253
|
else {
|
|
1940
2254
|
removeAttr(el, "aria-pressed");
|
|
1941
2255
|
}
|
|
1942
2256
|
// switch uses aria-checked (not aria-pressed) for its on/off state.
|
|
1943
|
-
if (role ===
|
|
1944
|
-
setBoolAttr(el, "aria-checked", (0,
|
|
2257
|
+
if (role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.switchControl) {
|
|
2258
|
+
setBoolAttr(el, "aria-checked", (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Toggled));
|
|
1945
2259
|
}
|
|
1946
2260
|
}
|
|
1947
2261
|
else {
|
|
1948
2262
|
removeAttr(el, "aria-pressed");
|
|
1949
2263
|
}
|
|
1950
|
-
if ((0,
|
|
1951
|
-
setBoolAttr(el, "aria-required", (0,
|
|
2264
|
+
if ((0,_types__WEBPACK_IMPORTED_MODULE_2__.hasTrait)(traits, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticTrait.Requirable) && ARIA_REQUIRED_ROLES.has(role)) {
|
|
2265
|
+
setBoolAttr(el, "aria-required", (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Required));
|
|
1952
2266
|
}
|
|
1953
2267
|
else {
|
|
1954
2268
|
removeAttr(el, "aria-required");
|
|
1955
2269
|
}
|
|
1956
|
-
if ((0,
|
|
1957
|
-
setBoolAttr(el, "aria-disabled", (0,
|
|
2270
|
+
if ((0,_types__WEBPACK_IMPORTED_MODULE_2__.hasTrait)(traits, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticTrait.Enablable)) {
|
|
2271
|
+
setBoolAttr(el, "aria-disabled", (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Disabled));
|
|
1958
2272
|
}
|
|
1959
2273
|
else {
|
|
1960
2274
|
removeAttr(el, "aria-disabled");
|
|
1961
2275
|
}
|
|
1962
2276
|
// ---- Non-trait states ----
|
|
1963
|
-
|
|
1964
|
-
// name — a nameless role="img" is a WCAG 1.1.1 violation; treat it as
|
|
1965
|
-
// decorative instead.
|
|
1966
|
-
var isDecorativeImage = role === _types__WEBPACK_IMPORTED_MODULE_0__.SemanticRole.image && !node.label;
|
|
1967
|
-
if ((0,_types__WEBPACK_IMPORTED_MODULE_0__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_0__.SemanticState.Hidden) || (0,_types__WEBPACK_IMPORTED_MODULE_0__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_0__.SemanticState.Obscured) || isDecorativeImage) {
|
|
2277
|
+
if (this.isAriaHidden(node)) {
|
|
1968
2278
|
setAttr(el, "aria-hidden", "true");
|
|
1969
2279
|
}
|
|
1970
2280
|
else {
|
|
1971
2281
|
removeAttr(el, "aria-hidden");
|
|
1972
2282
|
}
|
|
1973
|
-
if ((0,
|
|
2283
|
+
if ((0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.LiveRegion)) {
|
|
1974
2284
|
setAttr(el, "aria-live", "polite");
|
|
1975
2285
|
}
|
|
1976
2286
|
else {
|
|
@@ -1978,17 +2288,26 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
1978
2288
|
}
|
|
1979
2289
|
// textField-specific
|
|
1980
2290
|
// TODO: Details here may change once we implement text inputs
|
|
1981
|
-
if (role ===
|
|
1982
|
-
setBoolAttr(el, "aria-readonly", (0,
|
|
1983
|
-
setBoolAttr(el, "aria-multiline", (0,
|
|
2291
|
+
if (role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.textField) {
|
|
2292
|
+
setBoolAttr(el, "aria-readonly", (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.ReadOnly));
|
|
2293
|
+
setBoolAttr(el, "aria-multiline", (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Multiline));
|
|
1984
2294
|
// Surface the current field value as DOM text so screen readers can
|
|
1985
2295
|
// announce it. Only safe when the node has no semantic children —
|
|
1986
2296
|
// setting textContent would remove any child elements from the DOM.
|
|
1987
2297
|
if (node.children.length === 0) {
|
|
1988
|
-
var value = (_c = node.value) !== null && _c !== void 0 ? _c : "";
|
|
2298
|
+
var value = (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Obscured) ? "" : ((_c = node.value) !== null && _c !== void 0 ? _c : "");
|
|
1989
2299
|
if (el.textContent !== value)
|
|
1990
2300
|
el.textContent = value;
|
|
1991
2301
|
}
|
|
2302
|
+
else {
|
|
2303
|
+
// A value rendered earlier (before the node had children) must not linger,
|
|
2304
|
+
// least of all once the field turns Obscured.
|
|
2305
|
+
for (var _i = 0, _d = Array.from(el.childNodes); _i < _d.length; _i++) {
|
|
2306
|
+
var child = _d[_i];
|
|
2307
|
+
if (child.nodeType === Node.TEXT_NODE)
|
|
2308
|
+
child.remove();
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
1992
2311
|
}
|
|
1993
2312
|
else {
|
|
1994
2313
|
removeAttr(el, "aria-multiline");
|
|
@@ -2052,7 +2371,7 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
2052
2371
|
// Clear any CSS transform from a previous render pass.
|
|
2053
2372
|
if (el.style.transform)
|
|
2054
2373
|
el.style.transform = "";
|
|
2055
|
-
if (node.role ===
|
|
2374
|
+
if (node.role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.text) {
|
|
2056
2375
|
this.pendingTextGeometry.push(el);
|
|
2057
2376
|
}
|
|
2058
2377
|
};
|
|
@@ -2111,7 +2430,8 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
2111
2430
|
* Creates (on first call) and updates the artboard-space transform container.
|
|
2112
2431
|
*
|
|
2113
2432
|
* The container is sized to the artboard dimensions and carries a CSS
|
|
2114
|
-
* `transform: matrix(...)`
|
|
2433
|
+
* `transform: matrix(...)` that maps artboard coordinates to the canvas's CSS box
|
|
2434
|
+
* (forwardMat in backing-store pixels, scaled by CSS size / backing-store size). All semantic
|
|
2115
2435
|
* node elements are children of this container and use raw artboard
|
|
2116
2436
|
* coordinates as their CSS `left/top/width/height`, so the CSS compositor
|
|
2117
2437
|
* applies the artboard→screen mapping in one pass.
|
|
@@ -2136,13 +2456,20 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
2136
2456
|
var h = artboardBounds.maxY - artboardBounds.minY;
|
|
2137
2457
|
this.transformContainer.style.width = Math.round(w) + "px";
|
|
2138
2458
|
this.transformContainer.style.height = Math.round(h) + "px";
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
var
|
|
2143
|
-
var
|
|
2144
|
-
var
|
|
2145
|
-
var
|
|
2459
|
+
// Backing-store pixels → CSS pixels. Measured rather than 1/dpr: a canvas can be
|
|
2460
|
+
// stretched by CSS, or have a stale backing store after a resize, and the drawn
|
|
2461
|
+
// content follows the CSS box either way. Equal to 1/dpr when they match.
|
|
2462
|
+
var cssWidth = this.lastCanvasPositioning.width;
|
|
2463
|
+
var cssHeight = this.lastCanvasPositioning.height;
|
|
2464
|
+
var fallback = 1 / (dpr || 1);
|
|
2465
|
+
var sx = this.canvas.width > 0 && cssWidth > 0 ? cssWidth / this.canvas.width : fallback;
|
|
2466
|
+
var sy = this.canvas.height > 0 && cssHeight > 0 ? cssHeight / this.canvas.height : fallback;
|
|
2467
|
+
var a = forwardMat.xx * sx;
|
|
2468
|
+
var b = forwardMat.xy * sy;
|
|
2469
|
+
var c = forwardMat.yx * sx;
|
|
2470
|
+
var d = forwardMat.yy * sy;
|
|
2471
|
+
var tx = forwardMat.tx * sx;
|
|
2472
|
+
var ty = forwardMat.ty * sy;
|
|
2146
2473
|
this.transformContainer.style.transform =
|
|
2147
2474
|
"matrix(".concat(a, ",").concat(b, ",").concat(c, ",").concat(d, ",").concat(tx, ",").concat(ty, ")");
|
|
2148
2475
|
};
|
|
@@ -2165,11 +2492,11 @@ var AccessibilityOverlay = /** @class */ (function () {
|
|
|
2165
2492
|
// ---------------------------------------------------------------------------
|
|
2166
2493
|
/** aria-expanded: button, link, checkbox, switch (inherits button), tab. */
|
|
2167
2494
|
var ARIA_EXPANDED_ROLES = new Set([
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2495
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.button,
|
|
2496
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.link,
|
|
2497
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.checkbox,
|
|
2498
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.switchControl,
|
|
2499
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.tab,
|
|
2173
2500
|
]);
|
|
2174
2501
|
/**
|
|
2175
2502
|
* aria-selected: tab is the only role in our current set that natively
|
|
@@ -2178,13 +2505,13 @@ var ARIA_EXPANDED_ROLES = new Set([
|
|
|
2178
2505
|
* the set still lists it so the constraint is visible in one place.
|
|
2179
2506
|
*/
|
|
2180
2507
|
var ARIA_SELECTED_ROLES = new Set([
|
|
2181
|
-
|
|
2508
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.tab,
|
|
2182
2509
|
]);
|
|
2183
2510
|
/** aria-checked: checkbox, radio, switch. */
|
|
2184
2511
|
var ARIA_CHECKED_ROLES = new Set([
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2512
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.checkbox,
|
|
2513
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.radioButton,
|
|
2514
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.switchControl,
|
|
2188
2515
|
]);
|
|
2189
2516
|
/**
|
|
2190
2517
|
* aria-checked="mixed": checkbox only. ARIA defines checkbox as three-valued
|
|
@@ -2193,7 +2520,7 @@ var ARIA_CHECKED_ROLES = new Set([
|
|
|
2193
2520
|
* emitting a value they do not support.
|
|
2194
2521
|
*/
|
|
2195
2522
|
var ARIA_MIXED_ROLES = new Set([
|
|
2196
|
-
|
|
2523
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.checkbox,
|
|
2197
2524
|
]);
|
|
2198
2525
|
/**
|
|
2199
2526
|
* aria-pressed: button only. switch is a button subclass in ARIA but uses
|
|
@@ -2201,13 +2528,13 @@ var ARIA_MIXED_ROLES = new Set([
|
|
|
2201
2528
|
* excluded here and handled separately in the Toggleable block.
|
|
2202
2529
|
*/
|
|
2203
2530
|
var ARIA_PRESSED_ROLES = new Set([
|
|
2204
|
-
|
|
2531
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.button,
|
|
2205
2532
|
]);
|
|
2206
2533
|
/** aria-required: checkbox, textbox, radiogroup. */
|
|
2207
2534
|
var ARIA_REQUIRED_ROLES = new Set([
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2535
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.checkbox,
|
|
2536
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.textField,
|
|
2537
|
+
_types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.radioGroup,
|
|
2211
2538
|
]);
|
|
2212
2539
|
// ---------------------------------------------------------------------------
|
|
2213
2540
|
/** Style for visually-hidden description spans used with aria-describedby. */
|
|
@@ -2256,12 +2583,12 @@ function setBoolAttr(el, attr, value) {
|
|
|
2256
2583
|
/** Roles that receive click/Enter/Space action handlers. */
|
|
2257
2584
|
function isClickableRole(role) {
|
|
2258
2585
|
switch (role) {
|
|
2259
|
-
case
|
|
2260
|
-
case
|
|
2261
|
-
case
|
|
2262
|
-
case
|
|
2263
|
-
case
|
|
2264
|
-
case
|
|
2586
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.button:
|
|
2587
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.link:
|
|
2588
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.checkbox:
|
|
2589
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.switchControl:
|
|
2590
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.tab:
|
|
2591
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.radioButton:
|
|
2265
2592
|
return true;
|
|
2266
2593
|
default:
|
|
2267
2594
|
return false;
|
|
@@ -2270,14 +2597,14 @@ function isClickableRole(role) {
|
|
|
2270
2597
|
/** Roles that receive tabindex="-1" for programmatic/AT focus (not Tab order). */
|
|
2271
2598
|
function isInteractiveRole(role) {
|
|
2272
2599
|
switch (role) {
|
|
2273
|
-
case
|
|
2274
|
-
case
|
|
2275
|
-
case
|
|
2276
|
-
case
|
|
2277
|
-
case
|
|
2278
|
-
case
|
|
2279
|
-
case
|
|
2280
|
-
case
|
|
2600
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.button:
|
|
2601
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.link:
|
|
2602
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.checkbox:
|
|
2603
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.switchControl:
|
|
2604
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.slider:
|
|
2605
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.tab:
|
|
2606
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.radioButton:
|
|
2607
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.textField:
|
|
2281
2608
|
return true;
|
|
2282
2609
|
default:
|
|
2283
2610
|
return false;
|
|
@@ -2288,13 +2615,13 @@ function isInteractiveRole(role) {
|
|
|
2288
2615
|
* dialog only when the Modal state flag is set.
|
|
2289
2616
|
*/
|
|
2290
2617
|
function isModalDialogRole(role, flags) {
|
|
2291
|
-
return (role ===
|
|
2292
|
-
(role ===
|
|
2618
|
+
return (role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.alertDialog ||
|
|
2619
|
+
(role === _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.dialog && (0,_types__WEBPACK_IMPORTED_MODULE_2__.hasState)(flags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticState.Modal)));
|
|
2293
2620
|
}
|
|
2294
2621
|
/** Whether a node can receive focus: an interactive role or the Focusable trait. */
|
|
2295
2622
|
function isFocusableNode(node) {
|
|
2296
2623
|
return (isInteractiveRole(node.role) ||
|
|
2297
|
-
(0,
|
|
2624
|
+
(0,_types__WEBPACK_IMPORTED_MODULE_2__.hasTrait)(node.traitFlags, _types__WEBPACK_IMPORTED_MODULE_2__.SemanticTrait.Focusable));
|
|
2298
2625
|
}
|
|
2299
2626
|
/**
|
|
2300
2627
|
* Choose an HTML tag for a given role. Prefer native semantic elements
|
|
@@ -2303,9 +2630,9 @@ function isFocusableNode(node) {
|
|
|
2303
2630
|
*/
|
|
2304
2631
|
function tagForRole(role) {
|
|
2305
2632
|
switch (role) {
|
|
2306
|
-
case
|
|
2633
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.link:
|
|
2307
2634
|
return "a";
|
|
2308
|
-
case
|
|
2635
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.text:
|
|
2309
2636
|
// The outer div is the positioned AX element VoiceOver measures for its
|
|
2310
2637
|
// highlight box. The text itself lives in a child <span> (see createElement).
|
|
2311
2638
|
return "div";
|
|
@@ -2321,43 +2648,43 @@ function tagForRole(role) {
|
|
|
2321
2648
|
*/
|
|
2322
2649
|
function ariaRoleForSemantic(role) {
|
|
2323
2650
|
switch (role) {
|
|
2324
|
-
case
|
|
2651
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.none:
|
|
2325
2652
|
// TODO: Role "none" removes the node from the accessibility tree. For now, setting to Group, but maybe we want to switch to "none"
|
|
2326
2653
|
// or "presentation".
|
|
2327
2654
|
return "group";
|
|
2328
|
-
case
|
|
2655
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.button:
|
|
2329
2656
|
return "button";
|
|
2330
|
-
case
|
|
2657
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.link:
|
|
2331
2658
|
return null; // native <a>
|
|
2332
|
-
case
|
|
2659
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.checkbox:
|
|
2333
2660
|
return "checkbox";
|
|
2334
|
-
case
|
|
2661
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.switchControl:
|
|
2335
2662
|
return "switch";
|
|
2336
|
-
case
|
|
2663
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.slider:
|
|
2337
2664
|
return "slider";
|
|
2338
|
-
case
|
|
2665
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.textField:
|
|
2339
2666
|
return "textbox";
|
|
2340
|
-
case
|
|
2667
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.image:
|
|
2341
2668
|
return "img";
|
|
2342
|
-
case
|
|
2669
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.group:
|
|
2343
2670
|
return "group";
|
|
2344
|
-
case
|
|
2671
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.list:
|
|
2345
2672
|
return "list";
|
|
2346
|
-
case
|
|
2673
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.listItem:
|
|
2347
2674
|
return "listitem";
|
|
2348
|
-
case
|
|
2675
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.tab:
|
|
2349
2676
|
return "tab";
|
|
2350
|
-
case
|
|
2677
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.tabList:
|
|
2351
2678
|
return "tablist";
|
|
2352
|
-
case
|
|
2679
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.dialog:
|
|
2353
2680
|
return "dialog";
|
|
2354
|
-
case
|
|
2681
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.alertDialog:
|
|
2355
2682
|
return "alertdialog";
|
|
2356
|
-
case
|
|
2683
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.radioGroup:
|
|
2357
2684
|
return "radiogroup";
|
|
2358
|
-
case
|
|
2685
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.radioButton:
|
|
2359
2686
|
return "radio";
|
|
2360
|
-
case
|
|
2687
|
+
case _types__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.text:
|
|
2361
2688
|
// Text nodes use <span>; heading role is applied separately
|
|
2362
2689
|
// when headingLevel > 0.
|
|
2363
2690
|
return null;
|
|
@@ -2371,6 +2698,56 @@ function ariaRoleForSemantic(role) {
|
|
|
2371
2698
|
/* 10 */
|
|
2372
2699
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2373
2700
|
|
|
2701
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2702
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2703
|
+
/* harmony export */ claimKeyEvent: () => (/* binding */ claimKeyEvent),
|
|
2704
|
+
/* harmony export */ isKeyEventClaimed: () => (/* binding */ isKeyEventClaimed)
|
|
2705
|
+
/* harmony export */ });
|
|
2706
|
+
var claimed = new WeakSet();
|
|
2707
|
+
/**
|
|
2708
|
+
* Marks a key event as handled by a semantic overlay widget (and prevents its
|
|
2709
|
+
* default), so the Rive keyboard handler leaves it alone. A plain
|
|
2710
|
+
* `defaultPrevented` check can't tell these apart from host-page handlers.
|
|
2711
|
+
*/
|
|
2712
|
+
function claimKeyEvent(event) {
|
|
2713
|
+
event.preventDefault();
|
|
2714
|
+
claimed.add(event);
|
|
2715
|
+
}
|
|
2716
|
+
function isKeyEventClaimed(event) {
|
|
2717
|
+
return claimed.has(event);
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
|
|
2721
|
+
/***/ }),
|
|
2722
|
+
/* 11 */
|
|
2723
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2724
|
+
|
|
2725
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2726
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2727
|
+
/* harmony export */ canvasOffset: () => (/* binding */ canvasOffset)
|
|
2728
|
+
/* harmony export */ });
|
|
2729
|
+
/**
|
|
2730
|
+
* Canvas offset within its offsetParent, minus the scroll of ancestors in between (they
|
|
2731
|
+
* move the canvas, not absolutely positioned siblings).
|
|
2732
|
+
*/
|
|
2733
|
+
function canvasOffset(canvas) {
|
|
2734
|
+
var top = canvas.offsetTop;
|
|
2735
|
+
var left = canvas.offsetLeft;
|
|
2736
|
+
var offsetParent = canvas.offsetParent;
|
|
2737
|
+
if (!offsetParent)
|
|
2738
|
+
return { top: top, left: left };
|
|
2739
|
+
for (var el = canvas.parentElement; el && el !== offsetParent; el = el.parentElement) {
|
|
2740
|
+
top -= el.scrollTop;
|
|
2741
|
+
left -= el.scrollLeft;
|
|
2742
|
+
}
|
|
2743
|
+
return { top: top, left: left };
|
|
2744
|
+
}
|
|
2745
|
+
|
|
2746
|
+
|
|
2747
|
+
/***/ }),
|
|
2748
|
+
/* 12 */
|
|
2749
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2750
|
+
|
|
2374
2751
|
__webpack_require__.r(__webpack_exports__);
|
|
2375
2752
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2376
2753
|
/* harmony export */ AudioAssetWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_3__.AudioAssetWrapper),
|
|
@@ -2391,11 +2768,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2391
2768
|
/* harmony export */ registerTouchInteractions: () => (/* reexport safe */ _registerTouchInteractions__WEBPACK_IMPORTED_MODULE_0__.registerTouchInteractions),
|
|
2392
2769
|
/* harmony export */ sanitizeUrl: () => (/* reexport safe */ _sanitizeUrl__WEBPACK_IMPORTED_MODULE_2__.sanitizeUrl)
|
|
2393
2770
|
/* harmony export */ });
|
|
2394
|
-
/* harmony import */ var _registerTouchInteractions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2395
|
-
/* harmony import */ var _registerKeyboardInteractions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
2396
|
-
/* harmony import */ var _sanitizeUrl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
2397
|
-
/* harmony import */ var _finalizationRegistry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
2398
|
-
/* harmony import */ var _riveFont__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
2771
|
+
/* harmony import */ var _registerTouchInteractions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
|
|
2772
|
+
/* harmony import */ var _registerKeyboardInteractions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
|
|
2773
|
+
/* harmony import */ var _sanitizeUrl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
|
|
2774
|
+
/* harmony import */ var _finalizationRegistry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
|
|
2775
|
+
/* harmony import */ var _riveFont__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(19);
|
|
2399
2776
|
|
|
2400
2777
|
|
|
2401
2778
|
|
|
@@ -2404,7 +2781,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2404
2781
|
|
|
2405
2782
|
|
|
2406
2783
|
/***/ }),
|
|
2407
|
-
/*
|
|
2784
|
+
/* 13 */
|
|
2408
2785
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2409
2786
|
|
|
2410
2787
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -2412,6 +2789,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2412
2789
|
/* harmony export */ registerTouchInteractions: () => (/* binding */ registerTouchInteractions)
|
|
2413
2790
|
/* harmony export */ });
|
|
2414
2791
|
var _this = undefined;
|
|
2792
|
+
// A detented wheel reports lines; the runtime wants pixels.
|
|
2793
|
+
var PIXELS_PER_LINE = 16;
|
|
2794
|
+
// ScrollPhase.update. The DOM reports no gesture phase, so every wheel event
|
|
2795
|
+
// is an update and the runtime closes the gesture once it goes quiet.
|
|
2796
|
+
var SCROLL_PHASE_UPDATE = 1;
|
|
2415
2797
|
/**
|
|
2416
2798
|
* Extracts ClientCoordinates from a TouchList, respecting multi-touch vs.
|
|
2417
2799
|
* single-touch mode. In single-touch mode, only the touch matching
|
|
@@ -2479,11 +2861,12 @@ var getClientCoordinates = function (event, isTouchScrollEnabled, enableMultiTou
|
|
|
2479
2861
|
];
|
|
2480
2862
|
};
|
|
2481
2863
|
/**
|
|
2482
|
-
* Registers mouse move/up/down callback handlers on the canvas to send meaningful
|
|
2483
|
-
* the state machine pointer move/up/down functions based on cursor
|
|
2864
|
+
* Registers mouse move/up/down and wheel callback handlers on the canvas to send meaningful
|
|
2865
|
+
* coordinates to the state machine pointer move/up/down/scroll functions based on cursor
|
|
2866
|
+
* interaction
|
|
2484
2867
|
*/
|
|
2485
2868
|
var registerTouchInteractions = function (_a) {
|
|
2486
|
-
var canvas = _a.canvas, artboard = _a.artboard, _b = _a.stateMachines, stateMachines = _b === void 0 ? [] : _b, renderer = _a.renderer, rive = _a.rive, fit = _a.fit, alignment = _a.alignment, _c = _a.isTouchScrollEnabled, isTouchScrollEnabled = _c === void 0 ? false : _c, _d = _a.dispatchPointerExit, dispatchPointerExit = _d === void 0 ? true : _d, _e = _a.enableMultiTouch, enableMultiTouch = _e === void 0 ? false : _e, _f = _a.layoutScaleFactor, layoutScaleFactor = _f === void 0 ? 1.0 : _f, advanceAndDrain = _a.advanceAndDrain;
|
|
2869
|
+
var canvas = _a.canvas, artboard = _a.artboard, _b = _a.stateMachines, stateMachines = _b === void 0 ? [] : _b, renderer = _a.renderer, rive = _a.rive, fit = _a.fit, alignment = _a.alignment, _c = _a.isTouchScrollEnabled, isTouchScrollEnabled = _c === void 0 ? false : _c, _d = _a.dispatchPointerExit, dispatchPointerExit = _d === void 0 ? true : _d, _e = _a.enableMultiTouch, enableMultiTouch = _e === void 0 ? false : _e, _f = _a.layoutScaleFactor, layoutScaleFactor = _f === void 0 ? 1.0 : _f, advanceAndDrain = _a.advanceAndDrain, summonKeyboard = _a.summonKeyboard, isTextProxyFocused = _a.isTextProxyFocused;
|
|
2487
2870
|
if (!canvas ||
|
|
2488
2871
|
!stateMachines.length ||
|
|
2489
2872
|
!renderer ||
|
|
@@ -2492,6 +2875,13 @@ var registerTouchInteractions = function (_a) {
|
|
|
2492
2875
|
typeof window === "undefined") {
|
|
2493
2876
|
return null;
|
|
2494
2877
|
}
|
|
2878
|
+
// A gesture latched before the previous listeners came down (a pause, say)
|
|
2879
|
+
// never reached its idle timeout, and would take the next wheel wherever
|
|
2880
|
+
// it lands. These instances are live here; at teardown they may not be.
|
|
2881
|
+
for (var _i = 0, stateMachines_1 = stateMachines; _i < stateMachines_1.length; _i++) {
|
|
2882
|
+
var stateMachine = stateMachines_1[_i];
|
|
2883
|
+
stateMachine.cancelScroll();
|
|
2884
|
+
}
|
|
2495
2885
|
/**
|
|
2496
2886
|
* After a touchend event, some browsers may fire synthetic mouse events
|
|
2497
2887
|
* (mouseover, mousedown, mousemove, mouseup) if the touch interaction did not cause
|
|
@@ -2503,8 +2893,10 @@ var registerTouchInteractions = function (_a) {
|
|
|
2503
2893
|
* We're keeping track of the previous event to not send the synthetic mouse events if the
|
|
2504
2894
|
* touch event was a click (touchstart -> touchend).
|
|
2505
2895
|
*
|
|
2506
|
-
*
|
|
2507
|
-
*
|
|
2896
|
+
* Emulated events only occur when `isTouchScrollEnabled` is true; when false,
|
|
2897
|
+
* touchstart is default-prevented, which suppresses them.
|
|
2898
|
+
* Emulated mousedown is prevented while the proxy is focused, or it would blur it and
|
|
2899
|
+
* drop the keyboard.
|
|
2508
2900
|
**/
|
|
2509
2901
|
var _prevEventType = null;
|
|
2510
2902
|
var _syntheticEventsActive = false;
|
|
@@ -2515,12 +2907,43 @@ var registerTouchInteractions = function (_a) {
|
|
|
2515
2907
|
* Reset to null when the primary finger lifts (or touchcancel is called)
|
|
2516
2908
|
*/
|
|
2517
2909
|
var _primaryTouchId = null;
|
|
2910
|
+
/**
|
|
2911
|
+
* Maps client-space points into Artboard space through the fit and alignment
|
|
2912
|
+
* of the canvas.
|
|
2913
|
+
*/
|
|
2914
|
+
var mapToArtboard = function (boundingRect, points) {
|
|
2915
|
+
var forwardMatrix = rive.computeAlignment(fit, alignment, {
|
|
2916
|
+
minX: 0,
|
|
2917
|
+
minY: 0,
|
|
2918
|
+
maxX: boundingRect.width,
|
|
2919
|
+
maxY: boundingRect.height,
|
|
2920
|
+
}, artboard.bounds, layoutScaleFactor);
|
|
2921
|
+
var invertedMatrix = new rive.Mat2D();
|
|
2922
|
+
forwardMatrix.invert(invertedMatrix);
|
|
2923
|
+
var mapped = points.map(function (_a) {
|
|
2924
|
+
var clientX = _a.clientX, clientY = _a.clientY;
|
|
2925
|
+
var canvasX = clientX - boundingRect.left;
|
|
2926
|
+
var canvasY = clientY - boundingRect.top;
|
|
2927
|
+
var canvasCoordinatesVector = new rive.Vec2D(canvasX, canvasY);
|
|
2928
|
+
var transformedVector = rive.mapXY(invertedMatrix, canvasCoordinatesVector);
|
|
2929
|
+
var point = { x: transformedVector.x(), y: transformedVector.y() };
|
|
2930
|
+
transformedVector.delete();
|
|
2931
|
+
canvasCoordinatesVector.delete();
|
|
2932
|
+
return point;
|
|
2933
|
+
});
|
|
2934
|
+
invertedMatrix.delete();
|
|
2935
|
+
forwardMatrix.delete();
|
|
2936
|
+
return mapped;
|
|
2937
|
+
};
|
|
2518
2938
|
var processEventCallback = function (event) {
|
|
2519
2939
|
var _a;
|
|
2520
2940
|
// Exit early out of all synthetic mouse events
|
|
2521
2941
|
// https://stackoverflow.com/questions/9656990/how-to-prevent-simulated-mouse-events-in-mobile-browsers
|
|
2522
2942
|
// https://stackoverflow.com/questions/25572070/javascript-touchend-versus-click-dilemma
|
|
2523
2943
|
if (_syntheticEventsActive && event instanceof MouseEvent) {
|
|
2944
|
+
if (event.type === "mousedown" && (isTextProxyFocused === null || isTextProxyFocused === void 0 ? void 0 : isTextProxyFocused())) {
|
|
2945
|
+
event.preventDefault();
|
|
2946
|
+
}
|
|
2524
2947
|
// Synthetic event finished
|
|
2525
2948
|
if (event.type == "mouseup") {
|
|
2526
2949
|
_syntheticEventsActive = false;
|
|
@@ -2544,33 +2967,11 @@ var registerTouchInteractions = function (_a) {
|
|
|
2544
2967
|
}
|
|
2545
2968
|
}
|
|
2546
2969
|
var coordinateSets = getClientCoordinates(event, isTouchScrollEnabled, enableMultiTouch, enableMultiTouch ? null : _primaryTouchId);
|
|
2547
|
-
var
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
maxY: boundingRect.height,
|
|
2552
|
-
}, artboard.bounds, layoutScaleFactor);
|
|
2553
|
-
var invertedMatrix = new rive.Mat2D();
|
|
2554
|
-
forwardMatrix.invert(invertedMatrix);
|
|
2555
|
-
coordinateSets.forEach(function (coordinateSet) {
|
|
2556
|
-
var clientX = coordinateSet.clientX;
|
|
2557
|
-
var clientY = coordinateSet.clientY;
|
|
2558
|
-
if (!clientX && !clientY) {
|
|
2559
|
-
return;
|
|
2560
|
-
}
|
|
2561
|
-
var canvasX = clientX - boundingRect.left;
|
|
2562
|
-
var canvasY = clientY - boundingRect.top;
|
|
2563
|
-
var canvasCoordinatesVector = new rive.Vec2D(canvasX, canvasY);
|
|
2564
|
-
var transformedVector = rive.mapXY(invertedMatrix, canvasCoordinatesVector);
|
|
2565
|
-
var transformedX = transformedVector.x();
|
|
2566
|
-
var transformedY = transformedVector.y();
|
|
2567
|
-
coordinateSet.transformedX = transformedX;
|
|
2568
|
-
coordinateSet.transformedY = transformedY;
|
|
2569
|
-
transformedVector.delete();
|
|
2570
|
-
canvasCoordinatesVector.delete();
|
|
2970
|
+
var positionedSets = coordinateSets.filter(function (coordinateSet) { return coordinateSet.clientX || coordinateSet.clientY; });
|
|
2971
|
+
mapToArtboard(boundingRect, positionedSets).forEach(function (point, i) {
|
|
2972
|
+
positionedSets[i].transformedX = point.x;
|
|
2973
|
+
positionedSets[i].transformedY = point.y;
|
|
2571
2974
|
});
|
|
2572
|
-
invertedMatrix.delete();
|
|
2573
|
-
forwardMatrix.delete();
|
|
2574
2975
|
switch (event.type) {
|
|
2575
2976
|
/**
|
|
2576
2977
|
* There's a 2px buffer for a hitRadius when translating the pointer coordinates
|
|
@@ -2594,8 +2995,8 @@ var registerTouchInteractions = function (_a) {
|
|
|
2594
2995
|
});
|
|
2595
2996
|
}
|
|
2596
2997
|
};
|
|
2597
|
-
for (var _i = 0,
|
|
2598
|
-
var stateMachine =
|
|
2998
|
+
for (var _i = 0, stateMachines_2 = stateMachines; _i < stateMachines_2.length; _i++) {
|
|
2999
|
+
var stateMachine = stateMachines_2[_i];
|
|
2599
3000
|
_loop_1(stateMachine);
|
|
2600
3001
|
}
|
|
2601
3002
|
break;
|
|
@@ -2608,8 +3009,8 @@ var registerTouchInteractions = function (_a) {
|
|
|
2608
3009
|
stateMachine.pointerMove(coordinateSet.transformedX, coordinateSet.transformedY, coordinateSet.identifier);
|
|
2609
3010
|
});
|
|
2610
3011
|
};
|
|
2611
|
-
for (var _b = 0,
|
|
2612
|
-
var stateMachine =
|
|
3012
|
+
for (var _b = 0, stateMachines_3 = stateMachines; _b < stateMachines_3.length; _b++) {
|
|
3013
|
+
var stateMachine = stateMachines_3[_b];
|
|
2613
3014
|
_loop_2(stateMachine);
|
|
2614
3015
|
}
|
|
2615
3016
|
break;
|
|
@@ -2622,12 +3023,12 @@ var registerTouchInteractions = function (_a) {
|
|
|
2622
3023
|
stateMachine.pointerDown(coordinateSet.transformedX, coordinateSet.transformedY, coordinateSet.identifier);
|
|
2623
3024
|
});
|
|
2624
3025
|
};
|
|
2625
|
-
for (var _c = 0,
|
|
2626
|
-
var stateMachine =
|
|
3026
|
+
for (var _c = 0, stateMachines_4 = stateMachines; _c < stateMachines_4.length; _c++) {
|
|
3027
|
+
var stateMachine = stateMachines_4[_c];
|
|
2627
3028
|
_loop_3(stateMachine);
|
|
2628
3029
|
}
|
|
2629
3030
|
// Advance the state machine immediately so pointer down(s) takes effect synchronously
|
|
2630
|
-
advanceAndDrain(0);
|
|
3031
|
+
advanceAndDrain(0, { pointerDown: true });
|
|
2631
3032
|
break;
|
|
2632
3033
|
}
|
|
2633
3034
|
// Pointer click released on the canvas
|
|
@@ -2638,12 +3039,15 @@ var registerTouchInteractions = function (_a) {
|
|
|
2638
3039
|
stateMachine.pointerExit(coordinateSet.transformedX, coordinateSet.transformedY, coordinateSet.identifier);
|
|
2639
3040
|
});
|
|
2640
3041
|
};
|
|
2641
|
-
for (var _d = 0,
|
|
2642
|
-
var stateMachine =
|
|
3042
|
+
for (var _d = 0, stateMachines_5 = stateMachines; _d < stateMachines_5.length; _d++) {
|
|
3043
|
+
var stateMachine = stateMachines_5[_d];
|
|
2643
3044
|
_loop_4(stateMachine);
|
|
2644
3045
|
}
|
|
2645
3046
|
// Advance the state machine immediately so pointer up(s) takes effect synchronously
|
|
2646
3047
|
advanceAndDrain(0);
|
|
3048
|
+
// Still inside the touch gesture — summon the keyboard if the tap focused a
|
|
3049
|
+
// text input
|
|
3050
|
+
summonKeyboard === null || summonKeyboard === void 0 ? void 0 : summonKeyboard();
|
|
2647
3051
|
// Release the primary touch lock once that finger lifts so the next
|
|
2648
3052
|
// touchstart can claim a new primary finger.
|
|
2649
3053
|
if (!enableMultiTouch &&
|
|
@@ -2658,12 +3062,13 @@ var registerTouchInteractions = function (_a) {
|
|
|
2658
3062
|
stateMachine.pointerUp(coordinateSet.transformedX, coordinateSet.transformedY, coordinateSet.identifier);
|
|
2659
3063
|
});
|
|
2660
3064
|
};
|
|
2661
|
-
for (var _e = 0,
|
|
2662
|
-
var stateMachine =
|
|
3065
|
+
for (var _e = 0, stateMachines_6 = stateMachines; _e < stateMachines_6.length; _e++) {
|
|
3066
|
+
var stateMachine = stateMachines_6[_e];
|
|
2663
3067
|
_loop_5(stateMachine);
|
|
2664
3068
|
}
|
|
2665
3069
|
// Advance the state machine immediately so pointer up(s) takes effect synchronously
|
|
2666
3070
|
advanceAndDrain(0);
|
|
3071
|
+
summonKeyboard === null || summonKeyboard === void 0 ? void 0 : summonKeyboard();
|
|
2667
3072
|
break;
|
|
2668
3073
|
}
|
|
2669
3074
|
default:
|
|
@@ -2672,6 +3077,71 @@ var registerTouchInteractions = function (_a) {
|
|
|
2672
3077
|
var touchCancelCallback = function () {
|
|
2673
3078
|
_primaryTouchId = null;
|
|
2674
3079
|
};
|
|
3080
|
+
/**
|
|
3081
|
+
* Forwards wheel and trackpad scrolling to the state machines. The page keeps
|
|
3082
|
+
* the wheel unless a scroll view actually moves, so it still scrolls when
|
|
3083
|
+
* Rive has nothing to scroll or a view sits at its edge.
|
|
3084
|
+
*/
|
|
3085
|
+
var wheelCallback = function (event) {
|
|
3086
|
+
// Pinch zoom arrives as a ctrl+wheel and belongs to the page. A wheel that
|
|
3087
|
+
// can't be cancelled is part of a sequence the page is already scrolling;
|
|
3088
|
+
// taking it too would move both.
|
|
3089
|
+
if (event.ctrlKey || !event.cancelable) {
|
|
3090
|
+
return;
|
|
3091
|
+
}
|
|
3092
|
+
// Read before the deltas: Firefox reports pixels once a delta has been
|
|
3093
|
+
// read first.
|
|
3094
|
+
var deltaMode = event.deltaMode;
|
|
3095
|
+
var deltaX = event.deltaX;
|
|
3096
|
+
var deltaY = event.deltaY;
|
|
3097
|
+
// Shift+wheel scrolls sideways. Most browsers already report it on the x
|
|
3098
|
+
// axis; a vertical-only view would decline it on y.
|
|
3099
|
+
if (event.shiftKey && !deltaX) {
|
|
3100
|
+
deltaX = deltaY;
|
|
3101
|
+
deltaY = 0;
|
|
3102
|
+
}
|
|
3103
|
+
var boundingRect = event.currentTarget.getBoundingClientRect();
|
|
3104
|
+
// A page is the canvas's visible size, the nearest the host can get to the
|
|
3105
|
+
// scroll view's own.
|
|
3106
|
+
var toPixelsX = deltaMode === WheelEvent.DOM_DELTA_LINE
|
|
3107
|
+
? PIXELS_PER_LINE
|
|
3108
|
+
: deltaMode === WheelEvent.DOM_DELTA_PAGE
|
|
3109
|
+
? boundingRect.width
|
|
3110
|
+
: 1;
|
|
3111
|
+
var toPixelsY = deltaMode === WheelEvent.DOM_DELTA_LINE
|
|
3112
|
+
? PIXELS_PER_LINE
|
|
3113
|
+
: deltaMode === WheelEvent.DOM_DELTA_PAGE
|
|
3114
|
+
? boundingRect.height
|
|
3115
|
+
: 1;
|
|
3116
|
+
// The DOM reports how far to scroll; the runtime wants how far content
|
|
3117
|
+
// travels.
|
|
3118
|
+
var scrollX = -deltaX * toPixelsX;
|
|
3119
|
+
var scrollY = -deltaY * toPixelsY;
|
|
3120
|
+
if (!scrollX && !scrollY) {
|
|
3121
|
+
return;
|
|
3122
|
+
}
|
|
3123
|
+
// Mapping both ends of the delta keeps only the scale of the fit.
|
|
3124
|
+
var _a = mapToArtboard(boundingRect, [
|
|
3125
|
+
{ clientX: event.clientX, clientY: event.clientY },
|
|
3126
|
+
{ clientX: event.clientX + scrollX, clientY: event.clientY + scrollY },
|
|
3127
|
+
]), position = _a[0], moved = _a[1];
|
|
3128
|
+
// The DOM never says whether a pixel delta came from a trackpad, so it
|
|
3129
|
+
// counts as precise either way, as it does in the browser's own scrolling.
|
|
3130
|
+
var precise = deltaMode === WheelEvent.DOM_DELTA_PIXEL;
|
|
3131
|
+
var timeStamp = event.timeStamp / 1000;
|
|
3132
|
+
// A latched state machine owns the rest of its gesture, even past its edge.
|
|
3133
|
+
var latched = stateMachines.filter(function (sm) { return sm.hasScrollLatch(); });
|
|
3134
|
+
var ordered = latched.concat(stateMachines.filter(function (sm) { return latched.indexOf(sm) === -1; }));
|
|
3135
|
+
var consumed = ordered.some(function (stateMachine) {
|
|
3136
|
+
return stateMachine.pointerScroll(position.x, position.y, moved.x - position.x, moved.y - position.y, SCROLL_PHASE_UPDATE, precise, timeStamp, 0) !== 0;
|
|
3137
|
+
});
|
|
3138
|
+
if (!consumed) {
|
|
3139
|
+
return;
|
|
3140
|
+
}
|
|
3141
|
+
event.preventDefault();
|
|
3142
|
+
// Advance now so the scroll lands on the next frame drawn.
|
|
3143
|
+
advanceAndDrain(0);
|
|
3144
|
+
};
|
|
2675
3145
|
var callback = processEventCallback.bind(_this);
|
|
2676
3146
|
canvas.addEventListener("mouseover", callback);
|
|
2677
3147
|
canvas.addEventListener("mouseout", callback);
|
|
@@ -2686,6 +3156,8 @@ var registerTouchInteractions = function (_a) {
|
|
|
2686
3156
|
});
|
|
2687
3157
|
canvas.addEventListener("touchend", callback);
|
|
2688
3158
|
canvas.addEventListener("touchcancel", touchCancelCallback);
|
|
3159
|
+
// Not passive, or preventDefault could not keep the page from scrolling.
|
|
3160
|
+
canvas.addEventListener("wheel", wheelCallback, { passive: false });
|
|
2689
3161
|
return function () {
|
|
2690
3162
|
canvas.removeEventListener("mouseover", callback);
|
|
2691
3163
|
canvas.removeEventListener("mouseout", callback);
|
|
@@ -2696,12 +3168,13 @@ var registerTouchInteractions = function (_a) {
|
|
|
2696
3168
|
canvas.removeEventListener("touchstart", callback);
|
|
2697
3169
|
canvas.removeEventListener("touchend", callback);
|
|
2698
3170
|
canvas.removeEventListener("touchcancel", touchCancelCallback);
|
|
3171
|
+
canvas.removeEventListener("wheel", wheelCallback);
|
|
2699
3172
|
};
|
|
2700
3173
|
};
|
|
2701
3174
|
|
|
2702
3175
|
|
|
2703
3176
|
/***/ }),
|
|
2704
|
-
/*
|
|
3177
|
+
/* 14 */
|
|
2705
3178
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2706
3179
|
|
|
2707
3180
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -2709,6 +3182,43 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2709
3182
|
/* harmony export */ FocusSessionState: () => (/* binding */ FocusSessionState),
|
|
2710
3183
|
/* harmony export */ KeyboardInteractions: () => (/* binding */ KeyboardInteractions)
|
|
2711
3184
|
/* harmony export */ });
|
|
3185
|
+
/* harmony import */ var _keyMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
|
|
3186
|
+
/* harmony import */ var _semantics_claimedKeyEvents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
|
|
3187
|
+
/* harmony import */ var _textInputProxy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
|
|
3188
|
+
|
|
3189
|
+
|
|
3190
|
+
|
|
3191
|
+
/**
|
|
3192
|
+
* Defaults suppressed while typing (scroll/navigate/submit). Tab is traversal's; proxy
|
|
3193
|
+
* Space returns earlier as a printable.
|
|
3194
|
+
*/
|
|
3195
|
+
var EDITING_NAV_CODES = new Set([
|
|
3196
|
+
"Space",
|
|
3197
|
+
"ArrowLeft",
|
|
3198
|
+
"ArrowRight",
|
|
3199
|
+
"ArrowUp",
|
|
3200
|
+
"ArrowDown",
|
|
3201
|
+
"Backspace",
|
|
3202
|
+
"Delete",
|
|
3203
|
+
"Home",
|
|
3204
|
+
"End",
|
|
3205
|
+
"Enter",
|
|
3206
|
+
"NumpadEnter",
|
|
3207
|
+
]);
|
|
3208
|
+
/** A keystroke that types a character (not a Ctrl/Cmd shortcut). */
|
|
3209
|
+
function isPrintable(event) {
|
|
3210
|
+
return event.key.length === 1 && !event.ctrlKey && !event.metaKey;
|
|
3211
|
+
}
|
|
3212
|
+
function isArrowKey(key) {
|
|
3213
|
+
return (key === _keyMap__WEBPACK_IMPORTED_MODULE_0__.Key.left || key === _keyMap__WEBPACK_IMPORTED_MODULE_0__.Key.right || key === _keyMap__WEBPACK_IMPORTED_MODULE_0__.Key.up || key === _keyMap__WEBPACK_IMPORTED_MODULE_0__.Key.down);
|
|
3214
|
+
}
|
|
3215
|
+
/**
|
|
3216
|
+
* Alt/Ctrl/Meta arrows are browser/OS shortcuts (Alt+Left = back, Cmd+Arrow, etc.).
|
|
3217
|
+
* Shift is allowed: it is the spatial-navigation chord in Vivaldi/Opera.
|
|
3218
|
+
*/
|
|
3219
|
+
function hasShortcutModifier(event) {
|
|
3220
|
+
return event.altKey || event.ctrlKey || event.metaKey;
|
|
3221
|
+
}
|
|
2712
3222
|
/**
|
|
2713
3223
|
* Tracks the relationship between DOM focus inside this Rive focus domain (canvas or semantic overlay)
|
|
2714
3224
|
* and Rive's internal focus for the current focus session.
|
|
@@ -2734,7 +3244,8 @@ var FocusSessionState;
|
|
|
2734
3244
|
FocusSessionState["RiveFocused"] = "riveFocused";
|
|
2735
3245
|
})(FocusSessionState || (FocusSessionState = {}));
|
|
2736
3246
|
/**
|
|
2737
|
-
* Manages keyboard and DOM focus interactions for Rive's focus domain (<canvas
|
|
3247
|
+
* Manages keyboard and DOM focus interactions for Rive's focus domain (<canvas>, semantic
|
|
3248
|
+
* overlay, text input proxy). Owns the proxy and the text input session state.
|
|
2738
3249
|
* Because keyboard events can apply on either part of the domain, we need to track what events we should
|
|
2739
3250
|
* handle/intercept, and when to release focus back to the page outside of the domain.
|
|
2740
3251
|
*
|
|
@@ -2746,7 +3257,7 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
2746
3257
|
function KeyboardInteractions(_a) {
|
|
2747
3258
|
var canvas = _a.canvas, stateMachine = _a.stateMachine, hasFocusNodes = _a.hasFocusNodes, getOverlayElement = _a.getOverlayElement;
|
|
2748
3259
|
var _this = this;
|
|
2749
|
-
var _b;
|
|
3260
|
+
var _b, _c;
|
|
2750
3261
|
this.focusSessionState = FocusSessionState.NotFocused;
|
|
2751
3262
|
/** Whether the canvas currently has browser DOM focus. */
|
|
2752
3263
|
this.canvasHasFocus = false;
|
|
@@ -2754,6 +3265,19 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
2754
3265
|
this.focusDomainReleased = false;
|
|
2755
3266
|
/** Overlay element currently wired with focusin/keydown listeners, if any. */
|
|
2756
3267
|
this.currentOverlayElement = null;
|
|
3268
|
+
/** Codes whose keydown an overlay widget took, so their keyup is skipped too. */
|
|
3269
|
+
this.claimedKeyCodes = new Set();
|
|
3270
|
+
this.textInputSessionActive = false;
|
|
3271
|
+
/**
|
|
3272
|
+
* The proxy is always empty: copy Rive's selection; always preventDefault.
|
|
3273
|
+
*/
|
|
3274
|
+
this.onCopy = function (event) {
|
|
3275
|
+
var _a;
|
|
3276
|
+
event.preventDefault();
|
|
3277
|
+
var selected = _this.mainSm.selectedText();
|
|
3278
|
+
if (selected)
|
|
3279
|
+
(_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.setData("text/plain", selected);
|
|
3280
|
+
};
|
|
2757
3281
|
/**
|
|
2758
3282
|
* Handles the canvas gaining browser focus. The behavior differs based on how focus was gained -
|
|
2759
3283
|
*
|
|
@@ -2769,10 +3293,11 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
2769
3293
|
_this.syncOverlayListener();
|
|
2770
3294
|
_this.canvasHasFocus = true;
|
|
2771
3295
|
_this.focusDomainReleased = false;
|
|
2772
|
-
if (
|
|
2773
|
-
|
|
2774
|
-
|
|
3296
|
+
if (_this.isInFocusDomain(event.relatedTarget) ||
|
|
3297
|
+
!_this.hasFocusNodes ||
|
|
3298
|
+
_this.mainSm.focusState().hasFocus) {
|
|
2775
3299
|
return;
|
|
3300
|
+
}
|
|
2776
3301
|
_this.focusSessionState = FocusSessionState.EntryPending;
|
|
2777
3302
|
// Pointer focus waits for the user's next Tab (handled in onKeyDown). Keyboard focus enters now.
|
|
2778
3303
|
if (!_this.isKeyboardDrivenFocus())
|
|
@@ -2791,11 +3316,13 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
2791
3316
|
* When we're not in either of those buckets, it's safe to call `clearFocus()` on the SMI.
|
|
2792
3317
|
*/
|
|
2793
3318
|
this.onCanvasBlur = function (event) {
|
|
3319
|
+
// Must stay before the state reset because beginTextInputSession sets the session state and
|
|
3320
|
+
// then focuses the proxy, which synchronously blurs the canvas.
|
|
3321
|
+
if (_this.inputProxy.owns(event.relatedTarget))
|
|
3322
|
+
return;
|
|
2794
3323
|
_this.focusSessionState = FocusSessionState.NotFocused;
|
|
2795
3324
|
_this.canvasHasFocus = false;
|
|
2796
|
-
|
|
2797
|
-
var documentLostFocus = event.relatedTarget === null && !document.hasFocus();
|
|
2798
|
-
if (movedWithinFocusDomain || documentLostFocus)
|
|
3325
|
+
if (_this.blurStaysWithRive(event.relatedTarget))
|
|
2799
3326
|
return;
|
|
2800
3327
|
_this.mainSm.clearFocus();
|
|
2801
3328
|
};
|
|
@@ -2821,15 +3348,44 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
2821
3348
|
this.onFocusDomainHostFocusIn = function (event) {
|
|
2822
3349
|
_this.syncOverlayListener();
|
|
2823
3350
|
_this.onOverlayFocusIn(event);
|
|
3351
|
+
// Focus entering the proxy re-enters the focus domain, so clear any earlier Tab-out
|
|
3352
|
+
// release, or onKeyDown would drop the session's keystrokes.
|
|
3353
|
+
if (_this.inputProxy.owns(event.target)) {
|
|
3354
|
+
_this.focusDomainReleased = false;
|
|
3355
|
+
}
|
|
2824
3356
|
};
|
|
3357
|
+
/**
|
|
3358
|
+
* Handles keydown events in the Rive focus domain. We route certain keys to different functions, with the following
|
|
3359
|
+
* fallback behavior:
|
|
3360
|
+
* 1. Tab/Shift+Tab - check if keyInput() takes this key, if not, call focusNext/Previous traversal if there are focus nodes
|
|
3361
|
+
* 2. Check - if a semantic overlay element's key handler claimed the event, don't intercept the key event further
|
|
3362
|
+
* 3. Send key to `keyInput()` on Rive state machine if applicable.
|
|
3363
|
+
* 4. If the keyInput returned false, and the key is directional arrow keys, call directional focus methods on state machine
|
|
3364
|
+
* 5. Printables: in a session the proxy's input event supplies text; otherwise textInput().
|
|
3365
|
+
* A printable fires both keyInput and textInput even if a listener claims it.
|
|
3366
|
+
* @param event KeyboardEvent
|
|
3367
|
+
* @returns void
|
|
3368
|
+
*/
|
|
2825
3369
|
this.onKeyDown = function (event) {
|
|
2826
3370
|
_this.syncOverlayListener();
|
|
3371
|
+
// Keys that are part of an IME composition belong to the IME (candidate
|
|
3372
|
+
// navigation, commit). Safari reports the first one as keyCode 229 with
|
|
3373
|
+
// isComposing still false.
|
|
3374
|
+
if (event.isComposing || event.keyCode === 229)
|
|
3375
|
+
return;
|
|
2827
3376
|
// After Tab exits the last Rive node, ignore keys until focus re-enters the focus domain.
|
|
2828
3377
|
if (_this.focusDomainReleased)
|
|
2829
3378
|
return;
|
|
2830
3379
|
if (!_this.shouldRiveHandleKeyEvent(event))
|
|
2831
3380
|
return;
|
|
2832
|
-
if (event.
|
|
3381
|
+
if (event.key === "Tab" && _this.hasFocusNodes) {
|
|
3382
|
+
// Tab listeners are matched per phase (down/repeat/up), as in the editor, so
|
|
3383
|
+
// each event is offered on its own; one that isn't claimed traverses.
|
|
3384
|
+
if (_this.mainSm.focusState().hasFocus &&
|
|
3385
|
+
_this.mainSm.keyInput(_keyMap__WEBPACK_IMPORTED_MODULE_0__.Key.tab, (0,_keyMap__WEBPACK_IMPORTED_MODULE_0__.modifiersFromEvent)(event), true, event.repeat)) {
|
|
3386
|
+
event.preventDefault();
|
|
3387
|
+
return;
|
|
3388
|
+
}
|
|
2833
3389
|
var forward = !event.shiftKey;
|
|
2834
3390
|
var focusMoved = forward ? _this.mainSm.focusNext() : _this.mainSm.focusPrevious();
|
|
2835
3391
|
var focusState = _this.mainSm.focusState();
|
|
@@ -2842,13 +3398,74 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
2842
3398
|
}
|
|
2843
3399
|
else {
|
|
2844
3400
|
// No more traversable nodes — release Tab to the page.
|
|
3401
|
+
if (document.activeElement !== _this.canvas &&
|
|
3402
|
+
_this.isInFocusDomain(document.activeElement)) {
|
|
3403
|
+
// The browser's default Tab starts from the focused element; from an overlay element,
|
|
3404
|
+
// the nearest stop backward is the canvas itself. Start it from the
|
|
3405
|
+
// canvas instead, so a Shift+Tab goes to the proper element before Rive.
|
|
3406
|
+
_this.canvas.focus({ preventScroll: true });
|
|
3407
|
+
}
|
|
2845
3408
|
_this.focusSessionState = FocusSessionState.NotFocused;
|
|
2846
3409
|
_this.focusDomainReleased = true;
|
|
2847
3410
|
_this.canvasHasFocus = false;
|
|
2848
3411
|
}
|
|
2849
3412
|
_this.syncOverlayListener();
|
|
3413
|
+
return;
|
|
3414
|
+
}
|
|
3415
|
+
// A semantic overlay widget (roving radio/tab group, slider, Enter/Space activation)
|
|
3416
|
+
// already acted on this key at its target, so don't act on it twice.
|
|
3417
|
+
if ((0,_semantics_claimedKeyEvents__WEBPACK_IMPORTED_MODULE_1__.isKeyEventClaimed)(event)) {
|
|
3418
|
+
_this.claimedKeyCodes.add(event.code);
|
|
3419
|
+
return;
|
|
3420
|
+
}
|
|
3421
|
+
// A new unclaimed press: drop any claim whose keyup never arrived.
|
|
3422
|
+
_this.claimedKeyCodes.delete(event.code);
|
|
3423
|
+
var fromProxy = _this.textInputSessionActive && _this.inputProxy.owns(event.target);
|
|
3424
|
+
var expectsKeyboardInput = _this.mainSm.focusState().expectsKeyboardInput;
|
|
3425
|
+
// The focused node gets first refusal (a TextInput's caret, or a keyboard listener
|
|
3426
|
+
// on that key). Keys with no Rive equivalent map to null and aren't dispatched.
|
|
3427
|
+
var key = (0,_keyMap__WEBPACK_IMPORTED_MODULE_0__.keyboardEventToRiveKey)(event);
|
|
3428
|
+
var consumed = key !== null &&
|
|
3429
|
+
_this.mainSm.keyInput(key, (0,_keyMap__WEBPACK_IMPORTED_MODULE_0__.modifiersFromEvent)(event), true, event.repeat);
|
|
3430
|
+
// An arrow key with no consumed key input moves focus spatially. While a Rive node holds focus,
|
|
3431
|
+
// arrows never scroll the page
|
|
3432
|
+
if (!consumed && key !== null && isArrowKey(key) && !hasShortcutModifier(event)) {
|
|
3433
|
+
consumed =
|
|
3434
|
+
_this.focusInDirection(key) || _this.mainSm.focusState().hasFocus;
|
|
3435
|
+
}
|
|
3436
|
+
if (isPrintable(event)) {
|
|
3437
|
+
// During a session the printable must reach the proxy: its input event is the
|
|
3438
|
+
// (IME- and dead-key-correct) text source, and C++ inserts nothing from keyInput.
|
|
3439
|
+
if (fromProxy)
|
|
3440
|
+
return;
|
|
3441
|
+
// Session live but focus elsewhere in Rive: refocus the proxy so the default inserts there.
|
|
3442
|
+
if (_this.textInputSessionActive && _this.isInFocusDomain(event.target)) {
|
|
3443
|
+
_this.inputProxy.focus();
|
|
3444
|
+
return;
|
|
3445
|
+
}
|
|
3446
|
+
if (!_this.textInputSessionActive && expectsKeyboardInput) {
|
|
3447
|
+
_this.mainSm.textInput(event.key);
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
// Rive consumed it, or an unmodified editing key while typing (would scroll/submit).
|
|
3451
|
+
var typing = fromProxy || expectsKeyboardInput;
|
|
3452
|
+
if (consumed ||
|
|
3453
|
+
(typing && !hasShortcutModifier(event) && EDITING_NAV_CODES.has(event.code))) {
|
|
3454
|
+
event.preventDefault();
|
|
2850
3455
|
}
|
|
2851
3456
|
};
|
|
3457
|
+
this.onKeyUp = function (event) {
|
|
3458
|
+
if (event.isComposing || event.keyCode === 229)
|
|
3459
|
+
return;
|
|
3460
|
+
if (_this.claimedKeyCodes.delete(event.code))
|
|
3461
|
+
return;
|
|
3462
|
+
if (_this.focusSessionState === FocusSessionState.NotFocused)
|
|
3463
|
+
return;
|
|
3464
|
+
var key = (0,_keyMap__WEBPACK_IMPORTED_MODULE_0__.keyboardEventToRiveKey)(event);
|
|
3465
|
+
if (key === null)
|
|
3466
|
+
return;
|
|
3467
|
+
_this.mainSm.keyInput(key, (0,_keyMap__WEBPACK_IMPORTED_MODULE_0__.modifiersFromEvent)(event), false, false);
|
|
3468
|
+
};
|
|
2852
3469
|
this.canvas = canvas;
|
|
2853
3470
|
this.mainSm = stateMachine;
|
|
2854
3471
|
this.hasFocusNodes = hasFocusNodes;
|
|
@@ -2857,9 +3474,74 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
2857
3474
|
canvas.addEventListener("focus", this.onCanvasFocus);
|
|
2858
3475
|
canvas.addEventListener("blur", this.onCanvasBlur);
|
|
2859
3476
|
canvas.addEventListener("keydown", this.onKeyDown);
|
|
3477
|
+
canvas.addEventListener("keyup", this.onKeyUp);
|
|
2860
3478
|
this.focusDomainHost.addEventListener("focusin", this.onFocusDomainHostFocusIn);
|
|
2861
3479
|
this.syncOverlayListener();
|
|
3480
|
+
this.inputProxy = new _textInputProxy__WEBPACK_IMPORTED_MODULE_2__.TextInputProxy({
|
|
3481
|
+
container: (_c = canvas.parentElement) !== null && _c !== void 0 ? _c : document.body,
|
|
3482
|
+
canvas: canvas,
|
|
3483
|
+
textInput: function (text) { return _this.mainSm.textInput(text); },
|
|
3484
|
+
// Proxy keystrokes go through the same handlers as the canvas.
|
|
3485
|
+
onKeyDown: this.onKeyDown,
|
|
3486
|
+
onKeyUp: this.onKeyUp,
|
|
3487
|
+
onCopy: this.onCopy,
|
|
3488
|
+
onBlur: function (relatedTarget) { return _this.handleProxyBlur(relatedTarget); },
|
|
3489
|
+
});
|
|
2862
3490
|
}
|
|
3491
|
+
KeyboardInteractions.prototype.isTextInputSessionActive = function () {
|
|
3492
|
+
return this.textInputSessionActive;
|
|
3493
|
+
};
|
|
3494
|
+
/** Session active and the proxy holds DOM focus. */
|
|
3495
|
+
KeyboardInteractions.prototype.isEditingHostFocused = function () {
|
|
3496
|
+
return this.textInputSessionActive && this.inputProxy.hasDomFocus();
|
|
3497
|
+
};
|
|
3498
|
+
/** @param focusProxy move DOM focus to the proxy; false leaves it where it is. */
|
|
3499
|
+
KeyboardInteractions.prototype.beginTextInputSession = function (focusProxy) {
|
|
3500
|
+
this.textInputSessionActive = true;
|
|
3501
|
+
this.focusSessionState = FocusSessionState.RiveFocused;
|
|
3502
|
+
if (focusProxy)
|
|
3503
|
+
this.inputProxy.focus();
|
|
3504
|
+
};
|
|
3505
|
+
/** @param fromBlur focus is already leaving; don't park it on the canvas. */
|
|
3506
|
+
KeyboardInteractions.prototype.endTextInputSession = function (fromBlur) {
|
|
3507
|
+
if (fromBlur === void 0) { fromBlur = false; }
|
|
3508
|
+
if (!this.textInputSessionActive)
|
|
3509
|
+
return;
|
|
3510
|
+
this.textInputSessionActive = false;
|
|
3511
|
+
this.inputProxy.endSession();
|
|
3512
|
+
if (fromBlur || !this.inputProxy.hasDomFocus())
|
|
3513
|
+
return;
|
|
3514
|
+
// Nothing took DOM focus from the proxy (e.g. semantics is off). Park it on the
|
|
3515
|
+
// canvas so keys keep reaching Rive; onCanvasFocus ignores focus from the input proxy.
|
|
3516
|
+
this.canvas.focus({ preventScroll: true });
|
|
3517
|
+
};
|
|
3518
|
+
/** Must run synchronously in the pointer gesture or mobile keyboards won't open. */
|
|
3519
|
+
KeyboardInteractions.prototype.summonForPointer = function () {
|
|
3520
|
+
if (this.textInputSessionActive)
|
|
3521
|
+
this.inputProxy.focus();
|
|
3522
|
+
else
|
|
3523
|
+
this.beginTextInputSession(true);
|
|
3524
|
+
};
|
|
3525
|
+
Object.defineProperty(KeyboardInteractions.prototype, "editingHost", {
|
|
3526
|
+
/** The text-input proxy, for the semantics layer to decorate while editing. */
|
|
3527
|
+
get: function () {
|
|
3528
|
+
return this.inputProxy;
|
|
3529
|
+
},
|
|
3530
|
+
enumerable: false,
|
|
3531
|
+
configurable: true
|
|
3532
|
+
});
|
|
3533
|
+
KeyboardInteractions.prototype.handleProxyBlur = function (relatedTarget) {
|
|
3534
|
+
// Teardown already in progress (endTextInputSession blurred the proxy).
|
|
3535
|
+
if (!this.textInputSessionActive)
|
|
3536
|
+
return;
|
|
3537
|
+
// Still in Rive or the document blurred: keep the session (pollFocusState tears down).
|
|
3538
|
+
if (this.blurStaysWithRive(relatedTarget))
|
|
3539
|
+
return;
|
|
3540
|
+
// Blurred out of Rive entirely: release C++ focus and end the session.
|
|
3541
|
+
this.mainSm.clearFocus();
|
|
3542
|
+
this.endTextInputSession(true);
|
|
3543
|
+
this.focusSessionState = FocusSessionState.NotFocused;
|
|
3544
|
+
};
|
|
2863
3545
|
/**
|
|
2864
3546
|
* Set the FocusSessionState. Useful for invoking a Rive "blur" without actually blurring from the <canvas>. This
|
|
2865
3547
|
* helps put the DOM focus state on the canvas rather than the <body>, so the user doesn't lose the spot in page navigation
|
|
@@ -2878,6 +3560,26 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
2878
3560
|
KeyboardInteractions.prototype.notifyRiveFocused = function () {
|
|
2879
3561
|
this.focusSessionState = FocusSessionState.RiveFocused;
|
|
2880
3562
|
};
|
|
3563
|
+
/** Blur into the focus domain, or the whole document losing focus (tab/window switch). */
|
|
3564
|
+
KeyboardInteractions.prototype.blurStaysWithRive = function (relatedTarget) {
|
|
3565
|
+
return (this.isInFocusDomain(relatedTarget) ||
|
|
3566
|
+
(relatedTarget === null && !document.hasFocus()));
|
|
3567
|
+
};
|
|
3568
|
+
/** Arrow keys map to directional focus; anything else is not a focus move. */
|
|
3569
|
+
KeyboardInteractions.prototype.focusInDirection = function (key) {
|
|
3570
|
+
switch (key) {
|
|
3571
|
+
case _keyMap__WEBPACK_IMPORTED_MODULE_0__.Key.left:
|
|
3572
|
+
return this.mainSm.focusLeft();
|
|
3573
|
+
case _keyMap__WEBPACK_IMPORTED_MODULE_0__.Key.right:
|
|
3574
|
+
return this.mainSm.focusRight();
|
|
3575
|
+
case _keyMap__WEBPACK_IMPORTED_MODULE_0__.Key.up:
|
|
3576
|
+
return this.mainSm.focusUp();
|
|
3577
|
+
case _keyMap__WEBPACK_IMPORTED_MODULE_0__.Key.down:
|
|
3578
|
+
return this.mainSm.focusDown();
|
|
3579
|
+
default:
|
|
3580
|
+
return false;
|
|
3581
|
+
}
|
|
3582
|
+
};
|
|
2881
3583
|
/**
|
|
2882
3584
|
* Determine if Rive should handle keyboard input. If session state is `NotFocused` - no.
|
|
2883
3585
|
* DOM focus stays parked on the canvas after Rive releases focus internally, and that Tab
|
|
@@ -2895,14 +3597,12 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
2895
3597
|
var eventOnCanvas = event.target === this.canvas;
|
|
2896
3598
|
return inFocusDomain || this.canvasHasFocus || eventOnCanvas;
|
|
2897
3599
|
};
|
|
2898
|
-
/**
|
|
2899
|
-
* The Rive focus domain: the DOM that counts as "inside" Rive for focus purposes — today the
|
|
2900
|
-
* canvas itself OR the accessibility overlay subtree. Anything added later belongs here, so
|
|
2901
|
-
* session bookkeeping and keydown routing pick it up for free.
|
|
2902
|
-
*/
|
|
3600
|
+
/** DOM that counts as inside Rive for focus: canvas, overlay subtree, text-input proxy. */
|
|
2903
3601
|
KeyboardInteractions.prototype.isInFocusDomain = function (target) {
|
|
2904
3602
|
if (target === this.canvas)
|
|
2905
3603
|
return true;
|
|
3604
|
+
if (this.inputProxy.owns(target))
|
|
3605
|
+
return true;
|
|
2906
3606
|
return this.isInOverlay(target);
|
|
2907
3607
|
};
|
|
2908
3608
|
/** Overlay only (excludes the canvas) — the accessibility overlay subtree. */
|
|
@@ -2913,15 +3613,19 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
2913
3613
|
return (_c = (_b = (_a = this.getOverlayElement) === null || _a === void 0 ? void 0 : _a.call(this)) === null || _b === void 0 ? void 0 : _b.contains(target)) !== null && _c !== void 0 ? _c : false;
|
|
2914
3614
|
};
|
|
2915
3615
|
KeyboardInteractions.prototype.syncOverlayListener = function () {
|
|
2916
|
-
var _a, _b, _c, _d, _e, _f;
|
|
3616
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2917
3617
|
var nextOverlayElement = (_b = (_a = this.getOverlayElement) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : null;
|
|
2918
3618
|
if (nextOverlayElement === this.currentOverlayElement)
|
|
2919
3619
|
return;
|
|
2920
3620
|
(_c = this.currentOverlayElement) === null || _c === void 0 ? void 0 : _c.removeEventListener("focusin", this.onOverlayFocusIn);
|
|
2921
|
-
(_d = this.currentOverlayElement) === null || _d === void 0 ? void 0 : _d.removeEventListener("keydown", this.onKeyDown
|
|
3621
|
+
(_d = this.currentOverlayElement) === null || _d === void 0 ? void 0 : _d.removeEventListener("keydown", this.onKeyDown);
|
|
3622
|
+
(_e = this.currentOverlayElement) === null || _e === void 0 ? void 0 : _e.removeEventListener("keyup", this.onKeyUp);
|
|
2922
3623
|
this.currentOverlayElement = nextOverlayElement;
|
|
2923
|
-
(
|
|
2924
|
-
|
|
3624
|
+
(_f = this.currentOverlayElement) === null || _f === void 0 ? void 0 : _f.addEventListener("focusin", this.onOverlayFocusIn);
|
|
3625
|
+
// Bubble phase, so a semantic widget's own key handler runs first and can claim
|
|
3626
|
+
// the key via claimKeyEvent (see onKeyDown).
|
|
3627
|
+
(_g = this.currentOverlayElement) === null || _g === void 0 ? void 0 : _g.addEventListener("keydown", this.onKeyDown);
|
|
3628
|
+
(_h = this.currentOverlayElement) === null || _h === void 0 ? void 0 : _h.addEventListener("keyup", this.onKeyUp);
|
|
2925
3629
|
};
|
|
2926
3630
|
/**
|
|
2927
3631
|
* Whether the canvas currently matches :focus-visible — the browser's heuristic for keyboard-
|
|
@@ -2947,13 +3651,22 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
2947
3651
|
return true;
|
|
2948
3652
|
};
|
|
2949
3653
|
KeyboardInteractions.prototype.cleanup = function () {
|
|
2950
|
-
var _a, _b;
|
|
3654
|
+
var _a, _b, _c;
|
|
2951
3655
|
this.canvas.removeEventListener("focus", this.onCanvasFocus);
|
|
2952
3656
|
this.canvas.removeEventListener("blur", this.onCanvasBlur);
|
|
2953
3657
|
this.canvas.removeEventListener("keydown", this.onKeyDown);
|
|
3658
|
+
this.canvas.removeEventListener("keyup", this.onKeyUp);
|
|
3659
|
+
this.claimedKeyCodes.clear();
|
|
2954
3660
|
this.focusDomainHost.removeEventListener("focusin", this.onFocusDomainHostFocusIn);
|
|
2955
3661
|
(_a = this.currentOverlayElement) === null || _a === void 0 ? void 0 : _a.removeEventListener("focusin", this.onOverlayFocusIn);
|
|
2956
|
-
(_b = this.currentOverlayElement) === null || _b === void 0 ? void 0 : _b.removeEventListener("keydown", this.onKeyDown
|
|
3662
|
+
(_b = this.currentOverlayElement) === null || _b === void 0 ? void 0 : _b.removeEventListener("keydown", this.onKeyDown);
|
|
3663
|
+
(_c = this.currentOverlayElement) === null || _c === void 0 ? void 0 : _c.removeEventListener("keyup", this.onKeyUp);
|
|
3664
|
+
// Removing a focused element drops focus to <body> with no blur; park on the canvas.
|
|
3665
|
+
if (this.inputProxy.hasDomFocus()) {
|
|
3666
|
+
this.canvas.focus({ preventScroll: true });
|
|
3667
|
+
}
|
|
3668
|
+
this.inputProxy.cleanup();
|
|
3669
|
+
this.textInputSessionActive = false;
|
|
2957
3670
|
};
|
|
2958
3671
|
return KeyboardInteractions;
|
|
2959
3672
|
}());
|
|
@@ -2961,7 +3674,592 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
2961
3674
|
|
|
2962
3675
|
|
|
2963
3676
|
/***/ }),
|
|
2964
|
-
/*
|
|
3677
|
+
/* 15 */
|
|
3678
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3679
|
+
|
|
3680
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3681
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3682
|
+
/* harmony export */ Key: () => (/* binding */ Key),
|
|
3683
|
+
/* harmony export */ KeyModifiers: () => (/* binding */ KeyModifiers),
|
|
3684
|
+
/* harmony export */ keyboardEventToRiveKey: () => (/* binding */ keyboardEventToRiveKey),
|
|
3685
|
+
/* harmony export */ modifiersFromEvent: () => (/* binding */ modifiersFromEvent)
|
|
3686
|
+
/* harmony export */ });
|
|
3687
|
+
/*
|
|
3688
|
+
* Maps DOM keyboard events to the GLFW-style key codes and modifier bitmask
|
|
3689
|
+
* that StateMachineInstance.keyInput() expects. Values mirror `enum class Key`
|
|
3690
|
+
* and `enum class KeyModifiers` in rive-runtime focusable.hpp;
|
|
3691
|
+
* they are stable GLFW codes, so they live here as constants instead of an
|
|
3692
|
+
* embind enum.
|
|
3693
|
+
*/
|
|
3694
|
+
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
3695
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3696
|
+
if (ar || !(i in from)) {
|
|
3697
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
3698
|
+
ar[i] = from[i];
|
|
3699
|
+
}
|
|
3700
|
+
}
|
|
3701
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
3702
|
+
};
|
|
3703
|
+
var Key = {
|
|
3704
|
+
space: 32,
|
|
3705
|
+
apostrophe: 39, // '
|
|
3706
|
+
comma: 44, // ,
|
|
3707
|
+
minus: 45, // -
|
|
3708
|
+
period: 46, // .
|
|
3709
|
+
slash: 47, // /
|
|
3710
|
+
key0: 48,
|
|
3711
|
+
key1: 49,
|
|
3712
|
+
key2: 50,
|
|
3713
|
+
key3: 51,
|
|
3714
|
+
key4: 52,
|
|
3715
|
+
key5: 53,
|
|
3716
|
+
key6: 54,
|
|
3717
|
+
key7: 55,
|
|
3718
|
+
key8: 56,
|
|
3719
|
+
key9: 57,
|
|
3720
|
+
semicolon: 59, // ;
|
|
3721
|
+
equal: 61, // =
|
|
3722
|
+
a: 65,
|
|
3723
|
+
b: 66,
|
|
3724
|
+
c: 67,
|
|
3725
|
+
d: 68,
|
|
3726
|
+
e: 69,
|
|
3727
|
+
f: 70,
|
|
3728
|
+
g: 71,
|
|
3729
|
+
h: 72,
|
|
3730
|
+
i: 73,
|
|
3731
|
+
j: 74,
|
|
3732
|
+
k: 75,
|
|
3733
|
+
l: 76,
|
|
3734
|
+
m: 77,
|
|
3735
|
+
n: 78,
|
|
3736
|
+
o: 79,
|
|
3737
|
+
p: 80,
|
|
3738
|
+
q: 81,
|
|
3739
|
+
r: 82,
|
|
3740
|
+
s: 83,
|
|
3741
|
+
t: 84,
|
|
3742
|
+
u: 85,
|
|
3743
|
+
v: 86,
|
|
3744
|
+
w: 87,
|
|
3745
|
+
x: 88,
|
|
3746
|
+
y: 89,
|
|
3747
|
+
z: 90,
|
|
3748
|
+
leftBracket: 91, // [
|
|
3749
|
+
backslash: 92, // \
|
|
3750
|
+
rightBracket: 93, // ]
|
|
3751
|
+
graveAccent: 96, // `
|
|
3752
|
+
world1: 161, // non-US #1
|
|
3753
|
+
world2: 162, // non-US #2
|
|
3754
|
+
escape: 256,
|
|
3755
|
+
enter: 257,
|
|
3756
|
+
tab: 258,
|
|
3757
|
+
backspace: 259,
|
|
3758
|
+
insert: 260,
|
|
3759
|
+
deleteKey: 261,
|
|
3760
|
+
right: 262,
|
|
3761
|
+
left: 263,
|
|
3762
|
+
down: 264,
|
|
3763
|
+
up: 265,
|
|
3764
|
+
pageUp: 266,
|
|
3765
|
+
pageDown: 267,
|
|
3766
|
+
home: 268,
|
|
3767
|
+
end: 269,
|
|
3768
|
+
capsLock: 280,
|
|
3769
|
+
scrollLock: 281,
|
|
3770
|
+
numLock: 282,
|
|
3771
|
+
printScreen: 283,
|
|
3772
|
+
pause: 284,
|
|
3773
|
+
f1: 290,
|
|
3774
|
+
f2: 291,
|
|
3775
|
+
f3: 292,
|
|
3776
|
+
f4: 293,
|
|
3777
|
+
f5: 294,
|
|
3778
|
+
f6: 295,
|
|
3779
|
+
f7: 296,
|
|
3780
|
+
f8: 297,
|
|
3781
|
+
f9: 298,
|
|
3782
|
+
f10: 299,
|
|
3783
|
+
f11: 300,
|
|
3784
|
+
f12: 301,
|
|
3785
|
+
f13: 302,
|
|
3786
|
+
f14: 303,
|
|
3787
|
+
f15: 304,
|
|
3788
|
+
f16: 305,
|
|
3789
|
+
f17: 306,
|
|
3790
|
+
f18: 307,
|
|
3791
|
+
f19: 308,
|
|
3792
|
+
f20: 309,
|
|
3793
|
+
f21: 310,
|
|
3794
|
+
f22: 311,
|
|
3795
|
+
f23: 312,
|
|
3796
|
+
f24: 313,
|
|
3797
|
+
f25: 314,
|
|
3798
|
+
kp0: 320,
|
|
3799
|
+
kp1: 321,
|
|
3800
|
+
kp2: 322,
|
|
3801
|
+
kp3: 323,
|
|
3802
|
+
kp4: 324,
|
|
3803
|
+
kp5: 325,
|
|
3804
|
+
kp6: 326,
|
|
3805
|
+
kp7: 327,
|
|
3806
|
+
kp8: 328,
|
|
3807
|
+
kp9: 329,
|
|
3808
|
+
kpDecimal: 330,
|
|
3809
|
+
kpDivide: 331,
|
|
3810
|
+
kpMultiply: 332,
|
|
3811
|
+
kpSubtract: 333,
|
|
3812
|
+
kpAdd: 334,
|
|
3813
|
+
kpEnter: 335,
|
|
3814
|
+
kpEqual: 336,
|
|
3815
|
+
leftShift: 340,
|
|
3816
|
+
leftControl: 341,
|
|
3817
|
+
leftAlt: 342,
|
|
3818
|
+
leftSuper: 343,
|
|
3819
|
+
rightShift: 344,
|
|
3820
|
+
rightControl: 345,
|
|
3821
|
+
rightAlt: 346,
|
|
3822
|
+
rightSuper: 347,
|
|
3823
|
+
menu: 348,
|
|
3824
|
+
};
|
|
3825
|
+
var KeyModifiers = {
|
|
3826
|
+
none: 0,
|
|
3827
|
+
shift: 1 << 0,
|
|
3828
|
+
ctrl: 1 << 1,
|
|
3829
|
+
alt: 1 << 2,
|
|
3830
|
+
meta: 1 << 3,
|
|
3831
|
+
};
|
|
3832
|
+
// Physical key (KeyboardEvent.code) to Rive key, by US-QWERTY position.
|
|
3833
|
+
var CODE_TO_KEY = {
|
|
3834
|
+
// Modifiers are keys too (the editor sends them), and are also in the bitmask.
|
|
3835
|
+
ShiftLeft: Key.leftShift,
|
|
3836
|
+
ShiftRight: Key.rightShift,
|
|
3837
|
+
ControlLeft: Key.leftControl,
|
|
3838
|
+
ControlRight: Key.rightControl,
|
|
3839
|
+
AltLeft: Key.leftAlt,
|
|
3840
|
+
AltRight: Key.rightAlt,
|
|
3841
|
+
MetaLeft: Key.leftSuper,
|
|
3842
|
+
MetaRight: Key.rightSuper,
|
|
3843
|
+
KeyA: Key.a,
|
|
3844
|
+
KeyB: Key.b,
|
|
3845
|
+
KeyC: Key.c,
|
|
3846
|
+
KeyD: Key.d,
|
|
3847
|
+
KeyE: Key.e,
|
|
3848
|
+
KeyF: Key.f,
|
|
3849
|
+
KeyG: Key.g,
|
|
3850
|
+
KeyH: Key.h,
|
|
3851
|
+
KeyI: Key.i,
|
|
3852
|
+
KeyJ: Key.j,
|
|
3853
|
+
KeyK: Key.k,
|
|
3854
|
+
KeyL: Key.l,
|
|
3855
|
+
KeyM: Key.m,
|
|
3856
|
+
KeyN: Key.n,
|
|
3857
|
+
KeyO: Key.o,
|
|
3858
|
+
KeyP: Key.p,
|
|
3859
|
+
KeyQ: Key.q,
|
|
3860
|
+
KeyR: Key.r,
|
|
3861
|
+
KeyS: Key.s,
|
|
3862
|
+
KeyT: Key.t,
|
|
3863
|
+
KeyU: Key.u,
|
|
3864
|
+
KeyV: Key.v,
|
|
3865
|
+
KeyW: Key.w,
|
|
3866
|
+
KeyX: Key.x,
|
|
3867
|
+
KeyY: Key.y,
|
|
3868
|
+
KeyZ: Key.z,
|
|
3869
|
+
Digit0: Key.key0,
|
|
3870
|
+
Digit1: Key.key1,
|
|
3871
|
+
Digit2: Key.key2,
|
|
3872
|
+
Digit3: Key.key3,
|
|
3873
|
+
Digit4: Key.key4,
|
|
3874
|
+
Digit5: Key.key5,
|
|
3875
|
+
Digit6: Key.key6,
|
|
3876
|
+
Digit7: Key.key7,
|
|
3877
|
+
Digit8: Key.key8,
|
|
3878
|
+
Digit9: Key.key9,
|
|
3879
|
+
Numpad0: Key.kp0,
|
|
3880
|
+
Numpad1: Key.kp1,
|
|
3881
|
+
Numpad2: Key.kp2,
|
|
3882
|
+
Numpad3: Key.kp3,
|
|
3883
|
+
Numpad4: Key.kp4,
|
|
3884
|
+
Numpad5: Key.kp5,
|
|
3885
|
+
Numpad6: Key.kp6,
|
|
3886
|
+
Numpad7: Key.kp7,
|
|
3887
|
+
Numpad8: Key.kp8,
|
|
3888
|
+
Numpad9: Key.kp9,
|
|
3889
|
+
NumpadDecimal: Key.kpDecimal,
|
|
3890
|
+
NumpadDivide: Key.kpDivide,
|
|
3891
|
+
NumpadMultiply: Key.kpMultiply,
|
|
3892
|
+
NumpadSubtract: Key.kpSubtract,
|
|
3893
|
+
NumpadAdd: Key.kpAdd,
|
|
3894
|
+
NumpadEnter: Key.kpEnter,
|
|
3895
|
+
NumpadEqual: Key.kpEqual,
|
|
3896
|
+
Minus: Key.minus,
|
|
3897
|
+
Equal: Key.equal,
|
|
3898
|
+
BracketLeft: Key.leftBracket,
|
|
3899
|
+
BracketRight: Key.rightBracket,
|
|
3900
|
+
Backslash: Key.backslash,
|
|
3901
|
+
Semicolon: Key.semicolon,
|
|
3902
|
+
Quote: Key.apostrophe,
|
|
3903
|
+
Backquote: Key.graveAccent,
|
|
3904
|
+
Comma: Key.comma,
|
|
3905
|
+
Period: Key.period,
|
|
3906
|
+
Slash: Key.slash,
|
|
3907
|
+
IntlBackslash: Key.world1,
|
|
3908
|
+
IntlRo: Key.world2,
|
|
3909
|
+
Space: Key.space,
|
|
3910
|
+
Enter: Key.enter,
|
|
3911
|
+
Tab: Key.tab,
|
|
3912
|
+
Backspace: Key.backspace,
|
|
3913
|
+
Insert: Key.insert,
|
|
3914
|
+
Delete: Key.deleteKey,
|
|
3915
|
+
Escape: Key.escape,
|
|
3916
|
+
ArrowRight: Key.right,
|
|
3917
|
+
ArrowLeft: Key.left,
|
|
3918
|
+
ArrowDown: Key.down,
|
|
3919
|
+
ArrowUp: Key.up,
|
|
3920
|
+
PageUp: Key.pageUp,
|
|
3921
|
+
PageDown: Key.pageDown,
|
|
3922
|
+
Home: Key.home,
|
|
3923
|
+
End: Key.end,
|
|
3924
|
+
CapsLock: Key.capsLock,
|
|
3925
|
+
ScrollLock: Key.scrollLock,
|
|
3926
|
+
NumLock: Key.numLock,
|
|
3927
|
+
PrintScreen: Key.printScreen,
|
|
3928
|
+
Pause: Key.pause,
|
|
3929
|
+
ContextMenu: Key.menu,
|
|
3930
|
+
F1: Key.f1,
|
|
3931
|
+
F2: Key.f2,
|
|
3932
|
+
F3: Key.f3,
|
|
3933
|
+
F4: Key.f4,
|
|
3934
|
+
F5: Key.f5,
|
|
3935
|
+
F6: Key.f6,
|
|
3936
|
+
F7: Key.f7,
|
|
3937
|
+
F8: Key.f8,
|
|
3938
|
+
F9: Key.f9,
|
|
3939
|
+
F10: Key.f10,
|
|
3940
|
+
F11: Key.f11,
|
|
3941
|
+
F12: Key.f12,
|
|
3942
|
+
F13: Key.f13,
|
|
3943
|
+
F14: Key.f14,
|
|
3944
|
+
F15: Key.f15,
|
|
3945
|
+
F16: Key.f16,
|
|
3946
|
+
F17: Key.f17,
|
|
3947
|
+
F18: Key.f18,
|
|
3948
|
+
F19: Key.f19,
|
|
3949
|
+
F20: Key.f20,
|
|
3950
|
+
F21: Key.f21,
|
|
3951
|
+
F22: Key.f22,
|
|
3952
|
+
F23: Key.f23,
|
|
3953
|
+
F24: Key.f24,
|
|
3954
|
+
F25: Key.f25,
|
|
3955
|
+
};
|
|
3956
|
+
// Unshifted characters (event.key, lowercased) that name a Rive key.
|
|
3957
|
+
var CHAR_TO_KEY = (function () {
|
|
3958
|
+
var map = {
|
|
3959
|
+
" ": Key.space,
|
|
3960
|
+
"'": Key.apostrophe,
|
|
3961
|
+
",": Key.comma,
|
|
3962
|
+
"-": Key.minus,
|
|
3963
|
+
".": Key.period,
|
|
3964
|
+
"/": Key.slash,
|
|
3965
|
+
";": Key.semicolon,
|
|
3966
|
+
"=": Key.equal,
|
|
3967
|
+
"[": Key.leftBracket,
|
|
3968
|
+
"\\": Key.backslash,
|
|
3969
|
+
"]": Key.rightBracket,
|
|
3970
|
+
"`": Key.graveAccent,
|
|
3971
|
+
};
|
|
3972
|
+
for (var c = 0; c < 26; c++)
|
|
3973
|
+
map[String.fromCharCode(97 + c)] = Key.a + c;
|
|
3974
|
+
for (var d = 0; d <= 9; d++)
|
|
3975
|
+
map[String(d)] = Key.key0 + d;
|
|
3976
|
+
return map;
|
|
3977
|
+
})();
|
|
3978
|
+
// Non-printable event.key values; each shares its name with its code.
|
|
3979
|
+
var NAMED_KEYS = new Set(__spreadArray([
|
|
3980
|
+
"Enter",
|
|
3981
|
+
"Tab",
|
|
3982
|
+
"Backspace",
|
|
3983
|
+
"Insert",
|
|
3984
|
+
"Delete",
|
|
3985
|
+
"Escape",
|
|
3986
|
+
"ArrowRight",
|
|
3987
|
+
"ArrowLeft",
|
|
3988
|
+
"ArrowDown",
|
|
3989
|
+
"ArrowUp",
|
|
3990
|
+
"PageUp",
|
|
3991
|
+
"PageDown",
|
|
3992
|
+
"Home",
|
|
3993
|
+
"End",
|
|
3994
|
+
"CapsLock",
|
|
3995
|
+
"ScrollLock",
|
|
3996
|
+
"NumLock",
|
|
3997
|
+
"PrintScreen",
|
|
3998
|
+
"Pause",
|
|
3999
|
+
"ContextMenu"
|
|
4000
|
+
], Array.from({ length: 25 }, function (_, i) { return "F".concat(i + 1); }), true));
|
|
4001
|
+
/**
|
|
4002
|
+
* Maps a KeyboardEvent to a Rive key, or null if Rive has no equivalent.
|
|
4003
|
+
*
|
|
4004
|
+
* Resolves the logical key: what the user's layout labels the key, ignoring
|
|
4005
|
+
* Shift, so a listener on "A" fires on AZERTY's A too. `event.key` is preferred;
|
|
4006
|
+
* `event.code` is the fallback when `key` isn't a plain unshifted character
|
|
4007
|
+
* (shifted symbols, Option/AltGr output, non-Latin letters, dead keys).
|
|
4008
|
+
* Digit-row and numpad keys skip the character lookup so AZERTY's digit row
|
|
4009
|
+
* still reports digits and numpad digits stay distinct from the digit row.
|
|
4010
|
+
*/
|
|
4011
|
+
function keyboardEventToRiveKey(event) {
|
|
4012
|
+
var _a, _b;
|
|
4013
|
+
var code = event.code, key = event.key;
|
|
4014
|
+
if (NAMED_KEYS.has(key)) {
|
|
4015
|
+
// NumpadEnter reports key "Enter"; keep it distinct.
|
|
4016
|
+
return code === "NumpadEnter" ? Key.kpEnter : (_a = CODE_TO_KEY[key]) !== null && _a !== void 0 ? _a : null;
|
|
4017
|
+
}
|
|
4018
|
+
if (!code.startsWith("Digit") && !code.startsWith("Numpad") && key) {
|
|
4019
|
+
var fromChar = CHAR_TO_KEY[key.toLowerCase()];
|
|
4020
|
+
if (fromChar !== undefined)
|
|
4021
|
+
return fromChar;
|
|
4022
|
+
}
|
|
4023
|
+
return (_b = CODE_TO_KEY[code]) !== null && _b !== void 0 ? _b : null;
|
|
4024
|
+
}
|
|
4025
|
+
function modifiersFromEvent(event) {
|
|
4026
|
+
var modifiers = KeyModifiers.none;
|
|
4027
|
+
if (event.shiftKey)
|
|
4028
|
+
modifiers |= KeyModifiers.shift;
|
|
4029
|
+
if (event.ctrlKey)
|
|
4030
|
+
modifiers |= KeyModifiers.ctrl;
|
|
4031
|
+
if (event.altKey)
|
|
4032
|
+
modifiers |= KeyModifiers.alt;
|
|
4033
|
+
if (event.metaKey)
|
|
4034
|
+
modifiers |= KeyModifiers.meta;
|
|
4035
|
+
return modifiers;
|
|
4036
|
+
}
|
|
4037
|
+
|
|
4038
|
+
|
|
4039
|
+
/***/ }),
|
|
4040
|
+
/* 16 */
|
|
4041
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4042
|
+
|
|
4043
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4044
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4045
|
+
/* harmony export */ TextInputProxy: () => (/* binding */ TextInputProxy)
|
|
4046
|
+
/* harmony export */ });
|
|
4047
|
+
/* harmony import */ var _canvasOffset__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
|
|
4048
|
+
|
|
4049
|
+
// 16px: the smallest font size at which iOS Safari doesn't zoom on focus
|
|
4050
|
+
var FONT_SIZE_PX = 16;
|
|
4051
|
+
/** Capture-critical attributes decorate() must not touch. */
|
|
4052
|
+
var PROTECTED_ATTRS = new Set([
|
|
4053
|
+
"type",
|
|
4054
|
+
"value",
|
|
4055
|
+
"style",
|
|
4056
|
+
"tabindex",
|
|
4057
|
+
"autocapitalize",
|
|
4058
|
+
"autocomplete",
|
|
4059
|
+
"autocorrect",
|
|
4060
|
+
"spellcheck",
|
|
4061
|
+
]);
|
|
4062
|
+
/**
|
|
4063
|
+
* Invisible per-instance <input> capturing IME/dead-key/paste text; focusable inside a
|
|
4064
|
+
* gesture to raise mobile keyboards. Always empty: C++ owns value and caret. Decorated
|
|
4065
|
+
* for AT only while it holds DOM focus.
|
|
4066
|
+
*/
|
|
4067
|
+
var TextInputProxy = /** @class */ (function () {
|
|
4068
|
+
function TextInputProxy(params) {
|
|
4069
|
+
var _this = this;
|
|
4070
|
+
// True between compositionstart/compositionend; we never commit mid-composition.
|
|
4071
|
+
this.composing = false;
|
|
4072
|
+
// Names set by decorate(), removed by resetDecoration().
|
|
4073
|
+
this.decoratedKeys = new Set();
|
|
4074
|
+
// Last written left/top, to skip no-op style writes.
|
|
4075
|
+
this.lastLeft = NaN;
|
|
4076
|
+
this.lastTop = NaN;
|
|
4077
|
+
/** Re-sync before input: the canvas may have scrolled since the session began. */
|
|
4078
|
+
this.reposition = function () { return _this.positionOverCanvas(); };
|
|
4079
|
+
this.onCompositionStart = function () {
|
|
4080
|
+
_this.composing = true;
|
|
4081
|
+
};
|
|
4082
|
+
this.onCompositionEnd = function () {
|
|
4083
|
+
_this.composing = false;
|
|
4084
|
+
// The composed text is now committed in element.value; forward it here. A
|
|
4085
|
+
// trailing `input` event (order varies by browser) then sees an empty field.
|
|
4086
|
+
_this.commit();
|
|
4087
|
+
};
|
|
4088
|
+
this.onInput = function () {
|
|
4089
|
+
if (_this.composing)
|
|
4090
|
+
return;
|
|
4091
|
+
_this.commit();
|
|
4092
|
+
};
|
|
4093
|
+
// An <input type=text> strips line breaks from its value, so forward the clipboard
|
|
4094
|
+
// text directly. Core's single-line fields strip them themselves.
|
|
4095
|
+
this.onPaste = function (event) {
|
|
4096
|
+
var _a;
|
|
4097
|
+
var text = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData("text/plain");
|
|
4098
|
+
if (!text)
|
|
4099
|
+
return;
|
|
4100
|
+
event.preventDefault();
|
|
4101
|
+
_this.params.textInput(text.replace(/\r\n?/g, "\n"));
|
|
4102
|
+
};
|
|
4103
|
+
this.onBlur = function (event) {
|
|
4104
|
+
_this.params.onBlur(event.relatedTarget);
|
|
4105
|
+
};
|
|
4106
|
+
this.params = params;
|
|
4107
|
+
this.element = this.createElement();
|
|
4108
|
+
this.positionOverCanvas();
|
|
4109
|
+
// Order vs. the overlay is unspecified; fine, Tab release starts from the canvas.
|
|
4110
|
+
this.params.container.appendChild(this.element);
|
|
4111
|
+
}
|
|
4112
|
+
// Registered first so it runs before the key handler inserts or moves the caret.
|
|
4113
|
+
TextInputProxy.prototype.listeners = function () {
|
|
4114
|
+
return [
|
|
4115
|
+
["keydown", this.reposition],
|
|
4116
|
+
["beforeinput", this.reposition],
|
|
4117
|
+
["keydown", this.params.onKeyDown],
|
|
4118
|
+
["keyup", this.params.onKeyUp],
|
|
4119
|
+
["input", this.onInput],
|
|
4120
|
+
["compositionstart", this.onCompositionStart],
|
|
4121
|
+
["compositionend", this.onCompositionEnd],
|
|
4122
|
+
["paste", this.onPaste],
|
|
4123
|
+
["copy", this.params.onCopy],
|
|
4124
|
+
["blur", this.onBlur],
|
|
4125
|
+
];
|
|
4126
|
+
};
|
|
4127
|
+
TextInputProxy.prototype.createElement = function () {
|
|
4128
|
+
var el = document.createElement("input");
|
|
4129
|
+
el.type = "text";
|
|
4130
|
+
// Focusable but never in native tab order (Rive drives traversal synthetically),
|
|
4131
|
+
// and invisible without display:none (which would forbid focus).
|
|
4132
|
+
el.tabIndex = -1;
|
|
4133
|
+
el.setAttribute("aria-hidden", "true");
|
|
4134
|
+
// Always empty, so autocapitalize/autocorrect would misfire.
|
|
4135
|
+
el.setAttribute("autocapitalize", "off");
|
|
4136
|
+
el.setAttribute("autocomplete", "off");
|
|
4137
|
+
el.setAttribute("autocorrect", "off");
|
|
4138
|
+
el.spellcheck = false;
|
|
4139
|
+
// Over the canvas (not display:none) so iOS doesn't scroll-jump on keyboard open.
|
|
4140
|
+
// font-size must stay 16px or iOS Safari zooms on focus.
|
|
4141
|
+
el.style.cssText =
|
|
4142
|
+
"position:absolute;width:1px;height:1px;padding:0;margin:0;border:0;" +
|
|
4143
|
+
"outline:none;opacity:0;background:transparent;color:transparent;" +
|
|
4144
|
+
"caret-color:transparent;overflow:hidden;resize:none;z-index:0;" +
|
|
4145
|
+
// Focused programmatically only; must not swallow clicks
|
|
4146
|
+
"pointer-events:none;" +
|
|
4147
|
+
"font-size:".concat(FONT_SIZE_PX, "px;line-height:1;");
|
|
4148
|
+
for (var _i = 0, _a = this.listeners(); _i < _a.length; _i++) {
|
|
4149
|
+
var _b = _a[_i], type = _b[0], listener = _b[1];
|
|
4150
|
+
el.addEventListener(type, listener);
|
|
4151
|
+
}
|
|
4152
|
+
return el;
|
|
4153
|
+
};
|
|
4154
|
+
TextInputProxy.prototype.positionOverCanvas = function () {
|
|
4155
|
+
// Track the canvas (browsers scroll to the caret); clamp on-screen, one caret line box
|
|
4156
|
+
// (FONT_SIZE_PX) from the far edges, or the root scrolls to reveal it.
|
|
4157
|
+
var _a = (0,_canvasOffset__WEBPACK_IMPORTED_MODULE_0__.canvasOffset)(this.params.canvas), top = _a.top, left = _a.left;
|
|
4158
|
+
if (window.innerHeight > 0) {
|
|
4159
|
+
var r = this.params.canvas.getBoundingClientRect();
|
|
4160
|
+
top += clamp(r.top, 0, window.innerHeight - FONT_SIZE_PX) - r.top;
|
|
4161
|
+
left += clamp(r.left, 0, window.innerWidth - FONT_SIZE_PX) - r.left;
|
|
4162
|
+
}
|
|
4163
|
+
if (left !== this.lastLeft) {
|
|
4164
|
+
this.element.style.left = "".concat(left, "px");
|
|
4165
|
+
this.lastLeft = left;
|
|
4166
|
+
}
|
|
4167
|
+
if (top !== this.lastTop) {
|
|
4168
|
+
this.element.style.top = "".concat(top, "px");
|
|
4169
|
+
this.lastTop = top;
|
|
4170
|
+
}
|
|
4171
|
+
};
|
|
4172
|
+
/**
|
|
4173
|
+
* Forward the field's text to Rive and clear it.
|
|
4174
|
+
*
|
|
4175
|
+
* TODO: iOS won't autorepeat Backspace in an empty field (needs a text mirror).
|
|
4176
|
+
* */
|
|
4177
|
+
TextInputProxy.prototype.commit = function () {
|
|
4178
|
+
var text = this.element.value;
|
|
4179
|
+
if (!text)
|
|
4180
|
+
return;
|
|
4181
|
+
this.element.value = "";
|
|
4182
|
+
this.params.textInput(text);
|
|
4183
|
+
};
|
|
4184
|
+
/** Clear any transient value and decoration. Does not blur the element. */
|
|
4185
|
+
TextInputProxy.prototype.endSession = function () {
|
|
4186
|
+
this.element.value = "";
|
|
4187
|
+
// Browsers fire compositionend on blur, but a stuck flag would drop every
|
|
4188
|
+
// keystroke of the next session.
|
|
4189
|
+
this.composing = false;
|
|
4190
|
+
// Also covers blur-out, which bypasses the overlay.
|
|
4191
|
+
this.resetDecoration();
|
|
4192
|
+
};
|
|
4193
|
+
/** Must be called synchronously inside a gesture on iOS to raise the keyboard. */
|
|
4194
|
+
TextInputProxy.prototype.focus = function () {
|
|
4195
|
+
// Reposition first: iOS scrolls the focused input into view when the keyboard opens.
|
|
4196
|
+
this.positionOverCanvas();
|
|
4197
|
+
this.element.focus({ preventScroll: true });
|
|
4198
|
+
};
|
|
4199
|
+
TextInputProxy.prototype.hasDomFocus = function () {
|
|
4200
|
+
return document.activeElement === this.element;
|
|
4201
|
+
};
|
|
4202
|
+
TextInputProxy.prototype.owns = function (target) {
|
|
4203
|
+
return target === this.element;
|
|
4204
|
+
};
|
|
4205
|
+
/** See EditingHost.decorate. */
|
|
4206
|
+
TextInputProxy.prototype.decorate = function (attrs) {
|
|
4207
|
+
// aria-hidden outranks every attribute set below, so it must come off before this
|
|
4208
|
+
// element can stand in as the accessible element for the focused node.
|
|
4209
|
+
this.element.removeAttribute("aria-hidden");
|
|
4210
|
+
for (var _i = 0, _a = Object.entries(attrs); _i < _a.length; _i++) {
|
|
4211
|
+
var _b = _a[_i], name_1 = _b[0], value = _b[1];
|
|
4212
|
+
// Never override capture attrs.
|
|
4213
|
+
if (PROTECTED_ATTRS.has(name_1.toLowerCase()))
|
|
4214
|
+
continue;
|
|
4215
|
+
if (value === null) {
|
|
4216
|
+
this.element.removeAttribute(name_1);
|
|
4217
|
+
this.decoratedKeys.delete(name_1);
|
|
4218
|
+
}
|
|
4219
|
+
else {
|
|
4220
|
+
// Skip no-op writes: setting an attribute to the value it already has still
|
|
4221
|
+
// emits a mutation, and assistive tech is focused on this element mid-edit.
|
|
4222
|
+
if (this.element.getAttribute(name_1) !== value) {
|
|
4223
|
+
this.element.setAttribute(name_1, value);
|
|
4224
|
+
}
|
|
4225
|
+
this.decoratedKeys.add(name_1);
|
|
4226
|
+
}
|
|
4227
|
+
}
|
|
4228
|
+
};
|
|
4229
|
+
/**
|
|
4230
|
+
* type=password for obscured fields so AT doesn't echo keys.
|
|
4231
|
+
* TODO: source "type" from Core, not semantics.
|
|
4232
|
+
*/
|
|
4233
|
+
TextInputProxy.prototype.setSecure = function (secure) {
|
|
4234
|
+
var type = secure ? "password" : "text";
|
|
4235
|
+
if (this.element.type !== type)
|
|
4236
|
+
this.element.type = type;
|
|
4237
|
+
};
|
|
4238
|
+
/** Drop all decoration and return to the AT-invisible baseline. */
|
|
4239
|
+
TextInputProxy.prototype.resetDecoration = function () {
|
|
4240
|
+
var _this = this;
|
|
4241
|
+
this.setSecure(false);
|
|
4242
|
+
this.decoratedKeys.forEach(function (name) { return _this.element.removeAttribute(name); });
|
|
4243
|
+
this.decoratedKeys.clear();
|
|
4244
|
+
this.element.setAttribute("aria-hidden", "true");
|
|
4245
|
+
};
|
|
4246
|
+
TextInputProxy.prototype.cleanup = function () {
|
|
4247
|
+
for (var _i = 0, _a = this.listeners(); _i < _a.length; _i++) {
|
|
4248
|
+
var _b = _a[_i], type = _b[0], listener = _b[1];
|
|
4249
|
+
this.element.removeEventListener(type, listener);
|
|
4250
|
+
}
|
|
4251
|
+
this.element.remove();
|
|
4252
|
+
};
|
|
4253
|
+
return TextInputProxy;
|
|
4254
|
+
}());
|
|
4255
|
+
|
|
4256
|
+
function clamp(v, min, max) {
|
|
4257
|
+
return Math.min(Math.max(v, min), Math.max(min, max));
|
|
4258
|
+
}
|
|
4259
|
+
|
|
4260
|
+
|
|
4261
|
+
/***/ }),
|
|
4262
|
+
/* 17 */
|
|
2965
4263
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2966
4264
|
|
|
2967
4265
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -3014,7 +4312,7 @@ function sanitizeUrl(url) {
|
|
|
3014
4312
|
|
|
3015
4313
|
|
|
3016
4314
|
/***/ }),
|
|
3017
|
-
/*
|
|
4315
|
+
/* 18 */
|
|
3018
4316
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3019
4317
|
|
|
3020
4318
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -3314,7 +4612,7 @@ var createFinalization = function (target, finalizable) {
|
|
|
3314
4612
|
|
|
3315
4613
|
|
|
3316
4614
|
/***/ }),
|
|
3317
|
-
/*
|
|
4615
|
+
/* 19 */
|
|
3318
4616
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3319
4617
|
|
|
3320
4618
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -3486,7 +4784,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3486
4784
|
/* harmony import */ var _animation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
|
3487
4785
|
/* harmony import */ var _runtimeLoader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
|
3488
4786
|
/* harmony import */ var _semantics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
|
|
3489
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
4787
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
|
|
3490
4788
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
3491
4789
|
var extendStatics = function (d, b) {
|
|
3492
4790
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -5374,6 +6672,10 @@ var Rive = /** @class */ (function () {
|
|
|
5374
6672
|
this._dataEnums = null;
|
|
5375
6673
|
this._tabIndex = null;
|
|
5376
6674
|
this._prevHasFocus = false;
|
|
6675
|
+
this._prevWantsTextInputSession = false;
|
|
6676
|
+
// Pointer-down defers the proxy focus: mousedown's default would refocus the canvas and
|
|
6677
|
+
// touchstart isn't user activation; pointer-up focuses it.
|
|
6678
|
+
this._inPointerDownDrain = false;
|
|
5377
6679
|
this._focusOptions = {
|
|
5378
6680
|
allowFocusInterrupt: false,
|
|
5379
6681
|
};
|
|
@@ -5409,6 +6711,7 @@ var Rive = /** @class */ (function () {
|
|
|
5409
6711
|
_this.resizeToCanvas();
|
|
5410
6712
|
}
|
|
5411
6713
|
};
|
|
6714
|
+
this.isEditingHostFocused = function () { var _a, _b; return (_b = (_a = _this._keyboardInteractions) === null || _a === void 0 ? void 0 : _a.isEditingHostFocused()) !== null && _b !== void 0 ? _b : false; };
|
|
5412
6715
|
// Tracks the current animation frame request
|
|
5413
6716
|
this.frameRequestId = null;
|
|
5414
6717
|
/**
|
|
@@ -5729,11 +7032,21 @@ var Rive = /** @class */ (function () {
|
|
|
5729
7032
|
dispatchPointerExit: dispatchPointerExit,
|
|
5730
7033
|
enableMultiTouch: enableMultiTouch,
|
|
5731
7034
|
layoutScaleFactor: this._layout.layoutScaleFactor,
|
|
5732
|
-
advanceAndDrain: this.
|
|
7035
|
+
advanceAndDrain: this.advanceAndDrainForPointer.bind(this),
|
|
7036
|
+
summonKeyboard: this.summonKeyboardForGesture.bind(this),
|
|
7037
|
+
isTextProxyFocused: this.isEditingHostFocused,
|
|
5733
7038
|
});
|
|
5734
7039
|
this.ensureKeyboardInteractions();
|
|
5735
7040
|
}
|
|
5736
7041
|
};
|
|
7042
|
+
Object.defineProperty(Rive.prototype, "focusStateMachine", {
|
|
7043
|
+
// Assumes a single state machine drives focus.
|
|
7044
|
+
get: function () {
|
|
7045
|
+
return this.animator.stateMachines.find(function (sm) { return sm.playing && sm.hasFocusNodes; });
|
|
7046
|
+
},
|
|
7047
|
+
enumerable: false,
|
|
7048
|
+
configurable: true
|
|
7049
|
+
});
|
|
5737
7050
|
/**
|
|
5738
7051
|
* Wire keyboard interactions when a playing state machine has focus nodes.
|
|
5739
7052
|
* Called at listener setup and lazily each frame so late-bound bindable artboards work.
|
|
@@ -5746,7 +7059,7 @@ var Rive = /** @class */ (function () {
|
|
|
5746
7059
|
!(this.canvas instanceof HTMLCanvasElement)) {
|
|
5747
7060
|
return;
|
|
5748
7061
|
}
|
|
5749
|
-
var smWithFocusNodes = this.
|
|
7062
|
+
var smWithFocusNodes = this.focusStateMachine;
|
|
5750
7063
|
if (!smWithFocusNodes) {
|
|
5751
7064
|
return;
|
|
5752
7065
|
}
|
|
@@ -5756,16 +7069,51 @@ var Rive = /** @class */ (function () {
|
|
|
5756
7069
|
}
|
|
5757
7070
|
this._keyboardInteractions = new _utils__WEBPACK_IMPORTED_MODULE_3__.KeyboardInteractions({
|
|
5758
7071
|
canvas: this.canvas,
|
|
5759
|
-
stateMachine: smWithFocusNodes.instance,
|
|
7072
|
+
stateMachine: smWithFocusNodes.instance,
|
|
5760
7073
|
hasFocusNodes: true,
|
|
5761
7074
|
getOverlayElement: function () { var _a, _b; return (_b = (_a = _this._accessibilityOverlay) === null || _a === void 0 ? void 0 : _a.getSemanticOverlayContainer()) !== null && _b !== void 0 ? _b : null; },
|
|
5762
7075
|
});
|
|
5763
7076
|
};
|
|
7077
|
+
/** Runs inside touchend/mouseup so focusing the proxy raises the mobile keyboard. */
|
|
7078
|
+
Rive.prototype.summonKeyboardForGesture = function () {
|
|
7079
|
+
if (!this._keyboardInteractions)
|
|
7080
|
+
return;
|
|
7081
|
+
var activeSm = this.focusStateMachine;
|
|
7082
|
+
if (!activeSm)
|
|
7083
|
+
return;
|
|
7084
|
+
if (this.wantsTextInputSession(activeSm.focusState().expectsKeyboardInput)) {
|
|
7085
|
+
this._keyboardInteractions.summonForPointer();
|
|
7086
|
+
}
|
|
7087
|
+
};
|
|
7088
|
+
/** expectsKeyboardInput, and (with semantics on) the focused node is a textField. */
|
|
7089
|
+
Rive.prototype.wantsTextInputSession = function (expectsKeyboardInput) {
|
|
7090
|
+
var _a;
|
|
7091
|
+
if (!expectsKeyboardInput)
|
|
7092
|
+
return false;
|
|
7093
|
+
var node = (_a = this._semanticTree) === null || _a === void 0 ? void 0 : _a.focusedNode();
|
|
7094
|
+
return node === undefined || node.role === _semantics__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.textField;
|
|
7095
|
+
};
|
|
7096
|
+
Rive.prototype.advanceAndDrainForPointer = function (elapsedTime, options) {
|
|
7097
|
+
if (!(options === null || options === void 0 ? void 0 : options.pointerDown)) {
|
|
7098
|
+
this.advanceAndReportChanges(elapsedTime);
|
|
7099
|
+
return;
|
|
7100
|
+
}
|
|
7101
|
+
this._inPointerDownDrain = true;
|
|
7102
|
+
try {
|
|
7103
|
+
this.advanceAndReportChanges(elapsedTime);
|
|
7104
|
+
}
|
|
7105
|
+
finally {
|
|
7106
|
+
this._inPointerDownDrain = false;
|
|
7107
|
+
}
|
|
7108
|
+
};
|
|
5764
7109
|
Rive.prototype.cleanupKeyboardInteractions = function () {
|
|
7110
|
+
var _a;
|
|
5765
7111
|
if (this._keyboardInteractions) {
|
|
5766
7112
|
this._keyboardInteractions.cleanup();
|
|
5767
7113
|
this._keyboardInteractions = null;
|
|
5768
7114
|
}
|
|
7115
|
+
this._prevWantsTextInputSession = false;
|
|
7116
|
+
(_a = this._accessibilityOverlay) === null || _a === void 0 ? void 0 : _a.releaseEditingHost(null, null);
|
|
5769
7117
|
};
|
|
5770
7118
|
/**
|
|
5771
7119
|
* Remove Rive Listeners setup on the canvas
|
|
@@ -5857,6 +7205,7 @@ var Rive = /** @class */ (function () {
|
|
|
5857
7205
|
_c.label = 4;
|
|
5858
7206
|
case 4:
|
|
5859
7207
|
this.file = this.riveFile.getInstance();
|
|
7208
|
+
this.reportDisplayScale();
|
|
5860
7209
|
// Initialize and draw frame
|
|
5861
7210
|
this.initArtboard(artboardName, animationNames, stateMachineNames, autoplay, autoBind);
|
|
5862
7211
|
// Initialize the artboard size
|
|
@@ -6101,56 +7450,69 @@ var Rive = /** @class */ (function () {
|
|
|
6101
7450
|
var _a, _b, _c;
|
|
6102
7451
|
return (_c = (_b = (_a = this.riveFile) === null || _a === void 0 ? void 0 : _a.deferredSession) === null || _b === void 0 ? void 0 : _b.recordedThisFrame()) !== null && _c !== void 0 ? _c : false;
|
|
6103
7452
|
};
|
|
6104
|
-
/**
|
|
6105
|
-
* Poll focus state each frame to see if we should focus/blur the canvas in case
|
|
6106
|
-
* Rive internally updated focus outside of user interaction (e.g., via listener action)
|
|
6107
|
-
*/
|
|
7453
|
+
/** Rive can move focus on its own, so reconcile the text session and DOM focus each frame. */
|
|
6108
7454
|
Rive.prototype.pollFocusState = function () {
|
|
6109
|
-
var _a, _b;
|
|
6110
7455
|
this.ensureKeyboardInteractions();
|
|
6111
|
-
|
|
7456
|
+
var ki = this._keyboardInteractions;
|
|
7457
|
+
var activeSm = ki ? this.focusStateMachine : undefined;
|
|
7458
|
+
if (!ki || !activeSm || !(this.canvas instanceof HTMLCanvasElement)) {
|
|
6112
7459
|
this._prevHasFocus = false;
|
|
7460
|
+
this._prevWantsTextInputSession = false;
|
|
6113
7461
|
return;
|
|
6114
7462
|
}
|
|
6115
|
-
var
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
7463
|
+
var _a = activeSm.focusState(), hasFocus = _a.hasFocus, expectsKeyboardInput = _a.expectsKeyboardInput;
|
|
7464
|
+
this.syncTextInputSession(ki, this.wantsTextInputSession(expectsKeyboardInput));
|
|
7465
|
+
this.syncRiveFocus(ki, this.canvas, hasFocus);
|
|
7466
|
+
};
|
|
7467
|
+
/** Begin/end the text session on wantsSession edges; decorate the proxy while it has DOM focus. */
|
|
7468
|
+
Rive.prototype.syncTextInputSession = function (ki, wantsSession) {
|
|
7469
|
+
var host = ki.editingHost;
|
|
7470
|
+
var overlay = this._accessibilityOverlay;
|
|
7471
|
+
if (wantsSession) {
|
|
7472
|
+
var began = !this._prevWantsTextInputSession;
|
|
7473
|
+
if (began) {
|
|
7474
|
+
// In-domain or opted-in only; during pointer-down, pointer-up focuses instead.
|
|
7475
|
+
var focusProxy = !this._inPointerDownDrain &&
|
|
7476
|
+
(ki.isInFocusDomain(document.activeElement) ||
|
|
7477
|
+
!!this._focusOptions.allowFocusInterrupt);
|
|
7478
|
+
ki.beginTextInputSession(focusProxy);
|
|
7479
|
+
}
|
|
7480
|
+
// The <input> proxy stands in for the semantic DOM field only while it holds DOM focus.
|
|
7481
|
+
if (overlay && this._semanticTree) {
|
|
7482
|
+
if (host.hasDomFocus()) {
|
|
7483
|
+
overlay.syncEditingHost(this._semanticTree, host, began || !overlay.hasEditingHost());
|
|
7484
|
+
}
|
|
7485
|
+
else if (overlay.hasEditingHost()) {
|
|
7486
|
+
overlay.releaseEditingHost(this._semanticTree, host);
|
|
7487
|
+
}
|
|
7488
|
+
}
|
|
6119
7489
|
}
|
|
6120
|
-
if (this.
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
var scope = (_a = this._accessibilityOverlay) === null || _a === void 0 ? void 0 : _a.getSemanticOverlayContainer();
|
|
6137
|
-
var focusAlreadyInScope = document.activeElement === this.canvas ||
|
|
6138
|
-
((_b = scope === null || scope === void 0 ? void 0 : scope.contains(document.activeElement)) !== null && _b !== void 0 ? _b : false);
|
|
6139
|
-
if (!focusAlreadyInScope && this._focusOptions.allowFocusInterrupt) {
|
|
6140
|
-
this.canvas.focus();
|
|
6141
|
-
}
|
|
6142
|
-
this._prevHasFocus = true;
|
|
7490
|
+
else if (this._prevWantsTextInputSession) {
|
|
7491
|
+
// Overlay hand-off first, ahead of endTextInputSession's park-on-canvas fallback.
|
|
7492
|
+
overlay === null || overlay === void 0 ? void 0 : overlay.releaseEditingHost(this._semanticTree, host);
|
|
7493
|
+
ki.endTextInputSession();
|
|
7494
|
+
}
|
|
7495
|
+
this._prevWantsTextInputSession = wantsSession;
|
|
7496
|
+
};
|
|
7497
|
+
/** Mirror Rive's hasFocus into the keyboard session state and, on opt-in, canvas focus. */
|
|
7498
|
+
Rive.prototype.syncRiveFocus = function (ki, canvas, hasFocus) {
|
|
7499
|
+
if (hasFocus) {
|
|
7500
|
+
ki.notifyRiveFocused();
|
|
7501
|
+
// Pull focus from outside Rive only with allowFocusInterrupt.
|
|
7502
|
+
if (!this._prevHasFocus) {
|
|
7503
|
+
if (!ki.isInFocusDomain(document.activeElement) &&
|
|
7504
|
+
this._focusOptions.allowFocusInterrupt) {
|
|
7505
|
+
canvas.focus();
|
|
6143
7506
|
}
|
|
6144
|
-
|
|
7507
|
+
this._prevHasFocus = true;
|
|
6145
7508
|
}
|
|
7509
|
+
}
|
|
7510
|
+
else {
|
|
6146
7511
|
this._prevHasFocus = false;
|
|
6147
|
-
//
|
|
6148
|
-
//
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
// intentional no-ops — EntryPending must stay put (a click awaiting its first Tab).
|
|
6152
|
-
if (this._keyboardInteractions.focusSessionState === _utils__WEBPACK_IMPORTED_MODULE_3__.FocusSessionState.RiveFocused) {
|
|
6153
|
-
this._keyboardInteractions.setFocusSessionState(_utils__WEBPACK_IMPORTED_MODULE_3__.FocusSessionState.NotFocused);
|
|
7512
|
+
// Rive released focus internally (e.g. a state change): drop the Tab trap so the next
|
|
7513
|
+
// Tab leaves the canvas.
|
|
7514
|
+
if (ki.focusSessionState === _utils__WEBPACK_IMPORTED_MODULE_3__.FocusSessionState.RiveFocused) {
|
|
7515
|
+
ki.setFocusSessionState(_utils__WEBPACK_IMPORTED_MODULE_3__.FocusSessionState.NotFocused);
|
|
6154
7516
|
}
|
|
6155
7517
|
}
|
|
6156
7518
|
};
|
|
@@ -6248,6 +7610,7 @@ var Rive = /** @class */ (function () {
|
|
|
6248
7610
|
instanceId: this._instanceId,
|
|
6249
7611
|
semanticsOptions: this.semanticsOptions,
|
|
6250
7612
|
allowFocusInterrupt: this._focusOptions.allowFocusInterrupt,
|
|
7613
|
+
isEditingHostFocused: this.isEditingHostFocused,
|
|
6251
7614
|
fireAction: function (nodeId, actionType) {
|
|
6252
7615
|
mainSm_1.fireSemanticAction(nodeId, actionType);
|
|
6253
7616
|
},
|
|
@@ -6785,6 +8148,7 @@ var Rive = /** @class */ (function () {
|
|
|
6785
8148
|
// Sets a new layout
|
|
6786
8149
|
set: function (layout) {
|
|
6787
8150
|
this._layout = layout;
|
|
8151
|
+
this.reportDisplayScale();
|
|
6788
8152
|
// Fit/alignment/bounds feed the overlay transform.
|
|
6789
8153
|
this._overlayTransformDirty = true;
|
|
6790
8154
|
// If the maxX or maxY are 0, then set them to the canvas width and height
|
|
@@ -7492,10 +8856,17 @@ var Rive = /** @class */ (function () {
|
|
|
7492
8856
|
this._overlayTransformDirty = true;
|
|
7493
8857
|
}
|
|
7494
8858
|
this._devicePixelRatioUsed = value;
|
|
8859
|
+
this.reportDisplayScale();
|
|
7495
8860
|
},
|
|
7496
8861
|
enumerable: false,
|
|
7497
8862
|
configurable: true
|
|
7498
8863
|
});
|
|
8864
|
+
// Not per frame: the scale is per file, and instances sharing one would trade
|
|
8865
|
+
// it every frame.
|
|
8866
|
+
Rive.prototype.reportDisplayScale = function () {
|
|
8867
|
+
var _a;
|
|
8868
|
+
(_a = this.file) === null || _a === void 0 ? void 0 : _a.displayScale(this._devicePixelRatioUsed * this._layout.layoutScaleFactor);
|
|
8869
|
+
};
|
|
7499
8870
|
/**
|
|
7500
8871
|
* Sets the main view model instance and applies it (rebinds). Equivalent to
|
|
7501
8872
|
* `setViewModelInstance(vmi)` followed by `bind()`.
|