-
Notifications
You must be signed in to change notification settings - Fork 1
/
bundle.js.map
1 lines (1 loc) · 28 KB
/
bundle.js.map
1
{"version":3,"file":"bundle.js","sources":["node_modules/hyperapp/src/h.js","node_modules/hyperapp/src/app.js","node_modules/unfetch/dist/unfetch.es.js","index.js"],"sourcesContent":["export function h(tag, data) {\n var node\n var stack = []\n var children = []\n\n for (var i = arguments.length; i-- > 2; ) {\n stack[stack.length] = arguments[i]\n }\n\n while (stack.length) {\n if (Array.isArray((node = stack.pop()))) {\n for (var i = node.length; i--; ) {\n stack[stack.length] = node[i]\n }\n } else if (node != null && node !== true && node !== false) {\n if (typeof node === \"number\") {\n node = node + \"\"\n }\n children[children.length] = node\n }\n }\n\n return typeof tag === \"string\"\n ? {\n tag: tag,\n data: data || {},\n children: children\n }\n : tag(data, children)\n}\n","export function app(app) {\n var state = {}\n var actions = {}\n var events = {}\n var mixins = []\n var view = app.view\n var root = app.root || document.body\n var node\n var element\n var locked = false\n var loaded = false\n\n for (var i = -1; i < mixins.length; i++) {\n var mixin = mixins[i] ? mixins[i](emit) : app\n\n Object.keys(mixin.events || []).map(function(key) {\n events[key] = (events[key] || []).concat(mixin.events[key])\n })\n\n if (mixin.state != null) {\n state = merge(state, mixin.state)\n }\n\n mixins = mixins.concat(mixin.mixins || [])\n\n initialize(actions, mixin.actions)\n }\n\n node = hydrate((element = root.querySelector(\"[data-ssr]\")), [].map)\n\n repaint(emit(\"init\"))\n\n return emit\n\n function repaint() {\n if (!locked) {\n requestAnimationFrame(render, (locked = !locked))\n }\n }\n\n function hydrate(element, map) {\n return element == null\n ? element\n : {\n tag: element.tagName,\n data: {},\n children: map.call(element.childNodes, function(element) {\n hydrate(element, map)\n })\n }\n }\n\n function render() {\n element = patch(\n root,\n element,\n node,\n (node = emit(\"render\", view)(state, actions))\n )\n\n locked = !locked\n\n if (!loaded) {\n emit(\"loaded\", (loaded = true))\n }\n }\n\n function initialize(namespace, children, lastName) {\n Object.keys(children || []).map(function(key) {\n var action = children[key]\n var name = lastName ? lastName + \".\" + key : key\n\n if (typeof action === \"function\") {\n namespace[key] = function(data) {\n var result = action(\n state,\n actions,\n emit(\"action\", {\n name: name,\n data: data\n }).data\n )\n\n if (result != null && result.then == null) {\n repaint((state = merge(state, emit(\"update\", result))))\n }\n\n return result\n }\n } else {\n initialize(namespace[key] || (namespace[key] = {}), action, name)\n }\n })\n }\n\n function emit(name, data) {\n return (events[name] || []).map(function(cb) {\n var result = cb(state, actions, data)\n if (result != null) {\n data = result\n }\n }), data\n }\n\n function merge(a, b) {\n if (typeof b !== \"object\") {\n return b\n }\n\n var obj = {}\n\n for (var i in a) {\n obj[i] = a[i]\n }\n\n for (var i in b) {\n obj[i] = b[i]\n }\n\n return obj\n }\n\n function getKey(node) {\n if (node && (node = node.data)) {\n return node.key\n }\n }\n\n function createElement(node, isSVG) {\n if (typeof node === \"string\") {\n var element = document.createTextNode(node)\n } else {\n var element = (isSVG = isSVG || node.tag === \"svg\")\n ? document.createElementNS(\"http://www.w3.org/2000/svg\", node.tag)\n : document.createElement(node.tag)\n\n for (var i = 0; i < node.children.length; ) {\n element.appendChild(createElement(node.children[i++], isSVG))\n }\n\n for (var i in node.data) {\n if (i === \"oncreate\") {\n node.data[i](element)\n } else if (i === \"oninsert\") {\n setTimeout(node.data[i], 0, element)\n } else {\n setElementData(element, i, node.data[i])\n }\n }\n }\n\n return element\n }\n\n function setElementData(element, name, value, oldValue) {\n if (\n name === \"key\" ||\n name === \"oncreate\" ||\n name === \"oninsert\" ||\n name === \"onupdate\" ||\n name === \"onremove\"\n ) {\n return name\n } else if (name === \"style\") {\n for (var i in merge(oldValue, (value = value || {}))) {\n element.style[i] = value[i] || \"\"\n }\n } else {\n try {\n element[name] = value\n } catch (_) {}\n\n if (typeof value !== \"function\") {\n if (value) {\n element.setAttribute(name, value)\n } else {\n element.removeAttribute(name)\n }\n }\n }\n }\n\n function updateElementData(element, oldData, data, cb) {\n for (var name in merge(oldData, data)) {\n var value = data[name]\n var oldValue = oldData[name]\n\n if (\n value !== oldValue &&\n value !== element[name] &&\n setElementData(element, name, value, oldValue) == null\n ) {\n cb = data.onupdate\n }\n }\n\n if (cb != null) {\n cb(element)\n }\n }\n\n function removeElement(parent, element, data) {\n if (data && data.onremove) {\n data.onremove(element)\n } else {\n parent.removeChild(element)\n }\n }\n\n function patch(parent, element, oldNode, node, isSVG, lastElement) {\n if (oldNode == null) {\n element = parent.insertBefore(createElement(node, isSVG), element)\n } else if (node.tag != null && node.tag === oldNode.tag) {\n updateElementData(element, oldNode.data, node.data)\n\n isSVG = isSVG || node.tag === \"svg\"\n\n var len = node.children.length\n var oldLen = oldNode.children.length\n var reusableChildren = {}\n var oldElements = []\n var newKeys = {}\n\n for (var i = 0; i < oldLen; i++) {\n var oldElement = element.childNodes[i]\n oldElements[i] = oldElement\n\n var oldChild = oldNode.children[i]\n var oldKey = getKey(oldChild)\n\n if (null != oldKey) {\n reusableChildren[oldKey] = [oldElement, oldChild]\n }\n }\n\n var i = 0\n var j = 0\n\n while (j < len) {\n var oldElement = oldElements[i]\n var oldChild = oldNode.children[i]\n var newChild = node.children[j]\n\n var oldKey = getKey(oldChild)\n if (newKeys[oldKey]) {\n i++\n continue\n }\n\n var newKey = getKey(newChild)\n\n var reusableChild = reusableChildren[newKey] || []\n\n if (null == newKey) {\n if (null == oldKey) {\n patch(element, oldElement, oldChild, newChild, isSVG)\n j++\n }\n i++\n } else {\n if (oldKey === newKey) {\n patch(element, reusableChild[0], reusableChild[1], newChild, isSVG)\n i++\n } else if (reusableChild[0]) {\n element.insertBefore(reusableChild[0], oldElement)\n patch(element, reusableChild[0], reusableChild[1], newChild, isSVG)\n } else {\n patch(element, oldElement, null, newChild, isSVG)\n }\n\n j++\n newKeys[newKey] = newChild\n }\n }\n\n while (i < oldLen) {\n var oldChild = oldNode.children[i]\n var oldKey = getKey(oldChild)\n if (null == oldKey) {\n removeElement(element, oldElements[i], oldChild.data)\n }\n i++\n }\n\n for (var i in reusableChildren) {\n var reusableChild = reusableChildren[i]\n var reusableNode = reusableChild[1]\n if (!newKeys[reusableNode.data.key]) {\n removeElement(element, reusableChild[0], reusableNode.data)\n }\n }\n } else if (\n (lastElement = element) != null &&\n node !== oldNode &&\n node !== element.nodeValue\n ) {\n parent.replaceChild((element = createElement(node, isSVG)), lastElement)\n }\n\n return element\n }\n}\n","var index = typeof fetch=='function' ? fetch.bind() : function(url, options) {\n\toptions = options || {};\n\treturn new Promise( function (resolve, reject) {\n\t\tvar request = new XMLHttpRequest();\n\n\t\trequest.open(options.method || 'get', url);\n\n\t\tfor (var i in options.headers) {\n\t\t\trequest.setRequestHeader(i, options.headers[i]);\n\t\t}\n\n\t\trequest.withCredentials = options.credentials=='include';\n\n\t\trequest.onload = function () {\n\t\t\tresolve(response());\n\t\t};\n\n\t\trequest.onerror = reject;\n\n\t\trequest.send(options.body);\n\n\t\tfunction response() {\n\t\t\tvar keys = [],\n\t\t\t\tall = [],\n\t\t\t\theaders = {},\n\t\t\t\theader;\n\n\t\t\trequest.getAllResponseHeaders().replace(/^(.*?):\\s*([\\s\\S]*?)$/gm, function (m, key, value) {\n\t\t\t\tkeys.push(key = key.toLowerCase());\n\t\t\t\tall.push([key, value]);\n\t\t\t\theader = headers[key];\n\t\t\t\theaders[key] = header ? (header + \",\" + value) : value;\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\tok: (request.status/200|0) == 1,\t\t// 200-299\n\t\t\t\tstatus: request.status,\n\t\t\t\tstatusText: request.statusText,\n\t\t\t\turl: request.responseURL,\n\t\t\t\tclone: response,\n\t\t\t\ttext: function () { return Promise.resolve(request.responseText); },\n\t\t\t\tjson: function () { return Promise.resolve(request.responseText).then(JSON.parse); },\n\t\t\t\tblob: function () { return Promise.resolve(new Blob([request.response])); },\n\t\t\t\theaders: {\n\t\t\t\t\tkeys: function () { return keys; },\n\t\t\t\t\tentries: function () { return all; },\n\t\t\t\t\tget: function (n) { return headers[n.toLowerCase()]; },\n\t\t\t\t\thas: function (n) { return n.toLowerCase() in headers; }\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t});\n};\n\nexport default index;\n//# sourceMappingURL=unfetch.es.js.map\n","import { h, app } from 'hyperapp'\nimport fetch from 'unfetch'\n\nconst Selection = ({ state, actions }) => {\n let name = state.selectedAircraft ? state.selectedAircraft.name : ''\n return (\n <section class=\"aircraftList\">\n <h1>Aircraft</h1>\n <ul>\n { state.aircraft.map(aircraft =>\n <li><a onclick={ _ => actions.chooseAircraft(aircraft.name) }>{ aircraft.name }</a></li>\n )}\n </ul>\n </section>\n )\n}\n\nconst CloseButton = ({ actions }) => (<a class='closeButton' onclick={ _ => actions.chooseAircraft() }>✕</a>)\n\nconst Main = ({ state, actions }) => {\n if (state.selectedAircraft != null) {\n return (\n <main>\n <CloseButton actions={ actions } />\n <h1>{ state.selectedAircraft.name }</h1>\n <object type=\"image/svg+xml\" id=\"svg\" data={ `aircraft/${state.selectedAircraft.image}` }/>\n\n { state.selectedAircraft.procedures.concat(state.selectedAircraft.systems).map((item, index) => (\n <Transition delay={ index * 0.15 }>\n <List list={ item } />\n </Transition>\n ))}\n\n <a class=\"bvr\" href=\"https://bvr.design\"><img src=\"./bvr.png\"/></a>\n </main>\n )\n } else {\n return (\n <main>\n <Selection state={ state } actions={ actions }/>\n\n <a class=\"bvr\" href=\"https://bvr.design\"><img src=\"./bvr.png\"/></a>\n </main>\n )\n }\n}\n\nconst List = ({ className, list }) => (\n <section class={ className }>\n <h1>{ list.name }</h1>\n <table>\n { list.items.map(item =>\n Object.keys(item).map(key =>\n ListItem(item, key)\n )\n )}\n </table>\n </section>\n)\n\nconst ListItem = (item, name) => (\n <tr>\n <td>{ name }</td>\n <td>{ item[name] }</td>\n </tr>\n)\n\nconst Transition = (props, children) => {\n const reverses = Object.keys(props || {}).filter(k => k == 'reverses').length != 0\n const duration = `duration` in (props || {}) ? props.duration : 0.15\n const delay = `delay` in (props || {}) ? props.delay : 0\n\n const animatedChildren = children.map(child => {\n child.data.style = {\n transitionDuration: `${duration}s`,\n transitionDelay: `${delay}s`\n }\n\n child.data.oncreate = element => {\n element.className = 'transition-start'\n }\n\n child.data.oninsert = element => {\n element.className = 'transition-end'\n }\n\n if (reverses) {\n function handleTransitionEnd(event) {\n if (event.target.parentNode) {\n event.target.parentNode.removeChild(event.target)\n }\n event.target.removeEventListener('transitionend', handleTransitionEnd, false)\n }\n\n child.data.onremove = element => {\n element.className = 'transition-start'\n element.addEventListener('transitionend', handleTransitionEnd, false)\n }\n }\n return child\n })\n\n return animatedChildren\n}\n\napp({\n state: {\n aircraft: [],\n selectedAircraft: null,\n },\n\n view: (state, actions) => {\n return (\n <Main state={ state } actions={ actions } electedAircraft={ state.selectedAircraft }/>\n )\n },\n\n actions: {\n loadIndex: (state, actions) => {\n fetch('./aircraft/index.json')\n .then(response => response.json())\n .then(json =>\n json.map(path =>\n fetch(`./aircraft/${path}.json`)\n .then(response => response.json())\n .then(json => actions.updateAircraft(json))\n )\n )\n },\n\n updateAircraft: (state, actions, json) => {\n state.aircraft.push(json)\n state.aircraft.sort((a, b) => {\n const nameA = a.name.toLowerCase()\n const nameB = b.name.toLowerCase()\n if (nameA < nameB) {\n return -1\n }\n if (nameA > nameB) {\n return 1\n }\n return 0\n })\n return { aircraft : state.aircraft }\n },\n\n chooseAircraft: (state, actions, choice) => {\n const aircraft = choice !== undefined ? state.aircraft.filter( value => value.name == choice )[0] : null\n return { selectedAircraft: aircraft }\n }\n },\n\n events: {\n loaded: (state, actions) => {\n actions.loadIndex()\n }\n }\n})"],"names":["h","tag","data","node","stack","children","i","arguments","length","Array","isArray","pop","app","state","actions","events","mixins","view","root","document","body","element","locked","loaded","mixin","emit","keys","map","key","concat","merge","hydrate","querySelector","repaint","render","tagName","call","childNodes","patch","initialize","namespace","lastName","action","name","result","then","cb","a","b","obj","getKey","createElement","isSVG","createTextNode","createElementNS","appendChild","setElementData","value","oldValue","style","_","setAttribute","removeAttribute","updateElementData","oldData","onupdate","removeElement","parent","onremove","removeChild","oldNode","lastElement","insertBefore","len","oldLen","reusableChildren","oldElements","newKeys","oldElement","oldChild","oldKey","j","newChild","newKey","reusableChild","reusableNode","nodeValue","replaceChild","index","fetch","bind","url","options","Promise","resolve","reject","request","XMLHttpRequest","open","method","headers","setRequestHeader","withCredentials","credentials","onload","response","onerror","send","all","header","getAllResponseHeaders","replace","m","push","toLowerCase","status","statusText","responseURL","responseText","JSON","parse","Blob","n","Selection","aircraft","chooseAircraft","CloseButton","Main","selectedAircraft","image","procedures","systems","item","List","className","list","items","Object","ListItem","Transition","props","reverses","filter","k","duration","delay","animatedChildren","child","oncreate","oninsert","handleTransitionEnd","event","target","parentNode","removeEventListener","addEventListener","json","path","updateAircraft","sort","nameA","nameB","choice","undefined","loadIndex"],"mappings":";;;AAAO,SAASA,CAAT,CAAWC,GAAX,EAAgBC,IAAhB,EAAsB;MACvBC,IAAJ;MACIC,QAAQ,EAAZ;MACIC,WAAW,EAAf;;OAEK,IAAIC,IAAIC,UAAUC,MAAvB,EAA+BF,MAAM,CAArC,GAA0C;UAClCF,MAAMI,MAAZ,IAAsBD,UAAUD,CAAV,CAAtB;;;SAGKF,MAAMI,MAAb,EAAqB;QACfC,MAAMC,OAAN,CAAeP,OAAOC,MAAMO,GAAN,EAAtB,CAAJ,EAAyC;WAClC,IAAIL,IAAIH,KAAKK,MAAlB,EAA0BF,GAA1B,GAAiC;cACzBF,MAAMI,MAAZ,IAAsBL,KAAKG,CAAL,CAAtB;;KAFJ,MAIO,IAAIH,QAAQ,IAAR,IAAgBA,SAAS,IAAzB,IAAiCA,SAAS,KAA9C,EAAqD;UACtD,OAAOA,IAAP,KAAgB,QAApB,EAA8B;eACrBA,OAAO,EAAd;;eAEOE,SAASG,MAAlB,IAA4BL,IAA5B;;;;SAIG,OAAOF,GAAP,KAAe,QAAf,GACH;SACOA,GADP;UAEQC,QAAQ,EAFhB;cAGYG;GAJT,GAMHJ,IAAIC,IAAJ,EAAUG,QAAV,CANJ;;;ACtBK,SAASO,GAAT,CAAaA,G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