mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
2 lines
1.0 MiB
JavaScript
2 lines
1.0 MiB
JavaScript
|
/*! For license information please see main.229bcdbf.js.LICENSE.txt */
|
||
|
(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[40179],{86010:(e,t,p)=>{"use strict";function r(e){var t,p,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(p=r(e[t]))&&(a&&(a+=" "),a+=p);else for(t in e)e[t]&&(a&&(a+=" "),a+=t);return a}p.d(t,{Z:()=>a});const a=function(){for(var e,t,p=0,a="";p<arguments.length;)(e=arguments[p++])&&(t=r(e))&&(a&&(a+=" "),a+=t);return a}},99318:(e,t,p)=>{"use strict";p.d(t,{lX:()=>_,q_:()=>S,ob:()=>b,PP:()=>q,Ep:()=>l});var r=p(87462);function a(e){return"/"===e.charAt(0)}function n(e,t){for(var p=t,r=p+1,a=e.length;r<a;p+=1,r+=1)e[p]=e[r];e.pop()}const i=function(e,t){void 0===t&&(t="");var p,r=e&&e.split("/")||[],i=t&&t.split("/")||[],o=e&&a(e),s=t&&a(t),d=o||s;if(e&&a(e)?i=r:r.length&&(i.pop(),i=i.concat(r)),!i.length)return"/";if(i.length){var c=i[i.length-1];p="."===c||".."===c||""===c}else p=!1;for(var u=0,l=i.length;l>=0;l--){var b=i[l];"."===b?n(i,l):".."===b?(n(i,l),u++):u&&(n(i,l),u--)}if(!d)for(;u--;u)i.unshift("..");!d||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return p&&"/"!==m.substr(-1)&&(m+="/"),m};var o=p(2177);function s(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function u(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function l(e){var t=e.pathname,p=e.search,r=e.hash,a=t||"/";return p&&"?"!==p&&(a+="?"===p.charAt(0)?p:"?"+p),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function b(e,t,p,a){var n;"string"==typeof e?(n=function(e){var t=e||"/",p="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var n=t.indexOf("?");return-1!==n&&(p=t.substr(n),t=t.substr(0,n)),{pathname:t,search:"?"===p?"":p,hash:"#"===r?"":r}}(e),n.state=t):(void 0===(n=(0,r.Z)({},e)).pathname&&(n.pathname=""),n.search?"?"!==n.search.charAt(0)&&(n.search="?"+n.search):n.search="",n.hash?"#"!==n.hash.charAt(0)&&(n.hash="#"+n.hash):n.hash="",void 0!==t&&void 0===n.state&&(n.state=t));try{n.pathname=decodeURI(n.pathname)}catch(o){throw o instanceof URIError?new URIError('Pathname "'+n.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):o}return p&&(n.key=p),a?n.pathname?"/"!==n.pathname.charAt(0)&&(n.pathname=i(n.pathname,a.pathname)):n.pathname=a.pathname:n.pathname||(n.pathname="/"),n}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,p,r,a){if(null!=e){var n="function"==typeof e?e(t,p):e;"string"==typeof n?"function"==typeof r?r(n,a):a(!0):a(!1!==n)}else a(!0)},appendListener:function(e){var p=!0;function r(){p&&e.apply(void 0,arguments)}return t.push(r),function(){p=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,p=new Array(e),r=0;r<e;r++)p[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,p)}))}}}var h=!("undefined"==typeof window||!window.document||!window.document.createElement);function f(e,t){t(window.confirm(e))}var g="popstate",x="hashchange";function v(){try{return window.history.state||{}}catch(e){return{}}}function _(e){void 0===e&&(e={}),h||(0,o.Z)(!1);var t,p=window.history,a=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,n=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,d=i.forceRefresh,_=void 0!==d&&d,w=i.getUserConfirmation,y=void 0===w?f:w,k=i.keyLength,E=void 0===k?6:k,j=e.basename?u(s(e.basename)):"";function S(e){var t=e||{},p=t.key,r=t.state,a=window.location,n=a.pathname+a.search+a.hash;return j&&(n=c(n,j)),b(n,r,p)}function O(){return Math.random().toString(36).substr(2,E)}var q=m();function C(e){(0,r.Z)(B,e),B.length=p.length,q.notifyListeners(B.location,B.action)}function T(e){(functio
|