Files
developer-roadmap/_next/static/chunks/pages/[roadmap]/interactive-0976535f2226cf8d.js

1 line
11 KiB
JavaScript
Raw Normal View History

2021-12-02 16:45:03 +00:00
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[526],{7718:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[roadmap]/interactive",function(){return n(6122)}])},1524:function(e,t,n){"use strict";n.d(t,{m:function(){return i}});var r=n(5893),o=n(8527);n(7294);function i(e){var t=e.title,n=e.subtitle,i=e.children,a=e.beforeTitle,c=void 0===a?null:a;return(0,r.jsxs)(o.xu,{pt:["25px","20px","45px"],pb:["20px","15px","30px"],borderBottomWidth:1,mb:"30px",children:[(0,r.jsxs)(o.W2,{maxW:"container.md",position:"relative",children:[c,(0,r.jsx)(o.X6,{as:"h1",color:"black",fontSize:["28px","33px","40px"],fontWeight:700,mb:["2px","2px","5px"],children:t}),(0,r.jsx)(o.xv,{fontSize:["13px","14px","15px"],children:n})]}),i&&(0,r.jsx)(o.W2,{maxW:"container.md",children:i})]})}},6122:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return E},default:function(){return P}});var r=n(5893),o=n(8527),i=n(6723),a=n(9876),c=n(2438),l=n(1832),s=n(600),u=n(6673),d=n(1524),p=n(202),f=n(7294),v=n(8520),x=n.n(v);function h(e,t,n){var r=void 0===t?{}:t,o=document.createElementNS("http://www.w3.org/2000/svg",e);for(var i in r)r.hasOwnProperty(i)&&o.setAttribute(i,r[i]);return n&&n.appendChild(o),o}var y=2.7,m={black:["#000"],gray:["#000","#333","#666","#999","#ccc","#ddd","#eee"],white:["#fff"],red:["#cf2a27","#ea9999","#eo6666","#cc0000","#990000","#660000"],orange:["#ff9900","#f9cb9c","#f6b26b","#e69138","#b45f06","#783f04"],yellow:["#ffff00","#ffe599","#ffd966","#f1c232","#bf9000","#7f6000"],green:["#009e0f","#b6d7a8","#93c47d","#6aa84f","#38761d","#274e13"],cyan:["#00ffff","#a2c4c9","#76a5af","#45818e","#134f5c","#0c343d"],blue:["#2b78e4","#9fc5f8","#6fa8dc","#597eaa","#085394","#073763"],purple:["#9900ff","#b4a7d6","#8e7cc3","#674ea7","#351c75","#20124d"],pink:["#ff00ff","#d5a6bd","#c27ba0","#a64d79","#741b47","#4c1130"]};function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){o=!0,i=l}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var g=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.svgRoot=t,this.fontFamily=n,this.canvasRenderingContext2D=document.createElement("canvas").getContext("2d")}var t,n,r;return t=e,(n=[{key:"render",value:function(e,t){var n=e.typeID;n in this?this[n](e,t):console.log("'".concat(n,"' control type not implemented"))}},{key:"parseColor",value:function(e,t){return void 0===e?"rgb(".concat(t,")"):function(e){var t=e>>8&255,n=255&e;return"rgb(".concat(e>>16&255,",").concat(t,",").concat(n,")")}(e)}},{key:"parseFontProperties",value:function(e){var t,n,r;return{style:(null===(t=e.properties)||void 0===t?void 0:t.italic)?"italic":"normal",weight:(null===(n=e.properties)||void 0===n?void 0:n.bold)?"bold":"normal",size:(null===(r=e.properties)||void 0===r?void 0:r.size)?e.properties.size+"px":"13px",family:this.fontFamily}}},{key:"measureText",value:function(e,t){return this.canvasRenderingContext2D.font=t,this.canvasRenderingContext2D.measureText(e)}},{key:"drawRectangle",value:function(e,t){var n,r,o,i,a,c;h("rect",{x:parseInt(e.x)+1.35,y:parseInt(e.y)+1.35,width:parseInt(null!==(i=e.w)&&void 0!==i?i:e.measuredW)-y,height:parseInt(null!==(a=e.h)&&void 0!==a?a:e.measuredH)-y,rx:2,fill:this.parseColor(null===(n=e.properties)||void 0===n?void 0:n.color,"255,255,255"),"fill-opacity":null!==(c=null===(r=e.properties)||void 0===r?void 0:r.backgroundAlpha)&&void 0!==c?c:1,stroke:this.parseColor(null===(o=e.properties)||void 0===o?void 0:o.borde