MCPcopy
hub / github.com/williamngan/pts / i

Function i

demo/edit/vs/editor/editor.main.js:12–12  ·  view source on GitHub ↗
(e,t)

Source from the content-addressed store, hash-verified

10return o._onLoadError(e,i,t)}),r.setAttribute("href",t),r},e.prototype._linkTagExists=function(e,t){var n,i,o,r,s=document.getElementsByTagName("link");for(n=0,i=s.length;n<i;n++)if(o=s[n].getAttribute("data-name"),r=s[n].getAttribute("href"),o===e||r===t)return!0;return!1},e.prototype.load=function(e,t,n,i){if(this._linkTagExists(e,t))n();else{var o=this.createLinkTag(e,t,n,i);this._insertLinkNode(o)}},e}(),n=function(){function e(){this._cssLoader=new t}return e.prototype.load=function(e,t,n){var i=t.toUrl(e+".css");this._cssLoader.load(e,i,function(e){n({})},function(e){"function"==typeof n.error&&n.error("Could not find "+i+" or it was empty")})},e}();e.CSSPlugin=n,define("vs/css",new n)}(e||(e={}));var i;!function(e){function t(e,t,n){var i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,function(e,n){var i=n[0];return void 0!==t[i]?t[i]:e}),n.isPseudo&&(i="["+i.replace(/[aouei]/g,"$&$&")+"]"),i}function n(e,n){return function(i,o){var r=Array.prototype.slice.call(arguments,2);return t(e[i],r,n)}}
11var i=function(){function e(){this._detected=!1,this._isPseudo=!1}return Object.defineProperty(e.prototype,"isPseudo",{get:function(){return this._detect(),this._isPseudo},enumerable:!0,configurable:!0}),e.prototype._detect=function(){this._detected||(this._detected=!0,this._isPseudo="undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0)},e}(),o=function(){function e(e){var n=this;this._env=e,this.localize=function(e,i){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return function(e,n,i){for(var o=[],r=3;r<arguments.length;r++)o[r-3]=arguments[r];return t(i,o,e)}.apply(void 0,[n._env,e,i].concat(o))}}return e.prototype.setPseudoTranslation=function(e){this._env._isPseudo=e},e.prototype.create=function(e,t){return{localize:n(t[e],this._env)}},e.prototype.load=function(t,i,o,r){var s=this;if(r=r||{},t&&0!==t.length){var a=r["vs/nls"]||{},l=a.availableLanguages?function(e,t){var n=e[t];return n||(n=e["*"])||null}(a.availableLanguages,t):null,u=".nls"
12;null!==l&&l!==e.DEFAULT_TAG&&(u=u+"."+l);var c=function(e){Array.isArray(e)?e.localize=n(e,s._env):e.localize=n(e[t],s._env),o(e)};"function"==typeof a.loadBundle?a.loadBundle(t,l,function(e,n){e?i([t+".nls"],c):c(n)}):i([t+u],c)}else o({localize:this.localize})},e.DEFAULT_TAG="i-default",e}();e.NLSPlugin=o,define("vs/nls",new o(new i))}(i||(i={})),define(t[161],n([0,1]),function(e,t){"use strict";function n(e){if(!e.parent||e.parent===e)return null;try{var t=e.location,n=e.parent.location;if(t.protocol!==n.protocol||t.hostname!==n.hostname||t.port!==n.port)return o=!0,null}catch(e){return o=!0,null}return e.parent}function i(e,t){for(var n,i=e.document.getElementsByTagName("iframe"),o=0,r=i.length;o<r;o++)if((n=i[o]).contentWindow===t)return n;return null}Object.defineProperty(t,"__esModule",{value:!0});var o=!1,r=null,s=function(){function e(){}return e.getSameOriginWindowChain=function(){if(!r){r=[];var e,t=window;do{(e=n(t))?r.push({window:t,iframeElement:i(e,t)}):r.push({window:t,iframeElement:null}),
13t=e}while(t)}return r.slice(0)},e.hasDifferentOriginAncestor=function(){return r||this.getSameOriginWindowChain(),o},e.getPositionOfChildWindowRelativeToAncestorWindow=function(e,t){if(!t||e===t)return{top:0,left:0};for(var n=0,i=0,o=this.getSameOriginWindowChain(),r=0;r<o.length;r++){var s=o[r];if(s.window===t)break;if(!s.iframeElement)break;var a=s.iframeElement.getBoundingClientRect();n+=a.top,i+=a.left}return{top:n,left:i}},e}();t.IframeUtils=s}),define(t[565],n([0,1]),function(e,t){"use strict";function n(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};var n=Math.max(e.start,t.start),i=Math.min(e.end,t.end);return i-n<=0?{start:0,end:0}:{start:n,end:i}}function i(e){return e.end-e.start<=0}function o(e,t){for(var o=[],r=0,s=t;r<s.length;r++){var a=s[r];if(!(e.start>=a.range.end)){if(e.end<a.range.start)break;var l=n(e,a.range);i(l)||o.push({range:l,size:a.size})}}return o}function r(e,t){return{start:e.start+t,end:e.end+t}}function s(e){for(var t=[],n=null,i=0,o=e;i<o.length;i++){
14var r=o[i],s=r.range.start,a=r.range.end,l=r.size;n&&l===n.size?n.range.end=a:(n={range:{start:s,end:a},size:l},t.push(n))}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.intersect=n,t.isEmpty=i,t.relativeComplement=function(e,t){var n=[],o={start:e.start,end:Math.min(t.start,e.end)},r={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(r)||n.push(r),n},t.groupIntersect=o,t.shift=r,t.consolidate=s;var a=function(){function e(){this.groups=[],this._size=0}return e.prototype.splice=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var a=n.length-t,l=o({start:0,end:e},this.groups),u=o({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(function(e){return{range:r(e.range,a),size:e.size}}),c=n.map(function(t,n){return{range:{start:e+n,end:e+n+1},size:t.size}});this.groups=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s(e.reduce(function(e,t){return e.concat(t)},[]))}(l,c,u),this._size=this.groups.reduce(function(e,t){
15return e+t.size*(t.range.end-t.range.start)},0)},Object.defineProperty(e.prototype,"count",{get:function(){var e=this.groups.length;return e?this.groups[e-1].range.end:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.indexAt=function(e){if(e<0)return-1;for(var t=0,n=0,i=0,o=this.groups;i<o.length;i++){var r=o[i],s=r.range.end-r.range.start,a=n+s*r.size;if(e<a)return t+Math.floor((e-n)/r.size);t+=s,n=a}return t},e.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.count)},e.prototype.positionAt=function(e){if(e<0)return-1;for(var t=0,n=0,i=0,o=this.groups;i<o.length;i++){var r=o[i],s=r.range.end-r.range.start,a=n+s;if(e<a)return t+(e-n)*r.size;t+=s*r.size,n=a}return-1},e.prototype.dispose=function(){this.groups=null},e}();t.RangeMap=a}),define(t[159],n([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n){

Callers 13

sFunction · 0.70
editor.main.jsFile · 0.70
oFunction · 0.70
nFunction · 0.70
pFunction · 0.70
cFunction · 0.70
lFunction · 0.70
uFunction · 0.70
dFunction · 0.70
rFunction · 0.70
aFunction · 0.70
hFunction · 0.70

Calls 15

createElementMethod · 0.80
everyMethod · 0.80
tFunction · 0.70
oFunction · 0.70
nFunction · 0.70
cFunction · 0.70
NFunction · 0.70
IFunction · 0.70
EFunction · 0.70
LFunction · 0.70
disposeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected