@wordpress/dom 3.23.0 → 3.25.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.25.0 (2023-01-11)
6
+
7
+ ## 3.24.0 (2023-01-02)
8
+
5
9
  ## 3.23.0 (2022-12-14)
6
10
 
7
11
  ## 3.22.0 (2022-11-16)
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Gutenberg
2
2
 
3
- Copyright 2016-2022 by the contributors
3
+ Copyright 2016-2023 by the contributors
4
4
 
5
5
  **License for Contributions (on and after April 15, 2021)**
6
6
 
package/build/tabbable.js CHANGED
@@ -179,17 +179,11 @@ function find(context) {
179
179
 
180
180
 
181
181
  function findPrevious(element) {
182
- const focusables = (0, _focusable.find)(element.ownerDocument.body);
183
- const index = focusables.indexOf(element);
184
-
185
- if (index === -1) {
186
- return undefined;
187
- } // Remove all focusables after and including `element`.
188
-
189
-
190
- focusables.length = index;
191
- const tabbable = filterTabbable(focusables);
192
- return tabbable[tabbable.length - 1];
182
+ return filterTabbable((0, _focusable.find)(element.ownerDocument.body)).reverse().find(focusable => {
183
+ return (// eslint-disable-next-line no-bitwise
184
+ element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_PRECEDING
185
+ );
186
+ });
193
187
  }
194
188
  /**
195
189
  * Given a focusable element, find the next tabbable element.
@@ -202,10 +196,10 @@ function findPrevious(element) {
202
196
 
203
197
 
204
198
  function findNext(element) {
205
- const focusables = (0, _focusable.find)(element.ownerDocument.body);
206
- const index = focusables.indexOf(element); // Remove all focusables before and including `element`.
207
-
208
- const remaining = focusables.slice(index + 1);
209
- return filterTabbable(remaining)[0];
199
+ return filterTabbable((0, _focusable.find)(element.ownerDocument.body)).find(focusable => {
200
+ return (// eslint-disable-next-line no-bitwise
201
+ element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_FOLLOWING
202
+ );
203
+ });
210
204
  }
211
205
  //# sourceMappingURL=tabbable.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/dom/src/tabbable.js"],"names":["getTabIndex","element","tabIndex","getAttribute","parseInt","isTabbableIndex","createStatefulCollapseRadioGroup","CHOSEN_RADIO_BY_NAME","collapseRadioGroup","result","nodeName","type","checked","name","concat","hasChosen","hasOwnProperty","isChosen","hadChosenElement","filter","e","mapElementToObjectTabbable","index","mapObjectTabbableToElement","object","compareObjectTabbables","a","b","aTabIndex","bTabIndex","filterTabbable","focusables","map","sort","reduce","find","context","findPrevious","ownerDocument","body","indexOf","undefined","length","tabbable","findNext","remaining","slice"],"mappings":";;;;;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,WAAT,CAAsBC,OAAtB,EAAgC;AAC/B,QAAMC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAsB,UAAtB,CAAjB;AACA,SAAOD,QAAQ,KAAK,IAAb,GAAoB,CAApB,GAAwBE,QAAQ,CAAEF,QAAF,EAAY,EAAZ,CAAvC;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASG,eAAT,CAA0BJ,OAA1B,EAAoC;AAC1C,SAAOD,WAAW,CAAEC,OAAF,CAAX,KAA2B,CAAC,CAAnC;AACA;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASK,gCAAT,GAA4C;AAC3C;AACA,QAAMC,oBAAoB,GAAG,EAA7B;AAEA,SAAO,SAASC,kBAAT;AACN;AAAuCC,EAAAA,MADjC;AAEN;AAAqCR,EAAAA,OAF/B,EAGL;AACD,UAAM;AAAES,MAAAA,QAAF;AAAYC,MAAAA,IAAZ;AAAkBC,MAAAA,OAAlB;AAA2BC,MAAAA;AAA3B,QAAoCZ,OAA1C,CADC,CAGD;;AACA,QAAKS,QAA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4C,SAAS,GAAGd,UAAU,CAACe,KAAX,CAAkBxB,KAAK,GAAG,CAA1B,CAAlB;AAEA,SAAOQ,cAAc,CAAEe,SAAF,CAAd,CAA6B,CAA7B,CAAP;AACA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { find as findFocusable } from './focusable';\n\n/**\n * Returns the tab index of the given element. In contrast with the tabIndex\n * property, this normalizes the default (0) to avoid browser inconsistencies,\n * operating under the assumption that this function is only ever called with a\n * focusable node.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1190261\n *\n * @param {Element} element Element from which to retrieve.\n *\n * @return {number} Tab index of element (default 0).\n */\nfunction getTabIndex( element ) {\n\tconst tabIndex = element.getAttribute( 'tabindex' );\n\treturn tabIndex === null ? 0 : parseInt( tabIndex, 10 );\n}\n\n/**\n * Returns true if the specified element is tabbable, or false otherwise.\n *\n * @param {Element} element Element to test.\n *\n * @return {boolean} Whether element is tabbable.\n */\nexport function isTabbableIndex( element ) {\n\treturn getTabIndex( element ) !== -1;\n}\n\n/** @typedef {Element & { type?: string, checked?: boolean, name?: string }} MaybeHTMLInputElement */\n\n/**\n * Returns a stateful reducer function which constructs a filtered array of\n * tabbable elements, where at most one radio input is selected for a given\n * name, giving priority to checked input, falling back to the first\n * encountered.\n *\n * @return {(acc: MaybeHTMLInputElement[], el: MaybeHTMLInputElement) => MaybeHTMLInputElement[]} Radio group collapse reducer.\n */\nfunction createStatefulCollapseRadioGroup() {\n\t/** @type {Record<string, MaybeHTMLInputElement>} */\n\tconst CHOSEN_RADIO_BY_NAME = {};\n\n\treturn function collapseRadioGroup(\n\t\t/** @type {MaybeHTMLInputElement[]} */ result,\n\t\t/** @type {MaybeHTMLInputElement} */ element\n\t) {\n\t\tconst { nodeName, type, checked, name } = element;\n\n\t\t// For all non-radio tabbables, construct to array by concatenating.\n\t\tif ( nodeName !== 'INPUT' || type !== 'radio' || ! name ) {\n\t\t\treturn result.concat( element );\n\t\t}\n\n\t\tconst hasChosen = CHOSEN_RADIO_BY_NAME.hasOwnProperty( name );\n\n\t\t// Omit by skipping concatenation if the radio element is not chosen.\n\t\tconst isChosen = checked || ! hasChosen;\n\t\tif ( ! isChosen ) {\n\t\t\treturn result;\n\t\t}\n\n\t\t// At this point, if there had been a chosen element, the current\n\t\t// element is checked and should take priority. Retroactively remove\n\t\t// the element which had previously been considered the chosen one.\n\t\tif ( hasChosen ) {\n\t\t\tconst hadChosenElement = CHOSEN_RADIO_BY_NAME[ name ];\n\t\t\tresult = result.filter( ( e ) => e !== hadChosenElement );\n\t\t}\n\n\t\tCHOSEN_RADIO_BY_NAME[ name ] = element;\n\n\t\treturn result.concat( element );\n\t};\n}\n\n/**\n * An array map callback, returning an object with the element value and its\n * array index location as properties. This is used to emulate a proper stable\n * sort where equal tabIndex should be left in order of their occurrence in the\n * document.\n *\n * @param {Element} element Element.\n * @param {number} index Array index of element.\n *\n * @return {{ element: Element, index: number }} Mapped object with element, index.\n */\nfunction mapElementToObjectTabbable( element, index ) {\n\treturn { element, index };\n}\n\n/**\n * An array map callback, returning an element of the given mapped object's\n * element value.\n *\n * @param {{ element: Element }} object Mapped object with element.\n *\n * @return {Element} Mapped object element.\n */\nfunction mapObjectTabbableToElement( object ) {\n\treturn object.element;\n}\n\n/**\n * A sort comparator function used in comparing two objects of mapped elements.\n *\n * @see mapElementToObjectTabbable\n *\n * @param {{ element: Element, index: number }} a First object to compare.\n * @param {{ element: Element, index: number }} b Second object to compare.\n *\n * @return {number} Comparator result.\n */\nfunction compareObjectTabbables( a, b ) {\n\tconst aTabIndex = getTabIndex( a.element );\n\tconst bTabIndex = getTabIndex( b.element );\n\n\tif ( aTabIndex === bTabIndex ) {\n\t\treturn a.index - b.index;\n\t}\n\n\treturn aTabIndex - bTabIndex;\n}\n\n/**\n * Givin focusable elements, filters out tabbable element.\n *\n * @param {Element[]} focusables Focusable elements to filter.\n *\n * @return {Element[]} Tabbable elements.\n */\nfunction filterTabbable( focusables ) {\n\treturn focusables\n\t\t.filter( isTabbableIndex )\n\t\t.map( mapElementToObjectTabbable )\n\t\t.sort( compareObjectTabbables )\n\t\t.map( mapObjectTabbableToElement )\n\t\t.reduce( createStatefulCollapseRadioGroup(), [] );\n}\n\n/**\n * @param {Element} context\n * @return {Element[]} Tabbable elements within the context.\n */\nexport function find( context ) {\n\treturn filterTabbable( findFocusable( context ) );\n}\n\n/**\n * Given a focusable element, find the preceding tabbable element.\n *\n * @param {Element} element The focusable element before which to look. Defaults\n * to the active element.\n *\n * @return {Element|undefined} Preceding tabbable element.\n */\nexport function findPrevious( element ) {\n\tconst focusables = findFocusable( element.ownerDocument.body );\n\tconst index = focusables.indexOf( element );\n\n\tif ( index === -1 ) {\n\t\treturn undefined;\n\t}\n\n\t// Remove all focusables after and including `element`.\n\tfocusables.length = index;\n\n\tconst tabbable = filterTabbable( focusables );\n\treturn tabbable[ tabbable.length - 1 ];\n}\n\n/**\n * Given a focusable element, find the next tabbable element.\n *\n * @param {Element} element The focusable element after which to look. Defaults\n * to the active element.\n *\n * @return {Element|undefined} Next tabbable element.\n */\nexport function findNext( element ) {\n\tconst focusables = findFocusable( element.ownerDocument.body );\n\tconst index = focusables.indexOf( element );\n\n\t// Remove all focusables before and including `element`.\n\tconst remaining = focusables.slice( index + 1 );\n\n\treturn filterTabbable( remaining )[ 0 ];\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/dom/src/tabbable.js"],"names":["getTabIndex","element","tabIndex","getAttribute","parseInt","isTabbableIndex","createStatefulCollapseRadioGroup","CHOSEN_RADIO_BY_NAME","collapseRadioGroup","result","nodeName","type","checked","name","concat","hasChosen","hasOwnProperty","isChosen","hadChosenElement","filter","e","mapElementToObjectTabbable","index","mapObjectTabbableToElement","object","compareObjectTabbables","a","b","aTabIndex","bTabIndex","filterTabbable","focusables","map","sort","reduce","find","context","findPrevious","ownerDocument","body","reverse","focusable","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","findNext","DOCUMENT_POSITION_FOLLOWING"],"mappings":";;;;;;;;;;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c,CAAE,qBAAeM,OAAf,CAAF,CAArB;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,YAAT,CAAuBpC,OAAvB,EAAiC;AACvC,SAAO6B,cAAc,CAAE,qBAAe7B,OAAO,CAACqC,aAAR,CAAsBC,IAArC,CAAF,CAAd,CACLC,OADK,GAELL,IAFK,CAEGM,SAAF,IAAiB;AACvB,WACC;AACAxC,MAAAA,OAAO,CAACyC,uBAAR,CAAiCD,SAAjC,IACAxC,OAAO,CAAC0C;AAHT;AAKA,GARK,CAAP;AASA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,QAAT,CAAmB3C,OAAnB,EAA6B;AACnC,SAAO6B,cAAc,CAAE,qBAAe7B,OAAO,CAACqC,aAAR,CAAsBC,IAArC,CAAF,CAAd,CAA8DJ,IAA9D,CACJM,SAAF,IAAiB;AAChB,WACC;AACAxC,MAAAA,OAAO,CAACyC,uBAAR,CAAiCD,SAAjC,IACAxC,OAAO,CAAC4C;AAHT;AAKA,GAPK,CAAP;AASA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { find as findFocusable } from './focusable';\n\n/**\n * Returns the tab index of the given element. In contrast with the tabIndex\n * property, this normalizes the default (0) to avoid browser inconsistencies,\n * operating under the assumption that this function is only ever called with a\n * focusable node.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1190261\n *\n * @param {Element} element Element from which to retrieve.\n *\n * @return {number} Tab index of element (default 0).\n */\nfunction getTabIndex( element ) {\n\tconst tabIndex = element.getAttribute( 'tabindex' );\n\treturn tabIndex === null ? 0 : parseInt( tabIndex, 10 );\n}\n\n/**\n * Returns true if the specified element is tabbable, or false otherwise.\n *\n * @param {Element} element Element to test.\n *\n * @return {boolean} Whether element is tabbable.\n */\nexport function isTabbableIndex( element ) {\n\treturn getTabIndex( element ) !== -1;\n}\n\n/** @typedef {Element & { type?: string, checked?: boolean, name?: string }} MaybeHTMLInputElement */\n\n/**\n * Returns a stateful reducer function which constructs a filtered array of\n * tabbable elements, where at most one radio input is selected for a given\n * name, giving priority to checked input, falling back to the first\n * encountered.\n *\n * @return {(acc: MaybeHTMLInputElement[], el: MaybeHTMLInputElement) => MaybeHTMLInputElement[]} Radio group collapse reducer.\n */\nfunction createStatefulCollapseRadioGroup() {\n\t/** @type {Record<string, MaybeHTMLInputElement>} */\n\tconst CHOSEN_RADIO_BY_NAME = {};\n\n\treturn function collapseRadioGroup(\n\t\t/** @type {MaybeHTMLInputElement[]} */ result,\n\t\t/** @type {MaybeHTMLInputElement} */ element\n\t) {\n\t\tconst { nodeName, type, checked, name } = element;\n\n\t\t// For all non-radio tabbables, construct to array by concatenating.\n\t\tif ( nodeName !== 'INPUT' || type !== 'radio' || ! name ) {\n\t\t\treturn result.concat( element );\n\t\t}\n\n\t\tconst hasChosen = CHOSEN_RADIO_BY_NAME.hasOwnProperty( name );\n\n\t\t// Omit by skipping concatenation if the radio element is not chosen.\n\t\tconst isChosen = checked || ! hasChosen;\n\t\tif ( ! isChosen ) {\n\t\t\treturn result;\n\t\t}\n\n\t\t// At this point, if there had been a chosen element, the current\n\t\t// element is checked and should take priority. Retroactively remove\n\t\t// the element which had previously been considered the chosen one.\n\t\tif ( hasChosen ) {\n\t\t\tconst hadChosenElement = CHOSEN_RADIO_BY_NAME[ name ];\n\t\t\tresult = result.filter( ( e ) => e !== hadChosenElement );\n\t\t}\n\n\t\tCHOSEN_RADIO_BY_NAME[ name ] = element;\n\n\t\treturn result.concat( element );\n\t};\n}\n\n/**\n * An array map callback, returning an object with the element value and its\n * array index location as properties. This is used to emulate a proper stable\n * sort where equal tabIndex should be left in order of their occurrence in the\n * document.\n *\n * @param {Element} element Element.\n * @param {number} index Array index of element.\n *\n * @return {{ element: Element, index: number }} Mapped object with element, index.\n */\nfunction mapElementToObjectTabbable( element, index ) {\n\treturn { element, index };\n}\n\n/**\n * An array map callback, returning an element of the given mapped object's\n * element value.\n *\n * @param {{ element: Element }} object Mapped object with element.\n *\n * @return {Element} Mapped object element.\n */\nfunction mapObjectTabbableToElement( object ) {\n\treturn object.element;\n}\n\n/**\n * A sort comparator function used in comparing two objects of mapped elements.\n *\n * @see mapElementToObjectTabbable\n *\n * @param {{ element: Element, index: number }} a First object to compare.\n * @param {{ element: Element, index: number }} b Second object to compare.\n *\n * @return {number} Comparator result.\n */\nfunction compareObjectTabbables( a, b ) {\n\tconst aTabIndex = getTabIndex( a.element );\n\tconst bTabIndex = getTabIndex( b.element );\n\n\tif ( aTabIndex === bTabIndex ) {\n\t\treturn a.index - b.index;\n\t}\n\n\treturn aTabIndex - bTabIndex;\n}\n\n/**\n * Givin focusable elements, filters out tabbable element.\n *\n * @param {Element[]} focusables Focusable elements to filter.\n *\n * @return {Element[]} Tabbable elements.\n */\nfunction filterTabbable( focusables ) {\n\treturn focusables\n\t\t.filter( isTabbableIndex )\n\t\t.map( mapElementToObjectTabbable )\n\t\t.sort( compareObjectTabbables )\n\t\t.map( mapObjectTabbableToElement )\n\t\t.reduce( createStatefulCollapseRadioGroup(), [] );\n}\n\n/**\n * @param {Element} context\n * @return {Element[]} Tabbable elements within the context.\n */\nexport function find( context ) {\n\treturn filterTabbable( findFocusable( context ) );\n}\n\n/**\n * Given a focusable element, find the preceding tabbable element.\n *\n * @param {Element} element The focusable element before which to look. Defaults\n * to the active element.\n *\n * @return {Element|undefined} Preceding tabbable element.\n */\nexport function findPrevious( element ) {\n\treturn filterTabbable( findFocusable( element.ownerDocument.body ) )\n\t\t.reverse()\n\t\t.find( ( focusable ) => {\n\t\t\treturn (\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\telement.compareDocumentPosition( focusable ) &\n\t\t\t\telement.DOCUMENT_POSITION_PRECEDING\n\t\t\t);\n\t\t} );\n}\n\n/**\n * Given a focusable element, find the next tabbable element.\n *\n * @param {Element} element The focusable element after which to look. Defaults\n * to the active element.\n *\n * @return {Element|undefined} Next tabbable element.\n */\nexport function findNext( element ) {\n\treturn filterTabbable( findFocusable( element.ownerDocument.body ) ).find(\n\t\t( focusable ) => {\n\t\t\treturn (\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\telement.compareDocumentPosition( focusable ) &\n\t\t\t\telement.DOCUMENT_POSITION_FOLLOWING\n\t\t\t);\n\t\t}\n\t);\n}\n"]}
@@ -166,17 +166,11 @@ export function find(context) {
166
166
  */
167
167
 
168
168
  export function findPrevious(element) {
169
- const focusables = findFocusable(element.ownerDocument.body);
170
- const index = focusables.indexOf(element);
171
-
172
- if (index === -1) {
173
- return undefined;
174
- } // Remove all focusables after and including `element`.
175
-
176
-
177
- focusables.length = index;
178
- const tabbable = filterTabbable(focusables);
179
- return tabbable[tabbable.length - 1];
169
+ return filterTabbable(findFocusable(element.ownerDocument.body)).reverse().find(focusable => {
170
+ return (// eslint-disable-next-line no-bitwise
171
+ element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_PRECEDING
172
+ );
173
+ });
180
174
  }
181
175
  /**
182
176
  * Given a focusable element, find the next tabbable element.
@@ -188,10 +182,10 @@ export function findPrevious(element) {
188
182
  */
189
183
 
190
184
  export function findNext(element) {
191
- const focusables = findFocusable(element.ownerDocument.body);
192
- const index = focusables.indexOf(element); // Remove all focusables before and including `element`.
193
-
194
- const remaining = focusables.slice(index + 1);
195
- return filterTabbable(remaining)[0];
185
+ return filterTabbable(findFocusable(element.ownerDocument.body)).find(focusable => {
186
+ return (// eslint-disable-next-line no-bitwise
187
+ element.compareDocumentPosition(focusable) & element.DOCUMENT_POSITION_FOLLOWING
188
+ );
189
+ });
196
190
  }
197
191
  //# sourceMappingURL=tabbable.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/dom/src/tabbable.js"],"names":["find","findFocusable","getTabIndex","element","tabIndex","getAttribute","parseInt","isTabbableIndex","createStatefulCollapseRadioGroup","CHOSEN_RADIO_BY_NAME","collapseRadioGroup","result","nodeName","type","checked","name","concat","hasChosen","hasOwnProperty","isChosen","hadChosenElement","filter","e","mapElementToObjectTabbable","index","mapObjectTabbableToElement","object","compareObjectTabbables","a","b","aTabIndex","bTabIndex","filterTabbable","focusables","map","sort","reduce","context","findPrevious","ownerDocument","body","indexOf","undefined","length","tabbable","findNext","remaining","slice"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,IAAIC,aAAjB,QAAsC,aAAtC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,WAAT,CAAsBC,OAAtB,EAAgC;AAC/B,QAAMC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAsB,UAAtB,CAAjB;AACA,SAAOD,QAAQ,KAAK,IAAb,GAAoB,CAApB,GAAwBE,QAAQ,CAAEF,QAAF,EAAY,EAAZ,CAAvC;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,SAASG,eAAT,CAA0BJ,OAA1B,EAAoC;AAC1C,SAAOD,WAAW,CAAEC,OAAF,CAAX,KAA2B,CAAC,CAAnC;AACA;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASK,gCAAT,GAA4C;AAC3C;AACA,QAAMC,oBAAoB,GAAG,EAA7B;AAEA,SAAO,SAASC,kBAAT;AACN;AAAuCC,EAAAA,MADjC;AAEN;AAAqCR,EAAAA,OAF/B,EAGL;AACD,UAAM;AAAES,MAAAA,QAAF;AAAYC,MAAAA,IAAZ;AAAkBC,MAAAA,OAAlB;AAA2BC,MAAAA;AAA3B,QAAoCZ,OAA1C,CADC,CAGD;;AACA,QAAKS,QAAQ,KAAK,OAAb,IAAwBC,IAAI,KAAK,OAAjC,IAA4C,CAAEE,IAAnD,EAA0D;AACzD,aAAOJ,MAAM,CAACK,MAAP,CAAeb,OAAf,CAAP;AACA;;AAED,UAAMc,SAAS,GAAGR,oBAAoB,CAACS,cAArB,CAAqCH,IAArC,CAAlB,CARC,CAUD;;AACA,UAAMI,QAAQ,GAAGL,OAAO,IAAI,CAAEG,SAA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BAFA,EAGLY,IAHK,CAGCR,sBAHD,EAILO,GAJK,CAIAT,0BAJA,EAKLW,MALK,CAKG5B,gCAAgC,EALnC,EAKuC,EALvC,CAAP;AAMA;AAED;AACA;AACA;AACA;;;AACA,OAAO,SAASR,IAAT,CAAeqC,OAAf,EAAyB;AAC/B,SAAOL,cAAc,CAAE/B,aAAa,CAAEoC,OAAF,CAAf,CAArB;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,YAAT,CAAuBnC,OAAvB,EAAiC;AACvC,QAAM8B,UAAU,GAAGhC,aAAa,CAAEE,OAAO,CAACoC,aAAR,CAAsBC,IAAxB,CAAhC;AACA,QAAMhB,KAAK,GAAGS,UAAU,CAACQ,OAAX,CAAoBtC,OAApB,CAAd;;AAEA,MAAKqB,KAAK,KAAK,CAAC,CAAhB,EAAoB;AACnB,WAAOkB,SAAP;AACA,GANsC,CAQvC;;;AACAT,EAAAA,UAAU,CAACU,MAAX,GAAoBnB,KAApB;AAEA,QAAMoB,QAAQ,GAAGZ,cAAc,CAAEC,UAAF,CAA/B;AACA,SAAOW,QAAQ,CAAEA,QAAQ,CAACD,MAAT,GAAkB,CAApB,CAAf;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASE,QAAT,CAAmB1C,OAAnB,EAA6B;AACnC,QAAM8B,UAAU,GAAGhC,aAAa,CAAEE,OAAO,CAACoC,aAAR,CAAsBC,IAAxB,CAAhC;AACA,QAAMhB,KAAK,GAAGS,UAAU,CAACQ,OAAX,CAAoBtC,OAApB,CAAd,CAFmC,CAInC;;AACA,QAAM2C,SAAS,GAAGb,UAAU,CAACc,KAAX,CAAkBvB,KAAK,GAAG,CAA1B,CAAlB;AAEA,SAAOQ,cAAc,CAAEc,SAAF,CAAd,CAA6B,CAA7B,CAAP;AACA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { find as findFocusable } from './focusable';\n\n/**\n * Returns the tab index of the given element. In contrast with the tabIndex\n * property, this normalizes the default (0) to avoid browser inconsistencies,\n * operating under the assumption that this function is only ever called with a\n * focusable node.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1190261\n *\n * @param {Element} element Element from which to retrieve.\n *\n * @return {number} Tab index of element (default 0).\n */\nfunction getTabIndex( element ) {\n\tconst tabIndex = element.getAttribute( 'tabindex' );\n\treturn tabIndex === null ? 0 : parseInt( tabIndex, 10 );\n}\n\n/**\n * Returns true if the specified element is tabbable, or false otherwise.\n *\n * @param {Element} element Element to test.\n *\n * @return {boolean} Whether element is tabbable.\n */\nexport function isTabbableIndex( element ) {\n\treturn getTabIndex( element ) !== -1;\n}\n\n/** @typedef {Element & { type?: string, checked?: boolean, name?: string }} MaybeHTMLInputElement */\n\n/**\n * Returns a stateful reducer function which constructs a filtered array of\n * tabbable elements, where at most one radio input is selected for a given\n * name, giving priority to checked input, falling back to the first\n * encountered.\n *\n * @return {(acc: MaybeHTMLInputElement[], el: MaybeHTMLInputElement) => MaybeHTMLInputElement[]} Radio group collapse reducer.\n */\nfunction createStatefulCollapseRadioGroup() {\n\t/** @type {Record<string, MaybeHTMLInputElement>} */\n\tconst CHOSEN_RADIO_BY_NAME = {};\n\n\treturn function collapseRadioGroup(\n\t\t/** @type {MaybeHTMLInputElement[]} */ result,\n\t\t/** @type {MaybeHTMLInputElement} */ element\n\t) {\n\t\tconst { nodeName, type, checked, name } = element;\n\n\t\t// For all non-radio tabbables, construct to array by concatenating.\n\t\tif ( nodeName !== 'INPUT' || type !== 'radio' || ! name ) {\n\t\t\treturn result.concat( element );\n\t\t}\n\n\t\tconst hasChosen = CHOSEN_RADIO_BY_NAME.hasOwnProperty( name );\n\n\t\t// Omit by skipping concatenation if the radio element is not chosen.\n\t\tconst isChosen = checked || ! hasChosen;\n\t\tif ( ! isChosen ) {\n\t\t\treturn result;\n\t\t}\n\n\t\t// At this point, if there had been a chosen element, the current\n\t\t// element is checked and should take priority. Retroactively remove\n\t\t// the element which had previously been considered the chosen one.\n\t\tif ( hasChosen ) {\n\t\t\tconst hadChosenElement = CHOSEN_RADIO_BY_NAME[ name ];\n\t\t\tresult = result.filter( ( e ) => e !== hadChosenElement );\n\t\t}\n\n\t\tCHOSEN_RADIO_BY_NAME[ name ] = element;\n\n\t\treturn result.concat( element );\n\t};\n}\n\n/**\n * An array map callback, returning an object with the element value and its\n * array index location as properties. This is used to emulate a proper stable\n * sort where equal tabIndex should be left in order of their occurrence in the\n * document.\n *\n * @param {Element} element Element.\n * @param {number} index Array index of element.\n *\n * @return {{ element: Element, index: number }} Mapped object with element, index.\n */\nfunction mapElementToObjectTabbable( element, index ) {\n\treturn { element, index };\n}\n\n/**\n * An array map callback, returning an element of the given mapped object's\n * element value.\n *\n * @param {{ element: Element }} object Mapped object with element.\n *\n * @return {Element} Mapped object element.\n */\nfunction mapObjectTabbableToElement( object ) {\n\treturn object.element;\n}\n\n/**\n * A sort comparator function used in comparing two objects of mapped elements.\n *\n * @see mapElementToObjectTabbable\n *\n * @param {{ element: Element, index: number }} a First object to compare.\n * @param {{ element: Element, index: number }} b Second object to compare.\n *\n * @return {number} Comparator result.\n */\nfunction compareObjectTabbables( a, b ) {\n\tconst aTabIndex = getTabIndex( a.element );\n\tconst bTabIndex = getTabIndex( b.element );\n\n\tif ( aTabIndex === bTabIndex ) {\n\t\treturn a.index - b.index;\n\t}\n\n\treturn aTabIndex - bTabIndex;\n}\n\n/**\n * Givin focusable elements, filters out tabbable element.\n *\n * @param {Element[]} focusables Focusable elements to filter.\n *\n * @return {Element[]} Tabbable elements.\n */\nfunction filterTabbable( focusables ) {\n\treturn focusables\n\t\t.filter( isTabbableIndex )\n\t\t.map( mapElementToObjectTabbable )\n\t\t.sort( compareObjectTabbables )\n\t\t.map( mapObjectTabbableToElement )\n\t\t.reduce( createStatefulCollapseRadioGroup(), [] );\n}\n\n/**\n * @param {Element} context\n * @return {Element[]} Tabbable elements within the context.\n */\nexport function find( context ) {\n\treturn filterTabbable( findFocusable( context ) );\n}\n\n/**\n * Given a focusable element, find the preceding tabbable element.\n *\n * @param {Element} element The focusable element before which to look. Defaults\n * to the active element.\n *\n * @return {Element|undefined} Preceding tabbable element.\n */\nexport function findPrevious( element ) {\n\tconst focusables = findFocusable( element.ownerDocument.body );\n\tconst index = focusables.indexOf( element );\n\n\tif ( index === -1 ) {\n\t\treturn undefined;\n\t}\n\n\t// Remove all focusables after and including `element`.\n\tfocusables.length = index;\n\n\tconst tabbable = filterTabbable( focusables );\n\treturn tabbable[ tabbable.length - 1 ];\n}\n\n/**\n * Given a focusable element, find the next tabbable element.\n *\n * @param {Element} element The focusable element after which to look. Defaults\n * to the active element.\n *\n * @return {Element|undefined} Next tabbable element.\n */\nexport function findNext( element ) {\n\tconst focusables = findFocusable( element.ownerDocument.body );\n\tconst index = focusables.indexOf( element );\n\n\t// Remove all focusables before and including `element`.\n\tconst remaining = focusables.slice( index + 1 );\n\n\treturn filterTabbable( remaining )[ 0 ];\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/dom/src/tabbable.js"],"names":["find","findFocusable","getTabIndex","element","tabIndex","getAttribute","parseInt","isTabbableIndex","createStatefulCollapseRadioGroup","CHOSEN_RADIO_BY_NAME","collapseRadioGroup","result","nodeName","type","checked","name","concat","hasChosen","hasOwnProperty","isChosen","hadChosenElement","filter","e","mapElementToObjectTabbable","index","mapObjectTabbableToElement","object","compareObjectTabbables","a","b","aTabIndex","bTabIndex","filterTabbable","focusables","map","sort","reduce","context","findPrevious","ownerDocument","body","reverse","focusable","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","findNext","DOCUMENT_POSITION_FOLLOWING"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,IAAIC,aAAjB,QAAsC,aAAtC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,WAAT,CAAsBC,OAAtB,EAAgC;AAC/B,QAAMC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAsB,UAAt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AAEE,OAAO,CAACoC,aAAR,CAAsBC,IAAxB,CAAf,CAAd,CACLC,OADK,GAELzC,IAFK,CAEG0C,SAAF,IAAiB;AACvB,WACC;AACAvC,MAAAA,OAAO,CAACwC,uBAAR,CAAiCD,SAAjC,IACAvC,OAAO,CAACyC;AAHT;AAKA,GARK,CAAP;AASA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,QAAT,CAAmB1C,OAAnB,EAA6B;AACnC,SAAO6B,cAAc,CAAE/B,aAAa,CAAEE,OAAO,CAACoC,aAAR,CAAsBC,IAAxB,CAAf,CAAd,CAA8DxC,IAA9D,CACJ0C,SAAF,IAAiB;AAChB,WACC;AACAvC,MAAAA,OAAO,CAACwC,uBAAR,CAAiCD,SAAjC,IACAvC,OAAO,CAAC2C;AAHT;AAKA,GAPK,CAAP;AASA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { find as findFocusable } from './focusable';\n\n/**\n * Returns the tab index of the given element. In contrast with the tabIndex\n * property, this normalizes the default (0) to avoid browser inconsistencies,\n * operating under the assumption that this function is only ever called with a\n * focusable node.\n *\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=1190261\n *\n * @param {Element} element Element from which to retrieve.\n *\n * @return {number} Tab index of element (default 0).\n */\nfunction getTabIndex( element ) {\n\tconst tabIndex = element.getAttribute( 'tabindex' );\n\treturn tabIndex === null ? 0 : parseInt( tabIndex, 10 );\n}\n\n/**\n * Returns true if the specified element is tabbable, or false otherwise.\n *\n * @param {Element} element Element to test.\n *\n * @return {boolean} Whether element is tabbable.\n */\nexport function isTabbableIndex( element ) {\n\treturn getTabIndex( element ) !== -1;\n}\n\n/** @typedef {Element & { type?: string, checked?: boolean, name?: string }} MaybeHTMLInputElement */\n\n/**\n * Returns a stateful reducer function which constructs a filtered array of\n * tabbable elements, where at most one radio input is selected for a given\n * name, giving priority to checked input, falling back to the first\n * encountered.\n *\n * @return {(acc: MaybeHTMLInputElement[], el: MaybeHTMLInputElement) => MaybeHTMLInputElement[]} Radio group collapse reducer.\n */\nfunction createStatefulCollapseRadioGroup() {\n\t/** @type {Record<string, MaybeHTMLInputElement>} */\n\tconst CHOSEN_RADIO_BY_NAME = {};\n\n\treturn function collapseRadioGroup(\n\t\t/** @type {MaybeHTMLInputElement[]} */ result,\n\t\t/** @type {MaybeHTMLInputElement} */ element\n\t) {\n\t\tconst { nodeName, type, checked, name } = element;\n\n\t\t// For all non-radio tabbables, construct to array by concatenating.\n\t\tif ( nodeName !== 'INPUT' || type !== 'radio' || ! name ) {\n\t\t\treturn result.concat( element );\n\t\t}\n\n\t\tconst hasChosen = CHOSEN_RADIO_BY_NAME.hasOwnProperty( name );\n\n\t\t// Omit by skipping concatenation if the radio element is not chosen.\n\t\tconst isChosen = checked || ! hasChosen;\n\t\tif ( ! isChosen ) {\n\t\t\treturn result;\n\t\t}\n\n\t\t// At this point, if there had been a chosen element, the current\n\t\t// element is checked and should take priority. Retroactively remove\n\t\t// the element which had previously been considered the chosen one.\n\t\tif ( hasChosen ) {\n\t\t\tconst hadChosenElement = CHOSEN_RADIO_BY_NAME[ name ];\n\t\t\tresult = result.filter( ( e ) => e !== hadChosenElement );\n\t\t}\n\n\t\tCHOSEN_RADIO_BY_NAME[ name ] = element;\n\n\t\treturn result.concat( element );\n\t};\n}\n\n/**\n * An array map callback, returning an object with the element value and its\n * array index location as properties. This is used to emulate a proper stable\n * sort where equal tabIndex should be left in order of their occurrence in the\n * document.\n *\n * @param {Element} element Element.\n * @param {number} index Array index of element.\n *\n * @return {{ element: Element, index: number }} Mapped object with element, index.\n */\nfunction mapElementToObjectTabbable( element, index ) {\n\treturn { element, index };\n}\n\n/**\n * An array map callback, returning an element of the given mapped object's\n * element value.\n *\n * @param {{ element: Element }} object Mapped object with element.\n *\n * @return {Element} Mapped object element.\n */\nfunction mapObjectTabbableToElement( object ) {\n\treturn object.element;\n}\n\n/**\n * A sort comparator function used in comparing two objects of mapped elements.\n *\n * @see mapElementToObjectTabbable\n *\n * @param {{ element: Element, index: number }} a First object to compare.\n * @param {{ element: Element, index: number }} b Second object to compare.\n *\n * @return {number} Comparator result.\n */\nfunction compareObjectTabbables( a, b ) {\n\tconst aTabIndex = getTabIndex( a.element );\n\tconst bTabIndex = getTabIndex( b.element );\n\n\tif ( aTabIndex === bTabIndex ) {\n\t\treturn a.index - b.index;\n\t}\n\n\treturn aTabIndex - bTabIndex;\n}\n\n/**\n * Givin focusable elements, filters out tabbable element.\n *\n * @param {Element[]} focusables Focusable elements to filter.\n *\n * @return {Element[]} Tabbable elements.\n */\nfunction filterTabbable( focusables ) {\n\treturn focusables\n\t\t.filter( isTabbableIndex )\n\t\t.map( mapElementToObjectTabbable )\n\t\t.sort( compareObjectTabbables )\n\t\t.map( mapObjectTabbableToElement )\n\t\t.reduce( createStatefulCollapseRadioGroup(), [] );\n}\n\n/**\n * @param {Element} context\n * @return {Element[]} Tabbable elements within the context.\n */\nexport function find( context ) {\n\treturn filterTabbable( findFocusable( context ) );\n}\n\n/**\n * Given a focusable element, find the preceding tabbable element.\n *\n * @param {Element} element The focusable element before which to look. Defaults\n * to the active element.\n *\n * @return {Element|undefined} Preceding tabbable element.\n */\nexport function findPrevious( element ) {\n\treturn filterTabbable( findFocusable( element.ownerDocument.body ) )\n\t\t.reverse()\n\t\t.find( ( focusable ) => {\n\t\t\treturn (\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\telement.compareDocumentPosition( focusable ) &\n\t\t\t\telement.DOCUMENT_POSITION_PRECEDING\n\t\t\t);\n\t\t} );\n}\n\n/**\n * Given a focusable element, find the next tabbable element.\n *\n * @param {Element} element The focusable element after which to look. Defaults\n * to the active element.\n *\n * @return {Element|undefined} Next tabbable element.\n */\nexport function findNext( element ) {\n\treturn filterTabbable( findFocusable( element.ownerDocument.body ) ).find(\n\t\t( focusable ) => {\n\t\t\treturn (\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\telement.compareDocumentPosition( focusable ) &\n\t\t\t\telement.DOCUMENT_POSITION_FOLLOWING\n\t\t\t);\n\t\t}\n\t);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"tabbable.d.ts","sourceRoot":"","sources":["../src/tabbable.js"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH,yCAJW,OAAO,GAEN,OAAO,CAIlB;AAiHD;;;GAGG;AACH,8BAHW,OAAO,GACN,OAAO,EAAE,CAIpB;AAED;;;;;;;GAOG;AACH,sCALW,OAAO,GAGN,OAAO,GAAC,SAAS,CAe5B;AAED;;;;;;;GAOG;AACH,kCALW,OAAO,GAGN,OAAO,GAAC,SAAS,CAU5B;oCA9Ja,OAAO,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE"}
1
+ {"version":3,"file":"tabbable.d.ts","sourceRoot":"","sources":["../src/tabbable.js"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH,yCAJW,OAAO,GAEN,OAAO,CAIlB;AAiHD;;;GAGG;AACH,8BAHW,OAAO,GACN,OAAO,EAAE,CAIpB;AAED;;;;;;;GAOG;AACH,sCALW,OAAO,GAGN,OAAO,GAAC,SAAS,CAY5B;AAED;;;;;;;GAOG;AACH,kCALW,OAAO,GAGN,OAAO,GAAC,SAAS,CAY5B;oCA7Ja,OAAO,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/dom",
3
- "version": "3.23.0",
3
+ "version": "3.25.0",
4
4
  "description": "DOM utilities module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -29,10 +29,10 @@
29
29
  "sideEffects": false,
30
30
  "dependencies": {
31
31
  "@babel/runtime": "^7.16.0",
32
- "@wordpress/deprecated": "^3.23.0"
32
+ "@wordpress/deprecated": "^3.25.0"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "gitHead": "1eb65aabe6738097f4c062e78f69ae8f05879848"
37
+ "gitHead": "204c880ff65295768e9695dfee6c7a9fee1fdd05"
38
38
  }
package/src/tabbable.js CHANGED
@@ -159,18 +159,15 @@ export function find( context ) {
159
159
  * @return {Element|undefined} Preceding tabbable element.
160
160
  */
161
161
  export function findPrevious( element ) {
162
- const focusables = findFocusable( element.ownerDocument.body );
163
- const index = focusables.indexOf( element );
164
-
165
- if ( index === -1 ) {
166
- return undefined;
167
- }
168
-
169
- // Remove all focusables after and including `element`.
170
- focusables.length = index;
171
-
172
- const tabbable = filterTabbable( focusables );
173
- return tabbable[ tabbable.length - 1 ];
162
+ return filterTabbable( findFocusable( element.ownerDocument.body ) )
163
+ .reverse()
164
+ .find( ( focusable ) => {
165
+ return (
166
+ // eslint-disable-next-line no-bitwise
167
+ element.compareDocumentPosition( focusable ) &
168
+ element.DOCUMENT_POSITION_PRECEDING
169
+ );
170
+ } );
174
171
  }
175
172
 
176
173
  /**
@@ -182,11 +179,13 @@ export function findPrevious( element ) {
182
179
  * @return {Element|undefined} Next tabbable element.
183
180
  */
184
181
  export function findNext( element ) {
185
- const focusables = findFocusable( element.ownerDocument.body );
186
- const index = focusables.indexOf( element );
187
-
188
- // Remove all focusables before and including `element`.
189
- const remaining = focusables.slice( index + 1 );
190
-
191
- return filterTabbable( remaining )[ 0 ];
182
+ return filterTabbable( findFocusable( element.ownerDocument.body ) ).find(
183
+ ( focusable ) => {
184
+ return (
185
+ // eslint-disable-next-line no-bitwise
186
+ element.compareDocumentPosition( focusable ) &
187
+ element.DOCUMENT_POSITION_FOLLOWING
188
+ );
189
+ }
190
+ );
192
191
  }
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","./src/data-transfer.js","./src/focusable.js","./src/tabbable.js","./src/utils/assert-is-defined.ts","./src/dom/get-rectangle-from-range.js","./src/dom/compute-caret-rect.js","./src/dom/document-has-text-selection.js","./src/dom/is-html-input-element.js","./src/dom/is-text-field.js","./src/dom/input-field-has-uncollapsed-selection.js","./src/dom/document-has-uncollapsed-selection.js","./src/dom/document-has-selection.js","./src/dom/get-computed-style.js","./src/dom/get-scroll-container.js","./src/dom/get-offset-parent.js","./src/dom/is-input-or-text-area.js","./src/dom/is-entirely-selected.js","./src/dom/is-form-element.js","./src/dom/is-rtl.js","./src/dom/get-range-height.js","./src/dom/is-selection-forward.js","./src/dom/caret-range-from-point.js","./src/dom/hidden-caret-range-from-point.js","./src/dom/is-edge.js","./src/dom/is-horizontal-edge.js","../../node_modules/utility-types/dist/aliases-and-guards.d.ts","../../node_modules/utility-types/dist/mapped-types.d.ts","../../node_modules/utility-types/dist/utility-types.d.ts","../../node_modules/utility-types/dist/functional-helpers.d.ts","../../node_modules/utility-types/dist/index.d.ts","../deprecated/build-types/index.d.ts","./src/dom/is-number-input.js","./src/dom/is-vertical-edge.js","./src/dom/place-caret-at-edge.js","./src/dom/place-caret-at-horizontal-edge.js","./src/dom/place-caret-at-vertical-edge.js","./src/dom/insert-after.js","./src/dom/remove.js","./src/dom/replace.js","./src/dom/unwrap.js","./src/dom/replace-tag.js","./src/dom/wrap.js","./src/dom/safe-html.js","./src/dom/strip-html.js","./src/dom/is-empty.js","./src/phrasing-content.js","./src/dom/is-element.js","./src/dom/clean-node-list.js","./src/dom/remove-invalid-html.js","./src/dom/index.js","./src/index.js","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"80d2e2a2e1685c82cba3c320f5d077376fadff77fe1f52a4c29f995bdc40ea70","0ca9a18ed362f11af31b31312d27380b605653eb7d9b005abc7ce9af29e6c545","164b5a21f4789b107756c6a996433183516ca47357013df06320fcd95e7b2a63","a7836408f857cb8855443e0ff79d3ed7027415dca85f312c5f9f47daa6cd355d","526ccdce763cd3eed48a276874e970211dd8dca17e2cf6835fd439ad43fd64ca","99546def4f9cd760e5ee13c0cce45c83aaa3d5474d75cef79c34b1990a808022","1caa056d021a35691778948dcb48eb6f7550110ea33c0d14c03f0445daa93559","4fcfb368b1ba498dab2fd60a1c680c137aacc6df49d8e0e802c9de00f0e047f0","c16b538f18087f31e1b99251169cd93e8d7a1ba8dde51768978f4bde67f318ac","f329cdfc6aa9467443275d35b330b78fccfe85ff28d1a54e415143645c294ed9","9c32c48fe5fb3b9929609bbd1d7233ed1fc13ac7aaee602b8dd27a0a90baf9cf","9816eb62d7014f570356c988308e390770fea83993d6eae79788cd79a31ea6dc","dea4257186ad318062499e0aff7122433b1081b7883e95ef78d9b4121fc8e7da","2b23f5cd28174981922a2ad9c8382b0775cd69c7b9a02088e5e5f8a3a2e780f3","f5b932cd4c47954ecb9c5010d848afe821486d5785a3c1c81e670146f4245688","4d31f8f7e9d8a43d2fd3c5a378e390080706392dd4d1541fc6b6f876ed961cf4","756cc95fd142eb928ba7bd366cc2756a902d8a1219182a45a2820e86702b1f3e","c6d152163c07dc49df635b774cbc479cad88b467f924f3141a28f5a378ec4a36","4312fd698114e973469529ec29680789e8ce13ffddcf711a8660c85e522b4069","cb412dab570deef76d26e0c5759e3fbe12625947ac6a82037573c788b7a2d1a4","59fbe797b38f7f549100d38fc9a4c6cd0f4b990407700f5e1979a54c9d8e3ed6","e8be8e4d18f330bdd294cdbe7d3c4a89e8dca65585284745a25c515ecb69249f","8b692a361fc9f2d4102106f168b35cf6f30c9efc66050108001955a1a59b4fd2","4b8e98da59bd094293f48bcba2b2863f16844f7b628755317c4376d2a57aae6f","6199e013116305fa2d162835ad812abfe210076e1249852851c5a80a753f4f3d","bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8","905386a2f18ce88642a62d84ddda2e1763d6180a011947f9bc57f8c78589174a","ba688a4815abd9d27b425a819def1721b61e1798acc748b471e54d50a7804bcd","6ead72509efbd9dc382f48a146420b917c84af52dbaa1c79c1c944a043503032","609b8944af1aa9b73959c0bd766370986176a197c16c27e365e867a0bc85eed8","2ffc9898fdf8f285b73f08ee256ca9a6f20cf3de25c57dd7aa28f7558d3af624","0fb6bab9bd95185809964d513dcfeeab6b5609d280dcc6291b5277e36998afe1","2d18411640dd8fcf1067392b839136628cafef5a648d0d49dc9da2f7d344046e","57597a1e8735ae08b671194c8b64a2c2831fd6ce2793d1bca705dbceb41bdaae","fc9b503ac41bf643bdd2c5bcf21e7e8c052881dd6b94699e3624f3a60e02b0be","665d3d55e94122f2fe1c2dd78dd61774134151557a3b8dd41d49868a642c1277","2259073e3a0fcbd5d873f90465ad8364007668a97c0291a6b6d7975d8edbe30d","02959309d4b7d9a875c4f175abae0a359a074585513d073d1fbb828b704e5663","d0472eb54f481ef265c3407b31df68485efda04e40cc8a7238c8dbdaf93fe81b","eb89338ad7e6dac4cf3435ed1351b5d8340b9b60f583560e89ae8e9997f1ea31","b40f71b721dba07996ea071f624b52ca6148278a12a17f2cf84b56eb1828ceaf","0d0dd5ae0237a3571383b9ac701d40220e1d963d0bbb22473c336225b2ed44a7","1c1f2d8b269e664047a9b56ce701c02e4223ce8f0fddc513ab4f311af8dbe654","dcc4b56e334bd6f9a8680a5dd343e417cdb03bae06bdc4786211d2cdfd7899e8","acbe60d616549a3815593f33a7a34faf0b0d063257c74f3b01bfc20dae42652e","0af026de3ab75c99339016a7aa606da158668df7cfc0c25668c1d1617323da20",{"version":"f254c1abf6bb4c92633159831f924588908da902aa5e04ae45c39bd001f62e2e","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[70,71,72,73],[70],[71],[74],[81,82,84,89,90,91],[48,49],[51,52,53],[48],[51,54],[57],[57,66],[49,50,51,53,55,56,58,59,61,62,63,69,76,77,79,80,81,82,83,84,85,86,87,88,89,93],[52,53],[48,49,60,63,64,65,67],[48,60],[60],[68],[52,75],[52],[48,60,63,67],[78],[92],[48,81,82],[82],[87],[45,46,47,90,94],[46]],"referencedMap":[[74,1],[71,2],[72,3],[75,4],[92,5],[50,6],[56,7],[51,8],[55,9],[57,8],[59,10],[49,8],[58,10],[67,11],[94,12],[54,13],[81,8],[68,14],[61,15],[62,16],[69,17],[76,18],[63,10],[65,8],[53,19],[77,17],[78,20],[79,21],[80,21],[93,22],[82,8],[85,8],[83,23],[87,24],[88,25],[84,8],[86,8],[95,26],[47,27]],"exportedModulesMap":[[74,1],[71,2],[72,3],[75,4],[92,5],[50,6],[56,7],[51,8],[55,9],[57,8],[59,10],[49,8],[58,10],[67,11],[94,12],[54,13],[81,8],[68,14],[61,15],[62,16],[69,17],[76,18],[63,10],[65,8],[53,19],[77,17],[78,20],[79,21],[80,21],[93,22],[82,8],[85,8],[83,23],[87,24],[88,25],[84,8],[86,8],[95,26],[47,27]],"semanticDiagnosticsPerFile":[10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,70,73,74,71,72,75,45,66,92,50,56,51,55,57,59,64,49,58,67,94,54,81,68,91,89,61,62,69,52,60,76,63,65,53,77,78,79,80,93,82,85,83,87,88,84,86,46,95,90,47,48,96]},"version":"4.4.2"}
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","./src/data-transfer.js","./src/focusable.js","./src/tabbable.js","./src/utils/assert-is-defined.ts","./src/dom/get-rectangle-from-range.js","./src/dom/compute-caret-rect.js","./src/dom/document-has-text-selection.js","./src/dom/is-html-input-element.js","./src/dom/is-text-field.js","./src/dom/input-field-has-uncollapsed-selection.js","./src/dom/document-has-uncollapsed-selection.js","./src/dom/document-has-selection.js","./src/dom/get-computed-style.js","./src/dom/get-scroll-container.js","./src/dom/get-offset-parent.js","./src/dom/is-input-or-text-area.js","./src/dom/is-entirely-selected.js","./src/dom/is-form-element.js","./src/dom/is-rtl.js","./src/dom/get-range-height.js","./src/dom/is-selection-forward.js","./src/dom/caret-range-from-point.js","./src/dom/hidden-caret-range-from-point.js","./src/dom/is-edge.js","./src/dom/is-horizontal-edge.js","../../node_modules/utility-types/dist/aliases-and-guards.d.ts","../../node_modules/utility-types/dist/mapped-types.d.ts","../../node_modules/utility-types/dist/utility-types.d.ts","../../node_modules/utility-types/dist/functional-helpers.d.ts","../../node_modules/utility-types/dist/index.d.ts","../deprecated/build-types/index.d.ts","./src/dom/is-number-input.js","./src/dom/is-vertical-edge.js","./src/dom/place-caret-at-edge.js","./src/dom/place-caret-at-horizontal-edge.js","./src/dom/place-caret-at-vertical-edge.js","./src/dom/insert-after.js","./src/dom/remove.js","./src/dom/replace.js","./src/dom/unwrap.js","./src/dom/replace-tag.js","./src/dom/wrap.js","./src/dom/safe-html.js","./src/dom/strip-html.js","./src/dom/is-empty.js","./src/phrasing-content.js","./src/dom/is-element.js","./src/dom/clean-node-list.js","./src/dom/remove-invalid-html.js","./src/dom/index.js","./src/index.js","../../typings/gutenberg-env/index.d.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","eb75e89d63b3b72dd9ca8b0cac801cecae5be352307c004adeaa60bc9d6df51f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"cd6efb9467a8b6338ece2e2855e37765700f2cd061ca54b01b33878cf5c7677e","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"80d2e2a2e1685c82cba3c320f5d077376fadff77fe1f52a4c29f995bdc40ea70","0ca9a18ed362f11af31b31312d27380b605653eb7d9b005abc7ce9af29e6c545","2f84d4e9df1a03b75f60e69b02d021f2f63704f50a35e0f2bde516743763ad60","a7836408f857cb8855443e0ff79d3ed7027415dca85f312c5f9f47daa6cd355d","526ccdce763cd3eed48a276874e970211dd8dca17e2cf6835fd439ad43fd64ca","99546def4f9cd760e5ee13c0cce45c83aaa3d5474d75cef79c34b1990a808022","1caa056d021a35691778948dcb48eb6f7550110ea33c0d14c03f0445daa93559","4fcfb368b1ba498dab2fd60a1c680c137aacc6df49d8e0e802c9de00f0e047f0","c16b538f18087f31e1b99251169cd93e8d7a1ba8dde51768978f4bde67f318ac","f329cdfc6aa9467443275d35b330b78fccfe85ff28d1a54e415143645c294ed9","9c32c48fe5fb3b9929609bbd1d7233ed1fc13ac7aaee602b8dd27a0a90baf9cf","9816eb62d7014f570356c988308e390770fea83993d6eae79788cd79a31ea6dc","dea4257186ad318062499e0aff7122433b1081b7883e95ef78d9b4121fc8e7da","2b23f5cd28174981922a2ad9c8382b0775cd69c7b9a02088e5e5f8a3a2e780f3","f5b932cd4c47954ecb9c5010d848afe821486d5785a3c1c81e670146f4245688","4d31f8f7e9d8a43d2fd3c5a378e390080706392dd4d1541fc6b6f876ed961cf4","756cc95fd142eb928ba7bd366cc2756a902d8a1219182a45a2820e86702b1f3e","c6d152163c07dc49df635b774cbc479cad88b467f924f3141a28f5a378ec4a36","4312fd698114e973469529ec29680789e8ce13ffddcf711a8660c85e522b4069","cb412dab570deef76d26e0c5759e3fbe12625947ac6a82037573c788b7a2d1a4","59fbe797b38f7f549100d38fc9a4c6cd0f4b990407700f5e1979a54c9d8e3ed6","e8be8e4d18f330bdd294cdbe7d3c4a89e8dca65585284745a25c515ecb69249f","8b692a361fc9f2d4102106f168b35cf6f30c9efc66050108001955a1a59b4fd2","4b8e98da59bd094293f48bcba2b2863f16844f7b628755317c4376d2a57aae6f","6199e013116305fa2d162835ad812abfe210076e1249852851c5a80a753f4f3d","bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8","905386a2f18ce88642a62d84ddda2e1763d6180a011947f9bc57f8c78589174a","ba688a4815abd9d27b425a819def1721b61e1798acc748b471e54d50a7804bcd","6ead72509efbd9dc382f48a146420b917c84af52dbaa1c79c1c944a043503032","609b8944af1aa9b73959c0bd766370986176a197c16c27e365e867a0bc85eed8","2ffc9898fdf8f285b73f08ee256ca9a6f20cf3de25c57dd7aa28f7558d3af624","0fb6bab9bd95185809964d513dcfeeab6b5609d280dcc6291b5277e36998afe1","2d18411640dd8fcf1067392b839136628cafef5a648d0d49dc9da2f7d344046e","57597a1e8735ae08b671194c8b64a2c2831fd6ce2793d1bca705dbceb41bdaae","fc9b503ac41bf643bdd2c5bcf21e7e8c052881dd6b94699e3624f3a60e02b0be","665d3d55e94122f2fe1c2dd78dd61774134151557a3b8dd41d49868a642c1277","2259073e3a0fcbd5d873f90465ad8364007668a97c0291a6b6d7975d8edbe30d","02959309d4b7d9a875c4f175abae0a359a074585513d073d1fbb828b704e5663","d0472eb54f481ef265c3407b31df68485efda04e40cc8a7238c8dbdaf93fe81b","eb89338ad7e6dac4cf3435ed1351b5d8340b9b60f583560e89ae8e9997f1ea31","b40f71b721dba07996ea071f624b52ca6148278a12a17f2cf84b56eb1828ceaf","0d0dd5ae0237a3571383b9ac701d40220e1d963d0bbb22473c336225b2ed44a7","1c1f2d8b269e664047a9b56ce701c02e4223ce8f0fddc513ab4f311af8dbe654","dcc4b56e334bd6f9a8680a5dd343e417cdb03bae06bdc4786211d2cdfd7899e8","acbe60d616549a3815593f33a7a34faf0b0d063257c74f3b01bfc20dae42652e","0af026de3ab75c99339016a7aa606da158668df7cfc0c25668c1d1617323da20",{"version":"f254c1abf6bb4c92633159831f924588908da902aa5e04ae45c39bd001f62e2e","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[70,71,72,73],[70],[71],[74],[81,82,84,89,90,91],[48,49],[51,52,53],[48],[51,54],[57],[57,66],[49,50,51,53,55,56,58,59,61,62,63,69,76,77,79,80,81,82,83,84,85,86,87,88,89,93],[52,53],[48,49,60,63,64,65,67],[48,60],[60],[68],[52,75],[52],[48,60,63,67],[78],[92],[48,81,82],[82],[87],[45,46,47,90,94],[46]],"referencedMap":[[74,1],[71,2],[72,3],[75,4],[92,5],[50,6],[56,7],[51,8],[55,9],[57,8],[59,10],[49,8],[58,10],[67,11],[94,12],[54,13],[81,8],[68,14],[61,15],[62,16],[69,17],[76,18],[63,10],[65,8],[53,19],[77,17],[78,20],[79,21],[80,21],[93,22],[82,8],[85,8],[83,23],[87,24],[88,25],[84,8],[86,8],[95,26],[47,27]],"exportedModulesMap":[[74,1],[71,2],[72,3],[75,4],[92,5],[50,6],[56,7],[51,8],[55,9],[57,8],[59,10],[49,8],[58,10],[67,11],[94,12],[54,13],[81,8],[68,14],[61,15],[62,16],[69,17],[76,18],[63,10],[65,8],[53,19],[77,17],[78,20],[79,21],[80,21],[93,22],[82,8],[85,8],[83,23],[87,24],[88,25],[84,8],[86,8],[95,26],[47,27]],"semanticDiagnosticsPerFile":[10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,41,42,43,1,9,44,70,73,74,71,72,75,45,66,92,50,56,51,55,57,59,64,49,58,67,94,54,81,68,91,89,61,62,69,52,60,76,63,65,53,77,78,79,80,93,82,85,83,87,88,84,86,46,95,90,47,48,96]},"version":"4.4.2"}