Files
developer-roadmap/_next/static/chunks/pages/[roadmap]/interactive-02c87bde8a0bf469.js
Kamran Ahmed 3af2b39d8b Updates
2021-12-04 19:29:32 +00:00

1 line
15 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[526],{7718:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[roadmap]/interactive",function(){return t(4498)}])},1524:function(e,n,t){"use strict";t.d(n,{m:function(){return i}});var o=t(5893),r=t(8527);t(7294);function i(e){var n=e.title,t=e.subtitle,i=e.children,a=e.beforeTitle,c=void 0===a?null:a;return(0,o.jsxs)(r.xu,{pt:["25px","20px","45px"],pb:["20px","15px","30px"],borderBottomWidth:1,mb:"30px",children:[(0,o.jsxs)(r.W2,{maxW:"container.md",position:"relative",children:[c,(0,o.jsx)(r.X6,{as:"h1",color:"black",fontSize:["28px","33px","40px"],fontWeight:700,mb:["2px","2px","5px"],children:n}),(0,o.jsx)(r.xv,{fontSize:["13px","14px","15px"],children:t})]}),i&&(0,o.jsx)(r.W2,{maxW:"container.md",children:i})]})}},4866:function(e,n,t){"use strict";t.d(n,{v:function(){return c}});var o=t(5893),r=t(8527),i=t(8641),a=t(5657);t(7294);function c(){return(0,o.jsxs)(r.xv,{_hover:{textDecoration:"none",color:"blue.700","& .new-badge":{bg:"blue.700"}},as:r.rU,href:i.url.youtube,d:"block",target:"_blank",color:"red.700",fontSize:"sm",mb:"10px",fontWeight:500,onClick:function(){return(0,a.B)({category:"Subscription",action:"Clicked the YouTube banner",label:"YouTube Alert on Roadmap"})},children:[(0,o.jsx)(r.Ct,{transition:"all 300ms",className:"new-badge",mr:"7px",colorScheme:"red",variant:"solid",children:"New"}),(0,o.jsx)(r.xv,{textDecoration:"underline",as:"span",d:["none","inline"],children:"Roadmap topics to be covered on our YouTube Channel"}),(0,o.jsx)(r.xv,{textDecoration:"underline",as:"span",d:["inline","none"],children:"Topic videos being made on YouTube"}),(0,o.jsx)(r.xv,{as:"span",ml:"5px",children:"\xbb"})]})}},1177:function(e,n,t){"use strict";t.d(n,{h:function(){return s}});var o=t(5893),r=t(4866),i=t(8527),a=t(6723),c=t(9876),l=t(1524);t(7294);function s(e){var n=e.roadmap;return(0,o.jsx)(l.m,{beforeTitle:(0,o.jsx)(r.v,{}),title:n.title,subtitle:n.description,children:(0,o.jsxs)(i.Kq,{mt:"20px",isInline:!0,children:[(0,o.jsxs)(a.zx,{d:["flex","flex"],as:i.rU,href:"/roadmaps",size:"xs",py:"14px",px:"10px",colorScheme:"teal",variant:"solid",_hover:{textDecoration:"none"},children:["\u2190 ",(0,o.jsx)(i.xv,{as:"span",d:["none","inline"],ml:"5px",children:"All Roadmaps"})]}),n.pdfUrl&&(0,o.jsx)(a.zx,{as:i.rU,href:n.pdfUrl,target:"_blank",size:"xs",py:"14px",px:"10px",leftIcon:(0,o.jsx)(c._8,{}),colorScheme:"yellow",variant:"solid",_hover:{textDecoration:"none"},children:"Download"}),(0,o.jsx)(a.zx,{as:i.rU,href:"/signup",size:"xs",py:"14px",px:"10px",leftIcon:(0,o.jsx)(c.Km,{}),colorScheme:"yellow",variant:"solid",_hover:{textDecoration:"none"},children:"Subscribe"})]})})}},3626:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSG:function(){return x},default:function(){return h}});var o=t(5893),r=t(1739),i=t(8527),a=t(2438),c=t(1832),l=t(600),s=t(6673),u=t(8025),d=t(202),p=(t(7294),t(9876));function f(e){var n=e.roadmap,r=e.group;if(!n.contentPathsFilePath)return null;var i=n.contentPathsFilePath.replace(/^\//,""),a=(t(9280)("./".concat(i))[r]||"").replace(/^\//,""),c=t(9280)("./".concat(a)).default;return(0,o.jsx)(u.Z,{children:(0,o.jsx)(c,{})})}function v(e){var n=e.roadmap,t=e.group.split(":");return(0,o.jsxs)(r.aG,{fontWeight:"medium",fontSize:"sm",separator:(0,o.jsx)(p.XC,{color:"gray.500"}),children:[(0,o.jsx)(r.gN,{children:(0,o.jsx)(r.At,{color:"blue.500",href:"/".concat(n.id),children:n.featuredTitle})}),t.map((function(e,i){return(0,o.jsx)(r.gN,{isCurrentPage:i===t.length-1,children:(0,o.jsx)(r.At,{textTransform:"capitalize",color:"blue.500",href:"/".concat(n.id,"/").concat(t.slice(0,i+1).join(":")),children:e.split("-").join(" ")})},e)}))]})}var x=!0;function h(e){var n,t,r=e.roadmap,u=e.group,p=e.isOutlet;return void 0!==p&&p?(0,o.jsx)(f,{roadmap:r,group:u}):(0,o.jsxs)(i.xu,{bg:"white",minH:"100vh",children:[(0,o.jsx)(a.e,{}),(0,o.jsx)(d.Z,{title:(null===r||void 0===r||null===(n=r.seo)||void 0===n?void 0:n.title)||r.title,description:(null===r||void 0===r||null===(t=r.seo)||void 0===t?void 0:t.description)||r.description,keywords:(null===r||void 0===r?void 0:r.seo.keywords)||[]}),(0,o.jsxs)(i.W2,{my:"60px",maxW:"container.md",position:"relative",children:[(0,o.jsx)(v,{roadmap:r,group:u}),(0,o.jsx)(f,{roadmap:r,group:u})]}),(0,o.jsx)(c.z,{}),(0,o.jsx)(l.q,{}),(0,o.jsx)(s.$,{})]})}},4498:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSG:function(){return W},default:function(){return E}});var o=t(5893),r=t(8527),i=t(2438),a=t(1832),c=t(600),l=t(6673),s=t(202),u=t(7294),d=t(8520),p=t.n(d);function f(e,n,t){var o=void 0===n?{}:n,r=document.createElementNS("http://www.w3.org/2000/svg",e);for(var i in o)o.hasOwnProperty(i)&&r.setAttribute(i,o[i]);return t&&t.appendChild(r),r}var v=2.7,x={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 h(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function m(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function y(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=[],o=!0,r=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(o=(a=c.next()).done)&&(t.push(a.value),!n||t.length!==n);o=!0);}catch(l){r=!0,i=l}finally{try{o||null==c.return||c.return()}finally{if(r)throw i}}return t}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var b=function(){function e(n,t){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.svgRoot=n,this.fontFamily=t,this.canvasRenderingContext2D=document.createElement("canvas").getContext("2d")}var n,t,o;return n=e,(t=[{key:"render",value:function(e,n){var t=e.typeID;t in this?this[t](e,n):console.log("'".concat(t,"' control type not implemented"))}},{key:"parseColor",value:function(e,n){return void 0===e?"rgb(".concat(n,")"):function(e){var n=e>>8&255,t=255&e;return"rgb(".concat(e>>16&255,",").concat(n,",").concat(t,")")}(e)}},{key:"parseFontProperties",value:function(e){var n,t,o;return{style:(null===(n=e.properties)||void 0===n?void 0:n.italic)?"italic":"normal",weight:(null===(t=e.properties)||void 0===t?void 0:t.bold)?"bold":"normal",size:(null===(o=e.properties)||void 0===o?void 0:o.size)?e.properties.size+"px":"13px",family:this.fontFamily}}},{key:"measureText",value:function(e,n){return this.canvasRenderingContext2D.font=n,this.canvasRenderingContext2D.measureText(e)}},{key:"drawRectangle",value:function(e,n){var t,o,r,i,a,c;f("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)-v,height:parseInt(null!==(a=e.h)&&void 0!==a?a:e.measuredH)-v,rx:2,fill:this.parseColor(null===(t=e.properties)||void 0===t?void 0:t.color,"255,255,255"),"fill-opacity":null!==(c=null===(o=e.properties)||void 0===o?void 0:o.backgroundAlpha)&&void 0!==c?c:1,stroke:this.parseColor(null===(r=e.properties)||void 0===r?void 0:r.borderColor,"0,0,0"),"stroke-width":v},n)}},{key:"addText",value:function(e,n,t,o){var r,i,a=null!==(r=e.properties.text)&&void 0!==r?r:"",c=parseInt(e.x),l=parseInt(e.y),s=this.parseFontProperties(e),u=this.measureText(a,"".concat(s.style," ").concat(s.weight," ").concat(s.size," ").concat(s.family)),d=f("text",{x:"center"===o?c+(null!==(i=e.w)&&void 0!==i?i:e.measuredW)/2-u.width/2:c,y:l+e.measuredH/2+u.actualBoundingBoxAscent/2,fill:t,"font-style":s.style,"font-weight":s.weight,"font-size":s.size},n);a.includes("{color:")?a.split(/{color:|{color}/).forEach((function(e){if(e.includes("}")){var n=y(e.split("}"),2),t=n[0],o=n[1];if(!t.startsWith("#")){var r=parseInt(t.slice(-1));t=isNaN(r)?x[t][0]:x[t][r]}f("tspan",{fill:t},d).textContent=o}else f("tspan",{},d).textContent=e})):f("tspan",{},d).textContent=a}},{key:"TextArea",value:function(e,n){this.drawRectangle(e,n)}},{key:"Canvas",value:function(e,n){this.drawRectangle(e,n)}},{key:"Label",value:function(e,n){var t;this.addText(e,n,this.parseColor(null===(t=e.properties)||void 0===t?void 0:t.color,"0,0,0"),"left")}},{key:"TextInput",value:function(e,n){var t;this.drawRectangle(e,n),this.addText(e,n,this.parseColor(null===(t=e.properties)||void 0===t?void 0:t.textColor,"0,0,0"),"center")}},{key:"Arrow",value:function(e,n){var t,o,r,i,a=parseInt(e.x),c=parseInt(e.y),l=e.properties,s=l.p0,u=l.p1,d=l.p2;"dotted"===(null===(t=e.properties)||void 0===t?void 0:t.stroke)?i="0.8 12":"dashed"===(null===(o=e.properties)||void 0===o?void 0:o.stroke)&&(i="28 46");var p=(d.x-s.x)*u.x,v=(d.y-s.y)*u.x;f("path",{d:"M".concat(a+s.x," ").concat(c+s.y,"Q").concat(a+s.x+p+v*u.y*3.6," ").concat(c+s.y+v+-p*u.y*3.6," ").concat(a+d.x," ").concat(c+d.y),fill:"none",stroke:this.parseColor(null===(r=e.properties)||void 0===r?void 0:r.color,"0,0,0"),"stroke-width":4,"stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":i},n)}},{key:"Icon",value:function(e,n){var t,o=parseInt(e.x),r=parseInt(e.y),i=10;f("circle",{cx:o+i,cy:r+i,r:i,fill:this.parseColor(null===(t=e.properties)||void 0===t?void 0:t.color,"0,0,0")},n),"check-circle"===e.properties.icon.ID&&f("path",{d:"M".concat(o+4.5," ").concat(r+i,"L").concat(o+8.5," ").concat(r+i+4," ").concat(o+15," ").concat(r+i-2.5),fill:"none",stroke:"#fff","stroke-width":3.5,"stroke-linecap":"round","stroke-linejoin":"round"},n)}},{key:"HRule",value:function(e,n){var t,o,r,i,a,c=parseInt(e.x),l=parseInt(e.y);"dotted"===(null===(t=e.properties)||void 0===t?void 0:t.stroke)?i="0.8, 8":"dashed"===(null===(o=e.properties)||void 0===o?void 0:o.stroke)&&(i="18, 30"),f("path",{d:"M".concat(c," ").concat(l,"L").concat(c+parseInt(null!==(a=e.w)&&void 0!==a?a:e.measuredW)," ").concat(l),fill:"none",stroke:this.parseColor(null===(r=e.properties)||void 0===r?void 0:r.color,"0,0,0"),"stroke-width":v,"stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":i},n)}},{key:"__group__",value:function(e,n){var t,o=this,r=null===e||void 0===e||null===(t=e.properties)||void 0===t?void 0:t.controlName,i=f("g",function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},o=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(n){m(e,n,t[n])}))}return e}({},r?{class:"clickable-group","data-group-id":r}:{}),n);e.children.controls.control.sort((function(e,n){return e.zOrder-n.zOrder})).forEach((function(n){n.x=parseInt(n.x,10)+parseInt(e.x,10),n.y=parseInt(n.y,10)+parseInt(e.y,10),o.render(n,i)}))}}])&&h(n.prototype,t),o&&h(n,o),e}();function g(e,n,t,o,r,i,a){try{var c=e[i](a),l=c.value}catch(s){return void t(s)}c.done?n(l):Promise.resolve(l).then(o,r)}function w(e){return function(){var n=this,t=arguments;return new Promise((function(o,r){var i=e.apply(n,t);function a(e){g(i,o,r,a,c,"next",e)}function c(e){g(i,o,r,a,c,"throw",e)}a(void 0)}))}}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},o=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(n){j(e,n,t[n])}))}return e}function C(){return(C=w(p().mark((function e(n,t){var o,r,i,a,c,l,s,u,d;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(o=k({padding:5,fontFamily:"balsamiq",fontURL:"/fonts/balsamiq.woff2"},o=void 0===t?{}:t)).fontURL){e.next=7;break}return r=new FontFace(o.fontFamily,"url(".concat(o.fontURL,")")),e.next=6,r.load();case 6:document.fonts.add(r);case 7:return i=n.mockup,a=i.measuredW-i.mockupW-o.padding,c=i.measuredH-i.mockupH-o.padding,l=parseInt(i.mockupW)+2*o.padding,s=parseInt(i.mockupH)+2*o.padding,u=f("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"".concat(a," ").concat(c," ").concat(l," ").concat(s),style:"font-family: balsamiq"}),d=new b(u,o.fontFamily),i.controls.control.sort((function(e,n){return e.zOrder-n.zOrder})).forEach((function(e){d.render(e,u)})),e.abrupt("return",u);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var I=t(1177),_=t(4746),O=t(2779),z=t(3626);function P(e){var n=e.roadmap,t=e.groupId,i=e.onClose,a=void 0===i?function(){return null}:i;return t?(0,o.jsxs)(r.xu,{zIndex:99999,pos:"relative",children:[(0,o.jsx)(r.xu,{onClick:a,pos:"fixed",top:0,left:0,right:0,bottom:0,bg:"black",opacity:.4}),(0,o.jsx)(O.Z,{allowPinchZoom:!0,children:(0,o.jsxs)(r.xu,{p:"0px 30px 30px",position:"fixed",w:["100%","70%","50%"],bg:"white",top:0,right:0,bottom:0,borderLeftWidth:"1px",overflowY:"scroll",children:[(0,o.jsx)(_.P,{onClick:a,pos:"absolute",top:"20px",right:"20px",zIndex:1}),(0,o.jsx)(z.default,{isOutlet:!0,roadmap:n,group:t})]})})]}):null}var S=t(2730);function T(e){var n=e.roadmap,t=(0,S.ib)(),i=(t.loading,t.error,t.get),a=(0,u.useRef)(null),c=(0,u.useState)(null),l=c[0],s=c[1],d=(0,u.useState)(""),p=d[0],f=d[1],v=(0,u.useState)(!1),x=(v[0],v[1]);return(0,u.useEffect)((function(){i("/project/".concat(n.id,".json")).then((function(e){s(e)})).catch((function(e){console.error(e),x(!0)}))}),[i,n.id]),(0,u.useEffect)((function(){window.addEventListener("keydown",(function(e){"escape"===e.key.toLowerCase()&&f("")})),window.addEventListener("click",(function(e){var n,t,o=null===(n=null===e||void 0===e?void 0:e.target)||void 0===n?void 0:n.closest("g"),r=null===o||void 0===o||null===(t=o.dataset)||void 0===t?void 0:t.groupId;o&&r&&f(r.replace(/^\d+-/,""))}))}),[]),(0,u.useEffect)((function(){l&&function(e){return C.apply(this,arguments)}(l).then((function(e){var n=a.current;n&&(n.firstChild&&n.removeChild(n.firstChild),n.appendChild(e))})).catch((function(e){x(!0)}))}),[l]),(0,o.jsxs)(r.W2,{maxW:"container.lg",position:"relative",children:[(0,o.jsx)(P,{roadmap:n,groupId:p,onClose:function(){return f("")}}),(0,o.jsx)("div",{ref:a})]})}var W=!0;function E(e){var n,t,u=e.roadmap;return(0,o.jsxs)(r.xu,{bg:"white",minH:"100vh",children:[(0,o.jsx)(i.e,{}),(0,o.jsx)(s.Z,{title:(null===u||void 0===u||null===(n=u.seo)||void 0===n?void 0:n.title)||u.title,description:(null===u||void 0===u||null===(t=u.seo)||void 0===t?void 0:t.description)||u.description,keywords:(null===u||void 0===u?void 0:u.seo.keywords)||[]}),(0,o.jsxs)(r.xu,{mb:"60px",children:[(0,o.jsx)(I.h,{roadmap:u}),(0,o.jsx)(T,{roadmap:u})]}),(0,o.jsx)(a.z,{}),(0,o.jsx)(c.q,{}),(0,o.jsx)(l.$,{})]})}}},function(e){e.O(0,[709,22,26,515,231,70,636,280,774,888,179],(function(){return n=7718,e(e.s=n);var n}));var n=e.O();_N_E=n}]);