@gsp-cmp/debugtool
Advanced tools
@@ -161,2 +161,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
| var headers = event.headers.keys(); | ||
| debugInfo.start = startTime; | ||
| debugInfo.debugUrl = event.url; | ||
@@ -163,0 +164,0 @@ debugInfo.DebugTraceId = event.headers.get("DebugTraceId"); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["webpack://@gsp-cmp/debugtool.umd/webpack/universalModuleDefinition","webpack://@gsp-cmp/debugtool.umd/webpack/bootstrap","webpack://@gsp-cmp/debugtool.umd/external \"@angular/core\"","webpack://@gsp-cmp/debugtool.umd/./.tmp/debugtool/entity/debug-info.ts","webpack://@gsp-cmp/debugtool.umd/./.tmp/debugtool/service/request-handler.service.ts","webpack://@gsp-cmp/debugtool.umd/external \"@angular/common/http\"","webpack://@gsp-cmp/debugtool.umd/./.tmp/debugtool/service/debug.service.ts","webpack://@gsp-cmp/debugtool.umd/./.tmp/debugtool/service/core.service.ts","webpack://@gsp-cmp/debugtool.umd/external \"rxjs/operators\"","webpack://@gsp-cmp/debugtool.umd/external \"rxjs/observable/ErrorObservable\"","webpack://@gsp-cmp/debugtool.umd/external \"rxjs/Observable\"","webpack://@gsp-cmp/debugtool.umd/./.tmp/debugtool/debugtool.module.ts","webpack://@gsp-cmp/debugtool.umd/./.tmp/index.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8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+CAAqB,EAAC,KAAK,EAAC,IAAI,EAAC;aACtE;SACF;IACH,CAAC;IATU,eAAe;QAR3B,eAAQ,CAAC;YACR,YAAY,EAAE,EACb;YACD,SAAS,EAAE;gBACT,0BAAW;aACZ;YACD,SAAS,EAAE,EAAE;SACd,CAAC;OACW,eAAe,CAU3B;IAAD,sBAAC;;CAAA;AAVY,0CAAe;;;;;;;;;;ACf5B,6CAAgE;AAAvD,mDAAY;AACrB,gDAA+D;AAAtD,4DAAe;AACxB,uDAAmF;AAA1E,+EAAqB;AAC9B,0CAAyD;AAAhD,0CAAS","file":"@gsp-cmp/debugtool.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@angular/core\"), require(\"@angular/common/http\"), require(\"rxjs/operators\"), require(\"rxjs/observable/ErrorObservable\"), require(\"rxjs/Observable\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@angular/core\", \"@angular/common/http\", \"rxjs/operators\", \"rxjs/observable/ErrorObservable\", \"rxjs/Observable\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@gsp-cmp/debugtool.umd\"] = factory(require(\"@angular/core\"), require(\"@angular/common/http\"), require(\"rxjs/operators\"), require(\"rxjs/observable/ErrorObservable\"), require(\"rxjs/Observable\"));\n\telse\n\t\troot[\"@gsp-cmp/debugtool.umd\"] = factory(root[\"@angular/core\"], root[\"@angular/common/http\"], root[\"rxjs/operators\"], root[\"rxjs/observable/ErrorObservable\"], root[\"rxjs/Observable\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__8__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","\r\n/**\r\n * Debug信息实体类\r\n */\r\nexport class DebugInfo{\r\n //调试Url\r\n debugUrl:string;\r\n //本次调试的调用 Id\r\n DebugTraceId:string\r\n //本次调用耗时\r\n duration:number\r\n}","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse, HttpErrorResponse, HttpHeaders } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs/Observable\";\r\nimport { ErrorObservable } from 'rxjs/observable/ErrorObservable';\r\nimport { catchError, map } from 'rxjs/operators';\r\nimport { CoreService } from './core.service';\r\nimport { DebugInfo } from '../entity/debug-info';\r\n\r\n@Injectable()\r\nexport class RequestHandlerService implements HttpInterceptor {\r\n\r\n constructor(private core: CoreService){ }\r\n\r\n intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n //开启调试模式的情况下,增加debug参数\r\n if (this.core.getDebugMode()) {\r\n let debugHeaders: HttpHeaders = req.headers.append('isdebug', '1');\r\n req = req.clone({\r\n headers: debugHeaders\r\n });\r\n }\r\n const req_started = Date.now();\r\n\r\n return next.handle(req).pipe(\r\n map((event: HttpEvent<any>) => {\r\n if (event instanceof HttpResponse) {\r\n this.handleData(event, req_started);\r\n }\r\n return event;\r\n }),\r\n //失败请求的处理\r\n catchError((res: HttpResponse<any>) => {\r\n this.handleData(res, req_started);\r\n return ErrorObservable.create(event);\r\n })\r\n );\r\n\r\n }\r\n\r\n\r\n /**\r\n * 对返回的数据进行处理\r\n * @param event \r\n */\r\n private handleData(\r\n event: HttpResponse<any> | HttpErrorResponse,\r\n startTime: number\r\n ): Observable<any> {\r\n // 业务处理:一些通用操作\r\n if (event instanceof HttpResponse) {\r\n if(this.core.getDebugMode()){\r\n let debugInfo:DebugInfo=new DebugInfo();\r\n let headers=event.headers.keys();\r\n debugInfo.debugUrl=event.url;\r\n debugInfo.DebugTraceId=event.headers.get(\"DebugTraceId\");\r\n debugInfo.duration=Date.now()-startTime;\r\n this.core.setDebugId(debugInfo);\r\n // alert(\"请求次数+1\");\r\n }\r\n }\r\n return Observable.create(observer => observer.next(event));\r\n }\r\n\r\n}","module.exports = __WEBPACK_EXTERNAL_MODULE__3__;","import { Injectable } from '@angular/core';\r\nimport { DebugInfo } from '../entity/debug-info';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable()\r\n\r\n/**\r\n * 调试服务,可开启、关闭调试模式\r\n */\r\nexport class DebugService {\r\n constructor(private core:CoreService ){}\r\n\r\n /**\r\n * 开启调试模式\r\n */\r\n openDebugMode(){\r\n this.core.stateChange(true);\r\n }\r\n\r\n /**\r\n * 关闭调试模式,并获取期间的调试信息\r\n */\r\n closeDebugMode():DebugInfo[]{\r\n this.core.stateChange(false);\r\n let result:DebugInfo[]=this.core.getDebugIds();\r\n this.core.flushDebugIds();\r\n return result;\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { DebugInfo } from '../entity/debug-info';\r\n\r\n@Injectable()\r\n\r\n/**\r\n * 调试器核心服务\r\n */\r\nexport class CoreService {\r\n\r\n //存储全局变量,是否开启了调试模式\r\n private debugModeOn: boolean = false;\r\n\r\n //存储全局变量,每个调用链的id集合\r\n private debugIds:Array<DebugInfo>=[];\r\n\r\n /**\r\n * 调试模式发生变化,改变全局变量\r\n * @param debugModeOn 是否开启调试模式\r\n */\r\n stateChange(debugModeOn: boolean) {\r\n this.debugModeOn = debugModeOn;\r\n }\r\n\r\n /**\r\n * 获取全局内是否开启了调试模式\r\n */\r\n getDebugMode(): boolean {\r\n return this.debugModeOn;\r\n }\r\n\r\n /**\r\n * 增加一个debugId\r\n * @param debugId \r\n */\r\n setDebugId(debugInfo:DebugInfo){\r\n this.debugIds.push(debugInfo);\r\n }\r\n\r\n\r\n /**\r\n * 获取所有的DebugId列表\r\n */\r\n getDebugIds(){\r\n return this.debugIds;\r\n }\r\n\r\n /**\r\n * 一个调试周期结束,清空debugIds\r\n */\r\n flushDebugIds(){\r\n this.debugIds=[];\r\n }\r\n\r\n\r\n}","module.exports = __WEBPACK_EXTERNAL_MODULE__6__;","module.exports = __WEBPACK_EXTERNAL_MODULE__7__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8__;","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';\nimport { RequestHandlerService } from './service/request-handler.service';\nimport { CoreService } from './service/core.service';\nimport { DebugService } from './service/debug.service';\n\n\n@NgModule({\n declarations: [\n ],\n providers: [\n CoreService\n ],\n bootstrap: []\n})\nexport class DebugToolModule { \n static forRoot(): ModuleWithProviders{\n return {\n ngModule:DebugToolModule,\n providers:[\n DebugService,\n {provide:HTTP_INTERCEPTORS,useClass:RequestHandlerService,multi:true}\n ]\n }\n }\n}\n","export { DebugService } from './debugtool/service/debug.service'\r\nexport { DebugToolModule } from './debugtool/debugtool.module'\r\nexport { RequestHandlerService } from './debugtool/service/request-handler.service'\r\nexport { DebugInfo } from './debugtool/entity/debug-info'"],"sourceRoot":""} | ||
| {"version":3,"sources":["webpack://@gsp-cmp/debugtool.umd/webpack/universalModuleDefinition","webpack://@gsp-cmp/debugtool.umd/webpack/bootstrap","webpack://@gsp-cmp/debugtool.umd/external \"@angular/core\"","webpack://@gsp-cmp/debugtool.umd/./.tmp/debugtool/entity/debug-info.ts","webpack://@gsp-cmp/debugtool.umd/./.tmp/debugtool/service/request-handler.service.ts","webpack://@gsp-cmp/debugtool.umd/external \"@angular/common/http\"","webpack://@gsp-cmp/debugtool.umd/./.tmp/debugtool/service/debug.service.ts","webpack://@gsp-cmp/debugtool.umd/./.tmp/debugtool/service/core.service.ts","webpack://@gsp-cmp/debugtool.umd/external \"rxjs/operators\"","webpack://@gsp-cmp/debugtool.umd/external \"rxjs/observable/ErrorObservable\"","webpack://@gsp-cmp/debugtool.umd/external \"rxjs/Observable\"","webpack://@gsp-cmp/debugtool.umd/./.tmp/debugtool/debugtool.module.ts","webpack://@gsp-cmp/debugtool.umd/./.tmp/index.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA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;ACAA,gD;;;;;;;;;;;;;;;ACAA,oCAA8D;AAC9D,oCAA2E;AAC3E,uDAA0E;AAC1E,4CAAqD;AACrD,6CAAuD;AAWvD;IAAA;IAUA,CAAC;wBAVY,eAAe;IACnB,uBAAO,GAAd;QACE,MAAM,CAAC;YACL,QAAQ,EAAC,iBAAe;YACxB,SAAS,EAAC;gBACR,4BAAY;gBACZ,EAAC,OAAO,EAAC,wBAAiB,EAAC,QAAQ,EAAC,+CAAqB,EAAC,KAAK,EAAC,IAAI,EAAC;aACtE;SACF;IACH,CAAC;IATU,eAAe;QAR3B,eAAQ,CAAC;YACR,YAAY,EAAE,EACb;YACD,SAAS,EAAE;gBACT,0BAAW;aACZ;YACD,SAAS,EAAE,EAAE;SACd,CAAC;OACW,eAAe,CAU3B;IAAD,sBAAC;;CAAA;AAVY,0CAAe;;;;;;;;;;ACf5B,6CAAgE;AAAvD,mDAAY;AACrB,gDAA+D;AAAtD,4DAAe;AACxB,uDAAmF;AAA1E,+EAAqB;AAC9B,0CAAyD;AAAhD,0CAAS","file":"@gsp-cmp/debugtool.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@angular/core\"), require(\"@angular/common/http\"), require(\"rxjs/operators\"), require(\"rxjs/observable/ErrorObservable\"), require(\"rxjs/Observable\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@angular/core\", \"@angular/common/http\", \"rxjs/operators\", \"rxjs/observable/ErrorObservable\", \"rxjs/Observable\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@gsp-cmp/debugtool.umd\"] = factory(require(\"@angular/core\"), require(\"@angular/common/http\"), require(\"rxjs/operators\"), require(\"rxjs/observable/ErrorObservable\"), require(\"rxjs/Observable\"));\n\telse\n\t\troot[\"@gsp-cmp/debugtool.umd\"] = factory(root[\"@angular/core\"], root[\"@angular/common/http\"], root[\"rxjs/operators\"], root[\"rxjs/observable/ErrorObservable\"], root[\"rxjs/Observable\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__8__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","\r\n/**\r\n * Debug信息实体类\r\n */\r\nexport class DebugInfo{\r\n //调试Url\r\n debugUrl:string;\r\n //本次调试的调用 Id\r\n DebugTraceId:string\r\n //本次调用耗时\r\n duration:number;\r\n start:number;\r\n}","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse, HttpErrorResponse, HttpHeaders } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs/Observable\";\r\nimport { ErrorObservable } from 'rxjs/observable/ErrorObservable';\r\nimport { catchError, map } from 'rxjs/operators';\r\nimport { CoreService } from './core.service';\r\nimport { DebugInfo } from '../entity/debug-info';\r\n\r\n@Injectable()\r\nexport class RequestHandlerService implements HttpInterceptor {\r\n\r\n constructor(private core: CoreService){ }\r\n\r\n intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n //开启调试模式的情况下,增加debug参数\r\n if (this.core.getDebugMode()) {\r\n let debugHeaders: HttpHeaders = req.headers.append('isdebug', '1');\r\n req = req.clone({\r\n headers: debugHeaders\r\n });\r\n }\r\n const req_started = Date.now();\r\n\r\n return next.handle(req).pipe(\r\n map((event: HttpEvent<any>) => {\r\n if (event instanceof HttpResponse) {\r\n this.handleData(event, req_started);\r\n }\r\n return event;\r\n }),\r\n //失败请求的处理\r\n catchError((res: HttpResponse<any>) => {\r\n this.handleData(res, req_started);\r\n return ErrorObservable.create(event);\r\n })\r\n );\r\n\r\n }\r\n\r\n\r\n /**\r\n * 对返回的数据进行处理\r\n * @param event \r\n */\r\n private handleData(\r\n event: HttpResponse<any> | HttpErrorResponse,\r\n startTime: number\r\n ): Observable<any> {\r\n // 业务处理:一些通用操作\r\n if (event instanceof HttpResponse) {\r\n if(this.core.getDebugMode()){\r\n let debugInfo:DebugInfo=new DebugInfo();\r\n let headers=event.headers.keys();\r\n debugInfo.start=startTime;\r\n debugInfo.debugUrl=event.url;\r\n debugInfo.DebugTraceId=event.headers.get(\"DebugTraceId\");\r\n debugInfo.duration=Date.now()-startTime;\r\n this.core.setDebugId(debugInfo);\r\n // alert(\"请求次数+1\");\r\n }\r\n }\r\n return Observable.create(observer => observer.next(event));\r\n }\r\n\r\n}","module.exports = __WEBPACK_EXTERNAL_MODULE__3__;","import { Injectable } from '@angular/core';\r\nimport { DebugInfo } from '../entity/debug-info';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable()\r\n\r\n/**\r\n * 调试服务,可开启、关闭调试模式\r\n */\r\nexport class DebugService {\r\n constructor(private core:CoreService ){}\r\n\r\n /**\r\n * 开启调试模式\r\n */\r\n openDebugMode(){\r\n this.core.stateChange(true);\r\n }\r\n\r\n /**\r\n * 关闭调试模式,并获取期间的调试信息\r\n */\r\n closeDebugMode():DebugInfo[]{\r\n this.core.stateChange(false);\r\n let result:DebugInfo[]=this.core.getDebugIds();\r\n this.core.flushDebugIds();\r\n return result;\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { DebugInfo } from '../entity/debug-info';\r\n\r\n@Injectable()\r\n\r\n/**\r\n * 调试器核心服务\r\n */\r\nexport class CoreService {\r\n\r\n //存储全局变量,是否开启了调试模式\r\n private debugModeOn: boolean = false;\r\n\r\n //存储全局变量,每个调用链的id集合\r\n private debugIds:Array<DebugInfo>=[];\r\n\r\n /**\r\n * 调试模式发生变化,改变全局变量\r\n * @param debugModeOn 是否开启调试模式\r\n */\r\n stateChange(debugModeOn: boolean) {\r\n this.debugModeOn = debugModeOn;\r\n }\r\n\r\n /**\r\n * 获取全局内是否开启了调试模式\r\n */\r\n getDebugMode(): boolean {\r\n return this.debugModeOn;\r\n }\r\n\r\n /**\r\n * 增加一个debugId\r\n * @param debugId \r\n */\r\n setDebugId(debugInfo:DebugInfo){\r\n this.debugIds.push(debugInfo);\r\n }\r\n\r\n\r\n /**\r\n * 获取所有的DebugId列表\r\n */\r\n getDebugIds(){\r\n return this.debugIds;\r\n }\r\n\r\n /**\r\n * 一个调试周期结束,清空debugIds\r\n */\r\n flushDebugIds(){\r\n this.debugIds=[];\r\n }\r\n\r\n\r\n}","module.exports = __WEBPACK_EXTERNAL_MODULE__6__;","module.exports = __WEBPACK_EXTERNAL_MODULE__7__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8__;","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';\nimport { RequestHandlerService } from './service/request-handler.service';\nimport { CoreService } from './service/core.service';\nimport { DebugService } from './service/debug.service';\n\n\n@NgModule({\n declarations: [\n ],\n providers: [\n CoreService\n ],\n bootstrap: []\n})\nexport class DebugToolModule { \n static forRoot(): ModuleWithProviders{\n return {\n ngModule:DebugToolModule,\n providers:[\n DebugService,\n {provide:HTTP_INTERCEPTORS,useClass:RequestHandlerService,multi:true}\n ]\n }\n }\n}\n","export { DebugService } from './debugtool/service/debug.service'\r\nexport { DebugToolModule } from './debugtool/debugtool.module'\r\nexport { RequestHandlerService } from './debugtool/service/request-handler.service'\r\nexport { DebugInfo } from './debugtool/entity/debug-info'"],"sourceRoot":""} |
@@ -1,2 +0,2 @@ | ||
| !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs/observable/ErrorObservable"),require("rxjs/Observable")):"function"==typeof define&&define.amd?define(["@angular/core","@angular/common/http","rxjs/operators","rxjs/observable/ErrorObservable","rxjs/Observable"],t):"object"==typeof exports?exports["@gsp-cmp/debugtool.umd.min"]=t(require("@angular/core"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs/observable/ErrorObservable"),require("rxjs/Observable")):e["@gsp-cmp/debugtool.umd.min"]=t(e["@angular/core"],e["@angular/common/http"],e["rxjs/operators"],e["rxjs/observable/ErrorObservable"],e["rxjs/Observable"])}(window,function(e,t,r,o,n){return function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=10)}([function(t,r){t.exports=e},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){return function(){}}();t.DebugInfo=o},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,u=arguments.length,c=u<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,o);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(c=(u<3?n(c):u>3?n(t,r,c):n(t,r))||c);return u>3&&c&&Object.defineProperty(t,r,c),c};Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),u=r(3),c=r(8),i=r(7),s=r(6),a=r(1),f=function(){function e(e){this.core=e}return e.prototype.intercept=function(e,t){var r=this;if(this.core.getDebugMode()){var o=e.headers.append("isdebug","1");e=e.clone({headers:o})}var n=Date.now();return t.handle(e).pipe(s.map(function(e){return e instanceof u.HttpResponse&&r.handleData(e,n),e}),s.catchError(function(e){return r.handleData(e,n),i.ErrorObservable.create(event)}))},e.prototype.handleData=function(e,t){if(e instanceof u.HttpResponse&&this.core.getDebugMode()){var r=new a.DebugInfo;e.headers.keys();r.debugUrl=e.url,r.DebugTraceId=e.headers.get("DebugTraceId"),r.duration=Date.now()-t,this.core.setDebugId(r)}return c.Observable.create(function(t){return t.next(e)})},e=o([n.Injectable()],e)}();t.RequestHandlerService=f},function(e,r){e.exports=t},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,u=arguments.length,c=u<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,o);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(c=(u<3?n(c):u>3?n(t,r,c):n(t,r))||c);return u>3&&c&&Object.defineProperty(t,r,c),c};Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),u=function(){function e(e){this.core=e}return e.prototype.openDebugMode=function(){this.core.stateChange(!0)},e.prototype.closeDebugMode=function(){this.core.stateChange(!1);var e=this.core.getDebugIds();return this.core.flushDebugIds(),e},e=o([n.Injectable()],e)}();t.DebugService=u},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,u=arguments.length,c=u<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,o);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(c=(u<3?n(c):u>3?n(t,r,c):n(t,r))||c);return u>3&&c&&Object.defineProperty(t,r,c),c};Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),u=function(){function e(){this.debugModeOn=!1,this.debugIds=[]}return e.prototype.stateChange=function(e){this.debugModeOn=e},e.prototype.getDebugMode=function(){return this.debugModeOn},e.prototype.setDebugId=function(e){this.debugIds.push(e)},e.prototype.getDebugIds=function(){return this.debugIds},e.prototype.flushDebugIds=function(){this.debugIds=[]},e=o([n.Injectable()],e)}();t.CoreService=u},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t){e.exports=n},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,u=arguments.length,c=u<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,o);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(c=(u<3?n(c):u>3?n(t,r,c):n(t,r))||c);return u>3&&c&&Object.defineProperty(t,r,c),c};Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),u=r(3),c=r(2),i=r(5),s=r(4),a=function(){function e(){}return t=e,e.forRoot=function(){return{ngModule:t,providers:[s.DebugService,{provide:u.HTTP_INTERCEPTORS,useClass:c.RequestHandlerService,multi:!0}]}},e=t=o([n.NgModule({declarations:[],providers:[i.CoreService],bootstrap:[]})],e);var t}();t.DebugToolModule=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r(4);t.DebugService=o.DebugService;var n=r(9);t.DebugToolModule=n.DebugToolModule;var u=r(2);t.RequestHandlerService=u.RequestHandlerService;var c=r(1);t.DebugInfo=c.DebugInfo}])}); | ||
| !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs/observable/ErrorObservable"),require("rxjs/Observable")):"function"==typeof define&&define.amd?define(["@angular/core","@angular/common/http","rxjs/operators","rxjs/observable/ErrorObservable","rxjs/Observable"],t):"object"==typeof exports?exports["@gsp-cmp/debugtool.umd.min"]=t(require("@angular/core"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs/observable/ErrorObservable"),require("rxjs/Observable")):e["@gsp-cmp/debugtool.umd.min"]=t(e["@angular/core"],e["@angular/common/http"],e["rxjs/operators"],e["rxjs/observable/ErrorObservable"],e["rxjs/Observable"])}(window,function(e,t,r,o,n){return function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=10)}([function(t,r){t.exports=e},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){return function(){}}();t.DebugInfo=o},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,u=arguments.length,c=u<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,o);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(c=(u<3?n(c):u>3?n(t,r,c):n(t,r))||c);return u>3&&c&&Object.defineProperty(t,r,c),c};Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),u=r(3),c=r(8),i=r(7),s=r(6),a=r(1),f=function(){function e(e){this.core=e}return e.prototype.intercept=function(e,t){var r=this;if(this.core.getDebugMode()){var o=e.headers.append("isdebug","1");e=e.clone({headers:o})}var n=Date.now();return t.handle(e).pipe(s.map(function(e){return e instanceof u.HttpResponse&&r.handleData(e,n),e}),s.catchError(function(e){return r.handleData(e,n),i.ErrorObservable.create(event)}))},e.prototype.handleData=function(e,t){if(e instanceof u.HttpResponse&&this.core.getDebugMode()){var r=new a.DebugInfo;e.headers.keys();r.start=t,r.debugUrl=e.url,r.DebugTraceId=e.headers.get("DebugTraceId"),r.duration=Date.now()-t,this.core.setDebugId(r)}return c.Observable.create(function(t){return t.next(e)})},e=o([n.Injectable()],e)}();t.RequestHandlerService=f},function(e,r){e.exports=t},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,u=arguments.length,c=u<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,o);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(c=(u<3?n(c):u>3?n(t,r,c):n(t,r))||c);return u>3&&c&&Object.defineProperty(t,r,c),c};Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),u=function(){function e(e){this.core=e}return e.prototype.openDebugMode=function(){this.core.stateChange(!0)},e.prototype.closeDebugMode=function(){this.core.stateChange(!1);var e=this.core.getDebugIds();return this.core.flushDebugIds(),e},e=o([n.Injectable()],e)}();t.DebugService=u},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,u=arguments.length,c=u<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,o);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(c=(u<3?n(c):u>3?n(t,r,c):n(t,r))||c);return u>3&&c&&Object.defineProperty(t,r,c),c};Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),u=function(){function e(){this.debugModeOn=!1,this.debugIds=[]}return e.prototype.stateChange=function(e){this.debugModeOn=e},e.prototype.getDebugMode=function(){return this.debugModeOn},e.prototype.setDebugId=function(e){this.debugIds.push(e)},e.prototype.getDebugIds=function(){return this.debugIds},e.prototype.flushDebugIds=function(){this.debugIds=[]},e=o([n.Injectable()],e)}();t.CoreService=u},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t){e.exports=n},function(e,t,r){"use strict";var o=this&&this.__decorate||function(e,t,r,o){var n,u=arguments.length,c=u<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,r,o);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(c=(u<3?n(c):u>3?n(t,r,c):n(t,r))||c);return u>3&&c&&Object.defineProperty(t,r,c),c};Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),u=r(3),c=r(2),i=r(5),s=r(4),a=function(){function e(){}return t=e,e.forRoot=function(){return{ngModule:t,providers:[s.DebugService,{provide:u.HTTP_INTERCEPTORS,useClass:c.RequestHandlerService,multi:!0}]}},e=t=o([n.NgModule({declarations:[],providers:[i.CoreService],bootstrap:[]})],e);var t}();t.DebugToolModule=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r(4);t.DebugService=o.DebugService;var n=r(9);t.DebugToolModule=n.DebugToolModule;var u=r(2);t.RequestHandlerService=u.RequestHandlerService;var c=r(1);t.DebugInfo=c.DebugInfo}])}); | ||
| //# sourceMappingURL=debugtool.umd.min.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["webpack://@gsp-cmp/debugtool.umd.min/webpack/universalModuleDefinition","webpack://@gsp-cmp/debugtool.umd.min/webpack/bootstrap","webpack://@gsp-cmp/debugtool.umd.min/external \"@angular/core\"","webpack://@gsp-cmp/debugtool.umd.min/./.tmp/debugtool/entity/debug-info.ts","webpack://@gsp-cmp/debugtool.umd.min/./.tmp/debugtool/service/request-handler.service.ts","webpack://@gsp-cmp/debugtool.umd.min/external \"@angular/common/http\"","webpack://@gsp-cmp/debugtool.umd.min/./.tmp/debugtool/service/debug.service.ts","webpack://@gsp-cmp/debugtool.umd.min/./.tmp/debugtool/service/core.service.ts","webpack://@gsp-cmp/debugtool.umd.min/external \"rxjs/operators\"","webpack://@gsp-cmp/debugtool.umd.min/external \"rxjs/observable/ErrorObservable\"","webpack://@gsp-cmp/debugtool.umd.min/external \"rxjs/Observable\"","webpack://@gsp-cmp/debugtool.umd.min/./.tmp/debugtool/debugtool.module.ts","webpack://@gsp-cmp/debugtool.umd.min/./.tmp/index.ts"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","__WEBPACK_EXTERNAL_MODULE__3__","__WEBPACK_EXTERNAL_MODULE__6__","__WEBPACK_EXTERNAL_MODULE__7__","__WEBPACK_EXTERNAL_MODULE__8__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","DebugInfo","core_1","http_1","Observable_1","ErrorObservable_1","operators_1","debug_info_1","RequestHandlerService","core","this","intercept","req","next","_this","getDebugMode","debugHeaders","headers","append","clone","req_started","Date","now","handle","pipe","map","event","HttpResponse","handleData","catchError","res","ErrorObservable","create","startTime","debugInfo","keys","debugUrl","url","DebugTraceId","duration","setDebugId","Observable","observer","__decorate","Injectable","DebugService","openDebugMode","stateChange","closeDebugMode","result","getDebugIds","flushDebugIds","CoreService","debugModeOn","debugIds","push","request_handler_service_1","core_service_1","debug_service_1","DebugToolModule","forRoot","ngModule","DebugToolModule_1","providers","provide","HTTP_INTERCEPTORS","useClass","multi","NgModule","declarations","bootstrap","debugtool_module_1"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,iBAAAA,QAAA,wBAAAA,QAAA,kBAAAA,QAAA,mCAAAA,QAAA,oBACA,mBAAAC,eAAAC,IACAD,QAAA,6GAAAJ,GACA,iBAAAC,QACAA,QAAA,8BAAAD,EAAAG,QAAA,iBAAAA,QAAA,wBAAAA,QAAA,kBAAAA,QAAA,mCAAAA,QAAA,oBAEAJ,EAAA,8BAAAC,EAAAD,EAAA,iBAAAA,EAAA,wBAAAA,EAAA,kBAAAA,EAAA,mCAAAA,EAAA,oBARA,CASCO,OAAA,SAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAb,QAGA,IAAAC,EAAAU,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAf,YAUA,OANAgB,EAAAH,GAAAI,KAAAhB,EAAAD,QAAAC,IAAAD,QAAAY,GAGAX,EAAAc,GAAA,EAGAd,EAAAD,QA2CA,OAtCAY,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAApB,EAAAqB,EAAAC,GACAV,EAAAW,EAAAvB,EAAAqB,IACAG,OAAAC,eAAAzB,EAAAqB,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAi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kF,EAAAlF,EAAA,GACAmF,EAAAnF,EAAA,GACAoF,EAAApF,EAAA,GAWAqF,EAAA,oBAAAA,KAUA,SAVaA,EACJA,EAAAC,QAAP,WACE,OACEC,SAASC,EACTC,WACEL,EAAAb,cACCmB,QAAQ7D,EAAA8D,kBAAkBC,SAASV,EAAAhD,sBAAsB2D,OAAM,MAN3DR,EAAeG,EAAAnB,GAR3BzC,EAAAkE,UACCC,gBAEAN,WACEN,EAAAL,aAEFkB,gBAEWX,SAAb,GAAajG,EAAAiG,iGCfb,IAAAD,EAAApF,EAAA,GAASZ,EAAAmF,aAAAa,EAAAb,aACT,IAAA0B,EAAAjG,EAAA,GAASZ,EAAAiG,gBAAAY,EAAAZ,gBACT,IAAAH,EAAAlF,EAAA,GAASZ,EAAA8C,sBAAAgD,EAAAhD,sBACT,IAAAD,EAAAjC,EAAA,GAASZ,EAAAuC,UAAAM,EAAAN","file":"@gsp-cmp/debugtool.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@angular/core\"), require(\"@angular/common/http\"), require(\"rxjs/operators\"), require(\"rxjs/observable/ErrorObservable\"), require(\"rxjs/Observable\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@angular/core\", \"@angular/common/http\", \"rxjs/operators\", \"rxjs/observable/ErrorObservable\", \"rxjs/Observable\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@gsp-cmp/debugtool.umd.min\"] = factory(require(\"@angular/core\"), require(\"@angular/common/http\"), require(\"rxjs/operators\"), require(\"rxjs/observable/ErrorObservable\"), require(\"rxjs/Observable\"));\n\telse\n\t\troot[\"@gsp-cmp/debugtool.umd.min\"] = factory(root[\"@angular/core\"], root[\"@angular/common/http\"], root[\"rxjs/operators\"], root[\"rxjs/observable/ErrorObservable\"], root[\"rxjs/Observable\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__8__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","\r\n/**\r\n * Debug信息实体类\r\n */\r\nexport class DebugInfo{\r\n //调试Url\r\n debugUrl:string;\r\n //本次调试的调用 Id\r\n DebugTraceId:string\r\n //本次调用耗时\r\n duration:number\r\n}","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse, HttpErrorResponse, HttpHeaders } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs/Observable\";\r\nimport { ErrorObservable } from 'rxjs/observable/ErrorObservable';\r\nimport { catchError, map } from 'rxjs/operators';\r\nimport { CoreService } from './core.service';\r\nimport { DebugInfo } from '../entity/debug-info';\r\n\r\n@Injectable()\r\nexport class RequestHandlerService implements HttpInterceptor {\r\n\r\n constructor(private core: CoreService){ }\r\n\r\n intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n //开启调试模式的情况下,增加debug参数\r\n if (this.core.getDebugMode()) {\r\n let debugHeaders: HttpHeaders = req.headers.append('isdebug', '1');\r\n req = req.clone({\r\n headers: debugHeaders\r\n });\r\n }\r\n const req_started = Date.now();\r\n\r\n return next.handle(req).pipe(\r\n map((event: HttpEvent<any>) => {\r\n if (event instanceof HttpResponse) {\r\n this.handleData(event, req_started);\r\n }\r\n return event;\r\n }),\r\n //失败请求的处理\r\n catchError((res: HttpResponse<any>) => {\r\n this.handleData(res, req_started);\r\n return ErrorObservable.create(event);\r\n })\r\n );\r\n\r\n }\r\n\r\n\r\n /**\r\n * 对返回的数据进行处理\r\n * @param event \r\n */\r\n private handleData(\r\n event: HttpResponse<any> | HttpErrorResponse,\r\n startTime: number\r\n ): Observable<any> {\r\n // 业务处理:一些通用操作\r\n if (event instanceof HttpResponse) {\r\n if(this.core.getDebugMode()){\r\n let debugInfo:DebugInfo=new DebugInfo();\r\n let headers=event.headers.keys();\r\n debugInfo.debugUrl=event.url;\r\n debugInfo.DebugTraceId=event.headers.get(\"DebugTraceId\");\r\n debugInfo.duration=Date.now()-startTime;\r\n this.core.setDebugId(debugInfo);\r\n // alert(\"请求次数+1\");\r\n }\r\n }\r\n return Observable.create(observer => observer.next(event));\r\n }\r\n\r\n}","module.exports = __WEBPACK_EXTERNAL_MODULE__3__;","import { Injectable } from '@angular/core';\r\nimport { DebugInfo } from '../entity/debug-info';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable()\r\n\r\n/**\r\n * 调试服务,可开启、关闭调试模式\r\n */\r\nexport class DebugService {\r\n constructor(private core:CoreService ){}\r\n\r\n /**\r\n * 开启调试模式\r\n */\r\n openDebugMode(){\r\n this.core.stateChange(true);\r\n }\r\n\r\n /**\r\n * 关闭调试模式,并获取期间的调试信息\r\n */\r\n closeDebugMode():DebugInfo[]{\r\n this.core.stateChange(false);\r\n let result:DebugInfo[]=this.core.getDebugIds();\r\n this.core.flushDebugIds();\r\n return result;\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { DebugInfo } from '../entity/debug-info';\r\n\r\n@Injectable()\r\n\r\n/**\r\n * 调试器核心服务\r\n */\r\nexport class CoreService {\r\n\r\n //存储全局变量,是否开启了调试模式\r\n private debugModeOn: boolean = false;\r\n\r\n //存储全局变量,每个调用链的id集合\r\n private debugIds:Array<DebugInfo>=[];\r\n\r\n /**\r\n * 调试模式发生变化,改变全局变量\r\n * @param debugModeOn 是否开启调试模式\r\n */\r\n stateChange(debugModeOn: boolean) {\r\n this.debugModeOn = debugModeOn;\r\n }\r\n\r\n /**\r\n * 获取全局内是否开启了调试模式\r\n */\r\n getDebugMode(): boolean {\r\n return this.debugModeOn;\r\n }\r\n\r\n /**\r\n * 增加一个debugId\r\n * @param debugId \r\n */\r\n setDebugId(debugInfo:DebugInfo){\r\n this.debugIds.push(debugInfo);\r\n }\r\n\r\n\r\n /**\r\n * 获取所有的DebugId列表\r\n */\r\n getDebugIds(){\r\n return this.debugIds;\r\n }\r\n\r\n /**\r\n * 一个调试周期结束,清空debugIds\r\n */\r\n flushDebugIds(){\r\n this.debugIds=[];\r\n }\r\n\r\n\r\n}","module.exports = __WEBPACK_EXTERNAL_MODULE__6__;","module.exports = __WEBPACK_EXTERNAL_MODULE__7__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8__;","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';\nimport { RequestHandlerService } from './service/request-handler.service';\nimport { CoreService } from './service/core.service';\nimport { DebugService } from './service/debug.service';\n\n\n@NgModule({\n declarations: [\n ],\n providers: [\n CoreService\n ],\n bootstrap: []\n})\nexport class DebugToolModule { \n static forRoot(): ModuleWithProviders{\n return {\n ngModule:DebugToolModule,\n providers:[\n DebugService,\n {provide:HTTP_INTERCEPTORS,useClass:RequestHandlerService,multi:true}\n ]\n }\n }\n}\n","export { DebugService } from './debugtool/service/debug.service'\r\nexport { DebugToolModule } from './debugtool/debugtool.module'\r\nexport { RequestHandlerService } from './debugtool/service/request-handler.service'\r\nexport { DebugInfo } from './debugtool/entity/debug-info'"],"sourceRoot":""} | ||
| {"version":3,"sources":["webpack://@gsp-cmp/debugtool.umd.min/webpack/universalModuleDefinition","webpack://@gsp-cmp/debugtool.umd.min/webpack/bootstrap","webpack://@gsp-cmp/debugtool.umd.min/external \"@angular/core\"","webpack://@gsp-cmp/debugtool.umd.min/./.tmp/debugtool/entity/debug-info.ts","webpack://@gsp-cmp/debugtool.umd.min/./.tmp/debugtool/service/request-handler.service.ts","webpack://@gsp-cmp/debugtool.umd.min/external \"@angular/common/http\"","webpack://@gsp-cmp/debugtool.umd.min/./.tmp/debugtool/service/debug.service.ts","webpack://@gsp-cmp/debugtool.umd.min/./.tmp/debugtool/service/core.service.ts","webpack://@gsp-cmp/debugtool.umd.min/external \"rxjs/operators\"","webpack://@gsp-cmp/debugtool.umd.min/external \"rxjs/observable/ErrorObservable\"","webpack://@gsp-cmp/debugtool.umd.min/external \"rxjs/Observable\"","webpack://@gsp-cmp/debugtool.umd.min/./.tmp/debugtool/debugtool.module.ts","webpack://@gsp-cmp/debugtool.umd.min/./.tmp/index.ts"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","__WEBPACK_EXTERNAL_MODULE__3__","__WEBPACK_EXTERNAL_MODULE__6__","__WEBPACK_EXTERNAL_MODULE__7__","__WEBPACK_EXTERNAL_MODULE__8__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","DebugInfo","core_1","http_1","Observable_1","ErrorObservable_1","operators_1","debug_info_1","RequestHandlerService","core","this","intercept","req","next","_this","getDebugMode","debugHeaders","headers","append","clone","req_started","Date","now","handle","pipe","map","event","HttpResponse","handleData","catchError","res","ErrorObservable","create","startTime","debugInfo","keys","start","debugUrl","url","DebugTraceId","duration","setDebugId","Observable","observer","__decorate","Injectable","DebugService","openDebugMode","stateChange","closeDebugMode","result","getDebugIds","flushDebugIds","CoreService","debugModeOn","debugIds","push","request_handler_service_1","core_service_1","debug_service_1","DebugToolModule","forRoot","ngModule","DebugToolModule_1","providers","provide","HTTP_INTERCEPTORS","useClass","multi","NgModule","declarations","bootstrap","debugtool_module_1"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,iBAAAA,QAAA,wBAAAA,QAAA,kBAAAA,QAAA,mCAAAA,QAAA,oBACA,mBAAAC,eAAAC,IACAD,QAAA,6GAAAJ,GACA,iBAAAC,QACAA,QAAA,8BAAAD,EAAAG,QAAA,iBAAAA,QAAA,wBAAAA,QAAA,kBAAAA,QAAA,mCAAAA,QAAA,oBAEAJ,EAAA,8BAAAC,EAAAD,EAAA,iBAAAA,EAAA,wBAAAA,EAAA,kBAAAA,EAAA,mCAAAA,EAAA,oBARA,CASCO,OAAA,SAAAC,EAAAC,EAAAC,EAAAC,EAAAC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,OAnCIF,EAAAxD,UAAAmD,YAAA,SAAYM,GACR5C,KAAK4C,YAAcA,GAMvBD,EAAAxD,UAAAkB,aAAA,WACI,OAAOL,KAAK4C,aAOhBD,EAAAxD,UAAA4C,WAAA,SAAWP,GACPxB,KAAK6C,SAASC,KAAKtB,IAOvBmB,EAAAxD,UAAAsD,YAAA,WACI,OAAOzC,KAAK6C,UAMhBF,EAAAxD,UAAAuD,cAAA,WACI1C,KAAK6C,aA3CAF,EAAWT,GALvB1C,EAAA2C,cAKYQ,GAAb,GAAa3F,EAAA2F,6BCRb1F,EAAAD,QAAAQ,iBCAAP,EAAAD,QAAAS,iBCAAR,EAAAD,QAAAU,kbCAA,IAAA8B,EAAA5B,EAAA,GACA6B,EAAA7B,EAAA,GACAmF,EAAAnF,EAAA,GACAoF,EAAApF,EAAA,GACAqF,EAAArF,EAAA,GAWAsF,EAAA,oBAAAA,KAUA,SAVaA,EACJA,EAAAC,QAAP,WACE,OACEC,SAASC,EACTC,WACEL,EAAAb,cACCmB,QAAQ9D,EAAA+D,kBAAkBC,SAASV,EAAAjD,sBAAsB4D,OAAM,MAN3DR,EAAeG,EAAAnB,GAR3B1C,EAAAmE,UACCC,gBAEAN,WACEN,EAAAL,aAEFkB,gBAEWX,SAAb,GAAalG,EAAAkG,iGCfb,IAAAD,EAAArF,EAAA,GAASZ,EAAAoF,aAAAa,EAAAb,aACT,IAAA0B,EAAAlG,EAAA,GAASZ,EAAAkG,gBAAAY,EAAAZ,gBACT,IAAAH,EAAAnF,EAAA,GAASZ,EAAA8C,sBAAAiD,EAAAjD,sBACT,IAAAD,EAAAjC,EAAA,GAASZ,EAAAuC,UAAAM,EAAAN","file":"@gsp-cmp/debugtool.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@angular/core\"), require(\"@angular/common/http\"), require(\"rxjs/operators\"), require(\"rxjs/observable/ErrorObservable\"), require(\"rxjs/Observable\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@angular/core\", \"@angular/common/http\", \"rxjs/operators\", \"rxjs/observable/ErrorObservable\", \"rxjs/Observable\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@gsp-cmp/debugtool.umd.min\"] = factory(require(\"@angular/core\"), require(\"@angular/common/http\"), require(\"rxjs/operators\"), require(\"rxjs/observable/ErrorObservable\"), require(\"rxjs/Observable\"));\n\telse\n\t\troot[\"@gsp-cmp/debugtool.umd.min\"] = factory(root[\"@angular/core\"], root[\"@angular/common/http\"], root[\"rxjs/operators\"], root[\"rxjs/observable/ErrorObservable\"], root[\"rxjs/Observable\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__8__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","\r\n/**\r\n * Debug信息实体类\r\n */\r\nexport class DebugInfo{\r\n //调试Url\r\n debugUrl:string;\r\n //本次调试的调用 Id\r\n DebugTraceId:string\r\n //本次调用耗时\r\n duration:number;\r\n start:number;\r\n}","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse, HttpErrorResponse, HttpHeaders } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs/Observable\";\r\nimport { ErrorObservable } from 'rxjs/observable/ErrorObservable';\r\nimport { catchError, map } from 'rxjs/operators';\r\nimport { CoreService } from './core.service';\r\nimport { DebugInfo } from '../entity/debug-info';\r\n\r\n@Injectable()\r\nexport class RequestHandlerService implements HttpInterceptor {\r\n\r\n constructor(private core: CoreService){ }\r\n\r\n intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n //开启调试模式的情况下,增加debug参数\r\n if (this.core.getDebugMode()) {\r\n let debugHeaders: HttpHeaders = req.headers.append('isdebug', '1');\r\n req = req.clone({\r\n headers: debugHeaders\r\n });\r\n }\r\n const req_started = Date.now();\r\n\r\n return next.handle(req).pipe(\r\n map((event: HttpEvent<any>) => {\r\n if (event instanceof HttpResponse) {\r\n this.handleData(event, req_started);\r\n }\r\n return event;\r\n }),\r\n //失败请求的处理\r\n catchError((res: HttpResponse<any>) => {\r\n this.handleData(res, req_started);\r\n return ErrorObservable.create(event);\r\n })\r\n );\r\n\r\n }\r\n\r\n\r\n /**\r\n * 对返回的数据进行处理\r\n * @param event \r\n */\r\n private handleData(\r\n event: HttpResponse<any> | HttpErrorResponse,\r\n startTime: number\r\n ): Observable<any> {\r\n // 业务处理:一些通用操作\r\n if (event instanceof HttpResponse) {\r\n if(this.core.getDebugMode()){\r\n let debugInfo:DebugInfo=new DebugInfo();\r\n let headers=event.headers.keys();\r\n debugInfo.start=startTime;\r\n debugInfo.debugUrl=event.url;\r\n debugInfo.DebugTraceId=event.headers.get(\"DebugTraceId\");\r\n debugInfo.duration=Date.now()-startTime;\r\n this.core.setDebugId(debugInfo);\r\n // alert(\"请求次数+1\");\r\n }\r\n }\r\n return Observable.create(observer => observer.next(event));\r\n }\r\n\r\n}","module.exports = __WEBPACK_EXTERNAL_MODULE__3__;","import { Injectable } from '@angular/core';\r\nimport { DebugInfo } from '../entity/debug-info';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable()\r\n\r\n/**\r\n * 调试服务,可开启、关闭调试模式\r\n */\r\nexport class DebugService {\r\n constructor(private core:CoreService ){}\r\n\r\n /**\r\n * 开启调试模式\r\n */\r\n openDebugMode(){\r\n this.core.stateChange(true);\r\n }\r\n\r\n /**\r\n * 关闭调试模式,并获取期间的调试信息\r\n */\r\n closeDebugMode():DebugInfo[]{\r\n this.core.stateChange(false);\r\n let result:DebugInfo[]=this.core.getDebugIds();\r\n this.core.flushDebugIds();\r\n return result;\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { DebugInfo } from '../entity/debug-info';\r\n\r\n@Injectable()\r\n\r\n/**\r\n * 调试器核心服务\r\n */\r\nexport class CoreService {\r\n\r\n //存储全局变量,是否开启了调试模式\r\n private debugModeOn: boolean = false;\r\n\r\n //存储全局变量,每个调用链的id集合\r\n private debugIds:Array<DebugInfo>=[];\r\n\r\n /**\r\n * 调试模式发生变化,改变全局变量\r\n * @param debugModeOn 是否开启调试模式\r\n */\r\n stateChange(debugModeOn: boolean) {\r\n this.debugModeOn = debugModeOn;\r\n }\r\n\r\n /**\r\n * 获取全局内是否开启了调试模式\r\n */\r\n getDebugMode(): boolean {\r\n return this.debugModeOn;\r\n }\r\n\r\n /**\r\n * 增加一个debugId\r\n * @param debugId \r\n */\r\n setDebugId(debugInfo:DebugInfo){\r\n this.debugIds.push(debugInfo);\r\n }\r\n\r\n\r\n /**\r\n * 获取所有的DebugId列表\r\n */\r\n getDebugIds(){\r\n return this.debugIds;\r\n }\r\n\r\n /**\r\n * 一个调试周期结束,清空debugIds\r\n */\r\n flushDebugIds(){\r\n this.debugIds=[];\r\n }\r\n\r\n\r\n}","module.exports = __WEBPACK_EXTERNAL_MODULE__6__;","module.exports = __WEBPACK_EXTERNAL_MODULE__7__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8__;","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';\nimport { RequestHandlerService } from './service/request-handler.service';\nimport { CoreService } from './service/core.service';\nimport { DebugService } from './service/debug.service';\n\n\n@NgModule({\n declarations: [\n ],\n providers: [\n CoreService\n ],\n bootstrap: []\n})\nexport class DebugToolModule { \n static forRoot(): ModuleWithProviders{\n return {\n ngModule:DebugToolModule,\n providers:[\n DebugService,\n {provide:HTTP_INTERCEPTORS,useClass:RequestHandlerService,multi:true}\n ]\n }\n }\n}\n","export { DebugService } from './debugtool/service/debug.service'\r\nexport { DebugToolModule } from './debugtool/debugtool.module'\r\nexport { RequestHandlerService } from './debugtool/service/request-handler.service'\r\nexport { DebugInfo } from './debugtool/entity/debug-info'"],"sourceRoot":""} |
@@ -8,2 +8,3 @@ /** | ||
| duration: number; | ||
| start: number; | ||
| } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"debug-info.js","sourceRoot":"","sources":["../../../.tmp/debugtool/entity/debug-info.ts"],"names":[],"mappings":";;;;;AAIA;;;AAAA;;;oBAJA;IAWC,CAAA;AAPY,8BAAS"} | ||
| {"version":3,"file":"debug-info.js","sourceRoot":"","sources":["../../../.tmp/debugtool/entity/debug-info.ts"],"names":[],"mappings":";;;;;AAIA;;;AAAA;;;oBAJA;IAYC,CAAA;AARY,8BAAS"} |
@@ -55,2 +55,3 @@ "use strict"; | ||
| var headers = event.headers.keys(); | ||
| debugInfo.start = startTime; | ||
| debugInfo.debugUrl = event.url; | ||
@@ -57,0 +58,0 @@ debugInfo.DebugTraceId = event.headers.get("DebugTraceId"); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"request-handler.service.js","sourceRoot":"","sources":["../../../.tmp/debugtool/service/request-handler.service.ts"],"names":[],"mappings":";;AAAA,sCAA2C;AAC3C,6CAA0I;AAC1I,8CAA6C;AAC7C,mEAAkE;AAClE,4CAAiD;AACjD,+CAA6C;AAC7C,mDAAiD;;IAK/C,+BAAoB,IAAiB;QAAjB,SAAI,GAAJ,IAAI,CAAa;KAAI;IAEzC,yCAAS,GAAT,UAAU,GAAqB,EAAE,IAAiB;QAAlD,iBAwBC;;QAtBC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;YAC7B,IAAI,YAAY,GAAgB,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;YACnE,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC;gBACd,OAAO,EAAE,YAAY;aACtB,CAAC,CAAC;SACJ;QACD,IAAM,WAAW,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE/B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAC1B,eAAG,CAAC,UAAC,KAAqB;YACxB,EAAE,CAAC,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