Files
chrome-extenstions/vue-devtool/build/react_devtools_backend_compact.js
2026-01-20 21:53:59 +03:30

2 lines
50 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(()=>{"use strict";var e={3018:(e,t,n)=>{const r=n(5986),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),l=Symbol("allowStale"),a=Symbol("maxAge"),d=Symbol("dispose"),h=Symbol("noDisposeOnSet"),c=Symbol("lruList"),u=Symbol("cache"),p=Symbol("updateAgeOnGet"),naiveLength=()=>1;const get=(e,t,n)=>{const r=e[u].get(t);if(r){const t=r.value;if(isStale(e,t)){if(del(e,r),!e[l])return}else n&&(e[p]&&(r.value.now=Date.now()),e[c].unshiftNode(r));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[a])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[a]&&n>e[a]},trim=e=>{if(e[o]>e[i])for(let t=e[c].tail;e[o]>e[i]&&null!==t;){const n=t.prev;del(e,t),t=n}},del=(e,t)=>{if(t){const n=t.value;e[d]&&e[d](n.key,n.value),e[o]-=n.length,e[u].delete(n.key),e[c].removeNode(t)}};class f{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const forEachStep=(e,t,n,r)=>{let i=n.value;isStale(e,i)&&(del(e,n),e[l]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||naiveLength;if(this[s]="function"!=typeof t?naiveLength:t,this[l]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[a]=e.maxAge||0,this[d]=e.dispose,this[h]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,trim(this)}get max(){return this[i]}set allowStale(e){this[l]=!!e}get allowStale(){return this[l]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[a]=e,trim(this)}get maxAge(){return this[a]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[s]&&(this[s]=e,this[o]=0,this[c].forEach((e=>{e.length=this[s](e.value,e.key),this[o]+=e.length}))),trim(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[c].length}rforEach(e,t){t=t||this;for(let n=this[c].tail;null!==n;){const r=n.prev;forEachStep(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[c].head;null!==n;){const r=n.next;forEachStep(this,e,n,t),n=r}}keys(){return this[c].toArray().map((e=>e.key))}values(){return this[c].toArray().map((e=>e.value))}reset(){this[d]&&this[c]&&this[c].length&&this[c].forEach((e=>this[d](e.key,e.value))),this[u]=new Map,this[c]=new r,this[o]=0}dump(){return this[c].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[c]}set(e,t,n){if((n=n||this[a])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,l=this[s](t,e);if(this[u].has(e)){if(l>this[i])return del(this,this[u].get(e)),!1;const s=this[u].get(e).value;return this[d]&&(this[h]||this[d](e,s.value)),s.now=r,s.maxAge=n,s.value=t,this[o]+=l-s.length,s.length=l,this.get(e),trim(this),!0}const p=new f(e,t,l,r,n);return p.length>this[i]?(this[d]&&this[d](e,t),!1):(this[o]+=p.length,this[c].unshift(p),this[u].set(e,this[c].head),trim(this),!0)}has(e){if(!this[u].has(e))return!1;const t=this[u].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[c].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[u].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[u].forEach(((e,t)=>get(this,t,!1)))}}},7533:e=>{e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},5986:(e,t,n)=>{function Yallist(e){var t=this;if(t instanceof Yallist||(t=new Yallist),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)t.push(arguments[n]);return t}function insert(e,t,n){var r=t===e.head?new Node(n,null,t,e):new Node(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,n,r){if(!(this instanceof Node))return new Node(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=Yallist,Yallist.Node=Node,Yallist.create=Yallist,Yallist.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},Yallist.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},Yallist.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},Yallist.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},Yallist.prototype.map=function(e,t){t=t||this;for(var n=new Yallist,r=this.head;null!==r;)n.push(e.call(t,r.value,this)),r=r.next;return n},Yallist.prototype.mapReverse=function(e,t){t=t||this;for(var n=new Yallist,r=this.tail;null!==r;)n.push(e.call(t,r.value,this)),r=r.prev;return n},Yallist.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},Yallist.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},Yallist.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},Yallist.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},Yallist.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new Yallist;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,i=this.head;null!==i&&r<e;r++)i=i.next;for(;null!==i&&r<t;r++,i=i.next)n.push(i.value);return n},Yallist.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new Yallist;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,i=this.tail;null!==i&&r>t;r--)i=i.prev;for(;null!==i&&r>e;r--,i=i.prev)n.push(i.value);return n},Yallist.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,r=this.head;null!==r&&n<e;n++)r=r.next;var i=[];for(n=0;r&&n<t;n++)i.push(r.value),r=this.removeNode(r);null===r&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev);for(n=2;n<arguments.length;n++)r=insert(this,r,arguments[n]);return i},Yallist.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(7533)(Yallist)}catch(e){}}},t={};function __webpack_require__(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,__webpack_require__),i.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{function _defineProperty(e,t,n){var r;return(t="symbol"==typeof(r=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class e{constructor(){_defineProperty(this,"listenersMap",new Map)}addListener(e,t){const n=this.listenersMap.get(e);if(void 0===n)this.listenersMap.set(e,[t]);else{n.indexOf(t)<0&&n.push(t)}}emit(e,...t){const n=this.listenersMap.get(e);if(void 0!==n)if(1===n.length){n[0].apply(null,t)}else{let e=!1,r=null;const i=Array.from(n);for(let n=0;n<i.length;n++){const o=i[n];try{o.apply(null,t)}catch(t){null===r&&(e=!0,r=t)}}if(e)throw r}}removeAllListeners(){this.listenersMap.clear()}removeListener(e,t){const n=this.listenersMap.get(e);if(void 0!==n){const e=n.indexOf(t);e>=0&&n.splice(e,1)}}}const t="React::DevTools::lastSelection",esm_compareVersions=(e,t)=>{const n=validateAndParse(e),r=validateAndParse(t),i=n.pop(),o=r.pop(),s=compareSegments(n,r);return 0!==s?s:i&&o?compareSegments(i.split("."),o.split(".")):i||o?i?-1:1:0},n=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,validateAndParse=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(n);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},isWildcard=e=>"*"===e||"x"===e||"X"===e,tryParse=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},compareStrings=(e,t)=>{if(isWildcard(e)||isWildcard(t))return 0;const[n,r]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(tryParse(e),tryParse(t));return n>r?1:n<r?-1:0},compareSegments=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=compareStrings(e[n]||"0",t[n]||"0");if(0!==r)return r}return 0},r={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};Object.keys(r);var i=__webpack_require__(3018),o=__webpack_require__.n(i);Symbol.for("react.element"),Symbol.for("react.transitional.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.consumer"),Symbol.for("react.context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.for("react.scope"),Symbol.for("react.activity"),Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker"),Symbol.for("react.memo_cache_sentinel"),Symbol.for("react.postpone"),Symbol.for("react.view_transition"),Symbol.iterator;Symbol.asyncIterator;const s=Array.isArray;Object.prototype.hasOwnProperty,new WeakMap,new(o())({max:1e3}),Symbol.for("react.provider");Symbol("inspectable"),Symbol("inspected"),Symbol("name"),Symbol("preview_long"),Symbol("preview_short"),Symbol("readonly"),Symbol("size"),Symbol("type"),Symbol("unserializable");Array.isArray;function gte(e="",t=""){return esm_compareVersions(e,t)>-1}const isReactNativeEnvironment=()=>null==window.document;function getOwnerWindow(e){return e.ownerDocument?e.ownerDocument.defaultView:null}function getOwnerIframe(e){const t=getOwnerWindow(e);return t?t.frameElement:null}function getBoundingClientRectWithBorderOffset(e){const t=getElementDimensions(e);return mergeRectOffsets([e.getBoundingClientRect(),{top:t.borderTop,left:t.borderLeft,bottom:t.borderBottom,right:t.borderRight,width:0,height:0}])}function mergeRectOffsets(e){return e.reduce(((e,t)=>null==e?t:{top:e.top+t.top,left:e.left+t.left,width:e.width,height:e.height,bottom:e.bottom+t.bottom,right:e.right+t.right}))}function getNestedBoundingClientRect(e,t){const n=getOwnerIframe(e);if(n&&n!==t){const r=[e.getBoundingClientRect()];let i=n,o=!1;for(;i;){const e=getBoundingClientRectWithBorderOffset(i);if(r.push(e),i=getOwnerIframe(i),o)break;i&&getOwnerWindow(i)===t&&(o=!0)}return mergeRectOffsets(r)}return e.getBoundingClientRect()}function getElementDimensions(e){const t=window.getComputedStyle(e);return{borderLeft:parseInt(t.borderLeftWidth,10),borderRight:parseInt(t.borderRightWidth,10),borderTop:parseInt(t.borderTopWidth,10),borderBottom:parseInt(t.borderBottomWidth,10),marginLeft:parseInt(t.marginLeft,10),marginRight:parseInt(t.marginRight,10),marginTop:parseInt(t.marginTop,10),marginBottom:parseInt(t.marginBottom,10),paddingLeft:parseInt(t.paddingLeft,10),paddingRight:parseInt(t.paddingRight,10),paddingTop:parseInt(t.paddingTop,10),paddingBottom:parseInt(t.paddingBottom,10)}}const l=Object.assign;class a{constructor(e,t){this.node=e.createElement("div"),this.border=e.createElement("div"),this.padding=e.createElement("div"),this.content=e.createElement("div"),this.border.style.borderColor=c.border,this.padding.style.borderColor=c.padding,this.content.style.backgroundColor=c.background,l(this.node.style,{borderColor:c.margin,pointerEvents:"none",position:"fixed"}),this.node.style.zIndex="10000000",this.node.appendChild(this.border),this.border.appendChild(this.padding),this.padding.appendChild(this.content),t.appendChild(this.node)}remove(){this.node.parentNode&&this.node.parentNode.removeChild(this.node)}update(e,t){boxWrap(t,"margin",this.node),boxWrap(t,"border",this.border),boxWrap(t,"padding",this.padding),l(this.content.style,{height:e.height-t.borderTop-t.borderBottom-t.paddingTop-t.paddingBottom+"px",width:e.width-t.borderLeft-t.borderRight-t.paddingLeft-t.paddingRight+"px"}),l(this.node.style,{top:e.top-t.marginTop+"px",left:e.left-t.marginLeft+"px"})}}class d{constructor(e,t){this.tip=e.createElement("div"),l(this.tip.style,{display:"flex",flexFlow:"row nowrap",backgroundColor:"#333740",borderRadius:"2px",fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace',fontWeight:"bold",padding:"3px 5px",pointerEvents:"none",position:"fixed",fontSize:"12px",whiteSpace:"nowrap"}),this.nameSpan=e.createElement("span"),this.tip.appendChild(this.nameSpan),l(this.nameSpan.style,{color:"#ee78e6",borderRight:"1px solid #aaaaaa",paddingRight:"0.5rem",marginRight:"0.5rem"}),this.dimSpan=e.createElement("span"),this.tip.appendChild(this.dimSpan),l(this.dimSpan.style,{color:"#d7d7d7"}),this.tip.style.zIndex="10000000",t.appendChild(this.tip)}remove(){this.tip.parentNode&&this.tip.parentNode.removeChild(this.tip)}updateText(e,t,n){this.nameSpan.textContent=e,this.dimSpan.textContent=Math.round(t)+"px × "+Math.round(n)+"px"}updatePosition(e,t){const n=this.tip.getBoundingClientRect(),r=function(e,t,n){const r=Math.max(n.height,20),i=Math.max(n.width,60),o=5;let s;s=e.top+e.height+r<=t.top+t.height?e.top+e.height<t.top+0?t.top+o:e.top+e.height+o:e.top-r<=t.top+t.height?e.top-r-o<t.top+o?t.top+o:e.top-r-o:t.top+t.height-r-o;let l=e.left+o;e.left<t.left&&(l=t.left+o);e.left+i>t.left+t.width&&(l=t.left+t.width-i-o);return s+="px",l+="px",{style:{top:s,left:l}}}(e,t,{width:n.width,height:n.height});l(this.tip.style,r.style)}}class h{constructor(e){const t=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.window=t;const n=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.tipBoundsWindow=n;const r=t.document;this.container=r.createElement("div"),this.container.style.zIndex="10000000",this.tip=new d(r,this.container),this.rects=[],this.agent=e,r.body.appendChild(this.container)}remove(){this.tip.remove(),this.rects.forEach((e=>{e.remove()})),this.rects.length=0,this.container.parentNode&&this.container.parentNode.removeChild(this.container)}inspect(e,t){const n=e.filter((e=>e.nodeType===Node.ELEMENT_NODE));for(;this.rects.length>n.length;){this.rects.pop().remove()}if(0===n.length)return;for(;this.rects.length<n.length;)this.rects.push(new a(this.window.document,this.container));const r={top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,left:Number.POSITIVE_INFINITY};if(n.forEach(((e,t)=>{const n=getNestedBoundingClientRect(e,this.window),i=getElementDimensions(e);r.top=Math.min(r.top,n.top-i.marginTop),r.right=Math.max(r.right,n.left+n.width+i.marginRight),r.bottom=Math.max(r.bottom,n.top+n.height+i.marginBottom),r.left=Math.min(r.left,n.left-i.marginLeft);this.rects[t].update(n,i)})),!t){t=n[0].nodeName.toLowerCase();const e=n[0],r=this.agent.getComponentNameForHostInstance(e);r&&(t+=" (in "+r+")")}this.tip.updateText(t,r.right-r.left,r.bottom-r.top);const i=getNestedBoundingClientRect(this.tipBoundsWindow.document.documentElement,this.window);this.tip.updatePosition({top:r.top,left:r.left,height:r.bottom-r.top,width:r.right-r.left},{top:i.top+this.tipBoundsWindow.scrollY,left:i.left+this.tipBoundsWindow.scrollX,height:this.tipBoundsWindow.innerHeight,width:this.tipBoundsWindow.innerWidth})}}function boxWrap(e,t,n){l(n.style,{borderTopWidth:e[t+"Top"]+"px",borderLeftWidth:e[t+"Left"]+"px",borderRightWidth:e[t+"Right"]+"px",borderBottomWidth:e[t+"Bottom"]+"px",borderStyle:"solid"})}const c={background:"rgba(120, 170, 210, 0.7)",padding:"rgba(77, 200, 0, 0.3)",margin:"rgba(255, 155, 0, 0.3)",border:"rgba(255, 200, 50, 0.3)"},u=2e3;let p=null,f=null;function hideOverlay(e){return isReactNativeEnvironment()?function(e){e.emit("hideNativeHighlight")}(e):(p=null,void(null!==f&&(f.remove(),f=null)))}function showOverlay(e,t,n,r){return isReactNativeEnvironment()?function(e,t){t.emit("showNativeHighlight",e)}(e,n):function(e,t,n,r){null!==p&&clearTimeout(p),null===f&&(f=new h(n)),f.inspect(e,t),r&&(p=setTimeout((()=>hideOverlay(n)),u))}(e,t,n,r)}let g=new Set,m=!1;const v=["#37afa9","#63b19e","#80b393","#97b488","#abb67d","#beb771","#cfb965","#dfba57","#efbb49","#febc38"];let y=null;function drawWeb(e){null===y&&function(){y=window.document.createElement("canvas"),y.setAttribute("popover","manual"),y.style.cssText="\n xx-background-color: red;\n xx-opacity: 0.5;\n bottom: 0;\n left: 0;\n pointer-events: none;\n position: fixed;\n right: 0;\n top: 0;\n background-color: transparent;\n outline: none;\n box-shadow: none;\n border: none;\n ";const e=window.document.documentElement;e.insertBefore(y,e.firstChild)}();const t=window.devicePixelRatio||1,n=y;n.width=window.innerWidth*t,n.height=window.innerHeight*t,n.style.width=`${window.innerWidth}px`,n.style.height=`${window.innerHeight}px`;const r=n.getContext("2d");r.scale(t,t),r.clearRect(0,0,n.width/t,n.height/t);if(groupAndSortNodes(e).forEach((e=>{!function(e,t){t.forEach((({color:t,rect:n})=>{e.beginPath(),e.strokeStyle=t,e.rect(n.left,n.top,n.width-1,n.height-1),e.stroke()}))}(r,e),function(e,t){const n=t.map((({displayName:e,count:t})=>e?`${e}${t>1?` x${t}`:""}`:"")).filter(Boolean).join(", ");n&&function(e,t,n,r){const{left:i,top:o}=t;e.font="10px monospace",e.textBaseline="middle",e.textAlign="center";const s=2,l=14,a=e.measureText(n),d=a.width+2*s,h=l,c=i,u=o-h;e.fillStyle=r,e.fillRect(c,u,d,h),e.fillStyle="#000000",e.fillText(n,c+d/2,u+h/2)}(e,t[0].rect,n,t[0].color)}(r,e)})),null!==y){if(0===e.size&&y.matches(":popover-open"))return void y.hidePopover();y.matches(":popover-open")&&y.hidePopover(),y.showPopover()}}function groupAndSortNodes(e){const t=new Map;return iterateNodes(e,(({rect:e,color:n,displayName:r,count:i})=>{if(!e)return;const o=`${e.left},${e.top}`;t.has(o)||t.set(o,[]),t.get(o)?.push({rect:e,color:n,displayName:r,count:i})})),Array.from(t.values()).sort(((e,t)=>Math.max(...e.map((e=>e.count)))-Math.max(...t.map((e=>e.count)))))}function draw(e,t){return isReactNativeEnvironment()?function(e,t){const n=[];iterateNodes(e,(({color:e,node:t})=>{n.push({node:t,color:e})})),t.emit("drawTraceUpdates",n);const r=groupAndSortNodes(e);t.emit("drawGroupedTraceUpdatesWithNames",r)}(e,t):drawWeb(e)}function iterateNodes(e,t){e.forEach(((e,n)=>{const r=Math.min(v.length-1,e.count-1),i=v[r];t({color:i,node:n,count:e.count,displayName:e.displayName,expirationTime:e.expirationTime,lastMeasuredAt:e.lastMeasuredAt,rect:e.rect})}))}function destroy(e){return isReactNativeEnvironment()?function(e){e.emit("disableTraceUpdates")}(e):void(null!==y&&(y.matches(":popover-open")&&y.hidePopover(),null!=y.parentNode&&y.parentNode.removeChild(y),y=null))}const w=250,_=3e3,b=250,I=new Map([["Forget","✨"],["Memo","🧠"]]),S="object"==typeof performance&&"function"==typeof performance.now?()=>performance.now():()=>Date.now(),E=new Map;let P=null,x=null,D=!1,N=null;function traceUpdates(e){D&&(e.forEach((e=>{const t=E.get(e),n=S();let r=null!=t?t.lastMeasuredAt:0,i=null!=t?t.rect:null;(null===i||r+b<n)&&(r=n,i=function(e){if(!e||"function"!=typeof e.getBoundingClientRect)return null;const t=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;return getNestedBoundingClientRect(e,t)}(e));let o=P.getComponentNameForHostInstance(e);if(o){const{baseComponentName:e,hocNames:t}=function(e){if(!e)return{baseComponentName:"",hocNames:[]};const t=/([A-Z][a-zA-Z0-9]*?)\((.*)\)/g,n=[];let r,i=e;for(;null!=(r=t.exec(i));)if(Array.isArray(r)){const[,e,t]=r;n.push(e),i=t}return{baseComponentName:i,hocNames:n}}(o),n=t.map((e=>I.get(e)||"")).join("");o=n?`${n}${e}`:e}E.set(e,{count:null!=t?t.count+1:1,expirationTime:null!=t?Math.min(n+_,t.expirationTime+w):n+w,lastMeasuredAt:r,rect:i,displayName:o})})),null!==N&&(clearTimeout(N),N=null),null===x&&(x=requestAnimationFrame(prepareToDraw)))}function prepareToDraw(){x=null,N=null;const e=S();let t=Number.MAX_VALUE;E.forEach(((n,r)=>{n.expirationTime<e?E.delete(r):t=Math.min(t,n.expirationTime)})),draw(E,P),t!==Number.MAX_VALUE&&(N=setTimeout(prepareToDraw,t-e))}function bridge_defineProperty(e,t,n){var r;return(t="symbol"==typeof(r=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const T=[{version:0,minNpmVersion:'"<4.11.0"',maxNpmVersion:'"<4.11.0"'},{version:1,minNpmVersion:"4.13.0",maxNpmVersion:"4.21.0"},{version:2,minNpmVersion:"4.22.0",maxNpmVersion:null}],A=T[T.length-1];const L=class extends e{constructor(e){super(),bridge_defineProperty(this,"_isShutdown",!1),bridge_defineProperty(this,"_messageQueue",[]),bridge_defineProperty(this,"_scheduledFlush",!1),bridge_defineProperty(this,"_wallUnlisten",null),bridge_defineProperty(this,"_flush",(()=>{try{if(this._messageQueue.length){for(let e=0;e<this._messageQueue.length;e+=2)this._wall.send(this._messageQueue[e],...this._messageQueue[e+1]);this._messageQueue.length=0}}finally{this._scheduledFlush=!1}})),bridge_defineProperty(this,"overrideValueAtPath",(({id:e,path:t,rendererID:n,type:r,value:i})=>{switch(r){case"context":this.send("overrideContext",{id:e,path:t,rendererID:n,wasForwarded:!0,value:i});break;case"hooks":this.send("overrideHookState",{id:e,path:t,rendererID:n,wasForwarded:!0,value:i});break;case"props":this.send("overrideProps",{id:e,path:t,rendererID:n,wasForwarded:!0,value:i});break;case"state":this.send("overrideState",{id:e,path:t,rendererID:n,wasForwarded:!0,value:i})}})),this._wall=e,this._wallUnlisten=e.listen((e=>{e&&e.event&&this.emit(e.event,e.payload)}))||null,this.addListener("overrideValueAtPath",this.overrideValueAtPath)}get wall(){return this._wall}send(e,...t){this._isShutdown?console.warn(`Cannot send message "${e}" through a Bridge that has been shutdown.`):(this._messageQueue.push(e,t),this._scheduledFlush||(this._scheduledFlush=!0,"function"==typeof devtoolsJestTestScheduler?devtoolsJestTestScheduler(this._flush):queueMicrotask(this._flush)))}shutdown(){if(this._isShutdown)return void console.warn("Bridge was already shutdown.");this.emit("shutdown"),this.send("shutdown"),this._isShutdown=!0,this.addListener=function(){},this.emit=function(){},this.removeAllListeners();const e=this._wallUnlisten;e&&e();do{this._flush()}while(this._messageQueue.length)}};function agent_defineProperty(e,t,n){var r;return(t="symbol"==typeof(r=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mergeRoots(e,t,n){const r=e.suspendedByRange,i=t.suspendedByRange;t.isErrored&&(e.isErrored=!0);for(let n=0;n<t.errors.length;n++)e.errors.push(t.errors[n]);for(let n=0;n<t.warnings.length;n++)e.warnings.push(t.warnings[n]);const o=e.suspendedBy,{data:s,cleaned:l,unserializable:a}=t.suspendedBy,d=o.data,h=s;for(let e=0;e<h.length;e++)d.push(h[e]);for(let e=0;e<l.length;e++)o.cleaned.push([n+l[e][0]].concat(l[e].slice(1)));for(let e=0;e<a.length;e++)o.unserializable.push([n+a[e][0]].concat(a[e].slice(1)));null!==i&&(null===r?e.suspendedByRange=[i[0],i[1]]:(i[0]<r[0]&&(r[0]=i[0]),i[1]>r[1]&&(r[1]=i[1])))}class k extends e{constructor(e,n=!1,r){super(),agent_defineProperty(this,"_isProfiling",!1),agent_defineProperty(this,"_rendererInterfaces",{}),agent_defineProperty(this,"_persistedSelection",null),agent_defineProperty(this,"_persistedSelectionMatch",null),agent_defineProperty(this,"_traceUpdatesEnabled",!1),agent_defineProperty(this,"clearErrorsAndWarnings",(({rendererID:e})=>{const t=this._rendererInterfaces[e];null==t?console.warn(`Invalid renderer id "${e}"`):t.clearErrorsAndWarnings()})),agent_defineProperty(this,"clearErrorsForElementID",(({id:e,rendererID:t})=>{const n=this._rendererInterfaces[t];null==n?console.warn(`Invalid renderer id "${t}"`):n.clearErrorsForElementID(e)})),agent_defineProperty(this,"clearWarningsForElementID",(({id:e,rendererID:t})=>{const n=this._rendererInterfaces[t];null==n?console.warn(`Invalid renderer id "${t}"`):n.clearWarningsForElementID(e)})),agent_defineProperty(this,"copyElementPath",(({id:e,path:t,rendererID:n})=>{const r=this._rendererInterfaces[n];if(null==r)console.warn(`Invalid renderer id "${n}" for element "${e}"`);else{const n=r.getSerializedElementValueByPath(e,t);null!=n?this._bridge.send("saveToClipboard",n):console.warn(`Unable to obtain serialized value for element "${e}"`)}})),agent_defineProperty(this,"deletePath",(({hookID:e,id:t,path:n,rendererID:r,type:i})=>{const o=this._rendererInterfaces[r];null==o?console.warn(`Invalid renderer id "${r}" for element "${t}"`):o.deletePath(i,t,e,n)})),agent_defineProperty(this,"getBackendVersion",(()=>{const e="7.0.1-3cde211b0c";e&&this._bridge.send("backendVersion",e)})),agent_defineProperty(this,"getBridgeProtocol",(()=>{this._bridge.send("bridgeProtocol",A)})),agent_defineProperty(this,"getProfilingData",(({rendererID:e})=>{const t=this._rendererInterfaces[e];null==t&&console.warn(`Invalid renderer id "${e}"`),this._bridge.send("profilingData",t.getProfilingData())})),agent_defineProperty(this,"getProfilingStatus",(()=>{this._bridge.send("profilingStatus",this._isProfiling)})),agent_defineProperty(this,"getOwnersList",(({id:e,rendererID:t})=>{const n=this._rendererInterfaces[t];if(null==n)console.warn(`Invalid renderer id "${t}" for element "${e}"`);else{const t=n.getOwnersList(e);this._bridge.send("ownersList",{id:e,owners:t})}})),agent_defineProperty(this,"inspectElement",(({forceFullData:e,id:t,path:n,rendererID:r,requestID:i})=>{const o=this._rendererInterfaces[r];null==o?console.warn(`Invalid renderer id "${r}" for element "${t}"`):(this._bridge.send("inspectedElement",o.inspectElement(i,t,n,e)),null!==this._persistedSelectionMatch&&this._persistedSelectionMatch.id===t||(this._persistedSelection=null,this._persistedSelectionMatch=null,o.setTrackedPath(null),this._lastSelectedElementID=t,this._lastSelectedRendererID=r,this._persistSelectionTimerScheduled||(this._persistSelectionTimerScheduled=!0,setTimeout(this._persistSelection,1e3))))})),agent_defineProperty(this,"inspectScreen",(({requestID:e,id:t,forceFullData:n,path:r})=>{let i=null,o=!1,s=0,l=null,a=null;if(null!==r&&r.length>1){if("suspendedBy"!==r[0])throw new Error("Only hydrating suspendedBy paths is supported. This is a bug.");if("number"!=typeof r[1])throw new Error(`Expected suspendedBy index to be a number. Received '${r[1]}' instead. This is a bug.`);l=r[1],a=r.slice(2)}for(const r in this._rendererInterfaces){const c=this._rendererInterfaces[r];let u=null;if(null!==l&&null!==a){const e=l-s;void 0!==c.getElementAttributeByPath(t,["suspendedBy",e])&&(u=["suspendedBy",e].concat(a))}const p=c.inspectElement(e,t,u,n);switch(p.type){case"hydrated-path":if(p.path[1]+=s,null!==p.value)for(let e=0;e<p.value.cleaned.length;e++)p.value.cleaned[e][1]+=s;return void this._bridge.send("inspectedScreen",p);case"full-data":const e=p.value;null===i&&(d=e.id,h=e.type,i={id:d,type:h,isErrored:!1,errors:[],warnings:[],suspendedBy:{cleaned:[],data:[],unserializable:[]},suspendedByRange:null,unknownSuspenders:0,rootType:null,plugins:{stylex:null},nativeTag:null,env:null,source:null,stack:null,rendererPackageName:null,rendererVersion:null,key:null,canEditFunctionProps:!1,canEditHooks:!1,canEditFunctionPropsDeletePaths:!1,canEditFunctionPropsRenamePaths:!1,canEditHooksAndDeletePaths:!1,canEditHooksAndRenamePaths:!1,canToggleError:!1,canToggleSuspense:!1,isSuspended:!1,hasLegacyContext:!1,context:null,hooks:null,props:null,state:null,owners:null}),mergeRoots(i,e,s);s+=e.suspendedBy.data.length,o=!0;break;case"no-change":o=!0;s+=c.getElementAttributeByPath(t,["suspendedBy"]).length;break;case"not-found":break;case"error":return void this._bridge.send("inspectedScreen",p)}}var d,h;null===i?o?this._bridge.send("inspectedScreen",{type:"no-change",responseID:e,id:t}):this._bridge.send("inspectedScreen",{type:"not-found",responseID:e,id:t}):this._bridge.send("inspectedScreen",{type:"full-data",responseID:e,id:t,value:i})})),agent_defineProperty(this,"logElementToConsole",(({id:e,rendererID:t})=>{const n=this._rendererInterfaces[t];null==n?console.warn(`Invalid renderer id "${t}" for element "${e}"`):n.logElementToConsole(e)})),agent_defineProperty(this,"overrideError",(({id:e,rendererID:t,forceError:n})=>{const r=this._rendererInterfaces[t];null==r?console.warn(`Invalid renderer id "${t}" for element "${e}"`):r.overrideError(e,n)})),agent_defineProperty(this,"overrideSuspense",(({id:e,rendererID:t,forceFallback:n})=>{const r=this._rendererInterfaces[t];null==r?console.warn(`Invalid renderer id "${t}" for element "${e}"`):r.overrideSuspense(e,n)})),agent_defineProperty(this,"overrideSuspenseMilestone",(({suspendedSet:e})=>{for(const t in this._rendererInterfaces){const n=this._rendererInterfaces[t];n.supportsTogglingSuspense&&n.overrideSuspenseMilestone(e)}})),agent_defineProperty(this,"overrideValueAtPath",(({hookID:e,id:t,path:n,rendererID:r,type:i,value:o})=>{const s=this._rendererInterfaces[r];null==s?console.warn(`Invalid renderer id "${r}" for element "${t}"`):s.overrideValueAtPath(i,t,e,n,o)})),agent_defineProperty(this,"overrideContext",(({id:e,path:t,rendererID:n,wasForwarded:r,value:i})=>{r||this.overrideValueAtPath({id:e,path:t,rendererID:n,type:"context",value:i})})),agent_defineProperty(this,"overrideHookState",(({id:e,hookID:t,path:n,rendererID:r,wasForwarded:i,value:o})=>{i||this.overrideValueAtPath({id:e,path:n,rendererID:r,type:"hooks",value:o})})),agent_defineProperty(this,"overrideProps",(({id:e,path:t,rendererID:n,wasForwarded:r,value:i})=>{r||this.overrideValueAtPath({id:e,path:t,rendererID:n,type:"props",value:i})})),agent_defineProperty(this,"overrideState",(({id:e,path:t,rendererID:n,wasForwarded:r,value:i})=>{r||this.overrideValueAtPath({id:e,path:t,rendererID:n,type:"state",value:i})})),agent_defineProperty(this,"onReloadAndProfileSupportedByHost",(()=>{this._bridge.send("isReloadAndProfileSupportedByBackend",!0)})),agent_defineProperty(this,"reloadAndProfile",(({recordChangeDescriptions:e,recordTimeline:t})=>{"function"==typeof this._onReloadAndProfile&&this._onReloadAndProfile(e,t),this._bridge.send("reloadAppForProfiling")})),agent_defineProperty(this,"renamePath",(({hookID:e,id:t,newPath:n,oldPath:r,rendererID:i,type:o})=>{const s=this._rendererInterfaces[i];null==s?console.warn(`Invalid renderer id "${i}" for element "${t}"`):s.renamePath(o,t,e,r,n)})),agent_defineProperty(this,"setTraceUpdatesEnabled",(e=>{this._traceUpdatesEnabled=e,D=e,D||(E.clear(),null!==x&&(cancelAnimationFrame(x),x=null),null!==N&&(clearTimeout(N),N=null),destroy(P));for(const t in this._rendererInterfaces){this._rendererInterfaces[t].setTraceUpdatesEnabled(e)}})),agent_defineProperty(this,"syncSelectionFromBuiltinElementsPanel",(()=>{const e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0;null!=e&&this.selectNode(e)})),agent_defineProperty(this,"shutdown",(()=>{this.emit("shutdown"),this._bridge.removeAllListeners(),this.removeAllListeners()})),agent_defineProperty(this,"startProfiling",(({recordChangeDescriptions:e,recordTimeline:t})=>{this._isProfiling=!0;for(const n in this._rendererInterfaces){this._rendererInterfaces[n].startProfiling(e,t)}this._bridge.send("profilingStatus",this._isProfiling)})),agent_defineProperty(this,"stopProfiling",(()=>{this._isProfiling=!1;for(const e in this._rendererInterfaces){this._rendererInterfaces[e].stopProfiling()}this._bridge.send("profilingStatus",this._isProfiling)})),agent_defineProperty(this,"stopInspectingNative",(e=>{this._bridge.send("stopInspectingHost",e)})),agent_defineProperty(this,"storeAsGlobal",(({count:e,id:t,path:n,rendererID:r})=>{const i=this._rendererInterfaces[r];null==i?console.warn(`Invalid renderer id "${r}" for element "${t}"`):i.storeAsGlobal(t,n,e)})),agent_defineProperty(this,"updateHookSettings",(e=>{this.emit("updateHookSettings",e)})),agent_defineProperty(this,"getHookSettings",(()=>{this.emit("getHookSettings")})),agent_defineProperty(this,"onHookSettings",(e=>{this._bridge.send("hookSettings",e)})),agent_defineProperty(this,"updateComponentFilters",(e=>{for(const t in this._rendererInterfaces){const n=+t,r=this._rendererInterfaces[n];if(this._lastSelectedRendererID===n){const e=r.getPathForElement(this._lastSelectedElementID);null!==e&&(r.setTrackedPath(e),this._persistedSelection={rendererID:n,path:e})}r.updateComponentFilters(e)}})),agent_defineProperty(this,"getEnvironmentNames",(()=>{let e=null;for(const t in this._rendererInterfaces){const n=this._rendererInterfaces[+t].getEnvironmentNames();if(null===e)e=n;else for(let t=0;t<n.length;t++)-1===e.indexOf(n[t])&&e.push(n[t])}this._bridge.send("environmentNames",e||[])})),agent_defineProperty(this,"onTraceUpdates",(e=>{this.emit("traceUpdates",e)})),agent_defineProperty(this,"onFastRefreshScheduled",(()=>{this._bridge.send("fastRefreshScheduled")})),agent_defineProperty(this,"onHookOperations",(e=>{if(this._bridge.send("operations",e),null!==this._persistedSelection){const t=e[0];if(this._persistedSelection.rendererID===t){const e=this._rendererInterfaces[t];if(null==e)console.warn(`Invalid renderer id "${t}"`);else{const t=this._persistedSelectionMatch,n=e.getBestMatchForTrackedPath();this._persistedSelectionMatch=n;const r=null!==t?t.id:null,i=null!==n?n.id:null;r!==i&&null!==i&&this._bridge.send("selectElement",i),null!==n&&n.isFullMatch&&(this._persistedSelection=null,this._persistedSelectionMatch=null,e.setTrackedPath(null))}}}})),agent_defineProperty(this,"getIfHasUnsupportedRendererVersion",(()=>{this.emit("getIfHasUnsupportedRendererVersion")})),agent_defineProperty(this,"_persistSelectionTimerScheduled",!1),agent_defineProperty(this,"_lastSelectedRendererID",-1),agent_defineProperty(this,"_lastSelectedElementID",-1),agent_defineProperty(this,"_persistSelection",(()=>{this._persistSelectionTimerScheduled=!1;const e=this._lastSelectedRendererID,n=this._lastSelectedElementID,r=this._rendererInterfaces[e],i=null!=r?r.getPathForElement(n):null;null!==i?function(e,t){try{return sessionStorage.setItem(e,t)}catch(e){}}(t,JSON.stringify({rendererID:e,path:i})):function(e){try{sessionStorage.removeItem(e)}catch(e){}}(t)})),this._isProfiling=n,this._onReloadAndProfile=r;const i=function(e){try{return sessionStorage.getItem(e)}catch(e){return null}}(t);null!=i&&(this._persistedSelection=JSON.parse(i)),this._bridge=e,e.addListener("clearErrorsAndWarnings",this.clearErrorsAndWarnings),e.addListener("clearErrorsForElementID",this.clearErrorsForElementID),e.addListener("clearWarningsForElementID",this.clearWarningsForElementID),e.addListener("copyElementPath",this.copyElementPath),e.addListener("deletePath",this.deletePath),e.addListener("getBackendVersion",this.getBackendVersion),e.addListener("getBridgeProtocol",this.getBridgeProtocol),e.addListener("getProfilingData",this.getProfilingData),e.addListener("getProfilingStatus",this.getProfilingStatus),e.addListener("getOwnersList",this.getOwnersList),e.addListener("inspectElement",this.inspectElement),e.addListener("inspectScreen",this.inspectScreen),e.addListener("logElementToConsole",this.logElementToConsole),e.addListener("overrideError",this.overrideError),e.addListener("overrideSuspense",this.overrideSuspense),e.addListener("overrideSuspenseMilestone",this.overrideSuspenseMilestone),e.addListener("overrideValueAtPath",this.overrideValueAtPath),e.addListener("reloadAndProfile",this.reloadAndProfile),e.addListener("renamePath",this.renamePath),e.addListener("setTraceUpdatesEnabled",this.setTraceUpdatesEnabled),e.addListener("startProfiling",this.startProfiling),e.addListener("stopProfiling",this.stopProfiling),e.addListener("storeAsGlobal",this.storeAsGlobal),e.addListener("syncSelectionFromBuiltinElementsPanel",this.syncSelectionFromBuiltinElementsPanel),e.addListener("shutdown",this.shutdown),e.addListener("updateHookSettings",this.updateHookSettings),e.addListener("getHookSettings",this.getHookSettings),e.addListener("updateComponentFilters",this.updateComponentFilters),e.addListener("getEnvironmentNames",this.getEnvironmentNames),e.addListener("getIfHasUnsupportedRendererVersion",this.getIfHasUnsupportedRendererVersion),e.addListener("overrideContext",this.overrideContext),e.addListener("overrideHookState",this.overrideHookState),e.addListener("overrideProps",this.overrideProps),e.addListener("overrideState",this.overrideState),function(e,t){function registerListenersOnWindow(e){e&&"function"==typeof e.addEventListener?(e.addEventListener("click",onClick,!0),e.addEventListener("mousedown",onMouseEvent,!0),e.addEventListener("mouseover",onMouseEvent,!0),e.addEventListener("mouseup",onMouseEvent,!0),e.addEventListener("pointerdown",onPointerDown,!0),e.addEventListener("pointermove",onPointerMove,!0),e.addEventListener("pointerup",onPointerUp,!0)):t.emit("startInspectingNative")}function stopInspectingHost(){hideOverlay(t),removeListenersOnWindow(window),g.forEach((function(e){try{removeListenersOnWindow(e.contentWindow)}catch(e){}})),g=new Set}function removeListenersOnWindow(e){e&&"function"==typeof e.removeEventListener?(e.removeEventListener("click",onClick,!0),e.removeEventListener("mousedown",onMouseEvent,!0),e.removeEventListener("mouseover",onMouseEvent,!0),e.removeEventListener("mouseup",onMouseEvent,!0),e.removeEventListener("pointerdown",onPointerDown,!0),e.removeEventListener("pointermove",onPointerMove,!0),e.removeEventListener("pointerup",onPointerUp,!0)):t.emit("stopInspectingNative")}function highlightHostInstance({displayName:r,hideAfterTimeout:i,id:o,openBuiltinElementsPanel:s,rendererID:l,scrollIntoView:a}){const d=t.rendererInterfaces[l];if(null==d)return console.warn(`Invalid renderer id "${l}" for element "${o}"`),void hideOverlay(t);if(!d.hasElementWithId(o))return void hideOverlay(t);const h=d.findHostInstancesForElementID(o);if(null!=h)for(let o=0;o<h.length;o++){const l=h[o];if(null===l)continue;const d="function"==typeof l.getClientRects?l.getClientRects():[];if(d.length>0&&(d.length>2||d[0].width>0||d[0].height>0))return a&&"function"==typeof l.scrollIntoView&&(n&&(clearTimeout(n),n=null),l.scrollIntoView({block:"nearest",inline:"nearest"})),showOverlay(h,r,t,i),void(s&&(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0=l,e.send("syncSelectionToBuiltinElementsPanel")))}hideOverlay(t)}function attemptScrollToHostInstance(e,t){const n=e.findHostInstancesForElementID(t);if(null!=n)for(let e=0;e<n.length;e++){const t=n[e];if(null===t)continue;const r="function"==typeof t.getClientRects?t.getClientRects():[];if(r.length>0&&(r.length>2||r[0].width>0||r[0].height>0)&&"function"==typeof t.scrollIntoView)return t.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"}),!0}return!1}e.addListener("clearHostInstanceHighlight",(function(){hideOverlay(t)})),e.addListener("highlightHostInstance",highlightHostInstance),e.addListener("highlightHostInstances",(function({displayName:e,hideAfterTimeout:n,elements:r,scrollIntoView:i}){const o=[];for(let e=0;e<r.length;e++){const{id:n,rendererID:i}=r[e],s=t.rendererInterfaces[i];if(null==s){console.warn(`Invalid renderer id "${i}" for element "${n}"`);continue}if(!s.hasElementWithId(n))continue;const l=s.findHostInstancesForElementID(n);if(null!==l)for(let e=0;e<l.length;e++)o.push(l[e])}if(o.length>0){const e=o[0];i&&"function"==typeof e.scrollIntoView&&e.scrollIntoView({block:"nearest",inline:"nearest"})}showOverlay(o,e,t,n)})),e.addListener("scrollToHostInstance",(function({id:e,rendererID:r}){hideOverlay(t),n&&(clearTimeout(n),n=null);const i=t.rendererInterfaces[r];if(null==i)return void console.warn(`Invalid renderer id "${r}" for element "${e}"`);if(!i.hasElementWithId(e))return;if(attemptScrollToHostInstance(i,e))return;const o=i.findLastKnownRectsForID(e);if(null!==o&&o.length>0){let t=1/0,r=1/0;for(let e=0;e<o.length;e++){const n=o[e];n.x<t&&(t=n.x),n.y<r&&(r=n.y)}const s=document.documentElement;if(!s)return;(t<window.scrollX||r<window.scrollY||t>window.scrollX+s.clientWidth||r>window.scrollY+s.clientHeight)&&window.scrollTo({top:r,left:t,behavior:"smooth"}),n=setTimeout((()=>{attemptScrollToHostInstance(i,e)}),100)}})),e.addListener("shutdown",stopInspectingHost),e.addListener("startInspectingHost",(function(e){m=e,registerListenersOnWindow(window)})),e.addListener("stopInspectingHost",stopInspectingHost);let n=null;function onClick(t){t.preventDefault(),t.stopPropagation(),stopInspectingHost(),e.send("stopInspectingHost",!0)}function onMouseEvent(e){e.preventDefault(),e.stopPropagation()}function onPointerDown(e){e.preventDefault(),e.stopPropagation(),selectElementForNode(getEventTarget(e))}let r=null;function onPointerMove(e){e.preventDefault(),e.stopPropagation();const n=getEventTarget(e);if(r!==n){if(r=n,"IFRAME"===n.tagName){const e=n;try{g.has(e)||(registerListenersOnWindow(e.contentWindow),g.add(e))}catch(e){}}if(m){const e=t.getIDForHostInstance(n,m);if(null!==e){const n=t.rendererInterfaces[e.rendererID];if(null==n)return void console.warn(`Invalid renderer id "${e.rendererID}" for element "${e.id}"`);highlightHostInstance({displayName:n.getDisplayNameForElementID(e.id),hideAfterTimeout:!1,id:e.id,openBuiltinElementsPanel:!1,rendererID:e.rendererID,scrollIntoView:!1})}}else showOverlay([n],null,t,!1)}}function onPointerUp(e){e.preventDefault(),e.stopPropagation()}const selectElementForNode=n=>{const r=t.getIDForHostInstance(n,m);null!==r&&e.send("selectElement",r.id)};function getEventTarget(e){return e.composed?e.composedPath()[0]:e.target}}(e,this),P=this,P.addListener("traceUpdates",traceUpdates),e.send("backendInitialized"),this._isProfiling&&e.send("profilingStatus",!0)}get rendererInterfaces(){return this._rendererInterfaces}getInstanceAndStyle({id:e,rendererID:t}){const n=this._rendererInterfaces[t];return null==n?(console.warn(`Invalid renderer id "${t}"`),null):n.getInstanceAndStyle(e)}getIDForHostInstance(e,t){if(isReactNativeEnvironment()||"number"!=typeof e.nodeType){for(const n in this._rendererInterfaces){const r=this._rendererInterfaces[n];try{const i=t?r.getSuspenseNodeIDForHostInstance(e):r.getElementIDForHostInstance(e);if(null!==i)return{id:i,rendererID:+n}}catch(e){}}return null}{let n=null,r=null,i=0;for(const t in this._rendererInterfaces){const o=this._rendererInterfaces[t],s=o.getNearestMountedDOMNode(e);if(null!==s){if(s===e){n=s,r=o,i=+t;break}(null===n||n.contains(s))&&(n=s,r=o,i=+t)}}if(null!=r&&null!=n)try{const e=t?r.getSuspenseNodeIDForHostInstance(n):r.getElementIDForHostInstance(n);if(null!==e)return{id:e,rendererID:i}}catch(e){}return null}}getComponentNameForHostInstance(e){const t=this.getIDForHostInstance(e);if(null!==t){return this._rendererInterfaces[t.rendererID].getDisplayNameForElementID(t.id)}return null}selectNode(e){const t=this.getIDForHostInstance(e);null!==t&&this._bridge.send("selectElement",t.id)}registerRendererInterface(e,t){this._rendererInterfaces[e]=t,t.setTraceUpdatesEnabled(this._traceUpdatesEnabled);const n=t.renderer;if(null!==n){1===n.bundleType&&gte(n.version,"19.3.0-canary")&&this._bridge.send("enableSuspenseTab")}const r=this._persistedSelection;null!==r&&r.rendererID===e&&t.setTrackedPath(r.path)}onUnsupportedRenderer(){this._bridge.send("unsupportedRendererVersion")}}function initBackend(e,t,n,r){if(null==e)return()=>{};function registerRendererInterface(e,n){t.registerRendererInterface(e,n),n.flushInitialOperations()}const i=[e.sub("renderer-attached",(({id:e,rendererInterface:t})=>{registerRendererInterface(e,t)})),e.sub("unsupported-renderer-version",(()=>{t.onUnsupportedRenderer()})),e.sub("fastRefreshScheduled",t.onFastRefreshScheduled),e.sub("operations",t.onHookOperations),e.sub("traceUpdates",t.onTraceUpdates),e.sub("settingsInitialized",t.onHookSettings)];t.addListener("getIfHasUnsupportedRendererVersion",(()=>{e.hasUnsupportedRendererAttached&&t.onUnsupportedRenderer()})),e.rendererInterfaces.forEach(((e,t)=>{registerRendererInterface(t,e)})),e.emit("react-devtools",t),e.reactDevtoolsAgent=t;return t.addListener("shutdown",(()=>{i.forEach((e=>e())),e.rendererInterfaces.forEach((e=>{e.cleanup()})),e.reactDevtoolsAgent=null})),t.addListener("updateHookSettings",(t=>{e.settings=t})),t.addListener("getHookSettings",(()=>{null!=e.settings&&t.onHookSettings(e.settings)})),r&&t.onReloadAndProfileSupportedByHost(),()=>{i.forEach((e=>e()))}}function resolveBoxStyle(e,t){let n=!1;const r={bottom:0,left:0,right:0,top:0},i=t[e];if(null!=i){for(const e of Object.keys(r))r[e]=i;n=!0}const o=t[e+"Horizontal"];if(null!=o)r.left=o,r.right=o,n=!0;else{const i=t[e+"Left"];null!=i&&(r.left=i,n=!0);const o=t[e+"Right"];null!=o&&(r.right=o,n=!0);const s=t[e+"End"];null!=s&&(r.right=s,n=!0);const l=t[e+"Start"];null!=l&&(r.left=l,n=!0)}const s=t[e+"Vertical"];if(null!=s)r.bottom=s,r.top=s,n=!0;else{const i=t[e+"Bottom"];null!=i&&(r.bottom=i,n=!0);const o=t[e+"Top"];null!=o&&(r.top=o,n=!0)}return n?r:null}function setupNativeStyleEditor(e,t,n,r){e.addListener("NativeStyleEditor_measure",(({id:r,rendererID:i})=>{measureStyle(t,e,n,r,i)})),e.addListener("NativeStyleEditor_renameAttribute",(({id:r,rendererID:i,oldName:o,newName:l,value:a})=>{!function(e,t,n,r,i,o){const l=e.getInstanceAndStyle({id:t,rendererID:n});if(!l||!l.style)return;const{instance:a,style:d}=l,h=i?{[r]:void 0,[i]:o}:{[r]:void 0};let c;if(null!==a&&"function"==typeof a.setNativeProps){const e=O.get(t);e?Object.assign(e,h):O.set(t,h),a.setNativeProps({style:h})}else if(s(d)){const l=d.length-1;"object"!=typeof d[l]||s(d[l])?e.overrideValueAtPath({type:"props",id:t,rendererID:n,path:["style"],value:d.concat([h])}):(c=shallowClone(d[l]),delete c[r],i?c[i]=o:c[r]=void 0,e.overrideValueAtPath({type:"props",id:t,rendererID:n,path:["style",l],value:c}))}else"object"==typeof d?(c=shallowClone(d),delete c[r],i?c[i]=o:c[r]=void 0,e.overrideValueAtPath({type:"props",id:t,rendererID:n,path:["style"],value:c})):e.overrideValueAtPath({type:"props",id:t,rendererID:n,path:["style"],value:[d,h]});e.emit("hideNativeHighlight")}(t,r,i,o,l,a),setTimeout((()=>measureStyle(t,e,n,r,i)))})),e.addListener("NativeStyleEditor_setValue",(({id:r,rendererID:i,name:o,value:l})=>{!function(e,t,n,r,i){const o=e.getInstanceAndStyle({id:t,rendererID:n});if(!o||!o.style)return;const{instance:l,style:a}=o,d={[r]:i};if(null!==l&&"function"==typeof l.setNativeProps){const e=O.get(t);e?Object.assign(e,d):O.set(t,d),l.setNativeProps({style:d})}else if(s(a)){const o=a.length-1;"object"!=typeof a[o]||s(a[o])?e.overrideValueAtPath({type:"props",id:t,rendererID:n,path:["style"],value:a.concat([d])}):e.overrideValueAtPath({type:"props",id:t,rendererID:n,path:["style",o,r],value:i})}else e.overrideValueAtPath({type:"props",id:t,rendererID:n,path:["style"],value:[a,d]});e.emit("hideNativeHighlight")}(t,r,i,o,l),setTimeout((()=>measureStyle(t,e,n,r,i)))})),e.send("isNativeStyleEditorSupported",{isSupported:!0,validAttributes:r})}const R={top:0,left:0,right:0,bottom:0},O=new Map;function measureStyle(e,t,n,r,i){const o=e.getInstanceAndStyle({id:r,rendererID:i});if(!o||!o.style)return void t.send("NativeStyleEditor_styleAndLayout",{id:r,layout:null,style:null});const{instance:s,style:l}=o;let a=n(l);const d=O.get(r);null!=d&&(a=Object.assign({},a,d)),s&&"function"==typeof s.measure?s.measure(((e,n,i,o,s,l)=>{if("number"!=typeof e)return void t.send("NativeStyleEditor_styleAndLayout",{id:r,layout:null,style:a||null});const d=null!=a&&resolveBoxStyle("margin",a)||R,h=null!=a&&resolveBoxStyle("padding",a)||R;t.send("NativeStyleEditor_styleAndLayout",{id:r,layout:{x:e,y:n,width:i,height:o,left:s,top:l,margin:d,padding:h},style:a||null})})):t.send("NativeStyleEditor_styleAndLayout",{id:r,layout:null,style:a||null})}function shallowClone(e){const t={};for(const n in e)t[n]=e[n];return t}const B="compact";!function(e){if(null==e)return;e.backends.set(B,{Agent:k,Bridge:L,initBackend,setupNativeStyleEditor}),e.emit("devtools-backend-installed",B)}(window.__REACT_DEVTOOLS_GLOBAL_HOOK__)})()})();
//# sourceMappingURL=react_devtools_backend_compact.js.map