File size: 18,771 Bytes
f3e548c
 
1
2
/*! For license information please see htmlElementDebug.js.LICENSE.txt */
(()=>{var e={"../../node_modules/.pnpm/js-sha256@0.11.0/node_modules/js-sha256/src/sha256.js"(e,t,i){e=i.nmd(e),function(){"use strict";var t="input is invalid type",n="object"==typeof window,o=n?window:{};o.JS_SHA256_NO_WINDOW&&(n=!1);var r=!n&&"object"==typeof self,h=!o.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;h?o=i.g:r&&(o=self);var s=!o.JS_SHA256_NO_COMMON_JS&&"object"==typeof e&&e.exports,a="function"==typeof define&&define.amd,l=!o.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,f="0123456789abcdef".split(""),d=[-0x80000000,8388608,32768,128],c=[24,16,8,0],u=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],p=["hex","array","digest","arrayBuffer"],m=[];(o.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),l&&(o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e,t){return function(i){return new N(t,!0).update(i)[e]()}},x=function(e){var t=y("hex",e);h&&(t=b(t,e)),t.create=function(){return new N(e)},t.update=function(e){return t.create().update(e)};for(var i=0;i<p.length;++i){var n=p[i];t[n]=y(n,e)}return t},b=function(e,n){var r,h=i("?c118"),s=i("?4999").Buffer,a=n?"sha224":"sha256";return r=s.from&&!o.JS_SHA256_NO_BUFFER_FROM?s.from:function(e){return new s(e)},function(i){if("string"==typeof i)return h.createHash(a).update(i,"utf8").digest("hex");if(null==i)throw Error(t);return(i.constructor===ArrayBuffer&&(i=new Uint8Array(i)),Array.isArray(i)||ArrayBuffer.isView(i)||i.constructor===s)?h.createHash(a).update(r(i)).digest("hex"):e(i)}},g=function(e,t){return function(i,n){return new T(i,t,!0).update(n)[e]()}},w=function(e){var t=g("hex",e);t.create=function(t){return new T(t,e)},t.update=function(e,i){return t.create(e).update(i)};for(var i=0;i<p.length;++i){var n=p[i];t[n]=g(n,e)}return t};function N(e,t){t?(m[0]=m[16]=m[1]=m[2]=m[3]=m[4]=m[5]=m[6]=m[7]=m[8]=m[9]=m[10]=m[11]=m[12]=m[13]=m[14]=m[15]=0,this.blocks=m):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=0xc1059ed8,this.h1=0x367cd507,this.h2=0x3070dd17,this.h3=0xf70e5939,this.h4=0xffc00b31,this.h5=0x68581511,this.h6=0x64f98fa7,this.h7=0xbefa4fa4):(this.h0=0x6a09e667,this.h1=0xbb67ae85,this.h2=0x3c6ef372,this.h3=0xa54ff53a,this.h4=0x510e527f,this.h5=0x9b05688c,this.h6=0x1f83d9ab,this.h7=0x5be0cd19),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function T(e,i,n){var o,r=typeof e;if("string"===r){var h,s=[],a=e.length,f=0;for(o=0;o<a;++o)(h=e.charCodeAt(o))<128?s[f++]=h:(h<2048?s[f++]=192|h>>>6:(h<55296||h>=57344?s[f++]=224|h>>>12:(h=65536+((1023&h)<<10|1023&e.charCodeAt(++o)),s[f++]=240|h>>>18,s[f++]=128|h>>>12&63),s[f++]=128|h>>>6&63),s[f++]=128|63&h);e=s}else if("object"===r){if(null===e)throw Error(t);else if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);e.length>64&&(e=new N(i,!0).update(e).array());var d=[],c=[];for(o=0;o<64;++o){var u=e[o]||0;d[o]=92^u,c[o]=54^u}N.call(this,i,n),this.update(c),this.oKeyPad=d,this.inner=!0,this.sharedMemory=n}N.prototype.update=function(e){if(!this.finalized){var i,n=typeof e;if("string"!==n){if("object"===n){if(null===e)throw Error(t);else if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!l||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);i=!0}for(var o,r,h=0,s=e.length,a=this.blocks;h<s;){if(this.hashed&&(this.hashed=!1,a[0]=this.block,this.block=a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),i)for(r=this.start;h<s&&r<64;++h)a[r>>>2]|=e[h]<<c[3&r++];else for(r=this.start;h<s&&r<64;++h)(o=e.charCodeAt(h))<128?a[r>>>2]|=o<<c[3&r++]:(o<2048?a[r>>>2]|=(192|o>>>6)<<c[3&r++]:(o<55296||o>=57344?a[r>>>2]|=(224|o>>>12)<<c[3&r++]:(o=65536+((1023&o)<<10|1023&e.charCodeAt(++h)),a[r>>>2]|=(240|o>>>18)<<c[3&r++],a[r>>>2]|=(128|o>>>12&63)<<c[3&r++]),a[r>>>2]|=(128|o>>>6&63)<<c[3&r++]),a[r>>>2]|=(128|63&o)<<c[3&r++]);this.lastByteIndex=r,this.bytes+=r-this.start,r>=64?(this.block=a[16],this.start=r-64,this.hash(),this.hashed=!0):this.start=r}return this.bytes>0xffffffff&&(this.hBytes+=this.bytes/0x100000000|0,this.bytes=this.bytes%0x100000000),this}},N.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=d[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},N.prototype.hash=function(){var e,t,i,n,o,r,h,s,a,l,f=this.h0,d=this.h1,c=this.h2,p=this.h3,m=this.h4,y=this.h5,x=this.h6,b=this.h7,g=this.blocks;for(e=16;e<64;++e)t=((o=g[e-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,i=((o=g[e-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,g[e]=g[e-16]+t+g[e-7]+i|0;for(e=0,l=d&c;e<64;e+=4)this.first?(this.is224?(h=300032,b=(o=g[0]-0x543c9a5b)-0x8f1a6c7|0,p=o+0x170e9b5|0):(h=0x2a01a605,b=(o=g[0]-0xc881298)-0x5ab00ac6|0,p=o+0x8909ae5|0),this.first=!1):(t=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),i=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7),n=(h=f&d)^f&c^l,o=b+i+(m&y^~m&x)+u[e]+g[e],r=t+n,b=p+o|0,p=o+r|0),t=(p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),i=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7),n=(s=p&f)^p&d^h,o=x+i+(b&m^~b&y)+u[e+1]+g[e+1],r=t+n,x=c+o|0,t=((c=o+r|0)>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),i=(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7),n=(a=c&p)^c&f^s,o=y+i+(x&b^~x&m)+u[e+2]+g[e+2],r=t+n,y=d+o|0,t=((d=o+r|0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),i=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),n=(l=d&c)^d&p^a,o=m+i+(y&x^~y&b)+u[e+3]+g[e+3],r=t+n,m=f+o|0,f=o+r|0,this.chromeBugWorkAround=!0;this.h0=this.h0+f|0,this.h1=this.h1+d|0,this.h2=this.h2+c|0,this.h3=this.h3+p|0,this.h4=this.h4+m|0,this.h5=this.h5+y|0,this.h6=this.h6+x|0,this.h7=this.h7+b|0},N.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,i=this.h2,n=this.h3,o=this.h4,r=this.h5,h=this.h6,s=this.h7,a=f[e>>>28&15]+f[e>>>24&15]+f[e>>>20&15]+f[e>>>16&15]+f[e>>>12&15]+f[e>>>8&15]+f[e>>>4&15]+f[15&e]+f[t>>>28&15]+f[t>>>24&15]+f[t>>>20&15]+f[t>>>16&15]+f[t>>>12&15]+f[t>>>8&15]+f[t>>>4&15]+f[15&t]+f[i>>>28&15]+f[i>>>24&15]+f[i>>>20&15]+f[i>>>16&15]+f[i>>>12&15]+f[i>>>8&15]+f[i>>>4&15]+f[15&i]+f[n>>>28&15]+f[n>>>24&15]+f[n>>>20&15]+f[n>>>16&15]+f[n>>>12&15]+f[n>>>8&15]+f[n>>>4&15]+f[15&n]+f[o>>>28&15]+f[o>>>24&15]+f[o>>>20&15]+f[o>>>16&15]+f[o>>>12&15]+f[o>>>8&15]+f[o>>>4&15]+f[15&o]+f[r>>>28&15]+f[r>>>24&15]+f[r>>>20&15]+f[r>>>16&15]+f[r>>>12&15]+f[r>>>8&15]+f[r>>>4&15]+f[15&r]+f[h>>>28&15]+f[h>>>24&15]+f[h>>>20&15]+f[h>>>16&15]+f[h>>>12&15]+f[h>>>8&15]+f[h>>>4&15]+f[15&h];return this.is224||(a+=f[s>>>28&15]+f[s>>>24&15]+f[s>>>20&15]+f[s>>>16&15]+f[s>>>12&15]+f[s>>>8&15]+f[s>>>4&15]+f[15&s]),a},N.prototype.toString=N.prototype.hex,N.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,i=this.h2,n=this.h3,o=this.h4,r=this.h5,h=this.h6,s=this.h7,a=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n,o>>>24&255,o>>>16&255,o>>>8&255,255&o,r>>>24&255,r>>>16&255,r>>>8&255,255&r,h>>>24&255,h>>>16&255,h>>>8&255,255&h];return this.is224||a.push(s>>>24&255,s>>>16&255,s>>>8&255,255&s),a},N.prototype.array=N.prototype.digest,N.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},T.prototype=new N,T.prototype.finalize=function(){if(N.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();N.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),N.prototype.finalize.call(this)}};var E=x();E.sha256=E,E.sha224=x(!0),E.sha256.hmac=w(),E.sha224.hmac=w(!0),s?e.exports=E:(o.sha256=E.sha256,o.sha224=E.sha224,a&&define(function(){return E}))}()},"?4999"(){},"?c118"(){}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={id:n,loaded:!1,exports:{}};return e[n](r,r.exports,i),r.loaded=!0,r.exports}i.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";function e(e){return e instanceof Element&&(window.getComputedStyle(e).fontFamily||"").toLowerCase().indexOf("iconfont")>=0}function t(e){if(!(e instanceof HTMLElement))return!1;if(e.innerText)return!0;for(let t of["svg","button","input","textarea","select","option","img","a"])if(e.querySelectorAll(t).length>0)return!0;return!1}var n=i("../../node_modules/.pnpm/js-sha256@0.11.0/node_modules/js-sha256/src/sha256.js");"undefined"!=typeof process&&process.versions?.node;let o={},r=!1;function h(...e){r&&console.log(...e)}function s(e,t){if(!(e instanceof t.HTMLElement))return{before:"",after:""};let i=t.getComputedStyle(e,"::before").getPropertyValue("content"),n=t.getComputedStyle(e,"::after").getPropertyValue("content");return{before:"none"===i?"":i.replace(/"/g,""),after:"none"===n?"":n.replace(/"/g,"")}}function a(e,t){let i=Math.max(e.left,t.left),n=Math.max(e.top,t.top),o=Math.min(e.right,t.right),r=Math.min(e.bottom,t.bottom);return i<o&&n<r?{left:i,top:n,right:o,bottom:r,width:o-i,height:r-n,x:i,y:n,zoom:1}:null}function l(e,t,i){let n,o=1;if(e instanceof Element)n=e.getBoundingClientRect(),e instanceof i.HTMLElement&&!("currentCSSZoom"in e)&&(o=Number.parseFloat(i.getComputedStyle(e).zoom)||1);else{let t=i.document.createRange();t.selectNodeContents(e),n=t.getBoundingClientRect()}let r=o*t;return{width:n.width*r,height:n.height*r,left:n.left*r,top:n.top*r,right:n.right*r,bottom:n.bottom*r,x:n.x*r,y:n.y*r,zoom:r}}function f(e,t,i,n=1){let o,r,s;if(!e||!(e instanceof t.HTMLElement)&&e.nodeType!==Node.TEXT_NODE&&"svg"!==e.nodeName.toLowerCase())return h(e,"Element is not in the DOM hierarchy"),!1;if(e instanceof t.HTMLElement){let i=t.getComputedStyle(e);if("none"===i.display||"hidden"===i.visibility||"0"===i.opacity&&"INPUT"!==e.tagName)return h(e,"Element is hidden"),!1}let d=l(e,n,t);if(0===d.width&&0===d.height)return h(e,"Element has no size"),!1;if(1===n&&(o=d.left+d.width/2,r=d.top+d.height/2,!(!(s=t.document.elementFromPoint(o,r))||s===e||e?.contains(s)||s?.contains(e))&&a(d,l(s,1,t))&&(h(e,"Element is covered by another element",{topElement:s,el:e,rect:d,x:o,y:r}),1)))return!1;let c=function(e,t,i,n=2/3){let o=e.height,r=e.width,h=a(e,{left:0,top:0,width:t.innerWidth||i.documentElement.clientWidth,height:t.innerHeight||i.documentElement.clientHeight,right:t.innerWidth||i.documentElement.clientWidth,bottom:t.innerHeight||i.documentElement.clientHeight,x:0,y:0,zoom:1});return!!h&&h.width*h.height/(o*r)>=n}(d,t,i),u=e,p=e=>{let i=e?.parentElement;for(;i;){if("static"!==t.getComputedStyle(i).position)return i;i=i.parentElement}return null};for(;u&&u!==i.body;){if(!(u instanceof t.HTMLElement)){u=u.parentElement;continue}let i=t.getComputedStyle(u);if("hidden"===i.overflow){let i=l(u,1,t);if(d.right<i.left-10||d.left>i.right+10||d.bottom<i.top-10||d.top>i.bottom+10)return h(e,"element is partially or totally hidden by an ancestor",{rect:d,parentRect:i}),!1}if("fixed"===i.position||"sticky"===i.position)break;u="absolute"===i.position?p(u):u.parentElement}return{left:Math.round(d.left),top:Math.round(d.top),width:Math.round(d.width),height:Math.round(d.height),zoom:d.zoom,isVisible:c}}function d(e,t){return e&&e instanceof t.HTMLElement&&e.attributes?Object.fromEntries(Array.from(e.attributes).map(e=>{if("class"===e.name)return[e.name,`.${e.value.split(" ").join(".")}`];let t=e.value;return t.startsWith("data:image")&&(t="image"),t.length>300&&(t=`${t.slice(0,300)}...`),[e.name,t]})):{}}function c(){if("undefined"!=typeof window)return window.midsceneNodeHashCache}function u(e,t,i){let r=function(e,t=""){let i=JSON.stringify({content:t,rect:e}),r=5,h="",s=n.sha256.create().update(i).hex().split("").map(e=>String.fromCharCode(97+Number.parseInt(e,16)%26)).join("");for(;r<s.length-1;){if(o[h=s.slice(0,r)]&&o[h]!==i){r++;continue}o[h]=i;break}return h}(i,t);return e&&("undefined"==typeof window||c()||"undefined"!=typeof window&&(window.midsceneNodeHashCache=new Map),!function(e,t){let i=c();if(i&&!i.has(t)){if(i.size>=2e3){let e=i.keys().next().value;void 0!==e&&i.delete(e)}i.set(t,e)}}(e,r)),r}let p=0;function m(e){let t="";if(e instanceof HTMLElement)t=e.tagName?.toLowerCase();else{let i=e.parentElement;i&&i instanceof HTMLElement&&(t=i.tagName?.toLowerCase())}return t?`<${t}>`:""}function y(i,n,o,r=1,h={left:0,top:0},a=!1){var l;let c=f(i,n,o,r);if(!c||c.width<3||c.height<3||((0!==h.left||0!==h.top)&&(c.left+=h.left,c.top+=h.top),c.height>=window.innerHeight&&c.width>=window.innerWidth))return null;if(i instanceof HTMLElement&&("input"===i.tagName.toLowerCase()||"textarea"===i.tagName.toLowerCase()||"select"===i.tagName.toLowerCase()||"option"===i.tagName.toLowerCase())){let e=d(i,n),t=e.value||e.placeholder||i.textContent||"",o=u(i,t,c),r=i.tagName.toLowerCase();if("select"===i.tagName.toLowerCase()){let e=i.options[i.selectedIndex];t=e?.textContent||""}return("input"===i.tagName.toLowerCase()||"textarea"===i.tagName.toLowerCase())&&i.value&&(t=i.value),{id:o,nodeHashId:o,nodeType:"FORM_ITEM Node",indexId:p++,attributes:{...e,htmlTagName:`<${r}>`,nodeType:"FORM_ITEM Node"},content:t.trim(),rect:c,center:[Math.round(c.left+c.width/2),Math.round(c.top+c.height/2)],zoom:c.zoom,isVisible:c.isVisible}}if(i instanceof HTMLElement&&"button"===i.tagName.toLowerCase()){let e=function(e,t,i,n=1){let o=f(e,t,i,n);if(!o)return null;let r=o.left,h=o.top,s=o.left+o.width,a=o.top+o.height;return!function e(o){for(let l=0;l<o.childNodes.length;l++){let d=o.childNodes[l];if(1===d.nodeType){let o=f(d,t,i,n);o&&(r=Math.min(r,o.left),h=Math.min(h,o.top),s=Math.max(s,o.left+o.width),a=Math.max(a,o.top+o.height)),e(d)}}}(e),{...o,left:r,top:h,width:s-r,height:a-h}}(i,n,o,r);if(!e)return null;let t=d(i,n),h=s(i,n),a=i.innerText||h.before||h.after||"",l=u(i,a,e);return{id:l,indexId:p++,nodeHashId:l,nodeType:"BUTTON Node",attributes:{...t,htmlTagName:m(i),nodeType:"BUTTON Node"},content:a,rect:e,center:[Math.round(e.left+e.width/2),Math.round(e.top+e.height/2)],zoom:e.zoom,isVisible:e.isVisible}}if(!t(l=i)&&l instanceof Element&&"none"!==window.getComputedStyle(l).getPropertyValue("background-image")||e(l)||l instanceof HTMLElement&&"img"===l.tagName.toLowerCase()||l instanceof SVGElement&&"svg"===l.tagName.toLowerCase()){let e=d(i,n),t=u(i,"",c);return{id:t,indexId:p++,nodeHashId:t,attributes:{...e,...i.nodeName?.toLowerCase()==="svg"?{svgContent:"true"}:{},nodeType:"IMG Node",htmlTagName:m(i)},nodeType:"IMG Node",content:"",rect:c,center:[Math.round(c.left+c.width/2),Math.round(c.top+c.height/2)],zoom:c.zoom,isVisible:c.isVisible}}if(i instanceof Element&&i?.childNodes?.length===1&&i?.childNodes[0]instanceof Text||i.nodeName?.toLowerCase?.()==="#text"&&!e(i)){let e=i.textContent?.trim().replace(/\n+/g," ");if(!e)return null;let t=d(i,n),o=Object.keys(t);if(!e.trim()&&0===o.length)return null;let r=u(i,e,c);return{id:r,indexId:p++,nodeHashId:r,nodeType:"TEXT Node",attributes:{...t,nodeType:"TEXT Node",htmlTagName:m(i)},center:[Math.round(c.left+c.width/2),Math.round(c.top+c.height/2)],content:e,rect:c,zoom:c.zoom,isVisible:c.isVisible}}if(i instanceof HTMLElement&&"a"===i.tagName.toLowerCase()){let e=d(i,n),t=s(i,n),o=i.innerText||t.before||t.after||"",r=u(i,o,c);return{id:r,indexId:p++,nodeHashId:r,nodeType:"Anchor Node",attributes:{...e,htmlTagName:m(i),nodeType:"Anchor Node"},content:o,rect:c,center:[Math.round(c.left+c.width/2),Math.round(c.top+c.height/2)],zoom:c.zoom,isVisible:c.isVisible}}if(!(!(i instanceof HTMLElement)||t(i))&&window.getComputedStyle(i).getPropertyValue("background-color")||a){let e=d(i,n),t=u(i,"",c);return{id:t,nodeHashId:t,indexId:p++,nodeType:"CONTAINER Node",attributes:{...e,nodeType:"CONTAINER Node",htmlTagName:m(i)},content:"",rect:c,center:[Math.round(c.left+c.width/2),Math.round(c.top+c.height/2)],zoom:c.zoom,isVisible:c.isVisible}}return null}function x(e,t=!1){let i=function(e,t=!1){r=t,p=0;let i=document.body||document,n=e||i,o=[];function s(e,t,i,n=1,o={left:0,top:0}){if(!e||e.nodeType&&10===e.nodeType)return null;let r=y(e,t,i,n,o);if(e instanceof t.HTMLIFrameElement&&e.contentWindow&&e.contentWindow)return null;let a={node:r,children:[]};if(r?.nodeType==="BUTTON Node"||r?.nodeType==="IMG Node"||r?.nodeType==="TEXT Node"||r?.nodeType==="FORM_ITEM Node"||r?.nodeType==="CONTAINER Node")return a;let f=l(e,n,t);for(let n=0;n<e.childNodes.length;n++){h("will dfs",e.childNodes[n]);let r=s(e.childNodes[n],t,i,f.zoom,o);Array.isArray(r)?a.children.push(...r):r&&a.children.push(r)}return null===a.node?0===a.children.length?null:a.children:a}let a=s(n,window,document,1,{left:0,top:0});if(Array.isArray(a)?o.push(...a):a&&o.push(a),n===i){let e=document.querySelectorAll("iframe");for(let t=0;t<e.length;t++){let i=e[t];if(i.contentDocument&&i.contentWindow){let e=y(i,window,document,1);if(e){let t=s(i.contentDocument.body,i.contentWindow,i.contentDocument,1,{left:e.rect.left,top:e.rect.top});Array.isArray(t)?o.push(...t):t&&o.push(t)}}}}return{node:null,children:o}}(e,t),n=[];return!function e(t){t.node&&n.push(t.node);for(let i=0;i<t.children.length;i++)e(t.children[i])}({children:i.children,node:i.node}),n}console.log(x(document.body,!0)),console.log(JSON.stringify(x(document.body,!0))),"undefined"!=typeof window&&(window.extractTextWithPosition=x),"undefined"!=typeof window&&(window.midsceneVisibleRect=f)})(),window.midscene_element_inspector={}})();