{"dependencies":[{"name":"@babel/runtime/helpers/interopRequireDefault","data":{"asyncType":null,"isESMImport":false,"locs":[],"key":"kslwqCIsh6ew+I1KeA1rlVRjsAk=","exportNames":["*"]}},{"name":"../addEventListener","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":10,"column":0,"index":181},"end":{"line":10,"column":55,"index":236}}],"key":"4xvCwHsxCKw+bkXrhCHsTztm4zw=","exportNames":["*"]}},{"name":"../canUseDom","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":11,"column":0,"index":237},"end":{"line":11,"column":37,"index":274}}],"key":"NAgv5vx4h/J1uxoLSWxqZG/Z81Y=","exportNames":["*"]}}],"output":[{"data":{"code":"__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,\"__esModule\",{value:!0}),e.addModalityListener=function(t){return y.add(t),()=>{y.delete(t)}},e.getActiveModality=function(){return s},e.getModality=function(){return l},e.testOnly_resetActiveModality=function(){v=!1,s=f,l=f};var n,o,u=r(d[1]),c=t(r(d[2])),s='keyboard',l='keyboard',v=!1,y=new Set,f='keyboard',E='mouse',L='touch',h='contextmenu',p='mousedown',w='mousemove',b='mouseup',M='pointerdown',_='pointermove',k='scroll',K='selectionchange',A='touchcancel',O='touchmove',S='touchstart',j={passive:!0},x={capture:!0,passive:!0};function P(){null==n&&null==o||(null!=n&&(l=n,n=null),null!=o&&(s=o,o=null),z())}function q(t){var n=t.type;if(v||(n===p&&s!==E&&(l=E,s=E,z()),n===w&&l!==E&&(l=E,z())),n===S)return v=!0,t.touches&&t.touches.length>1&&(v=!1),void(s!==L&&(l=L,s=L,z()));n!==h&&n!==b&&n!==K&&n!==k&&n!==A&&n!==O||(v=!1)}function z(){var t={activeModality:s,modality:l};y.forEach(n=>{n(t)})}c.default&&((0,u.addEventListener)(window,'blur',function(){n=l,o=s,s=f,l=f,z(),v=!1},j),(0,u.addEventListener)(window,'focus',function(){P()},j),(0,u.addEventListener)(document,'keydown',function(t){t.metaKey||t.altKey||t.ctrlKey||l!==f&&(l=f,s=f,z())},x),(0,u.addEventListener)(document,'visibilitychange',function(){'hidden'!==document.visibilityState&&P()},x),(0,u.addEventListener)(document,M,q,x),(0,u.addEventListener)(document,_,q,x),(0,u.addEventListener)(document,h,q,x),(0,u.addEventListener)(document,p,q,x),(0,u.addEventListener)(document,w,q,x),(0,u.addEventListener)(document,b,q,x),(0,u.addEventListener)(document,A,q,x),(0,u.addEventListener)(document,O,q,x),(0,u.addEventListener)(document,S,q,x),(0,u.addEventListener)(document,K,q,x),(0,u.addEventListener)(document,k,q,x))});","lineCount":1,"map":[[1,113,178,7],[1,122,178,36,"listener"],[1,125,180,2],[1,132,179,2,"listeners"],[1,134,179,12,"add"],[1,138,179,16,"listener"],[1,141,180,9],[1,146,181,4,"listeners"],[1,148,181,14,"delete"],[1,155,181,21,"listener"],[1,158,183,0],[1,160],[1,180,172,7],[1,191,173,2],[1,198,173,9,"activeModality"],[1,199,174,0],[1,201],[1,215,175,7],[1,226,176,2],[1,233,176,9,"modality"],[1,234,177,0],[1,236],[1,267,184,7],[1,278,185,2,"isEmulatingMouseEvents"],[1,281,185,27],[1,283,186,2,"activeModality"],[1,285,186,19,"KEYBOARD"],[1,287,187,2,"modality"],[1,289,187,13,"KEYBOARD"],[1,290,188,0],[1,292,10,0],[1,296,15,4,"previousModality"],[1,298,16,4,"previousActiveModality"],[1,300,10,0,"_addEventListener"],[1,302,10,0,"r"],[1,304,10,0,"d"],[1,306,10,0],[1,310,11,0,"_canUseDom"],[1,312,11,0,"_interopRequireDefault"],[1,314,11,0,"r"],[1,316,11,0,"d"],[1,318,11,0],[1,323,13,4,"activeModality"],[1,325,13,21],[1,336,14,4,"modality"],[1,338,14,15],[1,349,17,4,"isEmulatingMouseEvents"],[1,352,17,29],[1,354,18,4,"listeners"],[1,356,18,16],[1,360,18,20,"Set"],[1,364,19,4,"KEYBOARD"],[1,366,19,15],[1,377,20,4,"MOUSE"],[1,379,20,12],[1,387,21,4,"TOUCH"],[1,389,21,12],[1,397,23,4,"CONTEXTMENU"],[1,399,23,18],[1,413,26,4,"MOUSEDOWN"],[1,415,26,16],[1,427,27,4,"MOUSEMOVE"],[1,429,27,16],[1,441,28,4,"MOUSEUP"],[1,443,28,14],[1,453,29,4,"POINTERDOWN"],[1,455,29,18],[1,469,30,4,"POINTERMOVE"],[1,471,30,18],[1,485,31,4,"SCROLL"],[1,487,31,13],[1,496,32,4,"SELECTIONCHANGE"],[1,498,32,22],[1,516,33,4,"TOUCHCANCEL"],[1,518,33,18],[1,532,34,4,"TOUCHMOVE"],[1,534,34,16],[1,546,35,4,"TOUCHSTART"],[1,548,35,17],[1,561,37,4,"bubbleOptions"],[1,563,37,20],[1,564,38,2,"passive"],[1,573,38,11],[1,576,40,4,"captureOptions"],[1,578,40,21],[1,579,41,2,"capture"],[1,588,41,11],[1,590,42,2,"passive"],[1,599,42,11],[1,602,44,0],[1,611,44,9,"restoreModality"],[1,615,45,26],[1,621,45,6,"previousModality"],[1,624,45,60],[1,630,45,34,"previousActiveModality"],[1,634,46,28],[1,640,46,8,"previousModality"],[1,644,47,6,"modality"],[1,646,47,17,"previousModality"],[1,648,48,6,"previousModality"],[1,650,48,25],[1,656,50,34],[1,662,50,8,"previousActiveModality"],[1,666,51,6,"activeModality"],[1,668,51,23,"previousActiveModality"],[1,670,52,6,"previousActiveModality"],[1,672,52,31],[1,678,54,4,"callListeners"],[1,682,56,0],[1,683,84,0],[1,692,84,9,"onPointerish"],[1,694,84,22,"event"],[1,697,85,2],[1,701,85,6,"eventType"],[1,703,85,18,"event"],[1,705,85,24,"type"],[1,710,122,4],[1,713,105,9,"isEmulatingMouseEvents"],[1,717,106,10,"eventType"],[1,721,106,24,"MOUSEDOWN"],[1,724,107,12,"activeModality"],[1,728,107,31,"MOUSE"],[1,732,108,10,"modality"],[1,734,108,21,"MOUSE"],[1,736,109,10,"activeModality"],[1,738,109,27,"MOUSE"],[1,740,110,10,"callListeners"],[1,745,113,10,"eventType"],[1,749,113,24,"MOUSEMOVE"],[1,752,114,12,"modality"],[1,756,114,25,"MOUSE"],[1,760,115,10,"modality"],[1,762,115,21,"MOUSE"],[1,764,116,10,"callListeners"],[1,770,122,8,"eventType"],[1,774,122,22,"TOUCHSTART"],[1,776,132,6],[1,783,123,6,"isEmulatingMouseEvents"],[1,786,123,31],[1,788,124,10,"event"],[1,790,124,16,"touches"],[1,799,124,27,"event"],[1,801,124,33,"touches"],[1,809,124,41,"length"],[1,816,124,50],[1,820,125,8,"isEmulatingMouseEvents"],[1,823,125,33],[1,831,127,10,"activeModality"],[1,835,127,29,"TOUCH"],[1,839,128,8,"modality"],[1,841,128,19,"TOUCH"],[1,843,129,8,"activeModality"],[1,845,129,25,"TOUCH"],[1,847,130,8,"callListeners"],[1,853,137,8,"eventType"],[1,857,137,22,"CONTEXTMENU"],[1,860,137,37,"eventType"],[1,864,137,51,"MOUSEUP"],[1,867,137,62,"eventType"],[1,871,137,76,"SELECTIONCHANGE"],[1,874,137,95,"eventType"],[1,878,137,109,"SCROLL"],[1,881,137,119,"eventType"],[1,885,137,133,"TOUCHCANCEL"],[1,888,137,148,"eventType"],[1,892,137,162,"TOUCHMOVE"],[1,896,138,6,"isEmulatingMouseEvents"],[1,899,138,31],[1,901,141,0],[1,902,163,0],[1,911,163,9,"callListeners"],[1,915,164,2],[1,919,164,6,"value"],[1,921,164,14],[1,922,165,4,"activeModality"],[1,939,166,4,"modality"],[1,951,168,2,"listeners"],[1,953,168,12,"forEach"],[1,961,168,20,"listener"],[1,965,169,4,"listener"],[1,967,169,13,"value"],[1,971,171,0],[1,972,142,4,"canUseDOM"],[1,985,144,2],[1,987,144,2,"addEventListener"],[1,1007,144,19,"window"],[1,1014,22,11],[1,1021,57,0],[1,1032,58,2,"previousModality"],[1,1034,58,21,"modality"],[1,1036,59,2,"previousActiveModality"],[1,1038,59,27,"activeModality"],[1,1040,60,2,"activeModality"],[1,1042,60,19,"KEYBOARD"],[1,1044,61,2,"modality"],[1,1046,61,13,"KEYBOARD"],[1,1048,62,2,"callListeners"],[1,1052,64,2,"isEmulatingMouseEvents"],[1,1055,64,27],[1,1056,65,0],[1,1058,144,47,"bubbleOptions"],[1,1062,145,2],[1,1064,145,2,"addEventListener"],[1,1084,145,19,"window"],[1,1091,24,12],[1,1099,66,0],[1,1110,67,2,"restoreModality"],[1,1113,68,0],[1,1115,145,49,"bubbleOptions"],[1,1119,148,2],[1,1121,148,2,"addEventListener"],[1,1141,148,19,"document"],[1,1150,25,14],[1,1160,69,0],[1,1169,69,19,"event"],[1,1172,70,6,"event"],[1,1174,70,12,"metaKey"],[1,1183,70,23,"event"],[1,1185,70,29,"altKey"],[1,1193,70,39,"event"],[1,1195,70,45,"ctrlKey"],[1,1204,73,6,"modality"],[1,1208,73,19,"KEYBOARD"],[1,1212,74,4,"modality"],[1,1214,74,15,"KEYBOARD"],[1,1216,75,4,"activeModality"],[1,1218,75,21,"KEYBOARD"],[1,1220,76,4,"callListeners"],[1,1224,78,0],[1,1226,148,49,"captureOptions"],[1,1230,149,2],[1,1232,149,2,"addEventListener"],[1,1252,149,19,"document"],[1,1261,36,23],[1,1280,79,0],[1,1291,80,35],[1,1302,80,6,"document"],[1,1311,80,15,"visibilityState"],[1,1328,81,4,"restoreModality"],[1,1331,83,0],[1,1333,149,67,"captureOptions"],[1,1337,150,2],[1,1339,150,2,"addEventListener"],[1,1359,150,19,"document"],[1,1368,150,29,"POINTERDOWN"],[1,1370,150,42,"onPointerish"],[1,1372,150,56,"captureOptions"],[1,1376,151,2],[1,1378,151,2,"addEventListener"],[1,1398,151,19,"document"],[1,1407,151,29,"POINTERMOVE"],[1,1409,151,42,"onPointerish"],[1,1411,151,56,"captureOptions"],[1,1415,153,2],[1,1417,153,2,"addEventListener"],[1,1437,153,19,"document"],[1,1446,153,29,"CONTEXTMENU"],[1,1448,153,42,"onPointerish"],[1,1450,153,56,"captureOptions"],[1,1454,154,2],[1,1456,154,2,"addEventListener"],[1,1476,154,19,"document"],[1,1485,154,29,"MOUSEDOWN"],[1,1487,154,40,"onPointerish"],[1,1489,154,54,"captureOptions"],[1,1493,155,2],[1,1495,155,2,"addEventListener"],[1,1515,155,19,"document"],[1,1524,155,29,"MOUSEMOVE"],[1,1526,155,40,"onPointerish"],[1,1528,155,54,"captureOptions"],[1,1532,156,2],[1,1534,156,2,"addEventListener"],[1,1554,156,19,"document"],[1,1563,156,29,"MOUSEUP"],[1,1565,156,38,"onPointerish"],[1,1567,156,52,"captureOptions"],[1,1571,157,2],[1,1573,157,2,"addEventListener"],[1,1593,157,19,"document"],[1,1602,157,29,"TOUCHCANCEL"],[1,1604,157,42,"onPointerish"],[1,1606,157,56,"captureOptions"],[1,1610,158,2],[1,1612,158,2,"addEventListener"],[1,1632,158,19,"document"],[1,1641,158,29,"TOUCHMOVE"],[1,1643,158,40,"onPointerish"],[1,1645,158,54,"captureOptions"],[1,1649,159,2],[1,1651,159,2,"addEventListener"],[1,1671,159,19,"document"],[1,1680,159,29,"TOUCHSTART"],[1,1682,159,41,"onPointerish"],[1,1684,159,55,"captureOptions"],[1,1688,160,2],[1,1690,160,2,"addEventListener"],[1,1710,160,19,"document"],[1,1719,160,29,"SELECTIONCHANGE"],[1,1721,160,46,"onPointerish"],[1,1723,160,60,"captureOptions"],[1,1727,161,2],[1,1729,161,2,"addEventListener"],[1,1749,161,19,"document"],[1,1758,161,29,"SCROLL"],[1,1760,161,37,"onPointerish"],[1,1762,161,51,"captureOptions"],[1,1765,188,1],[1,1768]],"functionMap":{"names":["","supportsPointerEvent","restoreModality","onBlurWindow","onFocusWindow","onKeyDown","onVisibilityChange","onPointerish","callListeners","listeners.forEach$argument_0","getActiveModality","getModality","addModalityListener","","testOnly_resetActiveModality"],"mappings":"AAA;2BCW,sED;AEgC;CFY;AGC;CHQ;AIC;CJE;AKC;CLS;AMC;CNI;AOC;CPyD;AQsB;oBCK;GDE;CRC;OUC;CVE;OWC;CXE;OYC;SCE;GDE;CZC;OcC"}},"type":"js/module"}]}