forked from jdubray/sam-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinferno.min.js
1 lines (1 loc) · 3.13 KB
/
inferno.min.js
1
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Inferno=e()}(this,function(){"use strict";function t(t){return void 0===t||null===t}function e(t){return"o"===t[0]&&"n"===t[1]&&t.length>3}function n(t){this.bp=t,this.dom=null,this.instance=null,this.tag=null,this.children=null,this.style=null,this.className=null,this.attrs=null,this.events=null,this.hooks=null,this.key=null,this.clipData=null}function r(t){return new n(t)}function s(e,r){var s=e.tag||null,l=!(!s||void 0===s.arg),o=t(e.children)?null:e.children,i=!(!o||void 0===o.arg),a=e.attrs||null,u=!(!a||void 0===a.arg),c=e.hooks||null,f=!(!c||void 0===c.arg),h=e.events||null,y=!(!h||void 0===h.arg),d=void 0===e.key?null:e.key,v=!t(d)&&!t(d.arg),m=e.style||null,g=!(!m||void 0===m.arg),p=void 0===e.className?null:e.className,b=!(!p||void 0===p.arg),k={lazy:e.lazy||!1,dom:null,pools:{keyed:{},nonKeyed:[]},tag:l?null:s,className:""!==p&&p?p:null,style:""!==m&&m?m:null,isComponent:l,hasAttrs:u||!!a,hasHooks:f,hasEvents:y,hasStyle:g||!(""===m||!m),hasClassName:b||!(""===p||!p),childrenType:void 0===r?o?5:0:r,attrKeys:null,eventKeys:null,isSVG:e.isSVG||!1};return function(){var t=new n(k);return l===!0&&(t.tag=arguments[s.arg]),i===!0&&(t.children=arguments[o.arg]),u===!0?t.attrs=arguments[a.arg]:t.attrs=a,f===!0&&(t.hooks=arguments[c.arg]),y===!0&&(t.events=arguments[h.arg]),v===!0&&(t.key=arguments[d.arg]),g===!0?t.style=arguments[m.arg]:t.style=k.style,b===!0?t.className=arguments[p.arg]:t.className=k.className,t}}function l(t,e){var n=void 0;return n=e===!0?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t)}function o(t,e,n){if(u){var r=l(t,n);return e&&i(e,r),r}return null}function i(n,r){for(var s=Object.keys(n),l=0;l<s.length;l++){var o=s[l],i=n[o];"className"===o?r.className=i:i===!0?r.setAttribute(o,o):t(i)||i===!1||e(o)||r.setAttribute(o,i)}}var a={};a.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a.createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a.extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},n.prototype={setAttrs:function(t){return this.attrs=t,this},setTag:function(t){return this.tag=t,this},setStyle:function(t){return this.style=t,this},setClassName:function(t){return this.className=t,this},setChildren:function(t){return this.children=t,this},setHooks:function(t){return this.hooks=t,this},setEvents:function(t){return this.events=t,this},setKey:function(t){return this.key=t,this}};var u="undefined"!=typeof window&&window.document,c={createBlueprint:s,createVNode:r,universal:{createElement:o}};return c});