Advertisement
Josiahiscool73

solara source code

Oct 9th, 2024
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.06 KB | None | 0 0
  1. /*!-----------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Version: 0.13.2(53a4043676e6259fb734c90fad14bf16f7425640)
  4. * Released under the MIT license
  5. * https://github.com/Microsoft/vscode/blob/master/LICENSE.txt
  6. *-----------------------------------------------------------*/
  7. "use strict";
  8. var _amdLoaderGlobal = this;
  9. !function(e) {
  10. e.global = _amdLoaderGlobal;
  11. var t = function() {
  12. function t() {
  13. this._detected = !1,
  14. this._isWindows = !1,
  15. this._isNode = !1,
  16. this._isElectronRenderer = !1,
  17. this._isWebWorker = !1
  18. }
  19. return Object.defineProperty(t.prototype, "isWindows", {
  20. get: function() {
  21. return this._detect(),
  22. this._isWindows
  23. },
  24. enumerable: !0,
  25. configurable: !0
  26. }),
  27. Object.defineProperty(t.prototype, "isNode", {
  28. get: function() {
  29. return this._detect(),
  30. this._isNode
  31. },
  32. enumerable: !0,
  33. configurable: !0
  34. }),
  35. Object.defineProperty(t.prototype, "isElectronRenderer", {
  36. get: function() {
  37. return this._detect(),
  38. this._isElectronRenderer
  39. },
  40. enumerable: !0,
  41. configurable: !0
  42. }),
  43. Object.defineProperty(t.prototype, "isWebWorker", {
  44. get: function() {
  45. return this._detect(),
  46. this._isWebWorker
  47. },
  48. enumerable: !0,
  49. configurable: !0
  50. }),
  51. t.prototype._detect = function() {
  52. this._detected || (this._detected = !0,
  53. this._isWindows = t._isWindows(),
  54. this._isNode = "undefined" != typeof module && !!module.exports,
  55. this._isElectronRenderer = "undefined" != typeof process && void 0 !== process.versions && void 0 !== process.versions.electron && "renderer" === process.type,
  56. this._isWebWorker = "function" == typeof e.global.importScripts)
  57. }
  58. ,
  59. t._isWindows = function() {
  60. return !!("undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.indexOf("Windows") >= 0) || "undefined" != typeof process && "win32" === process.platform
  61. }
  62. ,
  63. t
  64. }();
  65. e.Environment = t
  66. }(AMDLoader || (AMDLoader = {}));
  67. !function(e) {
  68. var t = function() {
  69. return function(e, t, r) {
  70. this.type = e,
  71. this.detail = t,
  72. this.timestamp = r
  73. }
  74. }();
  75. e.LoaderEvent = t;
  76. var r = function() {
  77. function r(e) {
  78. this._events = [new t(1,"",e)]
  79. }
  80. return r.prototype.record = function(r, n) {
  81. this._events.push(new t(r,n,e.Utilities.getHighPerformanceTimestamp()))
  82. }
  83. ,
  84. r.prototype.getEvents = function() {
  85. return this._events
  86. }
  87. ,
  88. r
  89. }();
  90. e.LoaderEventRecorder = r;
  91. var n = function() {
  92. function e() {}
  93. return e.prototype.record = function(e, t) {}
  94. ,
  95. e.prototype.getEvents = function() {
  96. return []
  97. }
  98. ,
  99. e.INSTANCE = new e,
  100. e
  101. }();
  102. e.NullLoaderEventRecorder = n
  103. }(AMDLoader || (AMDLoader = {}));
  104. !function(e) {
  105. var t = function() {
  106. function t() {}
  107. return t.fileUriToFilePath = function(e, t) {
  108. if (t = decodeURI(t),
  109. e) {
  110. if (/^file:\/\/\//.test(t))
  111. return t.substr(8);
  112. if (/^file:\/\//.test(t))
  113. return t.substr(5)
  114. } else if (/^file:\/\//.test(t))
  115. return t.substr(7);
  116. return t
  117. }
  118. ,
  119. t.startsWith = function(e, t) {
  120. return e.length >= t.length && e.substr(0, t.length) === t
  121. }
  122. ,
  123. t.endsWith = function(e, t) {
  124. return e.length >= t.length && e.substr(e.length - t.length) === t
  125. }
  126. ,
  127. t.containsQueryString = function(e) {
  128. return /^[^\#]*\?/gi.test(e)
  129. }
  130. ,
  131. t.isAbsolutePath = function(e) {
  132. return /^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(e)
  133. }
  134. ,
  135. t.forEachProperty = function(e, t) {
  136. if (e) {
  137. var r = void 0;
  138. for (r in e)
  139. e.hasOwnProperty(r) && t(r, e[r])
  140. }
  141. }
  142. ,
  143. t.isEmpty = function(e) {
  144. var r = !0;
  145. return t.forEachProperty(e, function() {
  146. r = !1
  147. }),
  148. r
  149. }
  150. ,
  151. t.recursiveClone = function(e) {
  152. if (!e || "object" != typeof e)
  153. return e;
  154. var r = Array.isArray(e) ? [] : {};
  155. return t.forEachProperty(e, function(e, n) {
  156. r[e] = n && "object" == typeof n ? t.recursiveClone(n) : n
  157. }),
  158. r
  159. }
  160. ,
  161. t.generateAnonymousModule = function() {
  162. return "===anonymous" + t.NEXT_ANONYMOUS_ID++ + "==="
  163. }
  164. ,
  165. t.isAnonymousModule = function(e) {
  166. return /^===anonymous/.test(e)
  167. }
  168. ,
  169. t.getHighPerformanceTimestamp = function() {
  170. return this.PERFORMANCE_NOW_PROBED || (this.PERFORMANCE_NOW_PROBED = !0,
  171. this.HAS_PERFORMANCE_NOW = e.global.performance && "function" == typeof e.global.performance.now),
  172. this.HAS_PERFORMANCE_NOW ? e.global.performance.now() : Date.now()
  173. }
  174. ,
  175. t.NEXT_ANONYMOUS_ID = 1,
  176. t.PERFORMANCE_NOW_PROBED = !1,
  177. t.HAS_PERFORMANCE_NOW = !1,
  178. t
  179. }();
  180. e.Utilities = t
  181. }(AMDLoader || (AMDLoader = {}));
  182. !function(e) {
  183. var t = function() {
  184. function t() {}
  185. return t.validateConfigurationOptions = function(t) {
  186. function r(e) {
  187. return "load" === e.errorCode ? (console.error('Loading "' + e.moduleId + '" failed'),
  188. console.error("Detail: ", e.detail),
  189. e.detail && e.detail.stack && console.error(e.detail.stack),
  190. console.error("Here are the modules that depend on it:"),
  191. void console.error(e.neededBy)) : "factory" === e.errorCode ? (console.error('The factory method of "' + e.moduleId + '" has thrown an exception'),
  192. console.error(e.detail),
  193. void (e.detail && e.detail.stack && console.error(e.detail.stack))) : void 0
  194. }
  195. return "string" != typeof (t = t || {}).baseUrl && (t.baseUrl = ""),
  196. "boolean" != typeof t.isBuild && (t.isBuild = !1),
  197. "object" != typeof t.paths && (t.paths = {}),
  198. "object" != typeof t.config && (t.config = {}),
  199. void 0 === t.catchError && (t.catchError = !1),
  200. "string" != typeof t.urlArgs && (t.urlArgs = ""),
  201. "function" != typeof t.onError && (t.onError = r),
  202. "object" == typeof t.ignoreDuplicateModules && Array.isArray(t.ignoreDuplicateModules) || (t.ignoreDuplicateModules = []),
  203. t.baseUrl.length > 0 && (e.Utilities.endsWith(t.baseUrl, "/") || (t.baseUrl += "/")),
  204. Array.isArray(t.nodeModules) || (t.nodeModules = []),
  205. ("number" != typeof t.nodeCachedDataWriteDelay || t.nodeCachedDataWriteDelay < 0) && (t.nodeCachedDataWriteDelay = 7e3),
  206. "function" != typeof t.onNodeCachedData && (t.onNodeCachedData = function(e, t) {
  207. e && ("cachedDataRejected" === e.errorCode ? console.warn("Rejected cached data from file: " + e.path) : "unlink" === e.errorCode || "writeFile" === e.errorCode ? (console.error("Problems writing cached data file: " + e.path),
  208. console.error(e.detail)) : console.error(e))
  209. }
  210. ),
  211. t
  212. }
  213. ,
  214. t.mergeConfigurationOptions = function(r, n) {
  215. void 0 === r && (r = null),
  216. void 0 === n && (n = null);
  217. var o = e.Utilities.recursiveClone(n || {});
  218. return e.Utilities.forEachProperty(r, function(t, r) {
  219. "ignoreDuplicateModules" === t && void 0 !== o.ignoreDuplicateModules ? o.ignoreDuplicateModules = o.ignoreDuplicateModules.concat(r) : "paths" === t && void 0 !== o.paths ? e.Utilities.forEachProperty(r, function(e, t) {
  220. return o.paths[e] = t
  221. }) : "config" === t && void 0 !== o.config ? e.Utilities.forEachProperty(r, function(e, t) {
  222. return o.config[e] = t
  223. }) : o[t] = e.Utilities.recursiveClone(r)
  224. }),
  225. t.validateConfigurationOptions(o)
  226. }
  227. ,
  228. t
  229. }();
  230. e.ConfigurationOptionsUtil = t;
  231. var r = function() {
  232. function r(e, r) {
  233. if (this._env = e,
  234. this.options = t.mergeConfigurationOptions(r),
  235. this._createIgnoreDuplicateModulesMap(),
  236. this._createNodeModulesMap(),
  237. this._createSortedPathsRules(),
  238. "" === this.options.baseUrl) {
  239. if (this.options.nodeRequire && this.options.nodeRequire.main && this.options.nodeRequire.main.filename && this._env.isNode) {
  240. var n = this.options.nodeRequire.main.filename
  241. , o = Math.max(n.lastIndexOf("/"), n.lastIndexOf("\\"));
  242. this.options.baseUrl = n.substring(0, o + 1)
  243. }
  244. if (this.options.nodeMain && this._env.isNode) {
  245. var n = this.options.nodeMain
  246. , o = Math.max(n.lastIndexOf("/"), n.lastIndexOf("\\"));
  247. this.options.baseUrl = n.substring(0, o + 1)
  248. }
  249. }
  250. }
  251. return r.prototype._createIgnoreDuplicateModulesMap = function() {
  252. this.ignoreDuplicateModulesMap = {};
  253. for (var e = 0; e < this.options.ignoreDuplicateModules.length; e++)
  254. this.ignoreDuplicateModulesMap[this.options.ignoreDuplicateModules[e]] = !0
  255. }
  256. ,
  257. r.prototype._createNodeModulesMap = function() {
  258. this.nodeModulesMap = Object.create(null);
  259. for (var e = 0, t = this.options.nodeModules; e < t.length; e++) {
  260. var r = t[e];
  261. this.nodeModulesMap[r] = !0
  262. }
  263. }
  264. ,
  265. r.prototype._createSortedPathsRules = function() {
  266. var t = this;
  267. this.sortedPathsRules = [],
  268. e.Utilities.forEachProperty(this.options.paths, function(e, r) {
  269. Array.isArray(r) ? t.sortedPathsRules.push({
  270. from: e,
  271. to: r
  272. }) : t.sortedPathsRules.push({
  273. from: e,
  274. to: [r]
  275. })
  276. }),
  277. this.sortedPathsRules.sort(function(e, t) {
  278. return t.from.length - e.from.length
  279. })
  280. }
  281. ,
  282. r.prototype.cloneAndMerge = function(e) {
  283. return new r(this._env,t.mergeConfigurationOptions(e, this.options))
  284. }
  285. ,
  286. r.prototype.getOptionsLiteral = function() {
  287. return this.options
  288. }
  289. ,
  290. r.prototype._applyPaths = function(t) {
  291. for (var r, n = 0, o = this.sortedPathsRules.length; n < o; n++)
  292. if (r = this.sortedPathsRules[n],
  293. e.Utilities.startsWith(t, r.from)) {
  294. for (var i = [], s = 0, d = r.to.length; s < d; s++)
  295. i.push(r.to[s] + t.substr(r.from.length));
  296. return i
  297. }
  298. return [t]
  299. }
  300. ,
  301. r.prototype._addUrlArgsToUrl = function(t) {
  302. return e.Utilities.containsQueryString(t) ? t + "&" + this.options.urlArgs : t + "?" + this.options.urlArgs
  303. }
  304. ,
  305. r.prototype._addUrlArgsIfNecessaryToUrl = function(e) {
  306. return this.options.urlArgs ? this._addUrlArgsToUrl(e) : e
  307. }
  308. ,
  309. r.prototype._addUrlArgsIfNecessaryToUrls = function(e) {
  310. if (this.options.urlArgs)
  311. for (var t = 0, r = e.length; t < r; t++)
  312. e[t] = this._addUrlArgsToUrl(e[t]);
  313. return e
  314. }
  315. ,
  316. r.prototype.moduleIdToPaths = function(t) {
  317. if (!0 === this.nodeModulesMap[t])
  318. return this.isBuild() ? ["empty:"] : ["node|" + t];
  319. var r, n = t;
  320. if (e.Utilities.endsWith(n, ".js") || e.Utilities.isAbsolutePath(n))
  321. e.Utilities.endsWith(n, ".js") || e.Utilities.containsQueryString(n) || (n += ".js"),
  322. r = [n];
  323. else
  324. for (var o = 0, i = (r = this._applyPaths(n)).length; o < i; o++)
  325. this.isBuild() && "empty:" === r[o] || (e.Utilities.isAbsolutePath(r[o]) || (r[o] = this.options.baseUrl + r[o]),
  326. e.Utilities.endsWith(r[o], ".js") || e.Utilities.containsQueryString(r[o]) || (r[o] = r[o] + ".js"));
  327. return this._addUrlArgsIfNecessaryToUrls(r)
  328. }
  329. ,
  330. r.prototype.requireToUrl = function(t) {
  331. var r = t;
  332. return e.Utilities.isAbsolutePath(r) || (r = this._applyPaths(r)[0],
  333. e.Utilities.isAbsolutePath(r) || (r = this.options.baseUrl + r)),
  334. this._addUrlArgsIfNecessaryToUrl(r)
  335. }
  336. ,
  337. r.prototype.isBuild = function() {
  338. return this.options.isBuild
  339. }
  340. ,
  341. r.prototype.isDuplicateMessageIgnoredFor = function(e) {
  342. return this.ignoreDuplicateModulesMap.hasOwnProperty(e)
  343. }
  344. ,
  345. r.prototype.getConfigForModule = function(e) {
  346. if (this.options.config)
  347. return this.options.config[e]
  348. }
  349. ,
  350. r.prototype.shouldCatchError = function() {
  351. return this.options.catchError
  352. }
  353. ,
  354. r.prototype.shouldRecordStats = function() {
  355. return this.options.recordStats
  356. }
  357. ,
  358. r.prototype.onError = function(e) {
  359. this.options.onError(e)
  360. }
  361. ,
  362. r
  363. }();
  364. e.Configuration = r
  365. }(AMDLoader || (AMDLoader = {}));
  366. !function(e) {
  367. var t = function() {
  368. function e(e) {
  369. this._env = e,
  370. this._scriptLoader = null,
  371. this._callbackMap = {}
  372. }
  373. return e.prototype.load = function(e, t, i, s) {
  374. var d = this;
  375. this._scriptLoader || (this._scriptLoader = this._env.isWebWorker ? new n : this._env.isNode ? new o(this._env) : new r);
  376. var a = {
  377. callback: i,
  378. errorback: s
  379. };
  380. this._callbackMap.hasOwnProperty(t) ? this._callbackMap[t].push(a) : (this._callbackMap[t] = [a],
  381. this._scriptLoader.load(e, t, function() {
  382. return d.triggerCallback(t)
  383. }, function(e) {
  384. return d.triggerErrorback(t, e)
  385. }))
  386. }
  387. ,
  388. e.prototype.triggerCallback = function(e) {
  389. var t = this._callbackMap[e];
  390. delete this._callbackMap[e];
  391. for (var r = 0; r < t.length; r++)
  392. t[r].callback()
  393. }
  394. ,
  395. e.prototype.triggerErrorback = function(e, t) {
  396. var r = this._callbackMap[e];
  397. delete this._callbackMap[e];
  398. for (var n = 0; n < r.length; n++)
  399. r[n].errorback(t)
  400. }
  401. ,
  402. e
  403. }()
  404. , r = function() {
  405. function e() {}
  406. return e.prototype.attachListeners = function(e, t, r) {
  407. var n = function() {
  408. e.removeEventListener("load", o),
  409. e.removeEventListener("error", i)
  410. }
  411. , o = function(e) {
  412. n(),
  413. t()
  414. }
  415. , i = function(e) {
  416. n(),
  417. r(e)
  418. };
  419. e.addEventListener("load", o),
  420. e.addEventListener("error", i)
  421. }
  422. ,
  423. e.prototype.load = function(e, t, r, n) {
  424. var o = document.createElement("script");
  425. o.setAttribute("async", "async"),
  426. o.setAttribute("type", "text/javascript"),
  427. this.attachListeners(o, r, n),
  428. o.setAttribute("src", t),
  429. document.getElementsByTagName("head")[0].appendChild(o)
  430. }
  431. ,
  432. e
  433. }()
  434. , n = function() {
  435. function e() {}
  436. return e.prototype.load = function(e, t, r, n) {
  437. try {
  438. importScripts(t),
  439. r()
  440. } catch (e) {
  441. n(e)
  442. }
  443. }
  444. ,
  445. e
  446. }()
  447. , o = function() {
  448. function t(e) {
  449. this._env = e,
  450. this._didInitialize = !1,
  451. this._didPatchNodeRequire = !1
  452. }
  453. return t.prototype._init = function(e) {
  454. if (!this._didInitialize) {
  455. this._didInitialize = !0,
  456. this._fs = e("fs"),
  457. this._vm = e("vm"),
  458. this._path = e("path"),
  459. this._crypto = e("crypto"),
  460. this._jsflags = "";
  461. for (var t = 0, r = process.argv; t < r.length; t++) {
  462. var n = r[t];
  463. if (0 === n.indexOf("--js-flags=")) {
  464. this._jsflags = n;
  465. break
  466. }
  467. }
  468. }
  469. }
  470. ,
  471. t.prototype._initNodeRequire = function(t, r) {
  472. var n = r.getConfig().getOptionsLiteral().nodeCachedDataDir;
  473. if (n && !this._didPatchNodeRequire) {
  474. this._didPatchNodeRequire = !0;
  475. var o = this
  476. , i = t("module");
  477. i.prototype._compile = function(t, s) {
  478. t = t.replace(/^#!.*/, "");
  479. var d = i.wrap(t)
  480. , a = o._getCachedDataPath(n, s)
  481. , u = {
  482. filename: s
  483. };
  484. try {
  485. u.cachedData = o._fs.readFileSync(a)
  486. } catch (e) {
  487. u.produceCachedData = !0
  488. }
  489. var l = new o._vm.Script(d,u)
  490. , c = l.runInThisContext(u)
  491. , h = o._path.dirname(s)
  492. , f = function(e) {
  493. var t = e.constructor
  494. , r = function(t) {
  495. try {
  496. return e.require(t)
  497. } finally {}
  498. };
  499. return r.resolve = function(r) {
  500. return t._resolveFilename(r, e)
  501. }
  502. ,
  503. r.main = process.mainModule,
  504. r.extensions = t._extensions,
  505. r.cache = t._cache,
  506. r
  507. }(this)
  508. , p = [this.exports, f, this, s, h, process, e.global, Buffer]
  509. , _ = c.apply(this.exports, p);
  510. return o._processCachedData(r, l, a),
  511. _
  512. }
  513. }
  514. }
  515. ,
  516. t.prototype.load = function(r, n, o, i) {
  517. var s = this
  518. , d = r.getConfig().getOptionsLiteral()
  519. , a = d.nodeRequire || e.global.nodeRequire
  520. , u = d.nodeInstrumenter || function(e) {
  521. return e
  522. }
  523. ;
  524. this._init(a),
  525. this._initNodeRequire(a, r);
  526. var l = r.getRecorder();
  527. if (/^node\|/.test(n)) {
  528. var c = n.split("|")
  529. , h = null;
  530. try {
  531. h = a(c[1])
  532. } catch (e) {
  533. return void i(e)
  534. }
  535. r.enqueueDefineAnonymousModule([], function() {
  536. return h
  537. }),
  538. o()
  539. } else
  540. n = e.Utilities.fileUriToFilePath(this._env.isWindows, n),
  541. this._fs.readFile(n, {
  542. encoding: "utf8"
  543. }, function(e, a) {
  544. if (e)
  545. i(e);
  546. else {
  547. var c = s._path.normalize(n)
  548. , h = c;
  549. if (s._env.isElectronRenderer) {
  550. var f = h.match(/^([a-z])\:(.*)/i);
  551. h = f ? "file:///" + (f[1].toUpperCase() + ":" + f[2]).replace(/\\/g, "/") : "file://" + h
  552. }
  553. var p, _ = "(function (require, define, __filename, __dirname) { ";
  554. if (p = a.charCodeAt(0) === t._BOM ? _ + a.substring(1) + "\n});" : _ + a + "\n});",
  555. p = u(p, c),
  556. d.nodeCachedDataDir) {
  557. var g = s._getCachedDataPath(d.nodeCachedDataDir, n);
  558. s._fs.readFile(g, function(e, t) {
  559. var i = {
  560. filename: h,
  561. produceCachedData: void 0 === t,
  562. cachedData: t
  563. }
  564. , d = s._loadAndEvalScript(r, n, h, p, i, l);
  565. o(),
  566. s._processCachedData(r, d, g)
  567. })
  568. } else
  569. s._loadAndEvalScript(r, n, h, p, {
  570. filename: h
  571. }, l),
  572. o()
  573. }
  574. })
  575. }
  576. ,
  577. t.prototype._loadAndEvalScript = function(t, r, n, o, i, s) {
  578. s.record(31, r);
  579. var d = new this._vm.Script(o,i);
  580. return d.runInThisContext(i).call(e.global, t.getGlobalAMDRequireFunc(), t.getGlobalAMDDefineFunc(), n, this._path.dirname(r)),
  581. s.record(32, r),
  582. d
  583. }
  584. ,
  585. t.prototype._getCachedDataPath = function(e, t) {
  586. var r = this._crypto.createHash("md5").update(t, "utf8").update(this._jsflags, "utf8").digest("hex")
  587. , n = this._path.basename(t).replace(/\.js$/, "");
  588. return this._path.join(e, n + "-" + r + ".code")
  589. }
  590. ,
  591. t.prototype._processCachedData = function(e, r, n) {
  592. var o = this;
  593. r.cachedDataRejected ? (e.getConfig().getOptionsLiteral().onNodeCachedData({
  594. errorCode: "cachedDataRejected",
  595. path: n
  596. }),
  597. t._runSoon(function() {
  598. return o._fs.unlink(n, function(t) {
  599. t && e.getConfig().getOptionsLiteral().onNodeCachedData({
  600. errorCode: "unlink",
  601. path: n,
  602. detail: t
  603. })
  604. })
  605. }, e.getConfig().getOptionsLiteral().nodeCachedDataWriteDelay)) : r.cachedDataProduced && (e.getConfig().getOptionsLiteral().onNodeCachedData(void 0, {
  606. path: n,
  607. length: r.cachedData.length
  608. }),
  609. t._runSoon(function() {
  610. return o._fs.writeFile(n, r.cachedData, function(t) {
  611. t && e.getConfig().getOptionsLiteral().onNodeCachedData({
  612. errorCode: "writeFile",
  613. path: n,
  614. detail: t
  615. })
  616. })
  617. }, e.getConfig().getOptionsLiteral().nodeCachedDataWriteDelay))
  618. }
  619. ,
  620. t._runSoon = function(e, t) {
  621. var r = t + Math.ceil(Math.random() * t);
  622. setTimeout(e, r)
  623. }
  624. ,
  625. t._BOM = 65279,
  626. t
  627. }();
  628. e.createScriptLoader = function(e) {
  629. return new t(e)
  630. }
  631. }(AMDLoader || (AMDLoader = {}));
  632. !function(e) {
  633. var t = function() {
  634. function t(e) {
  635. var t = e.lastIndexOf("/");
  636. this.fromModulePath = -1 !== t ? e.substr(0, t + 1) : ""
  637. }
  638. return t._normalizeModuleId = function(e) {
  639. var t, r = e;
  640. for (t = /\/\.\//; t.test(r); )
  641. r = r.replace(t, "/");
  642. for (r = r.replace(/^\.\//g, ""),
  643. t = /\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//; t.test(r); )
  644. r = r.replace(t, "/");
  645. return r = r.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//, "")
  646. }
  647. ,
  648. t.prototype.resolveModule = function(r) {
  649. var n = r;
  650. return e.Utilities.isAbsolutePath(n) || (e.Utilities.startsWith(n, "./") || e.Utilities.startsWith(n, "../")) && (n = t._normalizeModuleId(this.fromModulePath + n)),
  651. n
  652. }
  653. ,
  654. t.ROOT = new t(""),
  655. t
  656. }();
  657. e.ModuleIdResolver = t;
  658. var r = function() {
  659. function t(e, t, r, n, o, i) {
  660. this.id = e,
  661. this.strId = t,
  662. this.dependencies = r,
  663. this._callback = n,
  664. this._errorback = o,
  665. this.moduleIdResolver = i,
  666. this.exports = {},
  667. this.exportsPassedIn = !1,
  668. this.unresolvedDependenciesCount = this.dependencies.length,
  669. this._isComplete = !1
  670. }
  671. return t._safeInvokeFunction = function(t, r) {
  672. try {
  673. return {
  674. returnedValue: t.apply(e.global, r),
  675. producedError: null
  676. }
  677. } catch (e) {
  678. return {
  679. returnedValue: null,
  680. producedError: e
  681. }
  682. }
  683. }
  684. ,
  685. t._invokeFactory = function(t, r, n, o) {
  686. return t.isBuild() && !e.Utilities.isAnonymousModule(r) ? {
  687. returnedValue: null,
  688. producedError: null
  689. } : t.shouldCatchError() ? this._safeInvokeFunction(n, o) : {
  690. returnedValue: n.apply(e.global, o),
  691. producedError: null
  692. }
  693. }
  694. ,
  695. t.prototype.complete = function(r, n, o) {
  696. this._isComplete = !0;
  697. var i = null;
  698. if (this._callback)
  699. if ("function" == typeof this._callback) {
  700. r.record(21, this.strId);
  701. var s = t._invokeFactory(n, this.strId, this._callback, o);
  702. i = s.producedError,
  703. r.record(22, this.strId),
  704. i || void 0 === s.returnedValue || this.exportsPassedIn && !e.Utilities.isEmpty(this.exports) || (this.exports = s.returnedValue)
  705. } else
  706. this.exports = this._callback;
  707. i && n.onError({
  708. errorCode: "factory",
  709. moduleId: this.strId,
  710. detail: i
  711. }),
  712. this.dependencies = null,
  713. this._callback = null,
  714. this._errorback = null,
  715. this.moduleIdResolver = null
  716. }
  717. ,
  718. t.prototype.onDependencyError = function(e) {
  719. return !!this._errorback && (this._errorback(e),
  720. !0)
  721. }
  722. ,
  723. t.prototype.isComplete = function() {
  724. return this._isComplete
  725. }
  726. ,
  727. t
  728. }();
  729. e.Module = r;
  730. var n = function() {
  731. function e() {
  732. this._nextId = 0,
  733. this._strModuleIdToIntModuleId = new Map,
  734. this._intModuleIdToStrModuleId = [],
  735. this.getModuleId("exports"),
  736. this.getModuleId("module"),
  737. this.getModuleId("require")
  738. }
  739. return e.prototype.getMaxModuleId = function() {
  740. return this._nextId
  741. }
  742. ,
  743. e.prototype.getModuleId = function(e) {
  744. var t = this._strModuleIdToIntModuleId.get(e);
  745. return void 0 === t && (t = this._nextId++,
  746. this._strModuleIdToIntModuleId.set(e, t),
  747. this._intModuleIdToStrModuleId[t] = e),
  748. t
  749. }
  750. ,
  751. e.prototype.getStrModuleId = function(e) {
  752. return this._intModuleIdToStrModuleId[e]
  753. }
  754. ,
  755. e
  756. }()
  757. , o = function() {
  758. function e(e) {
  759. this.id = e
  760. }
  761. return e.EXPORTS = new e(0),
  762. e.MODULE = new e(1),
  763. e.REQUIRE = new e(2),
  764. e
  765. }();
  766. e.RegularDependency = o;
  767. var i = function() {
  768. return function(e, t, r) {
  769. this.id = e,
  770. this.pluginId = t,
  771. this.pluginParam = r
  772. }
  773. }();
  774. e.PluginDependency = i;
  775. var s = function() {
  776. function s(t, r, o, i, s) {
  777. void 0 === s && (s = 0),
  778. this._env = t,
  779. this._scriptLoader = r,
  780. this._loaderAvailableTimestamp = s,
  781. this._defineFunc = o,
  782. this._requireFunc = i,
  783. this._moduleIdProvider = new n,
  784. this._config = new e.Configuration(this._env),
  785. this._modules2 = [],
  786. this._knownModules2 = [],
  787. this._inverseDependencies2 = [],
  788. this._inversePluginDependencies2 = new Map,
  789. this._currentAnnonymousDefineCall = null,
  790. this._recorder = null,
  791. this._buildInfoPath = [],
  792. this._buildInfoDefineStack = [],
  793. this._buildInfoDependencies = []
  794. }
  795. return s.prototype.reset = function() {
  796. return new s(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)
  797. }
  798. ,
  799. s.prototype.getGlobalAMDDefineFunc = function() {
  800. return this._defineFunc
  801. }
  802. ,
  803. s.prototype.getGlobalAMDRequireFunc = function() {
  804. return this._requireFunc
  805. }
  806. ,
  807. s._findRelevantLocationInStack = function(e, t) {
  808. for (var r = function(e) {
  809. return e.replace(/\\/g, "/")
  810. }, n = r(e), o = t.split(/\n/), i = 0; i < o.length; i++) {
  811. var s = o[i].match(/(.*):(\d+):(\d+)\)?$/);
  812. if (s) {
  813. var d = s[1]
  814. , a = s[2]
  815. , u = s[3]
  816. , l = Math.max(d.lastIndexOf(" ") + 1, d.lastIndexOf("(") + 1);
  817. if (d = d.substr(l),
  818. (d = r(d)) === n) {
  819. var c = {
  820. line: parseInt(a, 10),
  821. col: parseInt(u, 10)
  822. };
  823. return 1 === c.line && (c.col -= "(function (require, define, __filename, __dirname) { ".length),
  824. c
  825. }
  826. }
  827. }
  828. throw new Error("Could not correlate define call site for needle " + e)
  829. }
  830. ,
  831. s.prototype.getBuildInfo = function() {
  832. if (!this._config.isBuild())
  833. return null;
  834. for (var e = [], t = 0, r = 0, n = this._modules2.length; r < n; r++) {
  835. var o = this._modules2[r];
  836. if (o) {
  837. var i = this._buildInfoPath[o.id] || null
  838. , d = this._buildInfoDefineStack[o.id] || null
  839. , a = this._buildInfoDependencies[o.id];
  840. e[t++] = {
  841. id: o.strId,
  842. path: i,
  843. defineLocation: i && d ? s._findRelevantLocationInStack(i, d) : null,
  844. dependencies: a,
  845. shim: null,
  846. exports: o.exports
  847. }
  848. }
  849. }
  850. return e
  851. }
  852. ,
  853. s.prototype.getRecorder = function() {
  854. return this._recorder || (this._config.shouldRecordStats() ? this._recorder = new e.LoaderEventRecorder(this._loaderAvailableTimestamp) : this._recorder = e.NullLoaderEventRecorder.INSTANCE),
  855. this._recorder
  856. }
  857. ,
  858. s.prototype.getLoaderEvents = function() {
  859. return this.getRecorder().getEvents()
  860. }
  861. ,
  862. s.prototype.enqueueDefineAnonymousModule = function(e, t) {
  863. if (null !== this._currentAnnonymousDefineCall)
  864. throw new Error("Can only have one anonymous define call per script file");
  865. var r = null;
  866. this._config.isBuild() && (r = new Error("StackLocation").stack),
  867. this._currentAnnonymousDefineCall = {
  868. stack: r,
  869. dependencies: e,
  870. callback: t
  871. }
  872. }
  873. ,
  874. s.prototype.defineModule = function(e, n, o, i, s, d) {
  875. var a = this;
  876. void 0 === d && (d = new t(e));
  877. var u = this._moduleIdProvider.getModuleId(e);
  878. if (this._modules2[u])
  879. this._config.isDuplicateMessageIgnoredFor(e) || console.warn("Duplicate definition of module '" + e + "'");
  880. else {
  881. var l = new r(u,e,this._normalizeDependencies(n, d),o,i,d);
  882. this._modules2[u] = l,
  883. this._config.isBuild() && (this._buildInfoDefineStack[u] = s,
  884. this._buildInfoDependencies[u] = l.dependencies.map(function(e) {
  885. return a._moduleIdProvider.getStrModuleId(e.id)
  886. })),
  887. this._resolve(l)
  888. }
  889. }
  890. ,
  891. s.prototype._normalizeDependency = function(e, t) {
  892. if ("exports" === e)
  893. return o.EXPORTS;
  894. if ("module" === e)
  895. return o.MODULE;
  896. if ("require" === e)
  897. return o.REQUIRE;
  898. var r = e.indexOf("!");
  899. if (r >= 0) {
  900. var n = t.resolveModule(e.substr(0, r))
  901. , s = t.resolveModule(e.substr(r + 1))
  902. , d = this._moduleIdProvider.getModuleId(n + "!" + s)
  903. , a = this._moduleIdProvider.getModuleId(n);
  904. return new i(d,a,s)
  905. }
  906. return new o(this._moduleIdProvider.getModuleId(t.resolveModule(e)))
  907. }
  908. ,
  909. s.prototype._normalizeDependencies = function(e, t) {
  910. for (var r = [], n = 0, o = 0, i = e.length; o < i; o++)
  911. r[n++] = this._normalizeDependency(e[o], t);
  912. return r
  913. }
  914. ,
  915. s.prototype._relativeRequire = function(t, r, n, o) {
  916. if ("string" == typeof r)
  917. return this.synchronousRequire(r, t);
  918. this.defineModule(e.Utilities.generateAnonymousModule(), r, n, o, null, t)
  919. }
  920. ,
  921. s.prototype.synchronousRequire = function(e, r) {
  922. void 0 === r && (r = new t(e));
  923. var n = this._normalizeDependency(e, r)
  924. , o = this._modules2[n.id];
  925. if (!o)
  926. throw new Error("Check dependency list! Synchronous require cannot resolve module '" + e + "'. This is the first mention of this module!");
  927. if (!o.isComplete())
  928. throw new Error("Check dependency list! Synchronous require cannot resolve module '" + e + "'. This module has not been resolved completely yet.");
  929. return o.exports
  930. }
  931. ,
  932. s.prototype.configure = function(t, r) {
  933. var n = this._config.shouldRecordStats();
  934. this._config = r ? new e.Configuration(this._env,t) : this._config.cloneAndMerge(t),
  935. this._config.shouldRecordStats() && !n && (this._recorder = null)
  936. }
  937. ,
  938. s.prototype.getConfig = function() {
  939. return this._config
  940. }
  941. ,
  942. s.prototype._onLoad = function(e) {
  943. if (null !== this._currentAnnonymousDefineCall) {
  944. var t = this._currentAnnonymousDefineCall;
  945. this._currentAnnonymousDefineCall = null,
  946. this.defineModule(this._moduleIdProvider.getStrModuleId(e), t.dependencies, t.callback, null, t.stack)
  947. }
  948. }
  949. ,
  950. s.prototype._createLoadError = function(e, t) {
  951. var r = this;
  952. return {
  953. errorCode: "load",
  954. moduleId: this._moduleIdProvider.getStrModuleId(e),
  955. neededBy: (this._inverseDependencies2[e] || []).map(function(e) {
  956. return r._moduleIdProvider.getStrModuleId(e)
  957. }),
  958. detail: t
  959. }
  960. }
  961. ,
  962. s.prototype._onLoadError = function(e, t) {
  963. for (var r = this._createLoadError(e, t), n = [], o = 0, i = this._moduleIdProvider.getMaxModuleId(); o < i; o++)
  964. n[o] = !1;
  965. var s = !1
  966. , d = [];
  967. for (d.push(e),
  968. n[e] = !0; d.length > 0; ) {
  969. var a = d.shift()
  970. , u = this._modules2[a];
  971. u && (s = u.onDependencyError(r) || s);
  972. var l = this._inverseDependencies2[a];
  973. if (l)
  974. for (var o = 0, i = l.length; o < i; o++) {
  975. var c = l[o];
  976. n[c] || (d.push(c),
  977. n[c] = !0)
  978. }
  979. }
  980. s || this._config.onError(r)
  981. }
  982. ,
  983. s.prototype._hasDependencyPath = function(e, t) {
  984. var r = this._modules2[e];
  985. if (!r)
  986. return !1;
  987. for (var n = [], o = 0, i = this._moduleIdProvider.getMaxModuleId(); o < i; o++)
  988. n[o] = !1;
  989. var s = [];
  990. for (s.push(r),
  991. n[e] = !0; s.length > 0; ) {
  992. var d = s.shift().dependencies;
  993. if (d)
  994. for (var o = 0, i = d.length; o < i; o++) {
  995. var a = d[o];
  996. if (a.id === t)
  997. return !0;
  998. var u = this._modules2[a.id];
  999. u && !n[a.id] && (n[a.id] = !0,
  1000. s.push(u))
  1001. }
  1002. }
  1003. return !1
  1004. }
  1005. ,
  1006. s.prototype._findCyclePath = function(e, t, r) {
  1007. if (e === t || 50 === r)
  1008. return [e];
  1009. var n = this._modules2[e];
  1010. if (!n)
  1011. return null;
  1012. for (var o = n.dependencies, i = 0, s = o.length; i < s; i++) {
  1013. var d = this._findCyclePath(o[i].id, t, r + 1);
  1014. if (null !== d)
  1015. return d.push(e),
  1016. d
  1017. }
  1018. return null
  1019. }
  1020. ,
  1021. s.prototype._createRequire = function(t) {
  1022. var r = this
  1023. , n = function(e, n, o) {
  1024. return r._relativeRequire(t, e, n, o)
  1025. };
  1026. return n.toUrl = function(e) {
  1027. return r._config.requireToUrl(t.resolveModule(e))
  1028. }
  1029. ,
  1030. n.getStats = function() {
  1031. return r.getLoaderEvents()
  1032. }
  1033. ,
  1034. n.__$__nodeRequire = e.global.nodeRequire,
  1035. n
  1036. }
  1037. ,
  1038. s.prototype._loadModule = function(e) {
  1039. var t = this;
  1040. if (!this._modules2[e] && !this._knownModules2[e]) {
  1041. this._knownModules2[e] = !0;
  1042. var r = this._moduleIdProvider.getStrModuleId(e)
  1043. , n = this._config.moduleIdToPaths(r);
  1044. this._env.isNode && -1 === r.indexOf("/") && n.push("node|" + r);
  1045. var o = -1
  1046. , i = function(r) {
  1047. if (++o >= n.length)
  1048. t._onLoadError(e, r);
  1049. else {
  1050. var s = n[o]
  1051. , d = t.getRecorder();
  1052. if (t._config.isBuild() && "empty:" === s)
  1053. return t._buildInfoPath[e] = s,
  1054. t.defineModule(t._moduleIdProvider.getStrModuleId(e), [], null, null, null),
  1055. void t._onLoad(e);
  1056. d.record(10, s),
  1057. t._scriptLoader.load(t, s, function() {
  1058. t._config.isBuild() && (t._buildInfoPath[e] = s),
  1059. d.record(11, s),
  1060. t._onLoad(e)
  1061. }, function(e) {
  1062. d.record(12, s),
  1063. i(e)
  1064. })
  1065. }
  1066. };
  1067. i(null)
  1068. }
  1069. }
  1070. ,
  1071. s.prototype._loadPluginDependency = function(e, r) {
  1072. var n = this;
  1073. if (!this._modules2[r.id] && !this._knownModules2[r.id]) {
  1074. this._knownModules2[r.id] = !0;
  1075. var o = function(e) {
  1076. n.defineModule(n._moduleIdProvider.getStrModuleId(r.id), [], e, null, null)
  1077. };
  1078. o.error = function(e) {
  1079. n._config.onError(n._createLoadError(r.id, e))
  1080. }
  1081. ,
  1082. e.load(r.pluginParam, this._createRequire(t.ROOT), o, this._config.getOptionsLiteral())
  1083. }
  1084. }
  1085. ,
  1086. s.prototype._resolve = function(e) {
  1087. for (var t = this, r = e.dependencies, n = 0, s = r.length; n < s; n++) {
  1088. var d = r[n];
  1089. if (d !== o.EXPORTS)
  1090. if (d !== o.MODULE)
  1091. if (d !== o.REQUIRE) {
  1092. var a = this._modules2[d.id];
  1093. if (a && a.isComplete())
  1094. e.unresolvedDependenciesCount--;
  1095. else if (this._hasDependencyPath(d.id, e.id)) {
  1096. console.warn("There is a dependency cycle between '" + this._moduleIdProvider.getStrModuleId(d.id) + "' and '" + this._moduleIdProvider.getStrModuleId(e.id) + "'. The cyclic path follows:");
  1097. var u = this._findCyclePath(d.id, e.id, 0);
  1098. u.reverse(),
  1099. u.push(d.id),
  1100. console.warn(u.map(function(e) {
  1101. return t._moduleIdProvider.getStrModuleId(e)
  1102. }).join(" => \n")),
  1103. e.unresolvedDependenciesCount--
  1104. } else if (this._inverseDependencies2[d.id] = this._inverseDependencies2[d.id] || [],
  1105. this._inverseDependencies2[d.id].push(e.id),
  1106. d instanceof i) {
  1107. var l = this._modules2[d.pluginId];
  1108. if (l && l.isComplete()) {
  1109. this._loadPluginDependency(l.exports, d);
  1110. continue
  1111. }
  1112. var c = this._inversePluginDependencies2.get(d.pluginId);
  1113. c || (c = [],
  1114. this._inversePluginDependencies2.set(d.pluginId, c)),
  1115. c.push(d),
  1116. this._loadModule(d.pluginId)
  1117. } else
  1118. this._loadModule(d.id)
  1119. } else
  1120. e.unresolvedDependenciesCount--;
  1121. else
  1122. e.unresolvedDependenciesCount--;
  1123. else
  1124. e.exportsPassedIn = !0,
  1125. e.unresolvedDependenciesCount--
  1126. }
  1127. 0 === e.unresolvedDependenciesCount && this._onModuleComplete(e)
  1128. }
  1129. ,
  1130. s.prototype._onModuleComplete = function(e) {
  1131. var t = this
  1132. , r = this.getRecorder();
  1133. if (!e.isComplete()) {
  1134. for (var n = e.dependencies, i = [], s = 0, d = n.length; s < d; s++) {
  1135. var a = n[s];
  1136. if (a !== o.EXPORTS)
  1137. if (a !== o.MODULE)
  1138. if (a !== o.REQUIRE) {
  1139. var u = this._modules2[a.id];
  1140. i[s] = u ? u.exports : null
  1141. } else
  1142. i[s] = this._createRequire(e.moduleIdResolver);
  1143. else
  1144. i[s] = {
  1145. id: e.strId,
  1146. config: function() {
  1147. return t._config.getConfigForModule(e.strId)
  1148. }
  1149. };
  1150. else
  1151. i[s] = e.exports
  1152. }
  1153. e.complete(r, this._config, i);
  1154. var l = this._inverseDependencies2[e.id];
  1155. if (this._inverseDependencies2[e.id] = null,
  1156. l)
  1157. for (var s = 0, d = l.length; s < d; s++) {
  1158. var c = l[s]
  1159. , h = this._modules2[c];
  1160. h.unresolvedDependenciesCount--,
  1161. 0 === h.unresolvedDependenciesCount && this._onModuleComplete(h)
  1162. }
  1163. var f = this._inversePluginDependencies2.get(e.id);
  1164. if (f) {
  1165. this._inversePluginDependencies2.delete(e.id);
  1166. for (var s = 0, d = f.length; s < d; s++)
  1167. this._loadPluginDependency(e.exports, f[s])
  1168. }
  1169. }
  1170. }
  1171. ,
  1172. s
  1173. }();
  1174. e.ModuleManager = s
  1175. }(AMDLoader || (AMDLoader = {}));
  1176. var define, AMDLoader;
  1177. !function(e) {
  1178. function t() {
  1179. if (void 0 !== e.global.require || "undefined" != typeof require) {
  1180. var t = e.global.require || require;
  1181. if ("function" == typeof t && "function" == typeof t.resolve) {
  1182. var i = function(e) {
  1183. n.getRecorder().record(33, e);
  1184. try {
  1185. return t(e)
  1186. } finally {
  1187. n.getRecorder().record(34, e)
  1188. }
  1189. };
  1190. e.global.nodeRequire = i,
  1191. s.nodeRequire = i,
  1192. s.__$__nodeRequire = i
  1193. }
  1194. }
  1195. r.isNode && !r.isElectronRenderer ? (module.exports = s,
  1196. require = s) : (r.isElectronRenderer || (e.global.define = o),
  1197. e.global.require = s)
  1198. }
  1199. var r = new e.Environment
  1200. , n = null
  1201. , o = function(e, t, r) {
  1202. "string" != typeof e && (r = t,
  1203. t = e,
  1204. e = null),
  1205. "object" == typeof t && Array.isArray(t) || (r = t,
  1206. t = null),
  1207. t || (t = ["require", "exports", "module"]),
  1208. e ? n.defineModule(e, t, r, null, null) : n.enqueueDefineAnonymousModule(t, r)
  1209. };
  1210. o.amd = {
  1211. jQuery: !0
  1212. };
  1213. var i = function(e, t) {
  1214. void 0 === t && (t = !1),
  1215. n.configure(e, t)
  1216. }
  1217. , s = function() {
  1218. if (1 === arguments.length) {
  1219. if (arguments[0]instanceof Object && !Array.isArray(arguments[0]))
  1220. return void i(arguments[0]);
  1221. if ("string" == typeof arguments[0])
  1222. return n.synchronousRequire(arguments[0])
  1223. }
  1224. if (2 !== arguments.length && 3 !== arguments.length || !Array.isArray(arguments[0]))
  1225. throw new Error("Unrecognized require call");
  1226. n.defineModule(e.Utilities.generateAnonymousModule(), arguments[0], arguments[1], arguments[2], null)
  1227. };
  1228. s.config = i,
  1229. s.getConfig = function() {
  1230. return n.getConfig().getOptionsLiteral()
  1231. }
  1232. ,
  1233. s.reset = function() {
  1234. n = n.reset()
  1235. }
  1236. ,
  1237. s.getBuildInfo = function() {
  1238. return n.getBuildInfo()
  1239. }
  1240. ,
  1241. s.getStats = function() {
  1242. return n.getLoaderEvents()
  1243. }
  1244. ,
  1245. e.init = t,
  1246. "function" == typeof e.global.define && e.global.define.amd || (n = new e.ModuleManager(r,e.createScriptLoader(r),o,s,e.Utilities.getHighPerformanceTimestamp()),
  1247. void 0 !== e.global.require && "function" != typeof e.global.require && s.config(e.global.require),
  1248. (define = function() {
  1249. return o.apply(null, arguments)
  1250. }
  1251. ).amd = o.amd,
  1252. "undefined" == typeof doNotInitLoader && t())
  1253. }(AMDLoader || (AMDLoader = {}));
  1254. //# sourceMappingURL=../../min-maps/vs/loader.js.map
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement