1 |
- {"ast":null,"code":"\"use strict\";\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SVGmtd = void 0;\nvar Wrapper_js_1 = require(\"../Wrapper.js\");\nvar mtd_js_1 = require(\"../../common/Wrappers/mtd.js\");\nvar mtd_js_2 = require(\"../../../core/MmlTree/MmlNodes/mtd.js\");\nvar SVGmtd = function (_super) {\n __extends(SVGmtd, _super);\n function SVGmtd() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SVGmtd.prototype.placeCell = function (x, y, W, H, D) {\n var bbox = this.getBBox();\n var h = Math.max(bbox.h, .75);\n var d = Math.max(bbox.d, .25);\n var calign = this.node.attributes.get('columnalign');\n var ralign = this.node.attributes.get('rowalign');\n var alignX = this.getAlignX(W, bbox, calign);\n var alignY = this.getAlignY(H, D, h, d, ralign);\n this.place(x + alignX, y + alignY);\n return [alignX, alignY];\n };\n SVGmtd.prototype.placeColor = function (x, y, W, H) {\n var adaptor = this.adaptor;\n var child = this.firstChild();\n if (child && adaptor.kind(child) === 'rect' && adaptor.getAttribute(child, 'data-bgcolor')) {\n adaptor.setAttribute(child, 'x', this.fixed(x));\n adaptor.setAttribute(child, 'y', this.fixed(y));\n adaptor.setAttribute(child, 'width', this.fixed(W));\n adaptor.setAttribute(child, 'height', this.fixed(H));\n }\n };\n SVGmtd.kind = mtd_js_2.MmlMtd.prototype.kind;\n return SVGmtd;\n}((0, mtd_js_1.CommonMtdMixin)(Wrapper_js_1.SVGWrapper));\nexports.SVGmtd = SVGmtd;","map":{"version":3,"names":["__extends","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","TypeError","String","__","constructor","create","defineProperty","exports","value","SVGmtd","Wrapper_js_1","require","mtd_js_1","mtd_js_2","_super","apply","arguments","placeCell","x","y","W","H","D","bbox","getBBox","h","Math","max","calign","node","attributes","get","ralign","alignX","getAlignX","alignY","getAlignY","place","placeColor","adaptor","child","firstChild","kind","getAttribute","setAttribute","fixed","MmlMtd","CommonMtdMixin","SVGWrapper"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/mathjax-full/js/output/svg/Wrappers/mtd.js"],"sourcesContent":["\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SVGmtd = void 0;\nvar Wrapper_js_1 = require(\"../Wrapper.js\");\nvar mtd_js_1 = require(\"../../common/Wrappers/mtd.js\");\nvar mtd_js_2 = require(\"../../../core/MmlTree/MmlNodes/mtd.js\");\nvar SVGmtd = (function (_super) {\n __extends(SVGmtd, _super);\n function SVGmtd() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SVGmtd.prototype.placeCell = function (x, y, W, H, D) {\n var bbox = this.getBBox();\n var h = Math.max(bbox.h, .75);\n var d = Math.max(bbox.d, .25);\n var calign = this.node.attributes.get('columnalign');\n var ralign = this.node.attributes.get('rowalign');\n var alignX = this.getAlignX(W, bbox, calign);\n var alignY = this.getAlignY(H, D, h, d, ralign);\n this.place(x + alignX, y + alignY);\n return [alignX, alignY];\n };\n SVGmtd.prototype.placeColor = function (x, y, W, H) {\n var adaptor = this.adaptor;\n var child = this.firstChild();\n if (child && adaptor.kind(child) === 'rect' && adaptor.getAttribute(child, 'data-bgcolor')) {\n adaptor.setAttribute(child, 'x', this.fixed(x));\n adaptor.setAttribute(child, 'y', this.fixed(y));\n adaptor.setAttribute(child, 'width', this.fixed(W));\n adaptor.setAttribute(child, 'height', this.fixed(H));\n }\n };\n SVGmtd.kind = mtd_js_2.MmlMtd.prototype.kind;\n return SVGmtd;\n}((0, mtd_js_1.CommonMtdMixin)(Wrapper_js_1.SVGWrapper)));\nexports.SVGmtd = SVGmtd;\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAI,IAAI,IAAI,IAAI,CAACA,SAAS,IAAM,YAAY;EACrD,IAAIC,aAAa,GAAG,SAAAA,CAAUC,CAAC,EAAEC,CAAC,EAAE;IAChCF,aAAa,GAAGG,MAAM,CAACC,cAAc,IAChC;MAAEC,SAAS,EAAE;IAAG,CAAC,YAAYC,KAAK,IAAI,UAAUL,CAAC,EAAEC,CAAC,EAAE;MAAED,CAAC,CAACI,SAAS,GAAGH,CAAC;IAAE,CAAE,IAC5E,UAAUD,CAAC,EAAEC,CAAC,EAAE;MAAE,KAAK,IAAIK,CAAC,IAAIL,CAAC,EAAE,IAAIC,MAAM,CAACK,SAAS,CAACC,cAAc,CAACC,IAAI,CAACR,CAAC,EAAEK,CAAC,CAAC,EAAEN,CAAC,CAACM,CAAC,CAAC,GAAGL,CAAC,CAACK,CAAC,CAAC;IAAE,CAAC;IACrG,OAAOP,aAAa,CAACC,CAAC,EAAEC,CAAC,CAAC;EAC9B,CAAC;EACD,OAAO,UAAUD,CAAC,EAAEC,CAAC,EAAE;IACnB,IAAI,OAAOA,C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