@applitools/dom-capture 11.7.1 → 11.8.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 +15 -0
- package/dist/captureDom.js +3 -3
- package/dist/captureDomForIE.js +3 -3
- package/dist/captureDomPoll.js +3 -3
- package/dist/captureDomPollCjs.js +3 -3
- package/dist/captureDomPollForIE.js +3 -3
- package/dist/pollResult.js +2 -2
- package/dist/pollResultCjs.js +2 -2
- package/dist/pollResultForIE.js +2 -2
- package/package.json +4 -2
package/dist/pollResult.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* @applitools/dom-capture@11.
|
|
1
|
+
/* @applitools/dom-capture@11.8.0 */
|
|
2
2
|
function __pollResult() {
|
|
3
|
-
var pollResult=function(){"use strict";
|
|
3
|
+
var pollResult=function(){"use strict";return function(...t){const e=function(t,e,n){return function(){var t={};function n(t,e=0){const n=t.charCodeAt(e);return n>=55296&&n<56320?1024*(n-55296)+(t.charCodeAt(e+1)-56320)+65536:56320<=n&&n<=57343?-1:n}var o=function(t,e){const o=[];let r=0;for(let i=0;i<t.length;++i){const c=n(t,i);let u=0;c>0&&(u=c<128?1:c<2048?2:c<65536?3:c<2097152?4:c<67108864?5:6),r+u>e?(o.push(i),r=u):r+=u}return o};const r=function(t){return t&&t.__esModule?t:{default:t}}(o),i="WIP",c="SUCCESS",u="SUCCESS_CHUNKED",s="ERROR";var a=function(t,n,o={}){const a=function(t,{chunkByteLength:n=0}={}){var o;if(t){if(t.value){if(n){if(!t.chunks)try{const i=void 0!==e?null===(o=e.__EYES__APPLITOOLS__)||void 0===o?void 0:o._stringify:void 0,c=(null!=i?i:JSON.stringify)(t.value);t.chunks=(0,r.default)(c,n),t.chunks.length>0&&(t.from=0,t.value=c)}catch(t){return{status:s,error:t.message}}if(t.from>=0)return{status:u,value:t.value.substring(t.from,t.from=t.chunks.shift()),done:!t.from}}return{status:c,value:t.value}}return t.error?{status:s,error:t.error}:{status:i}}return{status:s,error:"unexpected poll request received - cannot find state of current operation"}}((t=t||{})[n],o);return(a.status===c||a.status===s||a.status===u&&a.done)&&delete t[n],a};const l=a;var d=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessibleFrame=t.isInlineFrame=t.absolutizeUrl=t.poll=t.pollify=t.chunkify=void 0;const f=d(o);t.chunkify=f.default;const _=d((function(t,e,n){return o=>function(...r){return e[n]||(e[n]={},Promise.resolve().then((()=>t(...r))).then((t=>e[n].value=t)).catch((t=>e[n].error=t.message+"\nStack:"+t.stack))),l(e,n,o)}}));t.pollify=_.default;const E=d(a);t.poll=E.default;const h=d((function(t,e){if(function(t){try{return new URL(t),!0}catch(t){return!1}}(t))return t;let n=!0;try{n=t!==decodeURI(t)}catch(t){n=!0}try{const o=new URL(t,e).href;return n?o:decodeURI(o)}catch(e){return n?t:decodeURI(t)}}));t.absolutizeUrl=h.default;const p=d((function(t){return t.contentDocument&&t.contentDocument.location&&!/^https?:$/.test(t.contentDocument.location.protocol)}));t.isInlineFrame=p.default;const y=d((function(t){try{const e=t.contentDocument;return Boolean(e&&e.defaultView&&e.defaultView.frameElement)}catch(t){return!1}}));t.isAccessibleFrame=y.default;const{poll:S}=t,{EYES_NAMESPACE:g,DOM_CAPTURE_KEY:O}={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_CAPTURE_KEY:"domCaptureResult",NODE_TYPES:{ELEMENT:1,TEXT:3,DOCUMENT_FRAGMENT:11},DEFAULT_STYLE_PROPS:["background-color","background-image","background-origin","background-position","background-repeat","background-size","border-color","border-radius","border-style","border-width","color","cursor","display","font-family","font-size","font-weight","font-style","line-height","margin","opacity","overflow","padding","pointer-events","position","text-align","visibility","z-index"],DEFAULT_RECT_PROPS:["width","height","top","left"],DEFAULT_IGNORED_TAG_NAMES:["HEAD","SCRIPT"]};return function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}((function(t){return JSON.stringify(S(e[g],O,t))}))}()};let n=!0;try{let o=window.__applitools_sandbox;o||(o=document.createElement("iframe"),o.setAttribute("data-applitools-sandbox",""),o.setAttribute("data-applitools-skip",""),document.head.appendChild(o),window.__applitools_sandbox=o);const r=Math.floor(4294967296*Math.random()),i=o.contentDocument.createElement("script");i.textContent="window['ctor-"+r+"'] = "+e.toString()+";",o.contentDocument.head.appendChild(i);const c=o.contentWindow["ctor-"+r];if(delete o.contentWindow["ctor-"+r],"function"!=typeof c)throw new Error("Sandbox failed to extract function");n=!1;const u=o.contentWindow,s=u.__EYES__APPLITOOLS__=u.__EYES__APPLITOOLS__||{};s._stringify||(s._stringify=u.JSON.stringify.bind(u.JSON));const a=window.__EYES__APPLITOOLS__=window.__EYES__APPLITOOLS__||{};function l(t){if(u.Array.isArray(t)){const e=new u.Array(t.length);for(let n=0;n<t.length;n++)e[n]=l(t[n]);return e}if(t&&"object"==typeof t&&Object.getPrototypeOf(t)===Object.prototype){const e=new u.Object;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=l(t[n]));return e}return t}a._stringify&&a._stringify!==JSON.stringify||(a._stringify=u.JSON.stringify.bind(u.JSON));const d=new u.Array(t.length);for(let f=0;f<t.length;f++)d[f]=l(t[f]);return c(document,window,u)(...d)}catch(_){try{return e(document,window,window)(...t)}catch(E){throw n?E:_}}}}();
|
|
4
4
|
|
|
5
5
|
return pollResult.apply(this, arguments);
|
|
6
6
|
}
|
package/dist/pollResultCjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* @applitools/dom-capture@11.
|
|
2
|
-
"use strict";
|
|
1
|
+
/* @applitools/dom-capture@11.8.0 */
|
|
2
|
+
"use strict";module.exports=function(...t){const e=function(t,e,n){return function(){var t={};function n(t,e=0){const n=t.charCodeAt(e);return n>=55296&&n<56320?1024*(n-55296)+(t.charCodeAt(e+1)-56320)+65536:56320<=n&&n<=57343?-1:n}var o=function(t,e){const o=[];let r=0;for(let i=0;i<t.length;++i){const c=n(t,i);let u=0;c>0&&(u=c<128?1:c<2048?2:c<65536?3:c<2097152?4:c<67108864?5:6),r+u>e?(o.push(i),r=u):r+=u}return o};const r=function(t){return t&&t.__esModule?t:{default:t}}(o),i="WIP",c="SUCCESS",u="SUCCESS_CHUNKED",s="ERROR";var a=function(t,n,o={}){const a=function(t,{chunkByteLength:n=0}={}){var o;if(t){if(t.value){if(n){if(!t.chunks)try{const i=void 0!==e?null===(o=e.__EYES__APPLITOOLS__)||void 0===o?void 0:o._stringify:void 0,c=(null!=i?i:JSON.stringify)(t.value);t.chunks=(0,r.default)(c,n),t.chunks.length>0&&(t.from=0,t.value=c)}catch(t){return{status:s,error:t.message}}if(t.from>=0)return{status:u,value:t.value.substring(t.from,t.from=t.chunks.shift()),done:!t.from}}return{status:c,value:t.value}}return t.error?{status:s,error:t.error}:{status:i}}return{status:s,error:"unexpected poll request received - cannot find state of current operation"}}((t=t||{})[n],o);return(a.status===c||a.status===s||a.status===u&&a.done)&&delete t[n],a};const l=a;var d=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessibleFrame=t.isInlineFrame=t.absolutizeUrl=t.poll=t.pollify=t.chunkify=void 0;const f=d(o);t.chunkify=f.default;const _=d((function(t,e,n){return o=>function(...r){return e[n]||(e[n]={},Promise.resolve().then((()=>t(...r))).then((t=>e[n].value=t)).catch((t=>e[n].error=t.message+"\nStack:"+t.stack))),l(e,n,o)}}));t.pollify=_.default;const E=d(a);t.poll=E.default;const h=d((function(t,e){if(function(t){try{return new URL(t),!0}catch(t){return!1}}(t))return t;let n=!0;try{n=t!==decodeURI(t)}catch(t){n=!0}try{const o=new URL(t,e).href;return n?o:decodeURI(o)}catch(e){return n?t:decodeURI(t)}}));t.absolutizeUrl=h.default;const p=d((function(t){return t.contentDocument&&t.contentDocument.location&&!/^https?:$/.test(t.contentDocument.location.protocol)}));t.isInlineFrame=p.default;const y=d((function(t){try{const e=t.contentDocument;return Boolean(e&&e.defaultView&&e.defaultView.frameElement)}catch(t){return!1}}));t.isAccessibleFrame=y.default;const{poll:S}=t,{EYES_NAMESPACE:g,DOM_CAPTURE_KEY:O}={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_CAPTURE_KEY:"domCaptureResult",NODE_TYPES:{ELEMENT:1,TEXT:3,DOCUMENT_FRAGMENT:11},DEFAULT_STYLE_PROPS:["background-color","background-image","background-origin","background-position","background-repeat","background-size","border-color","border-radius","border-style","border-width","color","cursor","display","font-family","font-size","font-weight","font-style","line-height","margin","opacity","overflow","padding","pointer-events","position","text-align","visibility","z-index"],DEFAULT_RECT_PROPS:["width","height","top","left"],DEFAULT_IGNORED_TAG_NAMES:["HEAD","SCRIPT"]};return function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}((function(t){return JSON.stringify(S(e[g],O,t))}))}()};let n=!0;try{let o=window.__applitools_sandbox;o||(o=document.createElement("iframe"),o.setAttribute("data-applitools-sandbox",""),o.setAttribute("data-applitools-skip",""),document.head.appendChild(o),window.__applitools_sandbox=o);const r=Math.floor(4294967296*Math.random()),i=o.contentDocument.createElement("script");i.textContent="window['ctor-"+r+"'] = "+e.toString()+";",o.contentDocument.head.appendChild(i);const c=o.contentWindow["ctor-"+r];if(delete o.contentWindow["ctor-"+r],"function"!=typeof c)throw new Error("Sandbox failed to extract function");n=!1;const u=o.contentWindow,s=u.__EYES__APPLITOOLS__=u.__EYES__APPLITOOLS__||{};s._stringify||(s._stringify=u.JSON.stringify.bind(u.JSON));const a=window.__EYES__APPLITOOLS__=window.__EYES__APPLITOOLS__||{};function l(t){if(u.Array.isArray(t)){const e=new u.Array(t.length);for(let n=0;n<t.length;n++)e[n]=l(t[n]);return e}if(t&&"object"==typeof t&&Object.getPrototypeOf(t)===Object.prototype){const e=new u.Object;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=l(t[n]));return e}return t}a._stringify&&a._stringify!==JSON.stringify||(a._stringify=u.JSON.stringify.bind(u.JSON));const d=new u.Array(t.length);for(let f=0;f<t.length;f++)d[f]=l(t[f]);return c(document,window,u)(...d)}catch(_){try{return e(document,window,window)(...t)}catch(E){throw n?E:_}}};
|