-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.js.map
49 lines (49 loc) · 18.9 KB
/
build.js.map
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
"version": 3,
"sources": [
"node_modules/browser-pack/_prelude.js",
"docs/app/custom-elements/counter/index.js",
"docs/app/custom-elements/counter/view.html",
"docs/app/custom-elements/footer/index.js",
"docs/app/custom-elements/footer/view.html",
"docs/app/custom-elements/header/index.js",
"docs/app/custom-elements/header/view.html",
"docs/app/custom-elements/main/index.js",
"docs/app/custom-elements/main/view.html",
"docs/app/custom-elements/profile-image/index.js",
"docs/app/custom-elements/profile-image/view.html",
"docs/app/custom-elements/profile-nationality/index.js",
"docs/app/custom-elements/profile-nationality/view.html",
"docs/app/custom-elements/profile/index.js",
"docs/app/custom-elements/profile/view.html",
"docs/app/index.js",
"index.js",
"node_modules/ce-v0/comp.js",
"node_modules/hyperapp/dist/hyperapp.js"
],
"names": [],
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpIA;AACA;;ACDA;AACA",
"file": "generated.js",
"sourceRoot": "",
"sourcesContent": [
"(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()",
"module.exports = {\n name: 'x-counter',\n state: {\n counter: 0\n },\n actions: {\n down: () => state => ({ counter: state.counter - 1 }),\n up: () => state => ({ counter: state.counter + 1 })\n },\n view: require('./view.html'),\n observedAttributes: [{ max: Number }]\n}\n",
"module.exports = function view (state, actions) {\n return h('div', { class: 'field has-addons' }, [\n h('p', { class: 'control' }, h('button', { class: 'button', onclick: function (e) { actions.down() }, disabled: (!state.counter) }, '-')),\n h('p', { class: 'control' }, h('input', { class: 'input', type: 'text', value: (state.counter), readonly: 'readonly' })),\n h('p', { class: 'control' }, h('button', { class: 'button', onclick: function (e) { actions.up() }, disabled: (state.max && state.counter >= state.max) }, '+'))\n ])\n}\n",
"module.exports = {\n name: 'x-footer',\n view: require('./view.html')\n}\n",
"module.exports = function view (state, actions) {\n return h('footer', { class: 'footer' }, h('div', { class: 'container' }, h('div', { class: 'content has-text-centered' }, h('p', {}, [\n h('a', { href: 'http://opensource.org/licenses/mit-license.php' }, 'MIT'),\n '.'\n ]))))\n}\n",
"module.exports = {\n name: 'x-header',\n state: {\n showMenu: false\n },\n actions: {\n toggleMenu: () => (state) => ({ showMenu: !state.showMenu })\n },\n view: require('./view.html')\n}\n",
"module.exports = function view (state, actions) {\n return h('nav', { class: 'navbar is-transparent' }, [\n h('div', { class: 'navbar-brand' }, [\n h('a', { class: 'navbar-item', href: '#' }, 'HYPERAPP-CUSTOMELEMENTS'),\n h('div', { class: 'navbar-burger burger', onclick: function (e) { actions.toggleMenu() } }, [\n h('span', {}),\n h('span', {}),\n h('span', {})\n ])\n ]),\n h('div', { class: 'navbar-menu', style: { display: state.showMenu ? 'block' : 'none' } }, [\n h('div', { class: 'navbar-start' }, [\n h('a', { class: 'navbar-item', href: '#' }, 'Home'),\n h('div', { class: 'navbar-item has-dropdown is-hoverable' }, [\n h('a', { class: 'navbar-link', href: '#' }, 'Docs'),\n h('div', { class: 'navbar-dropdown is-boxed' }, [\n h('a', { class: 'navbar-item', href: '#' }, 'Overview'),\n h('a', { class: 'navbar-item', href: '#' }, 'Modifiers'),\n h('a', { class: 'navbar-item', href: '#' }, 'Columns'),\n h('a', { class: 'navbar-item', href: '#' }, 'Layout'),\n h('a', { class: 'navbar-item', href: '#' }, 'Form'),\n h('hr', { class: 'navbar-divider' }),\n h('a', { class: 'navbar-item', href: '#' }, 'Elements'),\n h('a', { class: 'navbar-item is-active', href: '#' }, 'Components')\n ])\n ])\n ]),\n h('div', { class: 'navbar-end' }, h('div', { class: 'navbar-item' }, h('div', { class: 'field is-grouped' }, [\n h('p', { class: 'control' }, h('a', { class: 'bd-tw-button button', href: '#' }, [\n h('span', { class: 'icon' }, h('i', { class: 'fab fa-twitter' })),\n h('span', {}, 'Tweet')\n ])),\n h('p', { class: 'control' }, h('a', { class: 'button is-primary', href: '#' }, [\n h('span', { class: 'icon' }, h('i', { class: 'fas fa-download' })),\n h('span', {}, 'Download')\n ]))\n ])))\n ])\n ])\n}\n",
"module.exports = {\n name: 'x-main',\n state: {\n counterMax: 10\n },\n actions: {\n setCounterMax: (value) => (state) => ({ counterMax: value })\n },\n view: require('./view.html')\n}\n",
"module.exports = function view (state, actions) {\n return h('div', { class: 'section' }, [\n h('div', { class: 'columns' }, [\n h('div', { class: 'column is-one-fifth' }, [\n 'Counter max:',\n h('input', { type: 'number', value: (state.counterMax), class: 'input', onchange: function (e) { actions.setCounterMax(+this.value) } })\n ]),\n h('div', { class: 'column is-two-fifths' }, [\n 'Counter:',\n h('x-counter', { max: (state.counterMax) })\n ])\n ]),\n h('x-profile', { id: '' }),\n h('x-profile', { id: '' }),\n h('x-profile', { id: '' })\n ])\n}\n",
"module.exports = {\n name: 'x-profile-image',\n view: require('./view.html'),\n state: {\n getUrl: function () {\n if (!this.url) {\n return\n }\n\n if (this.size === 'medium') {\n return this.url.replace('https://randomuser.me/api/portraits/',\n 'https://randomuser.me/api/portraits/med/')\n } else if (this.size === 'thumbnail') {\n return this.url.replace('https://randomuser.me/api/portraits/',\n 'https://randomuser.me/api/portraits/thumb/')\n } else {\n return this.url\n }\n }\n },\n observedAttributes: ['url', 'size']\n}\n",
"module.exports = function view (state, actions) {\n return state.url ? h('img', { src: (state.getUrl()) }) : undefined\n}\n",
"module.exports = {\n name: 'x-profile-nationality',\n view: require('./view.html'),\n observedAttributes: ['code']\n}\n",
"module.exports = function view (state, actions) {\n return h('span', {}, state.code ? h('span', { class: 'flag flag-' + (state.code.toLowerCase()), alt: (state.code) }) : undefined)\n}\n",
"module.exports = {\n name: 'x-profile',\n view: require('./view.html'),\n mapAttrsToState: false,\n actions: {\n setUser: (user) => state => Object.assign({}, state, { user })\n },\n observedAttributes: ['id'],\n loadProfile: function (id) {\n var url = 'https://randomuser.me/api/?noinfo' + (id ? '&seed=' + id : '')\n var actions = this.actions\n\n window.fetch(url, {\n method: 'get'\n }).then(function (response) {\n return response.json()\n }).then(function (response) {\n var user = response.results[0]\n console.log(user)\n actions.setUser(user)\n }).catch(function (err) {\n console.error(err)\n })\n },\n attributeChangedCallback: function (name, oldValue, newValue) {\n this.loadProfile(newValue)\n },\n constructor () {\n if (this.hasAttribute('id')) {\n this.loadProfile(this.getAttribute('id'))\n }\n }\n}\n",
"module.exports = function view (state, actions) {\n return h('div', {}, state.user ? h('div', { key: (state.user.id.value), class: 'card' }, h('div', { class: 'card-content' }, [\n h('div', { class: 'media' }, [\n h('div', { class: 'media-left' }, h('figure', { class: 'image is-48x48' }, h('x-profile-image', { size: 'thumbnail', url: (state.user.picture.large) }))),\n h('div', { class: 'media-content' }, [\n h('p', { class: 'title is-4' }, (state.user.name.title) + '\\\n ' + (state.user.name.first) + '\\\n ' + (state.user.name.last)),\n h('p', { class: 'subtitle is-6' }, [\n h('x-profile-nationality', { code: (state.user.nat) }),\n (state.user.id.name)\n ])\n ])\n ]),\n h('div', { class: 'content' }, [\n h('div', {}, [\n h('span', { class: 'icon has-text-success' }, h('i', { class: 'fa fa-phone' })),\n h('a', { href: 'tel:' + (state.user.phone) }, (state.user.phone))\n ]),\n h('div', {}, [\n h('span', { class: 'icon has-text-info' }, h('i', { class: 'fa fa-birthday-cake' })),\n h('time', { datetime: (state.user.registered) }, (new Date(state.user.dob).toDateString()))\n ]),\n h('div', {}, [\n h('span', { class: 'icon has-text-warning' }, h('i', { class: 'fa fa-envelope' })),\n h('a', { href: 'mailto:' + (state.user.email) }, (state.user.email))\n ])\n ])\n ])) : undefined)\n}\n",
"window.h = require('hyperapp').h\n\nvar define = require('../..')\n\ndefine(require('./custom-elements/main'))\ndefine(require('./custom-elements/header'))\ndefine(require('./custom-elements/footer'))\ndefine(require('./custom-elements/profile'))\ndefine(require('./custom-elements/profile-image'))\nvar Nationality = define(require('./custom-elements/profile-nationality'))\nvar Counter = define(require('./custom-elements/counter'))\n\n// Demo programmatically added elements\nconst myCounter = new Counter()\nconst myNationality = new Nationality()\nmyNationality.setAttribute('code', 'gb')\n\nsetTimeout(function () {\n document.body.appendChild(myCounter)\n document.body.appendChild(myNationality)\n}, 5000)\n",
"var app = require('hyperapp').app\nvar CEV0Component = require('ce-v0/comp')\n\nfunction hyperappCustomElement (options) {\n var view = options.view\n var state = options.state\n var ctor = options.constructor\n var mapAttrsToState = 'mapAttrsToState' in options\n ? !!options.mapAttrsToState\n : true\n\n var observedAttributes = options.observedAttributes\n var hasObservedAttributes = Array.isArray(observedAttributes)\n var actions = Object.assign(mapAttrsToState ? {\n __applyState: (item) => (state) => {\n return item\n }\n } : {}, options.actions)\n\n var opts = {}\n var converters = {}\n if (hasObservedAttributes) {\n opts.observedAttributes = []\n observedAttributes.forEach(function (attr) {\n if (typeof attr === 'string') {\n opts.observedAttributes.push(attr)\n } else {\n var name = Object.keys(attr)[0]\n opts.observedAttributes.push(name)\n if (typeof attr[name] === 'function') {\n converters[name] = attr[name]\n }\n }\n })\n }\n\n function convert (name, value) {\n var converter = converters[name]\n\n if (converter) {\n if (converter === Boolean) {\n return value !== 'false' && value !== '0'\n }\n\n return converters[name](value)\n }\n\n return value\n }\n\n function mapToState (el) {\n if (hasObservedAttributes) {\n opts.observedAttributes.forEach(function (name) {\n if (el.hasAttribute(name)) {\n var item = {}\n item[name] = convert(name, el.getAttribute(name))\n el.actions.__applyState(item)\n }\n })\n }\n }\n\n if (typeof ctor === 'function') {\n opts.constructor = function () {\n this.actions = app(state, actions, view, this)\n\n ctor.call(this)\n\n if (mapAttrsToState) {\n mapToState(this)\n }\n }\n } else {\n opts.constructor = function () {\n this.actions = app(state, actions, view, this)\n\n if (mapAttrsToState) {\n mapToState(this)\n }\n }\n }\n\n // Only fire attributeChangedCallback\n // if it's an observed attribute as per CEV1\n var onattribute\n var attributeChangedCallback = options.attributeChangedCallback\n\n if (hasObservedAttributes) {\n onattribute = function (name, oldValue, newValue) {\n if (observedAttributes.indexOf(name) < 0) {\n return\n }\n\n if (attributeChangedCallback) {\n attributeChangedCallback.call(this, name, oldValue, newValue)\n }\n\n if (mapAttrsToState) {\n var partial = {}\n partial[name] = convert(name, newValue)\n this.actions.__applyState(partial)\n }\n }\n\n opts.onattribute = onattribute\n }\n\n for (var key in options) {\n switch (key) {\n case 'connectedCallback':\n opts.onconnected = options[key]\n break\n case 'disconnectedCallback':\n opts.ondisconnected = options[key]\n break\n case 'view':\n case 'state':\n case 'actions':\n case 'constructor':\n case 'observedAttributes':\n case 'attributeChangedCallback':\n break\n default:\n opts[key] = options[key]\n break\n }\n }\n\n return new CEV0Component(opts)\n}\n\nmodule.exports = hyperappCustomElement\n",
"function Component(e){\"use strict\";/*! (C) 2017 Andrea Giammarchi - Mit Style License */\nvar t,a,r=function(e,t,a,r){var c=Object.getOwnPropertyDescriptor(e,t);c&&(c.enumerable=!1,a[r]=c)},c={},n={},o=e.extends||HTMLElement;for(t in e)switch(t){case\"extends\":case\"name\":break;case\"static\":a=e[t];for(t in a)r(a,t,c,t);break;case\"constructor\":r(e,t,n,\"createdCallback\");break;case\"onattribute\":r(e,t,n,\"attributeChangedCallback\");break;case\"onconnected\":r(e,t,n,\"attachedCallback\");break;case\"ondisconnected\":r(e,t,n,\"detachedCallback\");break;default:r(e,t,n,t)}return(Object.setPrototypeOf||function(e,a){if(e.__proto__=a,!(e instanceof a)){delete e.__proto__;for(t in a)try{r(a,t,e,t)}catch(e){}}return e})(Object.defineProperties(document.registerElement(e.name,{prototype:Object.create(o.prototype,n)}),c),o)}try{module.exports=Component}catch(e){}",
"!function(e,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n(exports):\"function\"==typeof define&&define.amd||n(e.hyperapp={})}(this,function(e){\"use strict\";e.h=function(e,n){for(var t,r=[],o=[],i=arguments.length;i-- >2;)r.push(arguments[i]);for(;r.length;)if((t=r.pop())&&t.pop)for(i=t.length;i--;)r.push(t[i]);else null!=t&&!0!==t&&!1!==t&&o.push(t);return\"function\"==typeof e?e(n||{},o):{nodeName:e,attributes:n||{},children:o,key:n&&n.key}},e.app=function(e,n,t,r){var o,i=[],u=r&&r.children[0]||null,l=u&&function e(n,t){return{nodeName:n.nodeName.toLowerCase(),attributes:{},children:t.call(n.childNodes,function(n){return 3===n.nodeType?n.nodeValue:e(n,t)})}}(u,[].map),f=s(e),a=s(n);return d(function e(n,t,r){for(var o in r)\"function\"==typeof r[o]?function(e,o){r[e]=function(e){return\"function\"==typeof(e=o(e))&&(e=e(p(n,f),r)),e&&e!==(t=p(n,f))&&!e.then&&d(f=h(n,s(t,e),f)),e}}(o,r[o]):e(n.concat(o),t[o]=t[o]||{},r[o]=s(r[o]))}([],f,a)),a;function c(){o=!o;var e=t(f,a);for(r&&!o&&(u=function e(n,t,r,o,u,l){if(o===r);else if(null==r)t=n.insertBefore(y(o,u),t);else if(o.nodeName&&o.nodeName===r.nodeName){!function(e,n,t,r){for(var o in s(n,t))t[o]!==(\"value\"===o||\"checked\"===o?e[o]:n[o])&&m(e,o,t[o],r,n[o]);t.onupdate&&i.push(function(){t.onupdate(e,n)})}(t,r.attributes,o.attributes,u=u||\"svg\"===o.nodeName);for(var f=[],a={},c={},d=0;d<r.children.length;d++){f[d]=t.childNodes[d];var h=r.children[d],p=v(h);null!=p&&(a[p]=[f[d],h])}for(var d=0,b=0;b<o.children.length;){var h=r.children[d],g=o.children[b],p=v(h),k=v(g);if(c[p])d++;else if(null==k)null==p&&(e(t,f[d],h,g,u),b++),d++;else{var w=a[k]||[];p===k?(e(t,w[0],w[1],g,u),d++):w[0]?e(t,t.insertBefore(w[0],f[d]),w[1],g,u):e(t,f[d],null,g,u),b++,c[k]=g}}for(;d<r.children.length;){var h=r.children[d];null==v(h)&&N(t,f[d],h),d++}for(var d in a)c[a[d][1].key]||N(t,a[d][0],a[d][1])}else o.nodeName===r.nodeName?t.nodeValue=o:(t=n.insertBefore(y(o,u),l=t),N(n,l,r));return t}(r,u,l,l=e));e=i.pop();)e()}function d(){o||(o=!o,setTimeout(c))}function s(e,n){var t={};for(var r in e)t[r]=e[r];for(var r in n)t[r]=n[r];return t}function h(e,n,t){var r={};return e.length?(r[e[0]]=e.length>1?h(e.slice(1),n,t[e[0]]):n,s(t,r)):n}function p(e,n){for(var t=0;t<e.length;t++)n=n[e[t]];return n}function v(e){return e?e.key:null}function m(e,n,t,r,o){if(\"key\"===n);else if(\"style\"===n)for(var i in s(o,t))e[n][i]=null==t||null==t[i]?\"\":t[i];else\"function\"==typeof t||n in e&&!r?e[n]=null==t?\"\":t:null!=t&&!1!==t&&e.setAttribute(n,t),null!=t&&!1!==t||e.removeAttribute(n)}function y(e,n){var t=\"string\"==typeof e||\"number\"==typeof e?document.createTextNode(e):(n=n||\"svg\"===e.nodeName)?document.createElementNS(\"http://www.w3.org/2000/svg\",e.nodeName):document.createElement(e.nodeName);if(e.attributes){e.attributes.oncreate&&i.push(function(){e.attributes.oncreate(t)});for(var r=0;r<e.children.length;r++)t.appendChild(y(e.children[r],n));for(var o in e.attributes)m(t,o,e.attributes[o],n)}return t}function N(e,n,t,r){function o(){e.removeChild(function e(n,t,r){if(r=t.attributes){for(var o=0;o<t.children.length;o++)e(n.childNodes[o],t.children[o]);r.ondestroy&&r.ondestroy(n)}return n}(n,t))}t.attributes&&(r=t.attributes.onremove)?r(n,o):o()}}});\n//# sourceMappingURL=hyperapp.js.map"
]
}