pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(1);
module.exports = __webpack_require__(191);
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {"use strict";
__webpack_require__(2);
__webpack_require__(189);
if (global._babelPolyfill) {
throw new Error("only one instance of babel-polyfill is allowed");
}
global._babelPolyfill = true;
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(3);
__webpack_require__(36);
__webpack_require__(42);
__webpack_require__(44);
__webpack_require__(46);
__webpack_require__(48);
__webpack_require__(50);
__webpack_require__(52);
__webpack_require__(53);
__webpack_require__(54);
__webpack_require__(55);
__webpack_require__(56);
__webpack_require__(57);
__webpack_require__(58);
__webpack_require__(59);
__webpack_require__(60);
__webpack_require__(61);
__webpack_require__(62);
__webpack_require__(63);
__webpack_require__(66);
__webpack_require__(67);
__webpack_require__(68);
__webpack_require__(70);
__webpack_require__(71);
__webpack_require__(72);
__webpack_require__(73);
__webpack_require__(74);
__webpack_require__(75);
__webpack_require__(76);
__webpack_require__(78);
__webpack_require__(79);
__webpack_require__(80);
__webpack_require__(82);
__webpack_require__(83);
__webpack_require__(84);
__webpack_require__(86);
__webpack_require__(87);
__webpack_require__(88);
__webpack_require__(89);
__webpack_require__(90);
__webpack_require__(91);
__webpack_require__(92);
__webpack_require__(93);
__webpack_require__(94);
__webpack_require__(95);
__webpack_require__(96);
__webpack_require__(97);
__webpack_require__(98);
__webpack_require__(99);
__webpack_require__(104);
__webpack_require__(105);
__webpack_require__(109);
__webpack_require__(110);
__webpack_require__(112);
__webpack_require__(113);
__webpack_require__(118);
__webpack_require__(119);
__webpack_require__(122);
__webpack_require__(124);
__webpack_require__(126);
__webpack_require__(128);
__webpack_require__(129);
__webpack_require__(130);
__webpack_require__(132);
__webpack_require__(133);
__webpack_require__(135);
__webpack_require__(136);
__webpack_require__(137);
__webpack_require__(138);
__webpack_require__(145);
__webpack_require__(148);
__webpack_require__(149);
__webpack_require__(151);
__webpack_require__(152);
__webpack_require__(153);
__webpack_require__(154);
__webpack_require__(155);
__webpack_require__(156);
__webpack_require__(157);
__webpack_require__(158);
__webpack_require__(159);
__webpack_require__(160);
__webpack_require__(161);
__webpack_require__(162);
__webpack_require__(164);
__webpack_require__(165);
__webpack_require__(166);
__webpack_require__(167);
__webpack_require__(168);
__webpack_require__(169);
__webpack_require__(171);
__webpack_require__(172);
__webpack_require__(173);
__webpack_require__(174);
__webpack_require__(176);
__webpack_require__(177);
__webpack_require__(179);
__webpack_require__(180);
__webpack_require__(182);
__webpack_require__(183);
__webpack_require__(184);
__webpack_require__(187);
__webpack_require__(188);
module.exports = __webpack_require__(7);
/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $ = __webpack_require__(4)
, $export = __webpack_require__(5)
, DESCRIPTORS = __webpack_require__(10)
, createDesc = __webpack_require__(9)
, html = __webpack_require__(16)
, cel = __webpack_require__(17)
, has = __webpack_require__(19)
, cof = __webpack_require__(20)
, invoke = __webpack_require__(21)
, fails = __webpack_require__(11)
, anObject = __webpack_require__(22)
, aFunction = __webpack_require__(15)
, isObject = __webpack_require__(18)
, toObject = __webpack_require__(23)
, toIObject = __webpack_require__(25)
, toInteger = __webpack_require__(27)
, toIndex = __webpack_require__(28)
, toLength = __webpack_require__(29)
, IObject = __webpack_require__(26)
, IE_PROTO = __webpack_require__(13)('__proto__')
, createArrayMethod = __webpack_require__(30)
, arrayIndexOf = __webpack_require__(35)(false)
, ObjectProto = Object.prototype
, ArrayProto = Array.prototype
, arraySlice = ArrayProto.slice
, arrayJoin = ArrayProto.join
, defineProperty = $.setDesc
, getOwnDescriptor = $.getDesc
, defineProperties = $.setDescs
, factories = {}
, IE8_DOM_DEFINE;
if(!DESCRIPTORS){
IE8_DOM_DEFINE = !fails(function(){
return defineProperty(cel('div'), 'a', {get: function(){ return 7; }}).a != 7;
});
$.setDesc = function(O, P, Attributes){
if(IE8_DOM_DEFINE)try {
return defineProperty(O, P, Attributes);
} catch(e){ /* empty */ }
if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
if('value' in Attributes)anObject(O)[P] = Attributes.value;
return O;
};
$.getDesc = function(O, P){
if(IE8_DOM_DEFINE)try {
return getOwnDescriptor(O, P);
} catch(e){ /* empty */ }
if(has(O, P))return createDesc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]);
};
$.setDescs = defineProperties = function(O, Properties){
anObject(O);
var keys = $.getKeys(Properties)
, length = keys.length
, i = 0
, P;
while(length > i)$.setDesc(O, P = keys[i++], Properties[P]);
return O;
};
}
$export($export.S + $export.F * !DESCRIPTORS, 'Object', {
// 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P)
getOwnPropertyDescriptor: $.getDesc,
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
defineProperty: $.setDesc,
// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
defineProperties: defineProperties
});
// IE 8- don't enum bug keys
var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' +
'toLocaleString,toString,valueOf').split(',')
// Additional keys for getOwnPropertyNames
, keys2 = keys1.concat('length', 'prototype')
, keysLen1 = keys1.length;
// Create object with `null` prototype: use iframe Object with cleared prototype
var createDict = function(){
// Thrash, waste and sodomy: IE GC bug
var iframe = cel('iframe')
, i = keysLen1
, gt = '>'
, iframeDocument;
iframe.style.display = 'none';
html.appendChild(iframe);
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
// createDict = iframe.contentWindow.Object;
// html.removeChild(iframe);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(' i)if(has(O, key = names[i++])){
~arrayIndexOf(result, key) || result.push(key);
}
return result;
};
};
var Empty = function(){};
$export($export.S, 'Object', {
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
getPrototypeOf: $.getProto = $.getProto || function(O){
O = toObject(O);
if(has(O, IE_PROTO))return O[IE_PROTO];
if(typeof O.constructor == 'function' && O instanceof O.constructor){
return O.constructor.prototype;
} return O instanceof Object ? ObjectProto : null;
},
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true),
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
create: $.create = $.create || function(O, /*?*/Properties){
var result;
if(O !== null){
Empty.prototype = anObject(O);
result = new Empty();
Empty.prototype = null;
// add "__proto__" for Object.getPrototypeOf shim
result[IE_PROTO] = O;
} else result = createDict();
return Properties === undefined ? result : defineProperties(result, Properties);
},
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false)
});
var construct = function(F, len, args){
if(!(len in factories)){
for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']';
factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
}
return factories[len](F, args);
};
// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
$export($export.P, 'Function', {
bind: function bind(that /*, args... */){
var fn = aFunction(this)
, partArgs = arraySlice.call(arguments, 1);
var bound = function(/* args... */){
var args = partArgs.concat(arraySlice.call(arguments));
return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
};
if(isObject(fn.prototype))bound.prototype = fn.prototype;
return bound;
}
});
// fallback for not array-like ES3 strings and DOM objects
$export($export.P + $export.F * fails(function(){
if(html)arraySlice.call(html);
}), 'Array', {
slice: function(begin, end){
var len = toLength(this.length)
, klass = cof(this);
end = end === undefined ? len : end;
if(klass == 'Array')return arraySlice.call(this, begin, end);
var start = toIndex(begin, len)
, upTo = toIndex(end, len)
, size = toLength(upTo - start)
, cloned = Array(size)
, i = 0;
for(; i < size; i++)cloned[i] = klass == 'String'
? this.charAt(start + i)
: this[start + i];
return cloned;
}
});
$export($export.P + $export.F * (IObject != Object), 'Array', {
join: function join(separator){
return arrayJoin.call(IObject(this), separator === undefined ? ',' : separator);
}
});
// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
$export($export.S, 'Array', {isArray: __webpack_require__(32)});
var createArrayReduce = function(isRight){
return function(callbackfn, memo){
aFunction(callbackfn);
var O = IObject(this)
, length = toLength(O.length)
, index = isRight ? length - 1 : 0
, i = isRight ? -1 : 1;
if(arguments.length < 2)for(;;){
if(index in O){
memo = O[index];
index += i;
break;
}
index += i;
if(isRight ? index < 0 : length <= index){
throw TypeError('Reduce of empty array with no initial value');
}
}
for(;isRight ? index >= 0 : length > index; index += i)if(index in O){
memo = callbackfn(memo, O[index], index, this);
}
return memo;
};
};
var methodize = function($fn){
return function(arg1/*, arg2 = undefined */){
return $fn(this, arg1, arguments[1]);
};
};
$export($export.P, 'Array', {
// 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
forEach: $.each = $.each || methodize(createArrayMethod(0)),
// 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
map: methodize(createArrayMethod(1)),
// 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
filter: methodize(createArrayMethod(2)),
// 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
some: methodize(createArrayMethod(3)),
// 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
every: methodize(createArrayMethod(4)),
// 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
reduce: createArrayReduce(false),
// 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
reduceRight: createArrayReduce(true),
// 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
indexOf: methodize(arrayIndexOf),
// 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
lastIndexOf: function(el, fromIndex /* = @[*-1] */){
var O = toIObject(this)
, length = toLength(O.length)
, index = length - 1;
if(arguments.length > 1)index = Math.min(index, toInteger(fromIndex));
if(index < 0)index = toLength(length + index);
for(;index >= 0; index--)if(index in O)if(O[index] === el)return index;
return -1;
}
});
// 20.3.3.1 / 15.9.4.4 Date.now()
$export($export.S, 'Date', {now: function(){ return +new Date; }});
var lz = function(num){
return num > 9 ? num : '0' + num;
};
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
// PhantomJS / old WebKit has a broken implementations
$export($export.P + $export.F * (fails(function(){
return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
}) || !fails(function(){
new Date(NaN).toISOString();
})), 'Date', {
toISOString: function toISOString(){
if(!isFinite(this))throw RangeError('Invalid time value');
var d = this
, y = d.getUTCFullYear()
, m = d.getUTCMilliseconds()
, s = y < 0 ? '-' : y > 9999 ? '+' : '';
return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
'-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
}
});
/***/ },
/* 4 */
/***/ function(module, exports) {
var $Object = Object;
module.exports = {
create: $Object.create,
getProto: $Object.getPrototypeOf,
isEnum: {}.propertyIsEnumerable,
getDesc: $Object.getOwnPropertyDescriptor,
setDesc: $Object.defineProperty,
setDescs: $Object.defineProperties,
getKeys: $Object.keys,
getNames: $Object.getOwnPropertyNames,
getSymbols: $Object.getOwnPropertySymbols,
each: [].forEach
};
/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {
var global = __webpack_require__(6)
, core = __webpack_require__(7)
, hide = __webpack_require__(8)
, redefine = __webpack_require__(12)
, ctx = __webpack_require__(14)
, PROTOTYPE = 'prototype';
var $export = function(type, name, source){
var IS_FORCED = type & $export.F
, IS_GLOBAL = type & $export.G
, IS_STATIC = type & $export.S
, IS_PROTO = type & $export.P
, IS_BIND = type & $export.B
, target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]
, exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
, expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})
, key, own, out, exp;
if(IS_GLOBAL)source = name;
for(key in source){
// contains in native
own = !IS_FORCED && target && key in target;
// export native or passed
out = (own ? target : source)[key];
// bind timers to global for call from export context
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// extend global
if(target && !own)redefine(target, key, out);
// export
if(exports[key] != out)hide(exports, key, exp);
if(IS_PROTO && expProto[key] != out)expProto[key] = out;
}
};
global.core = core;
// type bitmap
$export.F = 1; // forced
$export.G = 2; // global
$export.S = 4; // static
$export.P = 8; // proto
$export.B = 16; // bind
$export.W = 32; // wrap
module.exports = $export;
/***/ },
/* 6 */
/***/ function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
/***/ },
/* 7 */
/***/ function(module, exports) {
var core = module.exports = {version: '1.2.6'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {
var $ = __webpack_require__(4)
, createDesc = __webpack_require__(9);
module.exports = __webpack_require__(10) ? function(object, key, value){
return $.setDesc(object, key, createDesc(1, value));
} : function(object, key, value){
object[key] = value;
return object;
};
/***/ },
/* 9 */
/***/ function(module, exports) {
module.exports = function(bitmap, value){
return {
enumerable : !(bitmap & 1),
configurable: !(bitmap & 2),
writable : !(bitmap & 4),
value : value
};
};
/***/ },
/* 10 */
/***/ function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(11)(function(){
return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
});
/***/ },
/* 11 */
/***/ function(module, exports) {
module.exports = function(exec){
try {
return !!exec();
} catch(e){
return true;
}
};
/***/ },
/* 12 */
/***/ function(module, exports, __webpack_require__) {
// add fake Function#toString
// for correct work wrapped methods / constructors with methods like LoDash isNative
var global = __webpack_require__(6)
, hide = __webpack_require__(8)
, SRC = __webpack_require__(13)('src')
, TO_STRING = 'toString'
, $toString = Function[TO_STRING]
, TPL = ('' + $toString).split(TO_STRING);
__webpack_require__(7).inspectSource = function(it){
return $toString.call(it);
};
(module.exports = function(O, key, val, safe){
if(typeof val == 'function'){
val.hasOwnProperty(SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
val.hasOwnProperty('name') || hide(val, 'name', key);
}
if(O === global){
O[key] = val;
} else {
if(!safe)delete O[key];
hide(O, key, val);
}
})(Function.prototype, TO_STRING, function toString(){
return typeof this == 'function' && this[SRC] || $toString.call(this);
});
/***/ },
/* 13 */
/***/ function(module, exports) {
var id = 0
, px = Math.random();
module.exports = function(key){
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ },
/* 14 */
/***/ function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__(15);
module.exports = function(fn, that, length){
aFunction(fn);
if(that === undefined)return fn;
switch(length){
case 1: return function(a){
return fn.call(that, a);
};
case 2: return function(a, b){
return fn.call(that, a, b);
};
case 3: return function(a, b, c){
return fn.call(that, a, b, c);
};
}
return function(/* ...args */){
return fn.apply(that, arguments);
};
};
/***/ },
/* 15 */
/***/ function(module, exports) {
module.exports = function(it){
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
return it;
};
/***/ },
/* 16 */
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(6).document && document.documentElement;
/***/ },
/* 17 */
/***/ function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(18)
, document = __webpack_require__(6).document
// in old IE typeof document.createElement is 'object'
, is = isObject(document) && isObject(document.createElement);
module.exports = function(it){
return is ? document.createElement(it) : {};
};
/***/ },
/* 18 */
/***/ function(module, exports) {
module.exports = function(it){
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ },
/* 19 */
/***/ function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function(it, key){
return hasOwnProperty.call(it, key);
};
/***/ },
/* 20 */
/***/ function(module, exports) {
var toString = {}.toString;
module.exports = function(it){
return toString.call(it).slice(8, -1);
};
/***/ },
/* 21 */
/***/ function(module, exports) {
// fast apply, http://jsperf.lnkit.com/fast-apply/5
module.exports = function(fn, args, that){
var un = that === undefined;
switch(args.length){
case 0: return un ? fn()
: fn.call(that);
case 1: return un ? fn(args[0])
: fn.call(that, args[0]);
case 2: return un ? fn(args[0], args[1])
: fn.call(that, args[0], args[1]);
case 3: return un ? fn(args[0], args[1], args[2])
: fn.call(that, args[0], args[1], args[2]);
case 4: return un ? fn(args[0], args[1], args[2], args[3])
: fn.call(that, args[0], args[1], args[2], args[3]);
} return fn.apply(that, args);
};
/***/ },
/* 22 */
/***/ function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(18);
module.exports = function(it){
if(!isObject(it))throw TypeError(it + ' is not an object!');
return it;
};
/***/ },
/* 23 */
/***/ function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__(24);
module.exports = function(it){
return Object(defined(it));
};
/***/ },
/* 24 */
/***/ function(module, exports) {
// 7.2.1 RequireObjectCoercible(argument)
module.exports = function(it){
if(it == undefined)throw TypeError("Can't call method on " + it);
return it;
};
/***/ },
/* 25 */
/***/ function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(26)
, defined = __webpack_require__(24);
module.exports = function(it){
return IObject(defined(it));
};
/***/ },
/* 26 */
/***/ function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(20);
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ },
/* 27 */
/***/ function(module, exports) {
// 7.1.4 ToInteger
var ceil = Math.ceil
, floor = Math.floor;
module.exports = function(it){
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
/***/ },
/* 28 */
/***/ function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(27)
, max = Math.max
, min = Math.min;
module.exports = function(index, length){
index = toInteger(index);
return index < 0 ? max(index + length, 0) : min(index, length);
};
/***/ },
/* 29 */
/***/ function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__(27)
, min = Math.min;
module.exports = function(it){
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ },
/* 30 */
/***/ function(module, exports, __webpack_require__) {
// 0 -> Array#forEach
// 1 -> Array#map
// 2 -> Array#filter
// 3 -> Array#some
// 4 -> Array#every
// 5 -> Array#find
// 6 -> Array#findIndex
var ctx = __webpack_require__(14)
, IObject = __webpack_require__(26)
, toObject = __webpack_require__(23)
, toLength = __webpack_require__(29)
, asc = __webpack_require__(31);
module.exports = function(TYPE){
var IS_MAP = TYPE == 1
, IS_FILTER = TYPE == 2
, IS_SOME = TYPE == 3
, IS_EVERY = TYPE == 4
, IS_FIND_INDEX = TYPE == 6
, NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
return function($this, callbackfn, that){
var O = toObject($this)
, self = IObject(O)
, f = ctx(callbackfn, that, 3)
, length = toLength(self.length)
, index = 0
, result = IS_MAP ? asc($this, length) : IS_FILTER ? asc($this, 0) : undefined
, val, res;
for(;length > index; index++)if(NO_HOLES || index in self){
val = self[index];
res = f(val, index, O);
if(TYPE){
if(IS_MAP)result[index] = res; // map
else if(res)switch(TYPE){
case 3: return true; // some
case 5: return val; // find
case 6: return index; // findIndex
case 2: result.push(val); // filter
} else if(IS_EVERY)return false; // every
}
}
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
};
};
/***/ },
/* 31 */
/***/ function(module, exports, __webpack_require__) {
// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
var isObject = __webpack_require__(18)
, isArray = __webpack_require__(32)
, SPECIES = __webpack_require__(33)('species');
module.exports = function(original, length){
var C;
if(isArray(original)){
C = original.constructor;
// cross-realm fallback
if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
if(isObject(C)){
C = C[SPECIES];
if(C === null)C = undefined;
}
} return new (C === undefined ? Array : C)(length);
};
/***/ },
/* 32 */
/***/ function(module, exports, __webpack_require__) {
// 7.2.2 IsArray(argument)
var cof = __webpack_require__(20);
module.exports = Array.isArray || function(arg){
return cof(arg) == 'Array';
};
/***/ },
/* 33 */
/***/ function(module, exports, __webpack_require__) {
var store = __webpack_require__(34)('wks')
, uid = __webpack_require__(13)
, Symbol = __webpack_require__(6).Symbol;
module.exports = function(name){
return store[name] || (store[name] =
Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));
};
/***/ },
/* 34 */
/***/ function(module, exports, __webpack_require__) {
var global = __webpack_require__(6)
, SHARED = '__core-js_shared__'
, store = global[SHARED] || (global[SHARED] = {});
module.exports = function(key){
return store[key] || (store[key] = {});
};
/***/ },
/* 35 */
/***/ function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__(25)
, toLength = __webpack_require__(29)
, toIndex = __webpack_require__(28);
module.exports = function(IS_INCLUDES){
return function($this, el, fromIndex){
var O = toIObject($this)
, length = toLength(O.length)
, index = toIndex(fromIndex, length)
, value;
// Array#includes uses SameValueZero equality algorithm
if(IS_INCLUDES && el != el)while(length > index){
value = O[index++];
if(value != value)return true;
// Array#toIndex ignores holes, Array#includes - not
} else for(;length > index; index++)if(IS_INCLUDES || index in O){
if(O[index] === el)return IS_INCLUDES || index;
} return !IS_INCLUDES && -1;
};
};
/***/ },
/* 36 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// ECMAScript 6 symbols shim
var $ = __webpack_require__(4)
, global = __webpack_require__(6)
, has = __webpack_require__(19)
, DESCRIPTORS = __webpack_require__(10)
, $export = __webpack_require__(5)
, redefine = __webpack_require__(12)
, $fails = __webpack_require__(11)
, shared = __webpack_require__(34)
, setToStringTag = __webpack_require__(37)
, uid = __webpack_require__(13)
, wks = __webpack_require__(33)
, keyOf = __webpack_require__(38)
, $names = __webpack_require__(39)
, enumKeys = __webpack_require__(40)
, isArray = __webpack_require__(32)
, anObject = __webpack_require__(22)
, toIObject = __webpack_require__(25)
, createDesc = __webpack_require__(9)
, getDesc = $.getDesc
, setDesc = $.setDesc
, _create = $.create
, getNames = $names.get
, $Symbol = global.Symbol
, $JSON = global.JSON
, _stringify = $JSON && $JSON.stringify
, setter = false
, HIDDEN = wks('_hidden')
, isEnum = $.isEnum
, SymbolRegistry = shared('symbol-registry')
, AllSymbols = shared('symbols')
, useNative = typeof $Symbol == 'function'
, ObjectProto = Object.prototype;
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDesc = DESCRIPTORS && $fails(function(){
return _create(setDesc({}, 'a', {
get: function(){ return setDesc(this, 'a', {value: 7}).a; }
})).a != 7;
}) ? function(it, key, D){
var protoDesc = getDesc(ObjectProto, key);
if(protoDesc)delete ObjectProto[key];
setDesc(it, key, D);
if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);
} : setDesc;
var wrap = function(tag){
var sym = AllSymbols[tag] = _create($Symbol.prototype);
sym._k = tag;
DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
configurable: true,
set: function(value){
if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
setSymbolDesc(this, tag, createDesc(1, value));
}
});
return sym;
};
var isSymbol = function(it){
return typeof it == 'symbol';
};
var $defineProperty = function defineProperty(it, key, D){
if(D && has(AllSymbols, key)){
if(!D.enumerable){
if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));
it[HIDDEN][key] = true;
} else {
if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
D = _create(D, {enumerable: createDesc(0, false)});
} return setSymbolDesc(it, key, D);
} return setDesc(it, key, D);
};
var $defineProperties = function defineProperties(it, P){
anObject(it);
var keys = enumKeys(P = toIObject(P))
, i = 0
, l = keys.length
, key;
while(l > i)$defineProperty(it, key = keys[i++], P[key]);
return it;
};
var $create = function create(it, P){
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
var $propertyIsEnumerable = function propertyIsEnumerable(key){
var E = isEnum.call(this, key);
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]
? E : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
var D = getDesc(it = toIObject(it), key);
if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it){
var names = getNames(toIObject(it))
, result = []
, i = 0
, key;
while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);
return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
var names = getNames(toIObject(it))
, result = []
, i = 0
, key;
while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
return result;
};
var $stringify = function stringify(it){
if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
var args = [it]
, i = 1
, $$ = arguments
, replacer, $replacer;
while($$.length > i)args.push($$[i++]);
replacer = args[1];
if(typeof replacer == 'function')$replacer = replacer;
if($replacer || !isArray(replacer))replacer = function(key, value){
if($replacer)value = $replacer.call(this, key, value);
if(!isSymbol(value))return value;
};
args[1] = replacer;
return _stringify.apply($JSON, args);
};
var buggyJSON = $fails(function(){
var S = $Symbol();
// MS Edge converts symbol values to JSON as {}
// WebKit converts symbol values to JSON as null
// V8 throws on boxed symbols
return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
});
// 19.4.1.1 Symbol([description])
if(!useNative){
$Symbol = function Symbol(){
if(isSymbol(this))throw TypeError('Symbol is not a constructor');
return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));
};
redefine($Symbol.prototype, 'toString', function toString(){
return this._k;
});
isSymbol = function(it){
return it instanceof $Symbol;
};
$.create = $create;
$.isEnum = $propertyIsEnumerable;
$.getDesc = $getOwnPropertyDescriptor;
$.setDesc = $defineProperty;
$.setDescs = $defineProperties;
$.getNames = $names.get = $getOwnPropertyNames;
$.getSymbols = $getOwnPropertySymbols;
if(DESCRIPTORS && !__webpack_require__(41)){
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
}
}
var symbolStatics = {
// 19.4.2.1 Symbol.for(key)
'for': function(key){
return has(SymbolRegistry, key += '')
? SymbolRegistry[key]
: SymbolRegistry[key] = $Symbol(key);
},
// 19.4.2.5 Symbol.keyFor(sym)
keyFor: function keyFor(key){
return keyOf(SymbolRegistry, key);
},
useSetter: function(){ setter = true; },
useSimple: function(){ setter = false; }
};
// 19.4.2.2 Symbol.hasInstance
// 19.4.2.3 Symbol.isConcatSpreadable
// 19.4.2.4 Symbol.iterator
// 19.4.2.6 Symbol.match
// 19.4.2.8 Symbol.replace
// 19.4.2.9 Symbol.search
// 19.4.2.10 Symbol.species
// 19.4.2.11 Symbol.split
// 19.4.2.12 Symbol.toPrimitive
// 19.4.2.13 Symbol.toStringTag
// 19.4.2.14 Symbol.unscopables
$.each.call((
'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +
'species,split,toPrimitive,toStringTag,unscopables'
).split(','), function(it){
var sym = wks(it);
symbolStatics[it] = useNative ? sym : wrap(sym);
});
setter = true;
$export($export.G + $export.W, {Symbol: $Symbol});
$export($export.S, 'Symbol', symbolStatics);
$export($export.S + $export.F * !useNative, 'Object', {
// 19.1.2.2 Object.create(O [, Properties])
create: $create,
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
defineProperty: $defineProperty,
// 19.1.2.3 Object.defineProperties(O, Properties)
defineProperties: $defineProperties,
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
// 19.1.2.7 Object.getOwnPropertyNames(O)
getOwnPropertyNames: $getOwnPropertyNames,
// 19.1.2.8 Object.getOwnPropertySymbols(O)
getOwnPropertySymbols: $getOwnPropertySymbols
});
// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);
/***/ },
/* 37 */
/***/ function(module, exports, __webpack_require__) {
var def = __webpack_require__(4).setDesc
, has = __webpack_require__(19)
, TAG = __webpack_require__(33)('toStringTag');
module.exports = function(it, tag, stat){
if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
};
/***/ },
/* 38 */
/***/ function(module, exports, __webpack_require__) {
var $ = __webpack_require__(4)
, toIObject = __webpack_require__(25);
module.exports = function(object, el){
var O = toIObject(object)
, keys = $.getKeys(O)
, length = keys.length
, index = 0
, key;
while(length > index)if(O[key = keys[index++]] === el)return key;
};
/***/ },
/* 39 */
/***/ function(module, exports, __webpack_require__) {
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
var toIObject = __webpack_require__(25)
, getNames = __webpack_require__(4).getNames
, toString = {}.toString;
var windowNames = typeof window == 'object' && Object.getOwnPropertyNames
? Object.getOwnPropertyNames(window) : [];
var getWindowNames = function(it){
try {
return getNames(it);
} catch(e){
return windowNames.slice();
}
};
module.exports.get = function getOwnPropertyNames(it){
if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);
return getNames(toIObject(it));
};
/***/ },
/* 40 */
/***/ function(module, exports, __webpack_require__) {
// all enumerable object keys, includes symbols
var $ = __webpack_require__(4);
module.exports = function(it){
var keys = $.getKeys(it)
, getSymbols = $.getSymbols;
if(getSymbols){
var symbols = getSymbols(it)
, isEnum = $.isEnum
, i = 0
, key;
while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);
}
return keys;
};
/***/ },
/* 41 */
/***/ function(module, exports) {
module.exports = false;
/***/ },
/* 42 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.3.1 Object.assign(target, source)
var $export = __webpack_require__(5);
$export($export.S + $export.F, 'Object', {assign: __webpack_require__(43)});
/***/ },
/* 43 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.1 Object.assign(target, source, ...)
var $ = __webpack_require__(4)
, toObject = __webpack_require__(23)
, IObject = __webpack_require__(26);
// should work with symbols and should have deterministic property order (V8 bug)
module.exports = __webpack_require__(11)(function(){
var a = Object.assign
, A = {}
, B = {}
, S = Symbol()
, K = 'abcdefghijklmnopqrst';
A[S] = 7;
K.split('').forEach(function(k){ B[k] = k; });
return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K;
}) ? function assign(target, source){ // eslint-disable-line no-unused-vars
var T = toObject(target)
, $$ = arguments
, $$len = $$.length
, index = 1
, getKeys = $.getKeys
, getSymbols = $.getSymbols
, isEnum = $.isEnum;
while($$len > index){
var S = IObject($$[index++])
, keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
, length = keys.length
, j = 0
, key;
while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
}
return T;
} : Object.assign;
/***/ },
/* 44 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.3.10 Object.is(value1, value2)
var $export = __webpack_require__(5);
$export($export.S, 'Object', {is: __webpack_require__(45)});
/***/ },
/* 45 */
/***/ function(module, exports) {
// 7.2.9 SameValue(x, y)
module.exports = Object.is || function is(x, y){
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
};
/***/ },
/* 46 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = __webpack_require__(5);
$export($export.S, 'Object', {setPrototypeOf: __webpack_require__(47).set});
/***/ },
/* 47 */
/***/ function(module, exports, __webpack_require__) {
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
var getDesc = __webpack_require__(4).getDesc
, isObject = __webpack_require__(18)
, anObject = __webpack_require__(22);
var check = function(O, proto){
anObject(O);
if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
};
module.exports = {
set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
function(test, buggy, set){
try {
set = __webpack_require__(14)(Function.call, getDesc(Object.prototype, '__proto__').set, 2);
set(test, []);
buggy = !(test instanceof Array);
} catch(e){ buggy = true; }
return function setPrototypeOf(O, proto){
check(O, proto);
if(buggy)O.__proto__ = proto;
else set(O, proto);
return O;
};
}({}, false) : undefined),
check: check
};
/***/ },
/* 48 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 19.1.3.6 Object.prototype.toString()
var classof = __webpack_require__(49)
, test = {};
test[__webpack_require__(33)('toStringTag')] = 'z';
if(test + '' != '[object z]'){
__webpack_require__(12)(Object.prototype, 'toString', function toString(){
return '[object ' + classof(this) + ']';
}, true);
}
/***/ },
/* 49 */
/***/ function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(20)
, TAG = __webpack_require__(33)('toStringTag')
// ES3 wrong here
, ARG = cof(function(){ return arguments; }()) == 'Arguments';
module.exports = function(it){
var O, T, B;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
: typeof (T = (O = Object(it))[TAG]) == 'string' ? T
// builtinTag case
: ARG ? cof(O)
// ES3 arguments fallback
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};
/***/ },
/* 50 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.5 Object.freeze(O)
var isObject = __webpack_require__(18);
__webpack_require__(51)('freeze', function($freeze){
return function freeze(it){
return $freeze && isObject(it) ? $freeze(it) : it;
};
});
/***/ },
/* 51 */
/***/ function(module, exports, __webpack_require__) {
// most Object methods by ES6 should accept primitives
var $export = __webpack_require__(5)
, core = __webpack_require__(7)
, fails = __webpack_require__(11);
module.exports = function(KEY, exec){
var fn = (core.Object || {})[KEY] || Object[KEY]
, exp = {};
exp[KEY] = exec(fn);
$export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
};
/***/ },
/* 52 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.17 Object.seal(O)
var isObject = __webpack_require__(18);
__webpack_require__(51)('seal', function($seal){
return function seal(it){
return $seal && isObject(it) ? $seal(it) : it;
};
});
/***/ },
/* 53 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.15 Object.preventExtensions(O)
var isObject = __webpack_require__(18);
__webpack_require__(51)('preventExtensions', function($preventExtensions){
return function preventExtensions(it){
return $preventExtensions && isObject(it) ? $preventExtensions(it) : it;
};
});
/***/ },
/* 54 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.12 Object.isFrozen(O)
var isObject = __webpack_require__(18);
__webpack_require__(51)('isFrozen', function($isFrozen){
return function isFrozen(it){
return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
};
});
/***/ },
/* 55 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.13 Object.isSealed(O)
var isObject = __webpack_require__(18);
__webpack_require__(51)('isSealed', function($isSealed){
return function isSealed(it){
return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
};
});
/***/ },
/* 56 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.11 Object.isExtensible(O)
var isObject = __webpack_require__(18);
__webpack_require__(51)('isExtensible', function($isExtensible){
return function isExtensible(it){
return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
};
});
/***/ },
/* 57 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
var toIObject = __webpack_require__(25);
__webpack_require__(51)('getOwnPropertyDescriptor', function($getOwnPropertyDescriptor){
return function getOwnPropertyDescriptor(it, key){
return $getOwnPropertyDescriptor(toIObject(it), key);
};
});
/***/ },
/* 58 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.9 Object.getPrototypeOf(O)
var toObject = __webpack_require__(23);
__webpack_require__(51)('getPrototypeOf', function($getPrototypeOf){
return function getPrototypeOf(it){
return $getPrototypeOf(toObject(it));
};
});
/***/ },
/* 59 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.14 Object.keys(O)
var toObject = __webpack_require__(23);
__webpack_require__(51)('keys', function($keys){
return function keys(it){
return $keys(toObject(it));
};
});
/***/ },
/* 60 */
/***/ function(module, exports, __webpack_require__) {
// 19.1.2.7 Object.getOwnPropertyNames(O)
__webpack_require__(51)('getOwnPropertyNames', function(){
return __webpack_require__(39).get;
});
/***/ },
/* 61 */
/***/ function(module, exports, __webpack_require__) {
var setDesc = __webpack_require__(4).setDesc
, createDesc = __webpack_require__(9)
, has = __webpack_require__(19)
, FProto = Function.prototype
, nameRE = /^\s*function ([^ (]*)/
, NAME = 'name';
// 19.2.4.2 name
NAME in FProto || __webpack_require__(10) && setDesc(FProto, NAME, {
configurable: true,
get: function(){
var match = ('' + this).match(nameRE)
, name = match ? match[1] : '';
has(this, NAME) || setDesc(this, NAME, createDesc(5, name));
return name;
}
});
/***/ },
/* 62 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $ = __webpack_require__(4)
, isObject = __webpack_require__(18)
, HAS_INSTANCE = __webpack_require__(33)('hasInstance')
, FunctionProto = Function.prototype;
// 19.2.3.6 Function.prototype[@@hasInstance](V)
if(!(HAS_INSTANCE in FunctionProto))$.setDesc(FunctionProto, HAS_INSTANCE, {value: function(O){
if(typeof this != 'function' || !isObject(O))return false;
if(!isObject(this.prototype))return O instanceof this;
// for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
while(O = $.getProto(O))if(this.prototype === O)return true;
return false;
}});
/***/ },
/* 63 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $ = __webpack_require__(4)
, global = __webpack_require__(6)
, has = __webpack_require__(19)
, cof = __webpack_require__(20)
, toPrimitive = __webpack_require__(64)
, fails = __webpack_require__(11)
, $trim = __webpack_require__(65).trim
, NUMBER = 'Number'
, $Number = global[NUMBER]
, Base = $Number
, proto = $Number.prototype
// Opera ~12 has broken Object#toString
, BROKEN_COF = cof($.create(proto)) == NUMBER
, TRIM = 'trim' in String.prototype;
// 7.1.3 ToNumber(argument)
var toNumber = function(argument){
var it = toPrimitive(argument, false);
if(typeof it == 'string' && it.length > 2){
it = TRIM ? it.trim() : $trim(it, 3);
var first = it.charCodeAt(0)
, third, radix, maxCode;
if(first === 43 || first === 45){
third = it.charCodeAt(2);
if(third === 88 || third === 120)return NaN; // Number('+0x1') should be NaN, old V8 fix
} else if(first === 48){
switch(it.charCodeAt(1)){
case 66 : case 98 : radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
case 79 : case 111 : radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
default : return +it;
}
for(var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++){
code = digits.charCodeAt(i);
// parseInt parses a string to a first unavailable symbol
// but ToNumber should return NaN if a string contains unavailable symbols
if(code < 48 || code > maxCode)return NaN;
} return parseInt(digits, radix);
}
} return +it;
};
if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){
$Number = function Number(value){
var it = arguments.length < 1 ? 0 : value
, that = this;
return that instanceof $Number
// check on 1..constructor(foo) case
&& (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER)
? new Base(toNumber(it)) : toNumber(it);
};
$.each.call(__webpack_require__(10) ? $.getNames(Base) : (
// ES3:
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
// ES6 (in case, if modules with ES6 Number statics required before):
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
).split(','), function(key){
if(has(Base, key) && !has($Number, key)){
$.setDesc($Number, key, $.getDesc(Base, key));
}
});
$Number.prototype = proto;
proto.constructor = $Number;
__webpack_require__(12)(global, NUMBER, $Number);
}
/***/ },
/* 64 */
/***/ function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(18);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function(it, S){
if(!isObject(it))return it;
var fn, val;
if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ },
/* 65 */
/***/ function(module, exports, __webpack_require__) {
var $export = __webpack_require__(5)
, defined = __webpack_require__(24)
, fails = __webpack_require__(11)
, spaces = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
'\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'
, space = '[' + spaces + ']'
, non = '\u200b\u0085'
, ltrim = RegExp('^' + space + space + '*')
, rtrim = RegExp(space + space + '*$');
var exporter = function(KEY, exec){
var exp = {};
exp[KEY] = exec(trim);
$export($export.P + $export.F * fails(function(){
return !!spaces[KEY]() || non[KEY]() != non;
}), 'String', exp);
};
// 1 -> String#trimLeft
// 2 -> String#trimRight
// 3 -> String#trim
var trim = exporter.trim = function(string, TYPE){
string = String(defined(string));
if(TYPE & 1)string = string.replace(ltrim, '');
if(TYPE & 2)string = string.replace(rtrim, '');
return string;
};
module.exports = exporter;
/***/ },
/* 66 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.1 Number.EPSILON
var $export = __webpack_require__(5);
$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)});
/***/ },
/* 67 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.2 Number.isFinite(number)
var $export = __webpack_require__(5)
, _isFinite = __webpack_require__(6).isFinite;
$export($export.S, 'Number', {
isFinite: function isFinite(it){
return typeof it == 'number' && _isFinite(it);
}
});
/***/ },
/* 68 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
var $export = __webpack_require__(5);
$export($export.S, 'Number', {isInteger: __webpack_require__(69)});
/***/ },
/* 69 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
var isObject = __webpack_require__(18)
, floor = Math.floor;
module.exports = function isInteger(it){
return !isObject(it) && isFinite(it) && floor(it) === it;
};
/***/ },
/* 70 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.4 Number.isNaN(number)
var $export = __webpack_require__(5);
$export($export.S, 'Number', {
isNaN: function isNaN(number){
return number != number;
}
});
/***/ },
/* 71 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.5 Number.isSafeInteger(number)
var $export = __webpack_require__(5)
, isInteger = __webpack_require__(69)
, abs = Math.abs;
$export($export.S, 'Number', {
isSafeInteger: function isSafeInteger(number){
return isInteger(number) && abs(number) <= 0x1fffffffffffff;
}
});
/***/ },
/* 72 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.6 Number.MAX_SAFE_INTEGER
var $export = __webpack_require__(5);
$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff});
/***/ },
/* 73 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.10 Number.MIN_SAFE_INTEGER
var $export = __webpack_require__(5);
$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff});
/***/ },
/* 74 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.12 Number.parseFloat(string)
var $export = __webpack_require__(5);
$export($export.S, 'Number', {parseFloat: parseFloat});
/***/ },
/* 75 */
/***/ function(module, exports, __webpack_require__) {
// 20.1.2.13 Number.parseInt(string, radix)
var $export = __webpack_require__(5);
$export($export.S, 'Number', {parseInt: parseInt});
/***/ },
/* 76 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.3 Math.acosh(x)
var $export = __webpack_require__(5)
, log1p = __webpack_require__(77)
, sqrt = Math.sqrt
, $acosh = Math.acosh;
// V8 bug https://code.google.com/p/v8/issues/detail?id=3509
$export($export.S + $export.F * !($acosh && Math.floor($acosh(Number.MAX_VALUE)) == 710), 'Math', {
acosh: function acosh(x){
return (x = +x) < 1 ? NaN : x > 94906265.62425156
? Math.log(x) + Math.LN2
: log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
}
});
/***/ },
/* 77 */
/***/ function(module, exports) {
// 20.2.2.20 Math.log1p(x)
module.exports = Math.log1p || function log1p(x){
return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
};
/***/ },
/* 78 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.5 Math.asinh(x)
var $export = __webpack_require__(5);
function asinh(x){
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
}
$export($export.S, 'Math', {asinh: asinh});
/***/ },
/* 79 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.7 Math.atanh(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {
atanh: function atanh(x){
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
}
});
/***/ },
/* 80 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.9 Math.cbrt(x)
var $export = __webpack_require__(5)
, sign = __webpack_require__(81);
$export($export.S, 'Math', {
cbrt: function cbrt(x){
return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
}
});
/***/ },
/* 81 */
/***/ function(module, exports) {
// 20.2.2.28 Math.sign(x)
module.exports = Math.sign || function sign(x){
return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
};
/***/ },
/* 82 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.11 Math.clz32(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {
clz32: function clz32(x){
return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
}
});
/***/ },
/* 83 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.12 Math.cosh(x)
var $export = __webpack_require__(5)
, exp = Math.exp;
$export($export.S, 'Math', {
cosh: function cosh(x){
return (exp(x = +x) + exp(-x)) / 2;
}
});
/***/ },
/* 84 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.14 Math.expm1(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {expm1: __webpack_require__(85)});
/***/ },
/* 85 */
/***/ function(module, exports) {
// 20.2.2.14 Math.expm1(x)
module.exports = Math.expm1 || function expm1(x){
return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
};
/***/ },
/* 86 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.16 Math.fround(x)
var $export = __webpack_require__(5)
, sign = __webpack_require__(81)
, pow = Math.pow
, EPSILON = pow(2, -52)
, EPSILON32 = pow(2, -23)
, MAX32 = pow(2, 127) * (2 - EPSILON32)
, MIN32 = pow(2, -126);
var roundTiesToEven = function(n){
return n + 1 / EPSILON - 1 / EPSILON;
};
$export($export.S, 'Math', {
fround: function fround(x){
var $abs = Math.abs(x)
, $sign = sign(x)
, a, result;
if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
a = (1 + EPSILON32 / EPSILON) * $abs;
result = a - (a - $abs);
if(result > MAX32 || result != result)return $sign * Infinity;
return $sign * result;
}
});
/***/ },
/* 87 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
var $export = __webpack_require__(5)
, abs = Math.abs;
$export($export.S, 'Math', {
hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars
var sum = 0
, i = 0
, $$ = arguments
, $$len = $$.length
, larg = 0
, arg, div;
while(i < $$len){
arg = abs($$[i++]);
if(larg < arg){
div = larg / arg;
sum = sum * div * div + 1;
larg = arg;
} else if(arg > 0){
div = arg / larg;
sum += div * div;
} else sum += arg;
}
return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
}
});
/***/ },
/* 88 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.18 Math.imul(x, y)
var $export = __webpack_require__(5)
, $imul = Math.imul;
// some WebKit versions fails with big numbers, some has wrong arity
$export($export.S + $export.F * __webpack_require__(11)(function(){
return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
}), 'Math', {
imul: function imul(x, y){
var UINT16 = 0xffff
, xn = +x
, yn = +y
, xl = UINT16 & xn
, yl = UINT16 & yn;
return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
}
});
/***/ },
/* 89 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.21 Math.log10(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {
log10: function log10(x){
return Math.log(x) / Math.LN10;
}
});
/***/ },
/* 90 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.20 Math.log1p(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {log1p: __webpack_require__(77)});
/***/ },
/* 91 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.22 Math.log2(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {
log2: function log2(x){
return Math.log(x) / Math.LN2;
}
});
/***/ },
/* 92 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.28 Math.sign(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {sign: __webpack_require__(81)});
/***/ },
/* 93 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.30 Math.sinh(x)
var $export = __webpack_require__(5)
, expm1 = __webpack_require__(85)
, exp = Math.exp;
// V8 near Chromium 38 has a problem with very small numbers
$export($export.S + $export.F * __webpack_require__(11)(function(){
return !Math.sinh(-2e-17) != -2e-17;
}), 'Math', {
sinh: function sinh(x){
return Math.abs(x = +x) < 1
? (expm1(x) - expm1(-x)) / 2
: (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
}
});
/***/ },
/* 94 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.33 Math.tanh(x)
var $export = __webpack_require__(5)
, expm1 = __webpack_require__(85)
, exp = Math.exp;
$export($export.S, 'Math', {
tanh: function tanh(x){
var a = expm1(x = +x)
, b = expm1(-x);
return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
}
});
/***/ },
/* 95 */
/***/ function(module, exports, __webpack_require__) {
// 20.2.2.34 Math.trunc(x)
var $export = __webpack_require__(5);
$export($export.S, 'Math', {
trunc: function trunc(it){
return (it > 0 ? Math.floor : Math.ceil)(it);
}
});
/***/ },
/* 96 */
/***/ function(module, exports, __webpack_require__) {
var $export = __webpack_require__(5)
, toIndex = __webpack_require__(28)
, fromCharCode = String.fromCharCode
, $fromCodePoint = String.fromCodePoint;
// length should be 1, old FF problem
$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
// 21.1.2.2 String.fromCodePoint(...codePoints)
fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars
var res = []
, $$ = arguments
, $$len = $$.length
, i = 0
, code;
while($$len > i){
code = +$$[i++];
if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');
res.push(code < 0x10000
? fromCharCode(code)
: fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
);
} return res.join('');
}
});
/***/ },
/* 97 */
/***/ function(module, exports, __webpack_require__) {
var $export = __webpack_require__(5)
, toIObject = __webpack_require__(25)
, toLength = __webpack_require__(29);
$export($export.S, 'String', {
// 21.1.2.4 String.raw(callSite, ...substitutions)
raw: function raw(callSite){
var tpl = toIObject(callSite.raw)
, len = toLength(tpl.length)
, $$ = arguments
, $$len = $$.length
, res = []
, i = 0;
while(len > i){
res.push(String(tpl[i++]));
if(i < $$len)res.push(String($$[i]));
} return res.join('');
}
});
/***/ },
/* 98 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 21.1.3.25 String.prototype.trim()
__webpack_require__(65)('trim', function($trim){
return function trim(){
return $trim(this, 3);
};
});
/***/ },
/* 99 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $at = __webpack_require__(100)(true);
// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(101)(String, 'String', function(iterated){
this._t = String(iterated); // target
this._i = 0; // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
}, function(){
var O = this._t
, index = this._i
, point;
if(index >= O.length)return {value: undefined, done: true};
point = $at(O, index);
this._i += point.length;
return {value: point, done: false};
});
/***/ },
/* 100 */
/***/ function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(27)
, defined = __webpack_require__(24);
// true -> String#at
// false -> String#codePointAt
module.exports = function(TO_STRING){
return function(that, pos){
var s = String(defined(that))
, i = toInteger(pos)
, l = s.length
, a, b;
if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
a = s.charCodeAt(i);
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
? TO_STRING ? s.charAt(i) : a
: TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
};
};
/***/ },
/* 101 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var LIBRARY = __webpack_require__(41)
, $export = __webpack_require__(5)
, redefine = __webpack_require__(12)
, hide = __webpack_require__(8)
, has = __webpack_require__(19)
, Iterators = __webpack_require__(102)
, $iterCreate = __webpack_require__(103)
, setToStringTag = __webpack_require__(37)
, getProto = __webpack_require__(4).getProto
, ITERATOR = __webpack_require__(33)('iterator')
, BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
, FF_ITERATOR = '@@iterator'
, KEYS = 'keys'
, VALUES = 'values';
var returnThis = function(){ return this; };
module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
$iterCreate(Constructor, NAME, next);
var getMethod = function(kind){
if(!BUGGY && kind in proto)return proto[kind];
switch(kind){
case KEYS: return function keys(){ return new Constructor(this, kind); };
case VALUES: return function values(){ return new Constructor(this, kind); };
} return function entries(){ return new Constructor(this, kind); };
};
var TAG = NAME + ' Iterator'
, DEF_VALUES = DEFAULT == VALUES
, VALUES_BUG = false
, proto = Base.prototype
, $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
, $default = $native || getMethod(DEFAULT)
, methods, key;
// Fix native
if($native){
var IteratorPrototype = getProto($default.call(new Base));
// Set @@toStringTag to native iterators
setToStringTag(IteratorPrototype, TAG, true);
// FF fix
if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
// fix Array#{values, @@iterator}.name in V8 / FF
if(DEF_VALUES && $native.name !== VALUES){
VALUES_BUG = true;
$default = function values(){ return $native.call(this); };
}
}
// Define iterator
if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
hide(proto, ITERATOR, $default);
}
// Plug for library
Iterators[NAME] = $default;
Iterators[TAG] = returnThis;
if(DEFAULT){
methods = {
values: DEF_VALUES ? $default : getMethod(VALUES),
keys: IS_SET ? $default : getMethod(KEYS),
entries: !DEF_VALUES ? $default : getMethod('entries')
};
if(FORCED)for(key in methods){
if(!(key in proto))redefine(proto, key, methods[key]);
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
}
return methods;
};
/***/ },
/* 102 */
/***/ function(module, exports) {
module.exports = {};
/***/ },
/* 103 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $ = __webpack_require__(4)
, descriptor = __webpack_require__(9)
, setToStringTag = __webpack_require__(37)
, IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(8)(IteratorPrototype, __webpack_require__(33)('iterator'), function(){ return this; });
module.exports = function(Constructor, NAME, next){
Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});
setToStringTag(Constructor, NAME + ' Iterator');
};
/***/ },
/* 104 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $export = __webpack_require__(5)
, $at = __webpack_require__(100)(false);
$export($export.P, 'String', {
// 21.1.3.3 String.prototype.codePointAt(pos)
codePointAt: function codePointAt(pos){
return $at(this, pos);
}
});
/***/ },
/* 105 */
/***/ function(module, exports, __webpack_require__) {
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
'use strict';
var $export = __webpack_require__(5)
, toLength = __webpack_require__(29)
, context = __webpack_require__(106)
, ENDS_WITH = 'endsWith'
, $endsWith = ''[ENDS_WITH];
$export($export.P + $export.F * __webpack_require__(108)(ENDS_WITH), 'String', {
endsWith: function endsWith(searchString /*, endPosition = @length */){
var that = context(this, searchString, ENDS_WITH)
, $$ = arguments
, endPosition = $$.length > 1 ? $$[1] : undefined
, len = toLength(that.length)
, end = endPosition === undefined ? len : Math.min(toLength(endPosition), len)
, search = String(searchString);
return $endsWith
? $endsWith.call(that, search, end)
: that.slice(end - search.length, end) === search;
}
});
/***/ },
/* 106 */
/***/ function(module, exports, __webpack_require__) {
// helper for String#{startsWith, endsWith, includes}
var isRegExp = __webpack_require__(107)
, defined = __webpack_require__(24);
module.exports = function(that, searchString, NAME){
if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!");
return String(defined(that));
};
/***/ },
/* 107 */
/***/ function(module, exports, __webpack_require__) {
// 7.2.8 IsRegExp(argument)
var isObject = __webpack_require__(18)
, cof = __webpack_require__(20)
, MATCH = __webpack_require__(33)('match');
module.exports = function(it){
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
};
/***/ },
/* 108 */
/***/ function(module, exports, __webpack_require__) {
var MATCH = __webpack_require__(33)('match');
module.exports = function(KEY){
var re = /./;
try {
'/./'[KEY](re);
} catch(e){
try {
re[MATCH] = false;
return !'/./'[KEY](re);
} catch(f){ /* empty */ }
} return true;
};
/***/ },
/* 109 */
/***/ function(module, exports, __webpack_require__) {
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
'use strict';
var $export = __webpack_require__(5)
, context = __webpack_require__(106)
, INCLUDES = 'includes';
$export($export.P + $export.F * __webpack_require__(108)(INCLUDES), 'String', {
includes: function includes(searchString /*, position = 0 */){
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ },
/* 110 */
/***/ function(module, exports, __webpack_require__) {
var $export = __webpack_require__(5);
$export($export.P, 'String', {
// 21.1.3.13 String.prototype.repeat(count)
repeat: __webpack_require__(111)
});
/***/ },
/* 111 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var toInteger = __webpack_require__(27)
, defined = __webpack_require__(24);
module.exports = function repeat(count){
var str = String(defined(this))
, res = ''
, n = toInteger(count);
if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
return res;
};
/***/ },
/* 112 */
/***/ function(module, exports, __webpack_require__) {
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
'use strict';
var $export = __webpack_require__(5)
, toLength = __webpack_require__(29)
, context = __webpack_require__(106)
, STARTS_WITH = 'startsWith'
, $startsWith = ''[STARTS_WITH];
$export($export.P + $export.F * __webpack_require__(108)(STARTS_WITH), 'String', {
startsWith: function startsWith(searchString /*, position = 0 */){
var that = context(this, searchString, STARTS_WITH)
, $$ = arguments
, index = toLength(Math.min($$.length > 1 ? $$[1] : undefined, that.length))
, search = String(searchString);
return $startsWith
? $startsWith.call(that, search, index)
: that.slice(index, index + search.length) === search;
}
});
/***/ },
/* 113 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var ctx = __webpack_require__(14)
, $export = __webpack_require__(5)
, toObject = __webpack_require__(23)
, call = __webpack_require__(114)
, isArrayIter = __webpack_require__(115)
, toLength = __webpack_require__(29)
, getIterFn = __webpack_require__(116);
$export($export.S + $export.F * !__webpack_require__(117)(function(iter){ Array.from(iter); }), 'Array', {
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
var O = toObject(arrayLike)
, C = typeof this == 'function' ? this : Array
, $$ = arguments
, $$len = $$.length
, mapfn = $$len > 1 ? $$[1] : undefined
, mapping = mapfn !== undefined
, index = 0
, iterFn = getIterFn(O)
, length, result, step, iterator;
if(mapping)mapfn = ctx(mapfn, $$len > 2 ? $$[2] : undefined, 2);
// if object isn't iterable or it's array with default iterator - use simple case
if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
result[index] = mapping ? call(iterator, mapfn, [step.value, index], true) : step.value;
}
} else {
length = toLength(O.length);
for(result = new C(length); length > index; index++){
result[index] = mapping ? mapfn(O[index], index) : O[index];
}
}
result.length = index;
return result;
}
});
/***/ },
/* 114 */
/***/ function(module, exports, __webpack_require__) {
// call something on iterator step with safe closing on error
var anObject = __webpack_require__(22);
module.exports = function(iterator, fn, value, entries){
try {
return entries ? fn(anObject(value)[0], value[1]) : fn(value);
// 7.4.6 IteratorClose(iterator, completion)
} catch(e){
var ret = iterator['return'];
if(ret !== undefined)anObject(ret.call(iterator));
throw e;
}
};
/***/ },
/* 115 */
/***/ function(module, exports, __webpack_require__) {
// check on default Array iterator
var Iterators = __webpack_require__(102)
, ITERATOR = __webpack_require__(33)('iterator')
, ArrayProto = Array.prototype;
module.exports = function(it){
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
};
/***/ },
/* 116 */
/***/ function(module, exports, __webpack_require__) {
var classof = __webpack_require__(49)
, ITERATOR = __webpack_require__(33)('iterator')
, Iterators = __webpack_require__(102);
module.exports = __webpack_require__(7).getIteratorMethod = function(it){
if(it != undefined)return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
/***/ },
/* 117 */
/***/ function(module, exports, __webpack_require__) {
var ITERATOR = __webpack_require__(33)('iterator')
, SAFE_CLOSING = false;
try {
var riter = [7][ITERATOR]();
riter['return'] = function(){ SAFE_CLOSING = true; };
Array.from(riter, function(){ throw 2; });
} catch(e){ /* empty */ }
module.exports = function(exec, skipClosing){
if(!skipClosing && !SAFE_CLOSING)return false;
var safe = false;
try {
var arr = [7]
, iter = arr[ITERATOR]();
iter.next = function(){ safe = true; };
arr[ITERATOR] = function(){ return iter; };
exec(arr);
} catch(e){ /* empty */ }
return safe;
};
/***/ },
/* 118 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $export = __webpack_require__(5);
// WebKit Array.of isn't generic
$export($export.S + $export.F * __webpack_require__(11)(function(){
function F(){}
return !(Array.of.call(F) instanceof F);
}), 'Array', {
// 22.1.2.3 Array.of( ...items)
of: function of(/* ...args */){
var index = 0
, $$ = arguments
, $$len = $$.length
, result = new (typeof this == 'function' ? this : Array)($$len);
while($$len > index)result[index] = $$[index++];
result.length = $$len;
return result;
}
});
/***/ },
/* 119 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var addToUnscopables = __webpack_require__(120)
, step = __webpack_require__(121)
, Iterators = __webpack_require__(102)
, toIObject = __webpack_require__(25);
// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__(101)(Array, 'Array', function(iterated, kind){
this._t = toIObject(iterated); // target
this._i = 0; // next index
this._k = kind; // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function(){
var O = this._t
, kind = this._k
, index = this._i++;
if(!O || index >= O.length){
this._t = undefined;
return step(1);
}
if(kind == 'keys' )return step(0, index);
if(kind == 'values')return step(0, O[index]);
return step(0, [index, O[index]]);
}, 'values');
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array;
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
/***/ },
/* 120 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.31 Array.prototype[@@unscopables]
var UNSCOPABLES = __webpack_require__(33)('unscopables')
, ArrayProto = Array.prototype;
if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__(8)(ArrayProto, UNSCOPABLES, {});
module.exports = function(key){
ArrayProto[UNSCOPABLES][key] = true;
};
/***/ },
/* 121 */
/***/ function(module, exports) {
module.exports = function(done, value){
return {value: value, done: !!done};
};
/***/ },
/* 122 */
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(123)('Array');
/***/ },
/* 123 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var global = __webpack_require__(6)
, $ = __webpack_require__(4)
, DESCRIPTORS = __webpack_require__(10)
, SPECIES = __webpack_require__(33)('species');
module.exports = function(KEY){
var C = global[KEY];
if(DESCRIPTORS && C && !C[SPECIES])$.setDesc(C, SPECIES, {
configurable: true,
get: function(){ return this; }
});
};
/***/ },
/* 124 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
var $export = __webpack_require__(5);
$export($export.P, 'Array', {copyWithin: __webpack_require__(125)});
__webpack_require__(120)('copyWithin');
/***/ },
/* 125 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
'use strict';
var toObject = __webpack_require__(23)
, toIndex = __webpack_require__(28)
, toLength = __webpack_require__(29);
module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){
var O = toObject(this)
, len = toLength(O.length)
, to = toIndex(target, len)
, from = toIndex(start, len)
, $$ = arguments
, end = $$.length > 2 ? $$[2] : undefined
, count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to)
, inc = 1;
if(from < to && to < from + count){
inc = -1;
from += count - 1;
to += count - 1;
}
while(count-- > 0){
if(from in O)O[to] = O[from];
else delete O[to];
to += inc;
from += inc;
} return O;
};
/***/ },
/* 126 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
var $export = __webpack_require__(5);
$export($export.P, 'Array', {fill: __webpack_require__(127)});
__webpack_require__(120)('fill');
/***/ },
/* 127 */
/***/ function(module, exports, __webpack_require__) {
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
'use strict';
var toObject = __webpack_require__(23)
, toIndex = __webpack_require__(28)
, toLength = __webpack_require__(29);
module.exports = [].fill || function fill(value /*, start = 0, end = @length */){
var O = toObject(this)
, length = toLength(O.length)
, $$ = arguments
, $$len = $$.length
, index = toIndex($$len > 1 ? $$[1] : undefined, length)
, end = $$len > 2 ? $$[2] : undefined
, endPos = end === undefined ? length : toIndex(end, length);
while(endPos > index)O[index++] = value;
return O;
};
/***/ },
/* 128 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
var $export = __webpack_require__(5)
, $find = __webpack_require__(30)(5)
, KEY = 'find'
, forced = true;
// Shouldn't skip holes
if(KEY in [])Array(1)[KEY](function(){ forced = false; });
$export($export.P + $export.F * forced, 'Array', {
find: function find(callbackfn/*, that = undefined */){
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__(120)(KEY);
/***/ },
/* 129 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
var $export = __webpack_require__(5)
, $find = __webpack_require__(30)(6)
, KEY = 'findIndex'
, forced = true;
// Shouldn't skip holes
if(KEY in [])Array(1)[KEY](function(){ forced = false; });
$export($export.P + $export.F * forced, 'Array', {
findIndex: function findIndex(callbackfn/*, that = undefined */){
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__(120)(KEY);
/***/ },
/* 130 */
/***/ function(module, exports, __webpack_require__) {
var $ = __webpack_require__(4)
, global = __webpack_require__(6)
, isRegExp = __webpack_require__(107)
, $flags = __webpack_require__(131)
, $RegExp = global.RegExp
, Base = $RegExp
, proto = $RegExp.prototype
, re1 = /a/g
, re2 = /a/g
// "new" creates a new object, old webkit buggy here
, CORRECT_NEW = new $RegExp(re1) !== re1;
if(__webpack_require__(10) && (!CORRECT_NEW || __webpack_require__(11)(function(){
re2[__webpack_require__(33)('match')] = false;
// RegExp constructor can alter flags and IsRegExp works correct with @@match
return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
}))){
$RegExp = function RegExp(p, f){
var piRE = isRegExp(p)
, fiU = f === undefined;
return !(this instanceof $RegExp) && piRE && p.constructor === $RegExp && fiU ? p
: CORRECT_NEW
? new Base(piRE && !fiU ? p.source : p, f)
: Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f);
};
$.each.call($.getNames(Base), function(key){
key in $RegExp || $.setDesc($RegExp, key, {
configurable: true,
get: function(){ return Base[key]; },
set: function(it){ Base[key] = it; }
});
});
proto.constructor = $RegExp;
$RegExp.prototype = proto;
__webpack_require__(12)(global, 'RegExp', $RegExp);
}
__webpack_require__(123)('RegExp');
/***/ },
/* 131 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 21.2.5.3 get RegExp.prototype.flags
var anObject = __webpack_require__(22);
module.exports = function(){
var that = anObject(this)
, result = '';
if(that.global) result += 'g';
if(that.ignoreCase) result += 'i';
if(that.multiline) result += 'm';
if(that.unicode) result += 'u';
if(that.sticky) result += 'y';
return result;
};
/***/ },
/* 132 */
/***/ function(module, exports, __webpack_require__) {
// 21.2.5.3 get RegExp.prototype.flags()
var $ = __webpack_require__(4);
if(__webpack_require__(10) && /./g.flags != 'g')$.setDesc(RegExp.prototype, 'flags', {
configurable: true,
get: __webpack_require__(131)
});
/***/ },
/* 133 */
/***/ function(module, exports, __webpack_require__) {
// @@match logic
__webpack_require__(134)('match', 1, function(defined, MATCH){
// 21.1.3.11 String.prototype.match(regexp)
return function match(regexp){
'use strict';
var O = defined(this)
, fn = regexp == undefined ? undefined : regexp[MATCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
};
});
/***/ },
/* 134 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var hide = __webpack_require__(8)
, redefine = __webpack_require__(12)
, fails = __webpack_require__(11)
, defined = __webpack_require__(24)
, wks = __webpack_require__(33);
module.exports = function(KEY, length, exec){
var SYMBOL = wks(KEY)
, original = ''[KEY];
if(fails(function(){
var O = {};
O[SYMBOL] = function(){ return 7; };
return ''[KEY](O) != 7;
})){
redefine(String.prototype, KEY, exec(defined, SYMBOL, original));
hide(RegExp.prototype, SYMBOL, length == 2
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
? function(string, arg){ return original.call(string, this, arg); }
// 21.2.5.6 RegExp.prototype[@@match](string)
// 21.2.5.9 RegExp.prototype[@@search](string)
: function(string){ return original.call(string, this); }
);
}
};
/***/ },
/* 135 */
/***/ function(module, exports, __webpack_require__) {
// @@replace logic
__webpack_require__(134)('replace', 2, function(defined, REPLACE, $replace){
// 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
return function replace(searchValue, replaceValue){
'use strict';
var O = defined(this)
, fn = searchValue == undefined ? undefined : searchValue[REPLACE];
return fn !== undefined
? fn.call(searchValue, O, replaceValue)
: $replace.call(String(O), searchValue, replaceValue);
};
});
/***/ },
/* 136 */
/***/ function(module, exports, __webpack_require__) {
// @@search logic
__webpack_require__(134)('search', 1, function(defined, SEARCH){
// 21.1.3.15 String.prototype.search(regexp)
return function search(regexp){
'use strict';
var O = defined(this)
, fn = regexp == undefined ? undefined : regexp[SEARCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
};
});
/***/ },
/* 137 */
/***/ function(module, exports, __webpack_require__) {
// @@split logic
__webpack_require__(134)('split', 2, function(defined, SPLIT, $split){
// 21.1.3.17 String.prototype.split(separator, limit)
return function split(separator, limit){
'use strict';
var O = defined(this)
, fn = separator == undefined ? undefined : separator[SPLIT];
return fn !== undefined
? fn.call(separator, O, limit)
: $split.call(String(O), separator, limit);
};
});
/***/ },
/* 138 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $ = __webpack_require__(4)
, LIBRARY = __webpack_require__(41)
, global = __webpack_require__(6)
, ctx = __webpack_require__(14)
, classof = __webpack_require__(49)
, $export = __webpack_require__(5)
, isObject = __webpack_require__(18)
, anObject = __webpack_require__(22)
, aFunction = __webpack_require__(15)
, strictNew = __webpack_require__(139)
, forOf = __webpack_require__(140)
, setProto = __webpack_require__(47).set
, same = __webpack_require__(45)
, SPECIES = __webpack_require__(33)('species')
, speciesConstructor = __webpack_require__(141)
, asap = __webpack_require__(142)
, PROMISE = 'Promise'
, process = global.process
, isNode = classof(process) == 'process'
, P = global[PROMISE]
, Wrapper;
var testResolve = function(sub){
var test = new P(function(){});
if(sub)test.constructor = Object;
return P.resolve(test) === test;
};
var USE_NATIVE = function(){
var works = false;
function P2(x){
var self = new P(x);
setProto(self, P2.prototype);
return self;
}
try {
works = P && P.resolve && testResolve();
setProto(P2, P);
P2.prototype = $.create(P.prototype, {constructor: {value: P2}});
// actual Firefox has broken subclass support, test that
if(!(P2.resolve(5).then(function(){}) instanceof P2)){
works = false;
}
// actual V8 bug, https://code.google.com/p/v8/issues/detail?id=4162
if(works && __webpack_require__(10)){
var thenableThenGotten = false;
P.resolve($.setDesc({}, 'then', {
get: function(){ thenableThenGotten = true; }
}));
works = thenableThenGotten;
}
} catch(e){ works = false; }
return works;
}();
// helpers
var sameConstructor = function(a, b){
// library wrapper special case
if(LIBRARY && a === P && b === Wrapper)return true;
return same(a, b);
};
var getConstructor = function(C){
var S = anObject(C)[SPECIES];
return S != undefined ? S : C;
};
var isThenable = function(it){
var then;
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
var PromiseCapability = function(C){
var resolve, reject;
this.promise = new C(function($$resolve, $$reject){
if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');
resolve = $$resolve;
reject = $$reject;
});
this.resolve = aFunction(resolve),
this.reject = aFunction(reject)
};
var perform = function(exec){
try {
exec();
} catch(e){
return {error: e};
}
};
var notify = function(record, isReject){
if(record.n)return;
record.n = true;
var chain = record.c;
asap(function(){
var value = record.v
, ok = record.s == 1
, i = 0;
var run = function(reaction){
var handler = ok ? reaction.ok : reaction.fail
, resolve = reaction.resolve
, reject = reaction.reject
, result, then;
try {
if(handler){
if(!ok)record.h = true;
result = handler === true ? value : handler(value);
if(result === reaction.promise){
reject(TypeError('Promise-chain cycle'));
} else if(then = isThenable(result)){
then.call(result, resolve, reject);
} else resolve(result);
} else reject(value);
} catch(e){
reject(e);
}
};
while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
chain.length = 0;
record.n = false;
if(isReject)setTimeout(function(){
var promise = record.p
, handler, console;
if(isUnhandled(promise)){
if(isNode){
process.emit('unhandledRejection', value, promise);
} else if(handler = global.onunhandledrejection){
handler({promise: promise, reason: value});
} else if((console = global.console) && console.error){
console.error('Unhandled promise rejection', value);
}
} record.a = undefined;
}, 1);
});
};
var isUnhandled = function(promise){
var record = promise._d
, chain = record.a || record.c
, i = 0
, reaction;
if(record.h)return false;
while(chain.length > i){
reaction = chain[i++];
if(reaction.fail || !isUnhandled(reaction.promise))return false;
} return true;
};
var $reject = function(value){
var record = this;
if(record.d)return;
record.d = true;
record = record.r || record; // unwrap
record.v = value;
record.s = 2;
record.a = record.c.slice();
notify(record, true);
};
var $resolve = function(value){
var record = this
, then;
if(record.d)return;
record.d = true;
record = record.r || record; // unwrap
try {
if(record.p === value)throw TypeError("Promise can't be resolved itself");
if(then = isThenable(value)){
asap(function(){
var wrapper = {r: record, d: false}; // wrap
try {
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
} catch(e){
$reject.call(wrapper, e);
}
});
} else {
record.v = value;
record.s = 1;
notify(record, false);
}
} catch(e){
$reject.call({r: record, d: false}, e); // wrap
}
};
// constructor polyfill
if(!USE_NATIVE){
// 25.4.3.1 Promise(executor)
P = function Promise(executor){
aFunction(executor);
var record = this._d = {
p: strictNew(this, P, PROMISE), // <- promise
c: [], // <- awaiting reactions
a: undefined, // <- checked in isUnhandled reactions
s: 0, // <- state
d: false, // <- done
v: undefined, // <- value
h: false, // <- handled rejection
n: false // <- notify
};
try {
executor(ctx($resolve, record, 1), ctx($reject, record, 1));
} catch(err){
$reject.call(record, err);
}
};
__webpack_require__(144)(P.prototype, {
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
then: function then(onFulfilled, onRejected){
var reaction = new PromiseCapability(speciesConstructor(this, P))
, promise = reaction.promise
, record = this._d;
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
reaction.fail = typeof onRejected == 'function' && onRejected;
record.c.push(reaction);
if(record.a)record.a.push(reaction);
if(record.s)notify(record, false);
return promise;
},
// 25.4.5.1 Promise.prototype.catch(onRejected)
'catch': function(onRejected){
return this.then(undefined, onRejected);
}
});
}
$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: P});
__webpack_require__(37)(P, PROMISE);
__webpack_require__(123)(PROMISE);
Wrapper = __webpack_require__(7)[PROMISE];
// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
// 25.4.4.5 Promise.reject(r)
reject: function reject(r){
var capability = new PromiseCapability(this)
, $$reject = capability.reject;
$$reject(r);
return capability.promise;
}
});
$export($export.S + $export.F * (!USE_NATIVE || testResolve(true)), PROMISE, {
// 25.4.4.6 Promise.resolve(x)
resolve: function resolve(x){
// instanceof instead of internal slot check because we should fix it without replacement native Promise core
if(x instanceof P && sameConstructor(x.constructor, this))return x;
var capability = new PromiseCapability(this)
, $$resolve = capability.resolve;
$$resolve(x);
return capability.promise;
}
});
$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(117)(function(iter){
P.all(iter)['catch'](function(){});
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
all: function all(iterable){
var C = getConstructor(this)
, capability = new PromiseCapability(C)
, resolve = capability.resolve
, reject = capability.reject
, values = [];
var abrupt = perform(function(){
forOf(iterable, false, values.push, values);
var remaining = values.length
, results = Array(remaining);
if(remaining)$.each.call(values, function(promise, index){
var alreadyCalled = false;
C.resolve(promise).then(function(value){
if(alreadyCalled)return;
alreadyCalled = true;
results[index] = value;
--remaining || resolve(results);
}, reject);
});
else resolve(results);
});
if(abrupt)reject(abrupt.error);
return capability.promise;
},
// 25.4.4.4 Promise.race(iterable)
race: function race(iterable){
var C = getConstructor(this)
, capability = new PromiseCapability(C)
, reject = capability.reject;
var abrupt = perform(function(){
forOf(iterable, false, function(promise){
C.resolve(promise).then(capability.resolve, reject);
});
});
if(abrupt)reject(abrupt.error);
return capability.promise;
}
});
/***/ },
/* 139 */
/***/ function(module, exports) {
module.exports = function(it, Constructor, name){
if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!");
return it;
};
/***/ },
/* 140 */
/***/ function(module, exports, __webpack_require__) {
var ctx = __webpack_require__(14)
, call = __webpack_require__(114)
, isArrayIter = __webpack_require__(115)
, anObject = __webpack_require__(22)
, toLength = __webpack_require__(29)
, getIterFn = __webpack_require__(116);
module.exports = function(iterable, entries, fn, that){
var iterFn = getIterFn(iterable)
, f = ctx(fn, that, entries ? 2 : 1)
, index = 0
, length, step, iterator;
if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
// fast case for arrays with default iterator
if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
} else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
call(iterator, f, step.value, entries);
}
};
/***/ },
/* 141 */
/***/ function(module, exports, __webpack_require__) {
// 7.3.20 SpeciesConstructor(O, defaultConstructor)
var anObject = __webpack_require__(22)
, aFunction = __webpack_require__(15)
, SPECIES = __webpack_require__(33)('species');
module.exports = function(O, D){
var C = anObject(O).constructor, S;
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};
/***/ },
/* 142 */
/***/ function(module, exports, __webpack_require__) {
var global = __webpack_require__(6)
, macrotask = __webpack_require__(143).set
, Observer = global.MutationObserver || global.WebKitMutationObserver
, process = global.process
, Promise = global.Promise
, isNode = __webpack_require__(20)(process) == 'process'
, head, last, notify;
var flush = function(){
var parent, domain, fn;
if(isNode && (parent = process.domain)){
process.domain = null;
parent.exit();
}
while(head){
domain = head.domain;
fn = head.fn;
if(domain)domain.enter();
fn(); // <- currently we use it only for Promise - try / catch not required
if(domain)domain.exit();
head = head.next;
} last = undefined;
if(parent)parent.enter();
};
// Node.js
if(isNode){
notify = function(){
process.nextTick(flush);
};
// browsers with MutationObserver
} else if(Observer){
var toggle = 1
, node = document.createTextNode('');
new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
notify = function(){
node.data = toggle = -toggle;
};
// environments with maybe non-completely correct, but existent Promise
} else if(Promise && Promise.resolve){
notify = function(){
Promise.resolve().then(flush);
};
// for other environments - macrotask based on:
// - setImmediate
// - MessageChannel
// - window.postMessag
// - onreadystatechange
// - setTimeout
} else {
notify = function(){
// strange IE + webpack dev server bug - use .call(global)
macrotask.call(global, flush);
};
}
module.exports = function asap(fn){
var task = {fn: fn, next: undefined, domain: isNode && process.domain};
if(last)last.next = task;
if(!head){
head = task;
notify();
} last = task;
};
/***/ },
/* 143 */
/***/ function(module, exports, __webpack_require__) {
var ctx = __webpack_require__(14)
, invoke = __webpack_require__(21)
, html = __webpack_require__(16)
, cel = __webpack_require__(17)
, global = __webpack_require__(6)
, process = global.process
, setTask = global.setImmediate
, clearTask = global.clearImmediate
, MessageChannel = global.MessageChannel
, counter = 0
, queue = {}
, ONREADYSTATECHANGE = 'onreadystatechange'
, defer, channel, port;
var run = function(){
var id = +this;
if(queue.hasOwnProperty(id)){
var fn = queue[id];
delete queue[id];
fn();
}
};
var listner = function(event){
run.call(event.data);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if(!setTask || !clearTask){
setTask = function setImmediate(fn){
var args = [], i = 1;
while(arguments.length > i)args.push(arguments[i++]);
queue[++counter] = function(){
invoke(typeof fn == 'function' ? fn : Function(fn), args);
};
defer(counter);
return counter;
};
clearTask = function clearImmediate(id){
delete queue[id];
};
// Node.js 0.8-
if(__webpack_require__(20)(process) == 'process'){
defer = function(id){
process.nextTick(ctx(run, id, 1));
};
// Browsers with MessageChannel, includes WebWorkers
} else if(MessageChannel){
channel = new MessageChannel;
port = channel.port2;
channel.port1.onmessage = listner;
defer = ctx(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
} else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
defer = function(id){
global.postMessage(id + '', '*');
};
global.addEventListener('message', listner, false);
// IE8-
} else if(ONREADYSTATECHANGE in cel('script')){
defer = function(id){
html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){
html.removeChild(this);
run.call(id);
};
};
// Rest old browsers
} else {
defer = function(id){
setTimeout(ctx(run, id, 1), 0);
};
}
}
module.exports = {
set: setTask,
clear: clearTask
};
/***/ },
/* 144 */
/***/ function(module, exports, __webpack_require__) {
var redefine = __webpack_require__(12);
module.exports = function(target, src){
for(var key in src)redefine(target, key, src[key]);
return target;
};
/***/ },
/* 145 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var strong = __webpack_require__(146);
// 23.1 Map Objects
__webpack_require__(147)('Map', function(get){
return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.1.3.6 Map.prototype.get(key)
get: function get(key){
var entry = strong.getEntry(this, key);
return entry && entry.v;
},
// 23.1.3.9 Map.prototype.set(key, value)
set: function set(key, value){
return strong.def(this, key === 0 ? 0 : key, value);
}
}, strong, true);
/***/ },
/* 146 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $ = __webpack_require__(4)
, hide = __webpack_require__(8)
, redefineAll = __webpack_require__(144)
, ctx = __webpack_require__(14)
, strictNew = __webpack_require__(139)
, defined = __webpack_require__(24)
, forOf = __webpack_require__(140)
, $iterDefine = __webpack_require__(101)
, step = __webpack_require__(121)
, ID = __webpack_require__(13)('id')
, $has = __webpack_require__(19)
, isObject = __webpack_require__(18)
, setSpecies = __webpack_require__(123)
, DESCRIPTORS = __webpack_require__(10)
, isExtensible = Object.isExtensible || isObject
, SIZE = DESCRIPTORS ? '_s' : 'size'
, id = 0;
var fastKey = function(it, create){
// return primitive with prefix
if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
if(!$has(it, ID)){
// can't set id to frozen object
if(!isExtensible(it))return 'F';
// not necessary to add id
if(!create)return 'E';
// add missing object id
hide(it, ID, ++id);
// return object id with prefix
} return 'O' + it[ID];
};
var getEntry = function(that, key){
// fast case
var index = fastKey(key), entry;
if(index !== 'F')return that._i[index];
// frozen object case
for(entry = that._f; entry; entry = entry.n){
if(entry.k == key)return entry;
}
};
module.exports = {
getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
var C = wrapper(function(that, iterable){
strictNew(that, C, NAME);
that._i = $.create(null); // index
that._f = undefined; // first entry
that._l = undefined; // last entry
that[SIZE] = 0; // size
if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
});
redefineAll(C.prototype, {
// 23.1.3.1 Map.prototype.clear()
// 23.2.3.2 Set.prototype.clear()
clear: function clear(){
for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){
entry.r = true;
if(entry.p)entry.p = entry.p.n = undefined;
delete data[entry.i];
}
that._f = that._l = undefined;
that[SIZE] = 0;
},
// 23.1.3.3 Map.prototype.delete(key)
// 23.2.3.4 Set.prototype.delete(value)
'delete': function(key){
var that = this
, entry = getEntry(that, key);
if(entry){
var next = entry.n
, prev = entry.p;
delete that._i[entry.i];
entry.r = true;
if(prev)prev.n = next;
if(next)next.p = prev;
if(that._f == entry)that._f = next;
if(that._l == entry)that._l = prev;
that[SIZE]--;
} return !!entry;
},
// 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
// 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
forEach: function forEach(callbackfn /*, that = undefined */){
var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)
, entry;
while(entry = entry ? entry.n : this._f){
f(entry.v, entry.k, this);
// revert to the last existing entry
while(entry && entry.r)entry = entry.p;
}
},
// 23.1.3.7 Map.prototype.has(key)
// 23.2.3.7 Set.prototype.has(value)
has: function has(key){
return !!getEntry(this, key);
}
});
if(DESCRIPTORS)$.setDesc(C.prototype, 'size', {
get: function(){
return defined(this[SIZE]);
}
});
return C;
},
def: function(that, key, value){
var entry = getEntry(that, key)
, prev, index;
// change existing entry
if(entry){
entry.v = value;
// create new entry
} else {
that._l = entry = {
i: index = fastKey(key, true), // <- index
k: key, // <- key
v: value, // <- value
p: prev = that._l, // <- previous entry
n: undefined, // <- next entry
r: false // <- removed
};
if(!that._f)that._f = entry;
if(prev)prev.n = entry;
that[SIZE]++;
// add to index
if(index !== 'F')that._i[index] = entry;
} return that;
},
getEntry: getEntry,
setStrong: function(C, NAME, IS_MAP){
// add .keys, .values, .entries, [@@iterator]
// 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
$iterDefine(C, NAME, function(iterated, kind){
this._t = iterated; // target
this._k = kind; // kind
this._l = undefined; // previous
}, function(){
var that = this
, kind = that._k
, entry = that._l;
// revert to the last existing entry
while(entry && entry.r)entry = entry.p;
// get next entry
if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){
// or finish the iteration
that._t = undefined;
return step(1);
}
// return step by kind
if(kind == 'keys' )return step(0, entry.k);
if(kind == 'values')return step(0, entry.v);
return step(0, [entry.k, entry.v]);
}, IS_MAP ? 'entries' : 'values' , !IS_MAP, true);
// add [@@species], 23.1.2.2, 23.2.2.2
setSpecies(NAME);
}
};
/***/ },
/* 147 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var global = __webpack_require__(6)
, $export = __webpack_require__(5)
, redefine = __webpack_require__(12)
, redefineAll = __webpack_require__(144)
, forOf = __webpack_require__(140)
, strictNew = __webpack_require__(139)
, isObject = __webpack_require__(18)
, fails = __webpack_require__(11)
, $iterDetect = __webpack_require__(117)
, setToStringTag = __webpack_require__(37);
module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){
var Base = global[NAME]
, C = Base
, ADDER = IS_MAP ? 'set' : 'add'
, proto = C && C.prototype
, O = {};
var fixMethod = function(KEY){
var fn = proto[KEY];
redefine(proto, KEY,
KEY == 'delete' ? function(a){
return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
} : KEY == 'has' ? function has(a){
return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
} : KEY == 'get' ? function get(a){
return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
} : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; }
: function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; }
);
};
if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){
new C().entries().next();
}))){
// create collection constructor
C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
redefineAll(C.prototype, methods);
} else {
var instance = new C
// early implementations not supports chaining
, HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance
// V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
, THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); })
// most early implementations doesn't supports iterables, most modern - not close it correctly
, ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new
// for early implementations -0 and +0 not the same
, BUGGY_ZERO;
if(!ACCEPT_ITERABLES){
C = wrapper(function(target, iterable){
strictNew(target, C, NAME);
var that = new Base;
if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
return that;
});
C.prototype = proto;
proto.constructor = C;
}
IS_WEAK || instance.forEach(function(val, key){
BUGGY_ZERO = 1 / key === -Infinity;
});
if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){
fixMethod('delete');
fixMethod('has');
IS_MAP && fixMethod('get');
}
if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER);
// weak collections should not contains .clear method
if(IS_WEAK && proto.clear)delete proto.clear;
}
setToStringTag(C, NAME);
O[NAME] = C;
$export($export.G + $export.W + $export.F * (C != Base), O);
if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP);
return C;
};
/***/ },
/* 148 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var strong = __webpack_require__(146);
// 23.2 Set Objects
__webpack_require__(147)('Set', function(get){
return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.2.3.1 Set.prototype.add(value)
add: function add(value){
return strong.def(this, value = value === 0 ? 0 : value, value);
}
}, strong);
/***/ },
/* 149 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $ = __webpack_require__(4)
, redefine = __webpack_require__(12)
, weak = __webpack_require__(150)
, isObject = __webpack_require__(18)
, has = __webpack_require__(19)
, frozenStore = weak.frozenStore
, WEAK = weak.WEAK
, isExtensible = Object.isExtensible || isObject
, tmp = {};
// 23.3 WeakMap Objects
var $WeakMap = __webpack_require__(147)('WeakMap', function(get){
return function WeakMap(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.3.3.3 WeakMap.prototype.get(key)
get: function get(key){
if(isObject(key)){
if(!isExtensible(key))return frozenStore(this).get(key);
if(has(key, WEAK))return key[WEAK][this._i];
}
},
// 23.3.3.5 WeakMap.prototype.set(key, value)
set: function set(key, value){
return weak.def(this, key, value);
}
}, weak, true, true);
// IE11 WeakMap frozen keys fix
if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
$.each.call(['delete', 'has', 'get', 'set'], function(key){
var proto = $WeakMap.prototype
, method = proto[key];
redefine(proto, key, function(a, b){
// store frozen objects on leaky map
if(isObject(a) && !isExtensible(a)){
var result = frozenStore(this)[key](a, b);
return key == 'set' ? this : result;
// store all the rest on native weakmap
} return method.call(this, a, b);
});
});
}
/***/ },
/* 150 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var hide = __webpack_require__(8)
, redefineAll = __webpack_require__(144)
, anObject = __webpack_require__(22)
, isObject = __webpack_require__(18)
, strictNew = __webpack_require__(139)
, forOf = __webpack_require__(140)
, createArrayMethod = __webpack_require__(30)
, $has = __webpack_require__(19)
, WEAK = __webpack_require__(13)('weak')
, isExtensible = Object.isExtensible || isObject
, arrayFind = createArrayMethod(5)
, arrayFindIndex = createArrayMethod(6)
, id = 0;
// fallback for frozen keys
var frozenStore = function(that){
return that._l || (that._l = new FrozenStore);
};
var FrozenStore = function(){
this.a = [];
};
var findFrozen = function(store, key){
return arrayFind(store.a, function(it){
return it[0] === key;
});
};
FrozenStore.prototype = {
get: function(key){
var entry = findFrozen(this, key);
if(entry)return entry[1];
},
has: function(key){
return !!findFrozen(this, key);
},
set: function(key, value){
var entry = findFrozen(this, key);
if(entry)entry[1] = value;
else this.a.push([key, value]);
},
'delete': function(key){
var index = arrayFindIndex(this.a, function(it){
return it[0] === key;
});
if(~index)this.a.splice(index, 1);
return !!~index;
}
};
module.exports = {
getConstructor: function(wrapper, NAME, IS_MAP, ADDER){
var C = wrapper(function(that, iterable){
strictNew(that, C, NAME);
that._i = id++; // collection id
that._l = undefined; // leak store for frozen objects
if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
});
redefineAll(C.prototype, {
// 23.3.3.2 WeakMap.prototype.delete(key)
// 23.4.3.3 WeakSet.prototype.delete(value)
'delete': function(key){
if(!isObject(key))return false;
if(!isExtensible(key))return frozenStore(this)['delete'](key);
return $has(key, WEAK) && $has(key[WEAK], this._i) && delete key[WEAK][this._i];
},
// 23.3.3.4 WeakMap.prototype.has(key)
// 23.4.3.4 WeakSet.prototype.has(value)
has: function has(key){
if(!isObject(key))return false;
if(!isExtensible(key))return frozenStore(this).has(key);
return $has(key, WEAK) && $has(key[WEAK], this._i);
}
});
return C;
},
def: function(that, key, value){
if(!isExtensible(anObject(key))){
frozenStore(that).set(key, value);
} else {
$has(key, WEAK) || hide(key, WEAK, {});
key[WEAK][that._i] = value;
} return that;
},
frozenStore: frozenStore,
WEAK: WEAK
};
/***/ },
/* 151 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var weak = __webpack_require__(150);
// 23.4 WeakSet Objects
__webpack_require__(147)('WeakSet', function(get){
return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.4.3.1 WeakSet.prototype.add(value)
add: function add(value){
return weak.def(this, value, true);
}
}, weak, false, true);
/***/ },
/* 152 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
var $export = __webpack_require__(5)
, _apply = Function.apply;
$export($export.S, 'Reflect', {
apply: function apply(target, thisArgument, argumentsList){
return _apply.call(target, thisArgument, argumentsList);
}
});
/***/ },
/* 153 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
var $ = __webpack_require__(4)
, $export = __webpack_require__(5)
, aFunction = __webpack_require__(15)
, anObject = __webpack_require__(22)
, isObject = __webpack_require__(18)
, bind = Function.bind || __webpack_require__(7).Function.prototype.bind;
// MS Edge supports only 2 arguments
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
$export($export.S + $export.F * __webpack_require__(11)(function(){
function F(){}
return !(Reflect.construct(function(){}, [], F) instanceof F);
}), 'Reflect', {
construct: function construct(Target, args /*, newTarget*/){
aFunction(Target);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
if(Target == newTarget){
// w/o altered newTarget, optimization for 0-4 arguments
if(args != undefined)switch(anObject(args).length){
case 0: return new Target;
case 1: return new Target(args[0]);
case 2: return new Target(args[0], args[1]);
case 3: return new Target(args[0], args[1], args[2]);
case 4: return new Target(args[0], args[1], args[2], args[3]);
}
// w/o altered newTarget, lot of arguments case
var $args = [null];
$args.push.apply($args, args);
return new (bind.apply(Target, $args));
}
// with altered newTarget, not support built-in constructors
var proto = newTarget.prototype
, instance = $.create(isObject(proto) ? proto : Object.prototype)
, result = Function.apply.call(Target, instance, args);
return isObject(result) ? result : instance;
}
});
/***/ },
/* 154 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
var $ = __webpack_require__(4)
, $export = __webpack_require__(5)
, anObject = __webpack_require__(22);
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
$export($export.S + $export.F * __webpack_require__(11)(function(){
Reflect.defineProperty($.setDesc({}, 1, {value: 1}), 1, {value: 2});
}), 'Reflect', {
defineProperty: function defineProperty(target, propertyKey, attributes){
anObject(target);
try {
$.setDesc(target, propertyKey, attributes);
return true;
} catch(e){
return false;
}
}
});
/***/ },
/* 155 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.4 Reflect.deleteProperty(target, propertyKey)
var $export = __webpack_require__(5)
, getDesc = __webpack_require__(4).getDesc
, anObject = __webpack_require__(22);
$export($export.S, 'Reflect', {
deleteProperty: function deleteProperty(target, propertyKey){
var desc = getDesc(anObject(target), propertyKey);
return desc && !desc.configurable ? false : delete target[propertyKey];
}
});
/***/ },
/* 156 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// 26.1.5 Reflect.enumerate(target)
var $export = __webpack_require__(5)
, anObject = __webpack_require__(22);
var Enumerate = function(iterated){
this._t = anObject(iterated); // target
this._i = 0; // next index
var keys = this._k = [] // keys
, key;
for(key in iterated)keys.push(key);
};
__webpack_require__(103)(Enumerate, 'Object', function(){
var that = this
, keys = that._k
, key;
do {
if(that._i >= keys.length)return {value: undefined, done: true};
} while(!((key = keys[that._i++]) in that._t));
return {value: key, done: false};
});
$export($export.S, 'Reflect', {
enumerate: function enumerate(target){
return new Enumerate(target);
}
});
/***/ },
/* 157 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
var $ = __webpack_require__(4)
, has = __webpack_require__(19)
, $export = __webpack_require__(5)
, isObject = __webpack_require__(18)
, anObject = __webpack_require__(22);
function get(target, propertyKey/*, receiver*/){
var receiver = arguments.length < 3 ? target : arguments[2]
, desc, proto;
if(anObject(target) === receiver)return target[propertyKey];
if(desc = $.getDesc(target, propertyKey))return has(desc, 'value')
? desc.value
: desc.get !== undefined
? desc.get.call(receiver)
: undefined;
if(isObject(proto = $.getProto(target)))return get(proto, propertyKey, receiver);
}
$export($export.S, 'Reflect', {get: get});
/***/ },
/* 158 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
var $ = __webpack_require__(4)
, $export = __webpack_require__(5)
, anObject = __webpack_require__(22);
$export($export.S, 'Reflect', {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){
return $.getDesc(anObject(target), propertyKey);
}
});
/***/ },
/* 159 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.8 Reflect.getPrototypeOf(target)
var $export = __webpack_require__(5)
, getProto = __webpack_require__(4).getProto
, anObject = __webpack_require__(22);
$export($export.S, 'Reflect', {
getPrototypeOf: function getPrototypeOf(target){
return getProto(anObject(target));
}
});
/***/ },
/* 160 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.9 Reflect.has(target, propertyKey)
var $export = __webpack_require__(5);
$export($export.S, 'Reflect', {
has: function has(target, propertyKey){
return propertyKey in target;
}
});
/***/ },
/* 161 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.10 Reflect.isExtensible(target)
var $export = __webpack_require__(5)
, anObject = __webpack_require__(22)
, $isExtensible = Object.isExtensible;
$export($export.S, 'Reflect', {
isExtensible: function isExtensible(target){
anObject(target);
return $isExtensible ? $isExtensible(target) : true;
}
});
/***/ },
/* 162 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.11 Reflect.ownKeys(target)
var $export = __webpack_require__(5);
$export($export.S, 'Reflect', {ownKeys: __webpack_require__(163)});
/***/ },
/* 163 */
/***/ function(module, exports, __webpack_require__) {
// all object keys, includes non-enumerable and symbols
var $ = __webpack_require__(4)
, anObject = __webpack_require__(22)
, Reflect = __webpack_require__(6).Reflect;
module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){
var keys = $.getNames(anObject(it))
, getSymbols = $.getSymbols;
return getSymbols ? keys.concat(getSymbols(it)) : keys;
};
/***/ },
/* 164 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.12 Reflect.preventExtensions(target)
var $export = __webpack_require__(5)
, anObject = __webpack_require__(22)
, $preventExtensions = Object.preventExtensions;
$export($export.S, 'Reflect', {
preventExtensions: function preventExtensions(target){
anObject(target);
try {
if($preventExtensions)$preventExtensions(target);
return true;
} catch(e){
return false;
}
}
});
/***/ },
/* 165 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
var $ = __webpack_require__(4)
, has = __webpack_require__(19)
, $export = __webpack_require__(5)
, createDesc = __webpack_require__(9)
, anObject = __webpack_require__(22)
, isObject = __webpack_require__(18);
function set(target, propertyKey, V/*, receiver*/){
var receiver = arguments.length < 4 ? target : arguments[3]
, ownDesc = $.getDesc(anObject(target), propertyKey)
, existingDescriptor, proto;
if(!ownDesc){
if(isObject(proto = $.getProto(target))){
return set(proto, propertyKey, V, receiver);
}
ownDesc = createDesc(0);
}
if(has(ownDesc, 'value')){
if(ownDesc.writable === false || !isObject(receiver))return false;
existingDescriptor = $.getDesc(receiver, propertyKey) || createDesc(0);
existingDescriptor.value = V;
$.setDesc(receiver, propertyKey, existingDescriptor);
return true;
}
return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
}
$export($export.S, 'Reflect', {set: set});
/***/ },
/* 166 */
/***/ function(module, exports, __webpack_require__) {
// 26.1.14 Reflect.setPrototypeOf(target, proto)
var $export = __webpack_require__(5)
, setProto = __webpack_require__(47);
if(setProto)$export($export.S, 'Reflect', {
setPrototypeOf: function setPrototypeOf(target, proto){
setProto.check(target, proto);
try {
setProto.set(target, proto);
return true;
} catch(e){
return false;
}
}
});
/***/ },
/* 167 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $export = __webpack_require__(5)
, $includes = __webpack_require__(35)(true);
$export($export.P, 'Array', {
// https://github.com/domenic/Array.prototype.includes
includes: function includes(el /*, fromIndex = 0 */){
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__(120)('includes');
/***/ },
/* 168 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// https://github.com/mathiasbynens/String.prototype.at
var $export = __webpack_require__(5)
, $at = __webpack_require__(100)(true);
$export($export.P, 'String', {
at: function at(pos){
return $at(this, pos);
}
});
/***/ },
/* 169 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $export = __webpack_require__(5)
, $pad = __webpack_require__(170);
$export($export.P, 'String', {
padLeft: function padLeft(maxLength /*, fillString = ' ' */){
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
}
});
/***/ },
/* 170 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/ljharb/proposal-string-pad-left-right
var toLength = __webpack_require__(29)
, repeat = __webpack_require__(111)
, defined = __webpack_require__(24);
module.exports = function(that, maxLength, fillString, left){
var S = String(defined(that))
, stringLength = S.length
, fillStr = fillString === undefined ? ' ' : String(fillString)
, intMaxLength = toLength(maxLength);
if(intMaxLength <= stringLength)return S;
if(fillStr == '')fillStr = ' ';
var fillLen = intMaxLength - stringLength
, stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen);
return left ? stringFiller + S : S + stringFiller;
};
/***/ },
/* 171 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $export = __webpack_require__(5)
, $pad = __webpack_require__(170);
$export($export.P, 'String', {
padRight: function padRight(maxLength /*, fillString = ' ' */){
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
}
});
/***/ },
/* 172 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
__webpack_require__(65)('trimLeft', function($trim){
return function trimLeft(){
return $trim(this, 1);
};
});
/***/ },
/* 173 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
__webpack_require__(65)('trimRight', function($trim){
return function trimRight(){
return $trim(this, 2);
};
});
/***/ },
/* 174 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/benjamingr/RexExp.escape
var $export = __webpack_require__(5)
, $re = __webpack_require__(175)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
$export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }});
/***/ },
/* 175 */
/***/ function(module, exports) {
module.exports = function(regExp, replace){
var replacer = replace === Object(replace) ? function(part){
return replace[part];
} : replace;
return function(it){
return String(it).replace(regExp, replacer);
};
};
/***/ },
/* 176 */
/***/ function(module, exports, __webpack_require__) {
// https://gist.github.com/WebReflection/9353781
var $ = __webpack_require__(4)
, $export = __webpack_require__(5)
, ownKeys = __webpack_require__(163)
, toIObject = __webpack_require__(25)
, createDesc = __webpack_require__(9);
$export($export.S, 'Object', {
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){
var O = toIObject(object)
, setDesc = $.setDesc
, getDesc = $.getDesc
, keys = ownKeys(O)
, result = {}
, i = 0
, key, D;
while(keys.length > i){
D = getDesc(O, key = keys[i++]);
if(key in result)setDesc(result, key, createDesc(0, D));
else result[key] = D;
} return result;
}
});
/***/ },
/* 177 */
/***/ function(module, exports, __webpack_require__) {
// http://goo.gl/XkBrjD
var $export = __webpack_require__(5)
, $values = __webpack_require__(178)(false);
$export($export.S, 'Object', {
values: function values(it){
return $values(it);
}
});
/***/ },
/* 178 */
/***/ function(module, exports, __webpack_require__) {
var $ = __webpack_require__(4)
, toIObject = __webpack_require__(25)
, isEnum = $.isEnum;
module.exports = function(isEntries){
return function(it){
var O = toIObject(it)
, keys = $.getKeys(O)
, length = keys.length
, i = 0
, result = []
, key;
while(length > i)if(isEnum.call(O, key = keys[i++])){
result.push(isEntries ? [key, O[key]] : O[key]);
} return result;
};
};
/***/ },
/* 179 */
/***/ function(module, exports, __webpack_require__) {
// http://goo.gl/XkBrjD
var $export = __webpack_require__(5)
, $entries = __webpack_require__(178)(true);
$export($export.S, 'Object', {
entries: function entries(it){
return $entries(it);
}
});
/***/ },
/* 180 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = __webpack_require__(5);
$export($export.P, 'Map', {toJSON: __webpack_require__(181)('Map')});
/***/ },
/* 181 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var forOf = __webpack_require__(140)
, classof = __webpack_require__(49);
module.exports = function(NAME){
return function toJSON(){
if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic");
var arr = [];
forOf(this, false, arr.push, arr);
return arr;
};
};
/***/ },
/* 182 */
/***/ function(module, exports, __webpack_require__) {
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = __webpack_require__(5);
$export($export.P, 'Set', {toJSON: __webpack_require__(181)('Set')});
/***/ },
/* 183 */
/***/ function(module, exports, __webpack_require__) {
// JavaScript 1.6 / Strawman array statics shim
var $ = __webpack_require__(4)
, $export = __webpack_require__(5)
, $ctx = __webpack_require__(14)
, $Array = __webpack_require__(7).Array || Array
, statics = {};
var setStatics = function(keys, length){
$.each.call(keys.split(','), function(key){
if(length == undefined && key in $Array)statics[key] = $Array[key];
else if(key in [])statics[key] = $ctx(Function.call, [][key], length);
});
};
setStatics('pop,reverse,shift,keys,values,entries', 1);
setStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3);
setStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' +
'reduce,reduceRight,copyWithin,fill');
$export($export.S, 'Array', statics);
/***/ },
/* 184 */
/***/ function(module, exports, __webpack_require__) {
// ie9- setTimeout & setInterval additional parameters fix
var global = __webpack_require__(6)
, $export = __webpack_require__(5)
, invoke = __webpack_require__(21)
, partial = __webpack_require__(185)
, navigator = global.navigator
, MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
var wrap = function(set){
return MSIE ? function(fn, time /*, ...args */){
return set(invoke(
partial,
[].slice.call(arguments, 2),
typeof fn == 'function' ? fn : Function(fn)
), time);
} : set;
};
$export($export.G + $export.B + $export.F * MSIE, {
setTimeout: wrap(global.setTimeout),
setInterval: wrap(global.setInterval)
});
/***/ },
/* 185 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var path = __webpack_require__(186)
, invoke = __webpack_require__(21)
, aFunction = __webpack_require__(15);
module.exports = function(/* ...pargs */){
var fn = aFunction(this)
, length = arguments.length
, pargs = Array(length)
, i = 0
, _ = path._
, holder = false;
while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true;
return function(/* ...args */){
var that = this
, $$ = arguments
, $$len = $$.length
, j = 0, k = 0, args;
if(!holder && !$$len)return invoke(fn, pargs, that);
args = pargs.slice();
if(holder)for(;length > j; j++)if(args[j] === _)args[j] = $$[k++];
while($$len > k)args.push($$[k++]);
return invoke(fn, args, that);
};
};
/***/ },
/* 186 */
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(6);
/***/ },
/* 187 */
/***/ function(module, exports, __webpack_require__) {
var $export = __webpack_require__(5)
, $task = __webpack_require__(143);
$export($export.G + $export.B, {
setImmediate: $task.set,
clearImmediate: $task.clear
});
/***/ },
/* 188 */
/***/ function(module, exports, __webpack_require__) {
__webpack_require__(119);
var global = __webpack_require__(6)
, hide = __webpack_require__(8)
, Iterators = __webpack_require__(102)
, ITERATOR = __webpack_require__(33)('iterator')
, NL = global.NodeList
, HTC = global.HTMLCollection
, NLProto = NL && NL.prototype
, HTCProto = HTC && HTC.prototype
, ArrayValues = Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;
if(NLProto && !NLProto[ITERATOR])hide(NLProto, ITERATOR, ArrayValues);
if(HTCProto && !HTCProto[ITERATOR])hide(HTCProto, ITERATOR, ArrayValues);
/***/ },
/* 189 */
/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global, process) {/**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* https://raw.github.com/facebook/regenerator/master/LICENSE file. An
* additional grant of patent rights can be found in the PATENTS file in
* the same directory.
*/
!(function(global) {
"use strict";
var hasOwn = Object.prototype.hasOwnProperty;
var undefined; // More compressible than void 0.
var iteratorSymbol =
typeof Symbol === "function" && Symbol.iterator || "@@iterator";
var inModule = typeof module === "object";
var runtime = global.regeneratorRuntime;
if (runtime) {
if (inModule) {
// If regeneratorRuntime is defined globally and we're in a module,
// make the exports object identical to regeneratorRuntime.
module.exports = runtime;
}
// Don't bother evaluating the rest of this file if the runtime was
// already defined globally.
return;
}
// Define the runtime globally (as expected by generated code) as either
// module.exports (if we're in a module) or a new, empty object.
runtime = global.regeneratorRuntime = inModule ? module.exports : {};
function wrap(innerFn, outerFn, self, tryLocsList) {
// If outerFn provided, then outerFn.prototype instanceof Generator.
var generator = Object.create((outerFn || Generator).prototype);
var context = new Context(tryLocsList || []);
// The ._invoke method unifies the implementations of the .next,
// .throw, and .return methods.
generator._invoke = makeInvokeMethod(innerFn, self, context);
return generator;
}
runtime.wrap = wrap;
// Try/catch helper to minimize deoptimizations. Returns a completion
// record like context.tryEntries[i].completion. This interface could
// have been (and was previously) designed to take a closure to be
// invoked without arguments, but in all the cases we care about we
// already have an existing method we want to call, so there's no need
// to create a new function object. We can even get away with assuming
// the method takes exactly one argument, since that happens to be true
// in every case, so we don't have to touch the arguments object. The
// only additional allocation required is the completion record, which
// has a stable shape and so hopefully should be cheap to allocate.
function tryCatch(fn, obj, arg) {
try {
return { type: "normal", arg: fn.call(obj, arg) };
} catch (err) {
return { type: "throw", arg: err };
}
}
var GenStateSuspendedStart = "suspendedStart";
var GenStateSuspendedYield = "suspendedYield";
var GenStateExecuting = "executing";
var GenStateCompleted = "completed";
// Returning this object from the innerFn has the same effect as
// breaking out of the dispatch switch statement.
var ContinueSentinel = {};
// Dummy constructor functions that we use as the .constructor and
// .constructor.prototype properties for functions that return Generator
// objects. For full spec compliance, you may wish to configure your
// minifier not to mangle the names of these two functions.
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype;
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
GeneratorFunctionPrototype.constructor = GeneratorFunction;
GeneratorFunction.displayName = "GeneratorFunction";
// Helper for defining the .next, .throw, and .return methods of the
// Iterator interface in terms of a single ._invoke method.
function defineIteratorMethods(prototype) {
["next", "throw", "return"].forEach(function(method) {
prototype[method] = function(arg) {
return this._invoke(method, arg);
};
});
}
runtime.isGeneratorFunction = function(genFun) {
var ctor = typeof genFun === "function" && genFun.constructor;
return ctor
? ctor === GeneratorFunction ||
// For the native GeneratorFunction constructor, the best we can
// do is to check its .name property.
(ctor.displayName || ctor.name) === "GeneratorFunction"
: false;
};
runtime.mark = function(genFun) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
} else {
genFun.__proto__ = GeneratorFunctionPrototype;
}
genFun.prototype = Object.create(Gp);
return genFun;
};
// Within the body of any async function, `await x` is transformed to
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
// `value instanceof AwaitArgument` to determine if the yielded value is
// meant to be awaited. Some may consider the name of this method too
// cutesy, but they are curmudgeons.
runtime.awrap = function(arg) {
return new AwaitArgument(arg);
};
function AwaitArgument(arg) {
this.arg = arg;
}
function AsyncIterator(generator) {
// This invoke function is written in a style that assumes some
// calling function (or Promise) will handle exceptions.
function invoke(method, arg) {
var result = generator[method](arg);
var value = result.value;
return value instanceof AwaitArgument
? Promise.resolve(value.arg).then(invokeNext, invokeThrow)
: Promise.resolve(value).then(function(unwrapped) {
// When a yielded Promise is resolved, its final value becomes
// the .value of the Promise<{value,done}> result for the
// current iteration. If the Promise is rejected, however, the
// result for this iteration will be rejected with the same
// reason. Note that rejections of yielded Promises are not
// thrown back into the generator function, as is the case
// when an awaited Promise is rejected. This difference in
// behavior between yield and await is important, because it
// allows the consumer to decide what to do with the yielded
// rejection (swallow it and continue, manually .throw it back
// into the generator, abandon iteration, whatever). With
// await, by contrast, there is no opportunity to examine the
// rejection reason outside the generator function, so the
// only option is to throw it from the await expression, and
// let the generator function handle the exception.
result.value = unwrapped;
return result;
});
}
if (typeof process === "object" && process.domain) {
invoke = process.domain.bind(invoke);
}
var invokeNext = invoke.bind(generator, "next");
var invokeThrow = invoke.bind(generator, "throw");
var invokeReturn = invoke.bind(generator, "return");
var previousPromise;
function enqueue(method, arg) {
function callInvokeWithMethodAndArg() {
return invoke(method, arg);
}
return previousPromise =
// If enqueue has been called before, then we want to wait until
// all previous Promises have been resolved before calling invoke,
// so that results are always delivered in the correct order. If
// enqueue has not been called before, then it is important to
// call invoke immediately, without waiting on a callback to fire,
// so that the async generator function has the opportunity to do
// any necessary setup in a predictable way. This predictability
// is why the Promise constructor synchronously invokes its
// executor callback, and why async functions synchronously
// execute code before the first await. Since we implement simple
// async functions in terms of async generators, it is especially
// important to get this right, even though it requires care.
previousPromise ? previousPromise.then(
callInvokeWithMethodAndArg,
// Avoid propagating failures to Promises returned by later
// invocations of the iterator.
callInvokeWithMethodAndArg
) : new Promise(function (resolve) {
resolve(callInvokeWithMethodAndArg());
});
}
// Define the unified helper method that is used to implement .next,
// .throw, and .return (see defineIteratorMethods).
this._invoke = enqueue;
}
defineIteratorMethods(AsyncIterator.prototype);
// Note that simple async functions are implemented on top of
// AsyncIterator objects; they just return a Promise for the value of
// the final result produced by the iterator.
runtime.async = function(innerFn, outerFn, self, tryLocsList) {
var iter = new AsyncIterator(
wrap(innerFn, outerFn, self, tryLocsList)
);
return runtime.isGeneratorFunction(outerFn)
? iter // If outerFn is a generator, return the full iterator.
: iter.next().then(function(result) {
return result.done ? result.value : iter.next();
});
};
function makeInvokeMethod(innerFn, self, context) {
var state = GenStateSuspendedStart;
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
if (state === GenStateCompleted) {
if (method === "throw") {
throw arg;
}
// Be forgiving, per 25.3.3.3.3 of the spec:
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
return doneResult();
}
while (true) {
var delegate = context.delegate;
if (delegate) {
if (method === "return" ||
(method === "throw" && delegate.iterator[method] === undefined)) {
// A return or throw (when the delegate iterator has no throw
// method) always terminates the yield* loop.
context.delegate = null;
// If the delegate iterator has a return method, give it a
// chance to clean up.
var returnMethod = delegate.iterator["return"];
if (returnMethod) {
var record = tryCatch(returnMethod, delegate.iterator, arg);
if (record.type === "throw") {
// If the return method threw an exception, let that
// exception prevail over the original return or throw.
method = "throw";
arg = record.arg;
continue;
}
}
if (method === "return") {
// Continue with the outer return, now that the delegate
// iterator has been terminated.
continue;
}
}
var record = tryCatch(
delegate.iterator[method],
delegate.iterator,
arg
);
if (record.type === "throw") {
context.delegate = null;
// Like returning generator.throw(uncaught), but without the
// overhead of an extra function call.
method = "throw";
arg = record.arg;
continue;
}
// Delegate generator ran and handled its own exceptions so
// regardless of what the method was, we continue as if it is
// "next" with an undefined arg.
method = "next";
arg = undefined;
var info = record.arg;
if (info.done) {
context[delegate.resultName] = info.value;
context.next = delegate.nextLoc;
} else {
state = GenStateSuspendedYield;
return info;
}
context.delegate = null;
}
if (method === "next") {
context._sent = arg;
if (state === GenStateSuspendedYield) {
context.sent = arg;
} else {
context.sent = undefined;
}
} else if (method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
throw arg;
}
if (context.dispatchException(arg)) {
// If the dispatched exception was caught by a catch block,
// then let that catch block handle the exception normally.
method = "next";
arg = undefined;
}
} else if (method === "return") {
context.abrupt("return", arg);
}
state = GenStateExecuting;
var record = tryCatch(innerFn, self, context);
if (record.type === "normal") {
// If an exception is thrown from innerFn, we leave state ===
// GenStateExecuting and loop back for another invocation.
state = context.done
? GenStateCompleted
: GenStateSuspendedYield;
var info = {
value: record.arg,
done: context.done
};
if (record.arg === ContinueSentinel) {
if (context.delegate && method === "next") {
// Deliberately forget the last sent value so that we don't
// accidentally pass it on to the delegate.
arg = undefined;
}
} else {
return info;
}
} else if (record.type === "throw") {
state = GenStateCompleted;
// Dispatch the exception by looping back around to the
// context.dispatchException(arg) call above.
method = "throw";
arg = record.arg;
}
}
};
}
// Define Generator.prototype.{next,throw,return} in terms of the
// unified ._invoke helper method.
defineIteratorMethods(Gp);
Gp[iteratorSymbol] = function() {
return this;
};
Gp.toString = function() {
return "[object Generator]";
};
function pushTryEntry(locs) {
var entry = { tryLoc: locs[0] };
if (1 in locs) {
entry.catchLoc = locs[1];
}
if (2 in locs) {
entry.finallyLoc = locs[2];
entry.afterLoc = locs[3];
}
this.tryEntries.push(entry);
}
function resetTryEntry(entry) {
var record = entry.completion || {};
record.type = "normal";
delete record.arg;
entry.completion = record;
}
function Context(tryLocsList) {
// The root entry object (effectively a try statement without a catch
// or a finally block) gives us a place to store values thrown from
// locations where there is no enclosing try statement.
this.tryEntries = [{ tryLoc: "root" }];
tryLocsList.forEach(pushTryEntry, this);
this.reset(true);
}
runtime.keys = function(object) {
var keys = [];
for (var key in object) {
keys.push(key);
}
keys.reverse();
// Rather than returning an object with a next method, we keep
// things simple and return the next function itself.
return function next() {
while (keys.length) {
var key = keys.pop();
if (key in object) {
next.value = key;
next.done = false;
return next;
}
}
// To avoid creating an additional object, we just hang the .value
// and .done properties off the next function object itself. This
// also ensures that the minifier will not anonymize the function.
next.done = true;
return next;
};
};
function values(iterable) {
if (iterable) {
var iteratorMethod = iterable[iteratorSymbol];
if (iteratorMethod) {
return iteratorMethod.call(iterable);
}
if (typeof iterable.next === "function") {
return iterable;
}
if (!isNaN(iterable.length)) {
var i = -1, next = function next() {
while (++i < iterable.length) {
if (hasOwn.call(iterable, i)) {
next.value = iterable[i];
next.done = false;
return next;
}
}
next.value = undefined;
next.done = true;
return next;
};
return next.next = next;
}
}
// Return an iterator with no values.
return { next: doneResult };
}
runtime.values = values;
function doneResult() {
return { value: undefined, done: true };
}
Context.prototype = {
constructor: Context,
reset: function(skipTempReset) {
this.prev = 0;
this.next = 0;
this.sent = undefined;
this.done = false;
this.delegate = null;
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
for (var name in this) {
// Not sure about the optimal order of these conditions:
if (name.charAt(0) === "t" &&
hasOwn.call(this, name) &&
!isNaN(+name.slice(1))) {
this[name] = undefined;
}
}
}
},
stop: function() {
this.done = true;
var rootEntry = this.tryEntries[0];
var rootRecord = rootEntry.completion;
if (rootRecord.type === "throw") {
throw rootRecord.arg;
}
return this.rval;
},
dispatchException: function(exception) {
if (this.done) {
throw exception;
}
var context = this;
function handle(loc, caught) {
record.type = "throw";
record.arg = exception;
context.next = loc;
return !!caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
var record = entry.completion;
if (entry.tryLoc === "root") {
// Exception thrown outside of any try block that could handle
// it, so set the completion value of the entire function to
// throw the exception.
return handle("end");
}
if (entry.tryLoc <= this.prev) {
var hasCatch = hasOwn.call(entry, "catchLoc");
var hasFinally = hasOwn.call(entry, "finallyLoc");
if (hasCatch && hasFinally) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
} else if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else if (hasCatch) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
}
} else if (hasFinally) {
if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else {
throw new Error("try statement without catch or finally");
}
}
}
},
abrupt: function(type, arg) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc <= this.prev &&
hasOwn.call(entry, "finallyLoc") &&
this.prev < entry.finallyLoc) {
var finallyEntry = entry;
break;
}
}
if (finallyEntry &&
(type === "break" ||
type === "continue") &&
finallyEntry.tryLoc <= arg &&
arg <= finallyEntry.finallyLoc) {
// Ignore the finally entry if control is not jumping to a
// location outside the try/catch block.
finallyEntry = null;
}
var record = finallyEntry ? finallyEntry.completion : {};
record.type = type;
record.arg = arg;
if (finallyEntry) {
this.next = finallyEntry.finallyLoc;
} else {
this.complete(record);
}
return ContinueSentinel;
},
complete: function(record, afterLoc) {
if (record.type === "throw") {
throw record.arg;
}
if (record.type === "break" ||
record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
this.rval = record.arg;
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
},
finish: function(finallyLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.finallyLoc === finallyLoc) {
this.complete(entry.completion, entry.afterLoc);
resetTryEntry(entry);
return ContinueSentinel;
}
}
},
"catch": function(tryLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc === tryLoc) {
var record = entry.completion;
if (record.type === "throw") {
var thrown = record.arg;
resetTryEntry(entry);
}
return thrown;
}
}
// The context.catch method must only be called with a location
// argument that corresponds to a known catch block.
throw new Error("illegal catch attempt");
},
delegateYield: function(iterable, resultName, nextLoc) {
this.delegate = {
iterator: values(iterable),
resultName: resultName,
nextLoc: nextLoc
};
return ContinueSentinel;
}
};
})(
// Among the various tricks for obtaining a reference to the global
// object, this seems to be the most reliable technique that does not
// use indirect eval (which violates Content Security Policy).
typeof global === "object" ? global :
typeof window === "object" ? window :
typeof self === "object" ? self : this
);
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(190)))
/***/ },
/* 190 */
/***/ function(module, exports) {
// shim for using process in browser
var process = module.exports = {};
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = setTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while(len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
clearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
setTimeout(drainQueue, 0);
}
};
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };
/***/ },
/* 191 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _create_pageJsx = __webpack_require__(192);
var _create_pageJsx2 = _interopRequireDefault(_create_pageJsx);
var _create_widgetJsx = __webpack_require__(212);
var _create_widgetJsx2 = _interopRequireDefault(_create_widgetJsx);
var _create_containerJsx = __webpack_require__(194);
var _create_containerJsx2 = _interopRequireDefault(_create_containerJsx);
var _create_page_type = __webpack_require__(213);
var _create_page_type2 = _interopRequireDefault(_create_page_type);
var _create_widget_type = __webpack_require__(215);
var _create_widget_type2 = _interopRequireDefault(_create_widget_type);
var _create_page_componentJsx = __webpack_require__(216);
var _create_page_componentJsx2 = _interopRequireDefault(_create_page_componentJsx);
var _resolve = __webpack_require__(198);
var _resolve2 = _interopRequireDefault(_resolve);
var _mutate = __webpack_require__(217);
var _mutate2 = _interopRequireDefault(_mutate);
var _classnames = __webpack_require__(222);
var _classnames2 = _interopRequireDefault(_classnames);
var _componentsPage_wrapperJsx = __webpack_require__(223);
var _componentsPage_wrapperJsx2 = _interopRequireDefault(_componentsPage_wrapperJsx);
var _componentsPage_backgroundJsx = __webpack_require__(224);
var _componentsPage_backgroundJsx2 = _interopRequireDefault(_componentsPage_backgroundJsx);
var _componentsPage_shadowJsx = __webpack_require__(225);
var _componentsPage_shadowJsx2 = _interopRequireDefault(_componentsPage_shadowJsx);
var _componentsPage_contentJsx = __webpack_require__(226);
var _componentsPage_contentJsx2 = _interopRequireDefault(_componentsPage_contentJsx);
var _componentsPage_headerJsx = __webpack_require__(228);
var _componentsPage_headerJsx2 = _interopRequireDefault(_componentsPage_headerJsx);
var _componentsPage_textJsx = __webpack_require__(229);
var _componentsPage_textJsx2 = _interopRequireDefault(_componentsPage_textJsx);
var _componentsBackground_imageJsx = __webpack_require__(230);
var _componentsBackground_imageJsx2 = _interopRequireDefault(_componentsBackground_imageJsx);
var _componentsPage_background_imageJsx = __webpack_require__(231);
var _componentsPage_background_imageJsx2 = _interopRequireDefault(_componentsPage_background_imageJsx);
var _componentsPage_linkJsx = __webpack_require__(233);
var _componentsPage_linkJsx2 = _interopRequireDefault(_componentsPage_linkJsx);
var _componentsPage_thumbnailJsx = __webpack_require__(234);
var _componentsPage_thumbnailJsx2 = _interopRequireDefault(_componentsPage_thumbnailJsx);
var _componentsLazy_loaded_page_thumbnailJsx = __webpack_require__(235);
var _componentsLazy_loaded_page_thumbnailJsx2 = _interopRequireDefault(_componentsLazy_loaded_page_thumbnailJsx);
var _reactDraggable = __webpack_require__(236);
var _reactDraggable2 = _interopRequireDefault(_reactDraggable);
exports['default'] = {
/** @api public */
createContainer: _create_containerJsx2['default'],
/** @api public */
createPage: _create_pageJsx2['default'],
/** @api public */
createWidget: _create_widgetJsx2['default'],
/** @api public */
createPageType: _create_page_type2['default'],
/** @api public */
createWidgetType: _create_widget_type2['default'],
/** @api public */
createPageComponent: _create_page_componentJsx2['default'],
/** @api public */
resolve: _resolve2['default'],
/** @api public */
mutate: _mutate2['default'],
classNames: _classnames2['default'],
components: {
PageWrapper: _componentsPage_wrapperJsx2['default'],
PageBackground: _componentsPage_backgroundJsx2['default'],
PageShadow: _componentsPage_shadowJsx2['default'],
PageContent: _componentsPage_contentJsx2['default'],
PageHeader: _componentsPage_headerJsx2['default'],
PageText: _componentsPage_textJsx2['default'],
BackgroundImage: _componentsBackground_imageJsx2['default'],
PageBackgroundImage: _componentsPage_background_imageJsx2['default'],
PageLink: _componentsPage_linkJsx2['default'],
PageThumbnail: _componentsPage_thumbnailJsx2['default'],
LazyLoadedPageThumbnail: _componentsLazy_loaded_page_thumbnailJsx2['default'],
Draggable: _reactDraggable2['default']
}
};
module.exports = exports['default'];
/***/ },
/* 192 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _react2 = _interopRequireDefault(_react);
var _create_containerJsx = __webpack_require__(194);
var _create_containerJsx2 = _interopRequireDefault(_create_containerJsx);
var _create_resolver_rootJsx = __webpack_require__(197);
var _create_resolver_rootJsx2 = _interopRequireDefault(_create_resolver_rootJsx);
var _resolve = __webpack_require__(198);
var _resolve2 = _interopRequireDefault(_resolve);
exports['default'] = function (Component) {
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var ContainerComponent = (0, _create_containerJsx2['default'])(Component, {
fragments: _extends({
page: (0, _resolve2['default'])('page', {
property: 'pageId'
})
}, options.fragments || {})
});
var Page = (function (_React$Component) {
_inherits(Page, _React$Component);
function Page() {
_classCallCheck(this, Page);
_get(Object.getPrototypeOf(Page.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(Page, [{
key: 'getChildContext',
value: function getChildContext() {
return {
pageHooks: this.props.pageHooks,
pageIsPreloaded: this.props.isPreloaded
};
}
}, {
key: 'render',
value: function render() {
return _react2['default'].createElement(ContainerComponent, { pageId: this.props.pageId });
}
}], [{
key: 'childContextTypes',
value: {
pageHooks: _react2['default'].PropTypes.object,
pageIsPreloaded: _react2['default'].PropTypes.bool
},
enumerable: true
}]);
return Page;
})(_react2['default'].Component);
;
return (0, _create_resolver_rootJsx2['default'])(Page);
};
;
module.exports = exports['default'];
/***/ },
/* 193 */
/***/ function(module, exports) {
module.exports = React;
/***/ },
/* 194 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _react2 = _interopRequireDefault(_react);
var _resolversObject_resolver = __webpack_require__(195);
var _resolversObject_resolver2 = _interopRequireDefault(_resolversObject_resolver);
exports['default'] = function (Component, options) {
options = options || {};
if (options.editorOnly && !PAGEFLOW_EDITOR) {
return (function (_React$Component) {
_inherits(_class, _React$Component);
function _class() {
_classCallCheck(this, _class);
_get(Object.getPrototypeOf(_class.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(_class, [{
key: 'render',
value: function render() {
return false;
}
}]);
return _class;
})(_react2['default'].Component);
}
return (function (_React$Component2) {
_inherits(_class2, _React$Component2);
_createClass(_class2, null, [{
key: 'contextTypes',
value: {
resolverSeed: _react2['default'].PropTypes.object
},
enumerable: true
}]);
function _class2(props, context) {
_classCallCheck(this, _class2);
_get(Object.getPrototypeOf(_class2.prototype), 'constructor', this).call(this, props, context);
this._resolver = new _resolversObject_resolver2['default'](options.fragments, this._handleChange.bind(this));
this.state = this._resolve(props);
}
_createClass(_class2, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
this.setState(this._resolve(nextProps));
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this._resolver.dispose();
}
}, {
key: '_handleChange',
value: function _handleChange() {
this.setState(this._resolve(this.props));
}
}, {
key: '_resolve',
value: function _resolve(props) {
return this._resolver.get(props, this.context.resolverSeed);
}
}, {
key: 'render',
value: function render() {
return _react2['default'].createElement(Component, this.state);
}
}]);
return _class2;
})(_react2['default'].Component);
};
;
module.exports = exports['default'];
/***/ },
/* 195 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _resolver = __webpack_require__(196);
var _resolver2 = _interopRequireDefault(_resolver);
var ObjectResolver = (function (_Resolver) {
_inherits(ObjectResolver, _Resolver);
function ObjectResolver(fragment, callback, propertyName) {
_classCallCheck(this, ObjectResolver);
_get(Object.getPrototypeOf(ObjectResolver.prototype), 'constructor', this).call(this, callback);
this._fragment = fragment;
this._resolvers = {};
this._propertyName = propertyName;
}
_createClass(ObjectResolver, [{
key: 'get',
value: function get(props, seed) {
var _this = this;
this._updateResolvers();
if (this._propertyName) {
props = props[this._propertyName];
}
if (!props) {
return null;
}
return Object.keys(this._resolvers).reduce(function (result, key) {
var resolver = _this._resolvers[key];
result[key] = resolver.get(props, seed);
return result;
}, _extends({}, props));
}
}, {
key: 'dispose',
value: function dispose() {
var _this2 = this;
Object.keys(this._resolvers).forEach(function (key) {
_this2._resolvers[key].dispose();
});
}
}, {
key: '_updateResolvers',
value: function _updateResolvers() {
var _this3 = this;
var resolvers = this._resolvers;
Object.keys(this._fragment || {}).forEach(function (key) {
var resolverProvider = _this3._fragment[key];
if (!resolvers[key]) {
resolvers[key] = _this3._createResolver(resolverProvider, key);
}
});
}
}, {
key: '_createResolver',
value: function _createResolver(provider, key) {
var handleChange = this._handleChange.bind(this);
if (typeof provider === 'object') {
return new ObjectResolver(provider, handleChange, key);
} else {
return provider(handleChange);
}
}
}]);
return ObjectResolver;
})(_resolver2['default']);
exports['default'] = ObjectResolver;
module.exports = exports['default'];
/***/ },
/* 196 */
/***/ function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Resolver = (function () {
function Resolver(callback) {
_classCallCheck(this, Resolver);
this._callback = callback;
}
_createClass(Resolver, [{
key: "get",
value: function get(props) {}
}, {
key: "dispose",
value: function dispose() {}
/** @protected */
}, {
key: "_handleChange",
value: function _handleChange() {
if (this._callback) {
this._callback();
}
}
}]);
return Resolver;
})();
exports["default"] = Resolver;
module.exports = exports["default"];
/***/ },
/* 197 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _react2 = _interopRequireDefault(_react);
exports['default'] = function (Component) {
return (function (_React$Component) {
_inherits(_class, _React$Component);
function _class() {
_classCallCheck(this, _class);
_get(Object.getPrototypeOf(_class.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(_class, [{
key: 'getChildContext',
value: function getChildContext() {
return {
resolverSeed: this.props.resolverSeed || {}
};
}
}, {
key: 'render',
value: function render() {
return _react2['default'].createElement(Component, this.props);
}
}], [{
key: 'childContextTypes',
value: {
resolverSeed: _react2['default'].PropTypes.object
},
enumerable: true
}]);
return _class;
})(_react2['default'].Component);
};
;
module.exports = exports['default'];
/***/ },
/* 198 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _resolversEditor_file_ids_resolver = __webpack_require__(199);
var _resolversEditor_file_ids_resolver2 = _interopRequireDefault(_resolversEditor_file_ids_resolver);
var _resolversEditor_page_resolver = __webpack_require__(200);
var _resolversEditor_page_resolver2 = _interopRequireDefault(_resolversEditor_page_resolver);
var _resolversEditor_chapter_resolver = __webpack_require__(204);
var _resolversEditor_chapter_resolver2 = _interopRequireDefault(_resolversEditor_chapter_resolver);
var _resolversSeed_file_ids_resolver = __webpack_require__(205);
var _resolversSeed_file_ids_resolver2 = _interopRequireDefault(_resolversSeed_file_ids_resolver);
var _resolversSeed_page_resolver = __webpack_require__(206);
var _resolversSeed_page_resolver2 = _interopRequireDefault(_resolversSeed_page_resolver);
var _resolversSeed_chapter_resolver = __webpack_require__(208);
var _resolversSeed_chapter_resolver2 = _interopRequireDefault(_resolversSeed_chapter_resolver);
var _resolversPage_type_resolver = __webpack_require__(209);
var _resolversPage_type_resolver2 = _interopRequireDefault(_resolversPage_type_resolver);
var _resolversCurrent_parent_page_resolver = __webpack_require__(210);
var _resolversCurrent_parent_page_resolver2 = _interopRequireDefault(_resolversCurrent_parent_page_resolver);
var _resolversI18n_resolver = __webpack_require__(211);
var _resolversI18n_resolver2 = _interopRequireDefault(_resolversI18n_resolver);
var resolvers;
if (PAGEFLOW_EDITOR) {
resolvers = {
fileIds: _resolversEditor_file_ids_resolver2['default'],
chapter: _resolversEditor_chapter_resolver2['default'],
page: _resolversEditor_page_resolver2['default']
};
} else {
resolvers = {
fileIds: _resolversSeed_file_ids_resolver2['default'],
chapter: _resolversSeed_chapter_resolver2['default'],
page: _resolversSeed_page_resolver2['default']
};
}
resolvers = _extends({
pageType: _resolversPage_type_resolver2['default'],
currentParentPage: _resolversCurrent_parent_page_resolver2['default'],
i18n: _resolversI18n_resolver2['default']
}, resolvers);
exports['default'] = function (resolverName, options) {
var resolver = resolvers[resolverName];
if (!resolver) {
throw 'Unknown resolver ' + resolverName;
}
return function (callback) {
return new resolver(options, callback);
};
};
;
module.exports = exports['default'];
/***/ },
/* 199 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _resolver = __webpack_require__(196);
var _resolver2 = _interopRequireDefault(_resolver);
var _default = (function (_Resolver) {
_inherits(_default, _Resolver);
function _default(options, callback) {
var _this = this;
_classCallCheck(this, _default);
_get(Object.getPrototypeOf(_default.prototype), 'constructor', this).call(this, callback);
this._options = _extends({
collections: function collections() {
return pageflow.files;
}
}, options);
Object.values(this._options.collections()).forEach(function (collection) {
return collection.on('remove', _this._handleChange, _this);
});
}
_createClass(_default, [{
key: 'get',
value: function get() {
var files = this._options.collections();
return Object.keys(files).reduce(function (result, collectionName) {
result[collectionName] = files[collectionName].map(function (file) {
return file.id;
});
return result;
}, {});
}
}, {
key: 'dispose',
value: function dispose() {
var _this2 = this;
Object.values(this._options.collections()).forEach(function (collection) {
return collection.off('remove', _this2._handleChange, _this2);
});
}
}]);
return _default;
})(_resolver2['default']);
exports['default'] = _default;
;
module.exports = exports['default'];
/***/ },
/* 200 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _backbone_model_resolver = __webpack_require__(201);
var _backbone_model_resolver2 = _interopRequireDefault(_backbone_model_resolver);
exports['default'] = function (options, callback) {
return new _backbone_model_resolver2['default'](_extends({
collection: function collection() {
return pageflow.pages;
},
idAttribute: 'perma_id',
attributesForProps: ['perma_id', ['type', 'template'], 'chapter_id'],
includeConfiguration: true
}, options), callback);
};
;
module.exports = exports['default'];
/***/ },
/* 201 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _resolver = __webpack_require__(196);
var _resolver2 = _interopRequireDefault(_resolver);
var _create_recursive_resolver = __webpack_require__(202);
var _create_recursive_resolver2 = _interopRequireDefault(_create_recursive_resolver);
var _utilsCamelize = __webpack_require__(203);
var _utilsCamelize2 = _interopRequireDefault(_utilsCamelize);
/**
* Resolve a foreign key to an object of attributes.
*/
var BackboneModelResolver = (function (_Resolver) {
_inherits(BackboneModelResolver, _Resolver);
function BackboneModelResolver(options, callback) {
_classCallCheck(this, BackboneModelResolver);
_get(Object.getPrototypeOf(BackboneModelResolver.prototype), 'constructor', this).call(this, callback);
this._options = _extends({
idAttribute: 'id',
attributesForProps: ['id'],
includeConfiguration: false
}, options);
}
_createClass(BackboneModelResolver, [{
key: 'get',
value: function get(props, seed) {
this._updateModel(props, seed || {});
this._updateSubscription();
return this._getPropsFromModel();
}
}, {
key: 'dispose',
value: function dispose() {
if (this._model) {
this._stopListening(this._model);
}
}
}, {
key: '_updateModel',
value: function _updateModel(props, seed) {
this._prevModel = this._model;
this._model = this._getModel(props, seed);
}
}, {
key: '_getModel',
value: function _getModel(props, seed) {
var collection = this._options.collection(seed.ns);
return collection.findWhere(this._getIdConditions(props));
}
}, {
key: '_getIdConditions',
value: function _getIdConditions(props) {
var conditions = {};
conditions[this._options.idAttribute] = this._getModelId(props);
return conditions;
}
}, {
key: '_getModelId',
value: function _getModelId(props) {
return props[this._options.property];
}
}, {
key: '_updateSubscription',
value: function _updateSubscription() {
if (this._prevModel === this._model) {
return;
}
if (this._prevModel) {
this._stopListening(this._prevModel);
}
if (this._model) {
this._startListening(this._model);
}
}
}, {
key: '_startListening',
value: function _startListening(model) {
model.on(this._getSubscribedEvents(), this._handleChange, this);
if (this._options.includeConfiguration) {
model.configuration.on('change', this._handleChange, this);
}
}
}, {
key: '_stopListening',
value: function _stopListening(model) {
model.off(null, null, this);
if (this._options.includeConfiguration) {
model.configuration.off('change', this._handleChange, this);
}
}
}, {
key: '_getSubscribedEvents',
value: function _getSubscribedEvents() {
return this._options.attributesForProps.map(function (attribute) {
return 'change:' + attribute;
}).join(' ');
}
}, {
key: '_getPropsFromModel',
value: function _getPropsFromModel() {
var props = null;
var model = this._model;
if (model) {
props = this._getPropsFromAttributes();
if (this._options.includeConfiguration) {
Object.assign(props, _utilsCamelize2['default'].deep(model.configuration.attributes));
}
}
return props;
}
}, {
key: '_getPropsFromAttributes',
value: function _getPropsFromAttributes() {
var model = this._model;
return this._options.attributesForProps.reduce(function (result, name) {
if (typeof name === 'string') {
name = [(0, _utilsCamelize2['default'])(name), name];
}
result[name[0]] = model.get(name[1]);
return result;
}, {});
}
}]);
return BackboneModelResolver;
})(_resolver2['default']);
;
exports['default'] = (0, _create_recursive_resolver2['default'])(BackboneModelResolver);
module.exports = exports['default'];
/***/ },
/* 202 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _object_resolver = __webpack_require__(195);
var _object_resolver2 = _interopRequireDefault(_object_resolver);
exports['default'] = function (Resolver) {
return (function () {
function _class(options, callback) {
_classCallCheck(this, _class);
this._inner = new Resolver(options, callback);
this._objectResolver = new _object_resolver2['default'](options.fragments, callback);
}
_createClass(_class, [{
key: 'get',
value: function get(props, seed) {
var result = this._inner.get(props, seed);
return this._objectResolver.get(result, seed);
}
}, {
key: 'dispose',
value: function dispose() {
this._inner.dispose();
this._objectResolver.dispose();
}
}]);
return _class;
})();
};
;
module.exports = exports['default'];
/***/ },
/* 203 */
/***/ function(module, exports) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function camelize(snakeCase) {
return snakeCase.replace(/_[a-z]/g, function (match) {
return match[1].toUpperCase();
});
};
camelize.keys = function (object) {
return Object.keys(object).reduce(function (result, key) {
result[camelize(key)] = object[key];
return result;
}, {});
};
camelize.deep = function (object) {
if (Array.isArray(object)) {
return object.map(camelize.deep);
} else if (typeof object === 'object' && object) {
return Object.keys(object).reduce(function (result, key) {
result[camelize(key)] = camelize.deep(object[key]);
return result;
}, {});
} else {
return object;
}
};
exports['default'] = camelize;
module.exports = exports['default'];
/***/ },
/* 204 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _backbone_model_resolver = __webpack_require__(201);
var _backbone_model_resolver2 = _interopRequireDefault(_backbone_model_resolver);
exports['default'] = function (options, callback) {
return new _backbone_model_resolver2['default'](_extends({
collection: function collection() {
return pageflow.chapters;
},
attributesForProps: ['id', 'title', 'position'],
property: 'chapterId'
}, options), callback);
};
;
module.exports = exports['default'];
/***/ },
/* 205 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _resolver = __webpack_require__(196);
var _resolver2 = _interopRequireDefault(_resolver);
var _default = (function (_Resolver) {
_inherits(_default, _Resolver);
function _default(_, callback) {
_classCallCheck(this, _default);
_get(Object.getPrototypeOf(_default.prototype), 'constructor', this).call(this, callback);
}
_createClass(_default, [{
key: 'get',
value: function get(props, seed) {
return seed.file_ids;
}
}]);
return _default;
})(_resolver2['default']);
exports['default'] = _default;
;
module.exports = exports['default'];
/***/ },
/* 206 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _seed_resolver = __webpack_require__(207);
var _seed_resolver2 = _interopRequireDefault(_seed_resolver);
exports['default'] = function (options, callback) {
return new _seed_resolver2['default'](_extends({
seedProperty: 'pages',
idAttribute: 'perma_id',
attributesForProps: ['perma_id', ['type', 'template'], 'chapter_id'],
includeConfiguration: true
}, options), callback);
};
;
module.exports = exports['default'];
/***/ },
/* 207 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _resolver = __webpack_require__(196);
var _resolver2 = _interopRequireDefault(_resolver);
var _create_recursive_resolver = __webpack_require__(202);
var _create_recursive_resolver2 = _interopRequireDefault(_create_recursive_resolver);
var _utilsCamelize = __webpack_require__(203);
var _utilsCamelize2 = _interopRequireDefault(_utilsCamelize);
/**
* Resolves a foreign key to an object of attributes from the seed
* data.
*/
var SeedResolver = (function (_Resolver) {
_inherits(SeedResolver, _Resolver);
function SeedResolver(options, callback) {
_classCallCheck(this, SeedResolver);
_get(Object.getPrototypeOf(SeedResolver.prototype), 'constructor', this).call(this, callback);
this._options = _extends({
idAttribute: 'id',
attributesForProps: ['id'],
includeConfiguration: false
}, options);
}
_createClass(SeedResolver, [{
key: 'get',
value: function get(props, seed) {
var attributes = this._getAttributes(props, seed);
return this._getProps(attributes);
}
}, {
key: '_getAttributes',
value: function _getAttributes(props, seed) {
return this._getAttributesById(this._getModelId(props), seed);
}
}, {
key: '_getAttributesById',
value: function _getAttributesById(id, seed) {
var _this = this;
var collection = seed[this._options.seedProperty];
if (!collection) {
return null;
}
return collection.find(function (attributes) {
return attributes[_this._options.idAttribute] === id;
});
}
}, {
key: '_getModelId',
value: function _getModelId(props) {
return props[this._options.property];
}
}, {
key: '_getProps',
value: function _getProps(attributes) {
var props;
if (!attributes) {
return null;
}
props = this._getPropsFromAttributes(attributes);
if (this._options.includeConfiguration) {
Object.assign(props, _utilsCamelize2['default'].deep(attributes.configuration));
}
return props;
}
}, {
key: '_getPropsFromAttributes',
value: function _getPropsFromAttributes(attributes) {
return this._options.attributesForProps.reduce(function (result, name) {
if (typeof name === 'string') {
name = [(0, _utilsCamelize2['default'])(name), name];
}
result[name[0]] = attributes[name[1]];
return result;
}, {});
}
}]);
return SeedResolver;
})(_resolver2['default']);
;
exports['default'] = (0, _create_recursive_resolver2['default'])(SeedResolver);
module.exports = exports['default'];
/***/ },
/* 208 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _seed_resolver = __webpack_require__(207);
var _seed_resolver2 = _interopRequireDefault(_seed_resolver);
exports['default'] = function (options, callback) {
return new _seed_resolver2['default'](_extends({
seedProperty: 'chapters',
attributesForProps: ['id', 'title'],
property: 'chapterId'
}, options), callback);
};
;
module.exports = exports['default'];
/***/ },
/* 209 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _resolver = __webpack_require__(196);
var _resolver2 = _interopRequireDefault(_resolver);
var _utilsCamelize = __webpack_require__(203);
var _utilsCamelize2 = _interopRequireDefault(_utilsCamelize);
var _default = (function (_Resolver) {
_inherits(_default, _Resolver);
function _default() {
_classCallCheck(this, _default);
_get(Object.getPrototypeOf(_default.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(_default, [{
key: 'get',
value: function get(props, seed) {
return _extends({
name: props.type
}, _utilsCamelize2['default'].deep(seed.page_types[props.type]));
}
}]);
return _default;
})(_resolver2['default']);
exports['default'] = _default;
;
module.exports = exports['default'];
/***/ },
/* 210 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _resolver = __webpack_require__(196);
var _resolver2 = _interopRequireDefault(_resolver);
var _resolve = __webpack_require__(198);
var _resolve2 = _interopRequireDefault(_resolve);
var _create_recursive_resolver = __webpack_require__(202);
var _create_recursive_resolver2 = _interopRequireDefault(_create_recursive_resolver);
var CurrentPageResolver = (function (_Resolver) {
_inherits(CurrentPageResolver, _Resolver);
function CurrentPageResolver(options, callback) {
_classCallCheck(this, CurrentPageResolver);
_get(Object.getPrototypeOf(CurrentPageResolver.prototype), 'constructor', this).call(this, callback);
this._subscribeToPageChange();
this._pageResolver = (0, _resolve2['default'])('page', { property: 'permaId' })(callback);
}
_createClass(CurrentPageResolver, [{
key: 'get',
value: function get(_, seed) {
return this._pageResolver.get({
permaId: this._currentParentPagePermaId(seed)
}, seed);
}
}, {
key: 'dispose',
value: function dispose() {
this._unsubscribeFromPageChange();
}
}, {
key: '_currentParentPagePermaId',
value: function _currentParentPagePermaId(seed) {
var currentPagePermaId = pageflow.slides.currentPage().page('getPermaId');
return pageflow.entryData.getParentPagePermaIdByPagePermaId(currentPagePermaId);
}
}, {
key: '_subscribeToPageChange',
value: function _subscribeToPageChange() {
pageflow.events.on('page:change', this._handleChange, this);
}
}, {
key: '_unsubscribeFromPageChange',
value: function _unsubscribeFromPageChange() {
pageflow.events.off('page:change', this._handleChange, this);
}
}]);
return CurrentPageResolver;
})(_resolver2['default']);
;
exports['default'] = (0, _create_recursive_resolver2['default'])(CurrentPageResolver);
module.exports = exports['default'];
/***/ },
/* 211 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _resolver = __webpack_require__(196);
var _resolver2 = _interopRequireDefault(_resolver);
var _default = (function (_Resolver) {
_inherits(_default, _Resolver);
function _default() {
_classCallCheck(this, _default);
_get(Object.getPrototypeOf(_default.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(_default, [{
key: 'get',
value: function get(props, seed) {
return {
t: function t(key, options) {
return I18n.t(key, _extends({ locale: seed.locale }, options));
}
};
}
}]);
return _default;
})(_resolver2['default']);
exports['default'] = _default;
;
module.exports = exports['default'];
/***/ },
/* 212 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _create_resolver_rootJsx = __webpack_require__(197);
var _create_resolver_rootJsx2 = _interopRequireDefault(_create_resolver_rootJsx);
exports['default'] = _create_resolver_rootJsx2['default'];
module.exports = exports['default'];
/***/ },
/* 213 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _react = __webpack_require__(193);
var _react2 = _interopRequireDefault(_react);
var _reactDom = __webpack_require__(214);
var _reactDom2 = _interopRequireDefault(_reactDom);
exports['default'] = function (Component) {
return {
scroller: false,
enhance: function enhance(pageElement) {
this._pageHooks = _extends({}, Backbone.Events);
this._isPreloaded = false;
this._render(pageElement);
},
preload: function preload(pageElement) {
this._isPreloaded = true;
this._render(pageElement);
},
activating: function activating(elelement, configuration, options) {
this._pageHooks.trigger('activating', options);
},
activated: function activated() {
this._pageHooks.trigger('activated');
},
deactivating: function deactivating() {
this._pageHooks.trigger('deactivating');
},
deactivated: function deactivated() {
this._pageHooks.trigger('deactivated');
},
resize: function resize() {
this._pageHooks.trigger('resize');
},
update: function update(pageElement, configuration) {
pageflow.commonPageCssClasses.updateCommonPageCssClasses(pageElement, configuration);
},
cleanup: function cleanup(pageElement) {
_reactDom2['default'].unmountComponentAtNode(pageElement[0]);
},
_render: function _render(pageElement) {
_reactDom2['default'].render(_react2['default'].createElement(Component, {
resolverSeed: pageflow.seed,
pageId: parseInt(pageElement.attr('id'), 10),
pageHooks: this._pageHooks,
isPreloaded: this._isPreloaded
}), pageElement[0]);
}
};
};
;
module.exports = exports['default'];
/***/ },
/* 214 */
/***/ function(module, exports) {
module.exports = ReactDOM;
/***/ },
/* 215 */
/***/ function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports["default"] = function (Component) {
return {
enhance: function enhance(element) {
ReactDOM.render(React.createElement(Component, {
resolverSeed: _extends({
events: pageflow.events
}, pageflow.seed)
}), element[0]);
}
};
};
;
module.exports = exports["default"];
/***/ },
/* 216 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _react2 = _interopRequireDefault(_react);
exports['default'] = function (Component) {
return (function (_React$Component) {
_inherits(_class, _React$Component);
function _class() {
_classCallCheck(this, _class);
_get(Object.getPrototypeOf(_class.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(_class, [{
key: 'componentDidMount',
value: function componentDidMount() {
var component = this.refs.component;
this.context.pageHooks.on({
activating: function activating(options) {
trigger('pageWillActivate', options);
},
activated: function activated() {
trigger('pageDidActivate');
},
deactivating: function deactivating() {
trigger('pageDidDeactivate');
},
resize: function resize() {
trigger('pageDidResize');
}
}, this);
function trigger(name, options) {
if (typeof component[name] === 'function') {
component[name].call(component, options);
}
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.context.pageHooks.off(null, null, this);
}
}, {
key: 'render',
value: function render() {
return _react2['default'].createElement(Component, _extends({}, this.props, { ref: 'component' }));
}
}], [{
key: 'contextTypes',
value: {
pageHooks: _react2['default'].PropTypes.object
},
enumerable: true
}]);
return _class;
})(_react2['default'].Component);
};
;
module.exports = exports['default'];
/***/ },
/* 217 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _mutationsUpdate_page_mutation = __webpack_require__(218);
var _mutationsUpdate_page_mutation2 = _interopRequireDefault(_mutationsUpdate_page_mutation);
var _mutationsUpdate_page_link_mutation = __webpack_require__(221);
var _mutationsUpdate_page_link_mutation2 = _interopRequireDefault(_mutationsUpdate_page_link_mutation);
var mutations = {
updatePage: _mutationsUpdate_page_mutation2['default'],
updatePageLink: _mutationsUpdate_page_link_mutation2['default']
};
exports['default'] = function (mutationName, props) {
var mutation = mutations[mutationName];
if (!mutation) {
throw 'Unknown mutation ' + mutationName;
}
return new mutation(props).perform();
};
;
module.exports = exports['default'];
/***/ },
/* 218 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _mutation = __webpack_require__(219);
var _mutation2 = _interopRequireDefault(_mutation);
var _pageflow = __webpack_require__(220);
var _pageflow2 = _interopRequireDefault(_pageflow);
var _default = (function (_Mutation) {
_inherits(_default, _Mutation);
function _default() {
_classCallCheck(this, _default);
_get(Object.getPrototypeOf(_default.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(_default, [{
key: 'perform',
value: function perform() {
this._getPage().configuration.set(this.props.attributes);
}
}, {
key: '_getPage',
value: function _getPage() {
var page = _pageflow2['default'].pages.get(this.props.pageId);
if (!page) {
throw new Error('Could not find page with id ' + this.props.pageId + '.');
}
return page;
}
}]);
return _default;
})(_mutation2['default']);
exports['default'] = _default;
module.exports = exports['default'];
/***/ },
/* 219 */
/***/ function(module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var _default = function _default(props) {
_classCallCheck(this, _default);
this.props = props;
};
exports["default"] = _default;
module.exports = exports["default"];
/***/ },
/* 220 */
/***/ function(module, exports) {
module.exports = pageflow;
/***/ },
/* 221 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _mutation = __webpack_require__(219);
var _mutation2 = _interopRequireDefault(_mutation);
var _pageflow = __webpack_require__(220);
var _pageflow2 = _interopRequireDefault(_pageflow);
var _default = (function (_Mutation) {
_inherits(_default, _Mutation);
function _default() {
_classCallCheck(this, _default);
_get(Object.getPrototypeOf(_default.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(_default, [{
key: 'perform',
value: function perform() {
this._getPageLink().set(this.props.attributes);
}
}, {
key: '_getPageLink',
value: function _getPageLink() {
var pageLink = this._getPage().pageLinks().get(this.props.id);
if (!pageLink) {
throw new Error('Could not find page link with id ' + this.props.pageLinkId + '.');
}
return pageLink;
}
}, {
key: '_getPage',
value: function _getPage() {
var _props$id$split = this.props.id.split(':');
var _props$id$split2 = _slicedToArray(_props$id$split, 1);
var pageId = _props$id$split2[0];
var page = _pageflow2['default'].pages.getByPermaId(pageId);
if (!page) {
throw new Error('Could not find page with id ' + pageId + '.');
}
return page;
}
}]);
return _default;
})(_mutation2['default']);
exports['default'] = _default;
module.exports = exports['default'];
/***/ },
/* 222 */
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
Copyright (c) 2015 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/* global define */
(function () {
'use strict';
var hasOwn = {}.hasOwnProperty;
function classNames () {
var classes = '';
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (!arg) continue;
var argType = typeof arg;
if (argType === 'string' || argType === 'number') {
classes += ' ' + arg;
} else if (Array.isArray(arg)) {
classes += ' ' + classNames.apply(null, arg);
} else if (argType === 'object') {
for (var key in arg) {
if (hasOwn.call(arg, key) && arg[key]) {
classes += ' ' + key;
}
}
}
}
return classes.substr(1);
}
if (typeof module !== 'undefined' && module.exports) {
module.exports = classNames;
} else if (true) {
// register as 'classnames', consistent with npm package name
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {
return classNames;
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else {
window.classNames = classNames;
}
}());
/***/ },
/* 223 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _default = (function (_Component) {
_inherits(_default, _Component);
function _default() {
_classCallCheck(this, _default);
_get(Object.getPrototypeOf(_default.prototype), "constructor", this).apply(this, arguments);
}
_createClass(_default, [{
key: "render",
value: function render() {
return React.createElement(
"div",
{ className: "content_and_background" },
this.props.children
);
}
}]);
return _default;
})(_react.Component);
exports["default"] = _default;
;
module.exports = exports["default"];
/***/ },
/* 224 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _default = (function (_Component) {
_inherits(_default, _Component);
function _default() {
_classCallCheck(this, _default);
_get(Object.getPrototypeOf(_default.prototype), "constructor", this).apply(this, arguments);
}
_createClass(_default, [{
key: "render",
value: function render() {
return React.createElement(
"div",
{ className: "backgroundArea" },
this.props.children
);
}
}]);
return _default;
})(_react.Component);
exports["default"] = _default;
;
module.exports = exports["default"];
/***/ },
/* 225 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _react2 = _interopRequireDefault(_react);
var PageShadow = (function (_React$Component) {
_inherits(PageShadow, _React$Component);
function PageShadow() {
_classCallCheck(this, PageShadow);
_get(Object.getPrototypeOf(PageShadow.prototype), "constructor", this).apply(this, arguments);
}
_createClass(PageShadow, [{
key: "render",
value: function render() {
return _react2["default"].createElement(
"div",
{ className: "shadow_wrapper" },
_react2["default"].createElement("div", { className: "shadow", style: this.style() })
);
}
}, {
key: "style",
value: function style() {
if ('gradientOpacity' in this.props.page) {
return {
opacity: this.props.page.gradientOpacity / 100
};
}
}
}]);
return PageShadow;
})(_react2["default"].Component);
exports["default"] = PageShadow;
;
module.exports = exports["default"];
/***/ },
/* 226 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _react2 = _interopRequireDefault(_react);
var _scroller = __webpack_require__(227);
var _scroller2 = _interopRequireDefault(_scroller);
var _create_page_componentJsx = __webpack_require__(216);
var _create_page_componentJsx2 = _interopRequireDefault(_create_page_componentJsx);
var PageContent = (function (_React$Component) {
_inherits(PageContent, _React$Component);
function PageContent() {
_classCallCheck(this, PageContent);
_get(Object.getPrototypeOf(PageContent.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(PageContent, [{
key: 'getChildContext',
value: function getChildContext() {
var _this = this;
this._pageScroller = this._pageScroller || {
disable: function disable() {
_this.refs.scroller.disable();
},
enable: function enable() {
_this.refs.scroller.enable();
}
};
return {
pageScroller: this._pageScroller
};
}
}, {
key: 'render',
value: function render() {
return _react2['default'].createElement(
'div',
{ className: 'content' },
_react2['default'].createElement(
_scroller2['default'],
{ ref: 'scroller' },
_react2['default'].createElement(
'div',
{ className: 'contentWrapper' },
this.props.children
)
)
);
}
}, {
key: 'pageWillActivate',
value: function pageWillActivate(options) {
this.refs.scroller.resetPosition({ position: options.position });
}
}, {
key: 'pageDidActivate',
value: function pageDidActivate() {
this.refs.scroller.enable();
}
}, {
key: 'pageWillDeactivate',
value: function pageWillDeactivate() {
this.refs.scroller.disable();
}
}], [{
key: 'childContextTypes',
value: {
pageScroller: _react2['default'].PropTypes.object
},
enumerable: true
}]);
return PageContent;
})(_react2['default'].Component);
exports['default'] = PageContent;
;
exports['default'] = (0, _create_page_componentJsx2['default'])(PageContent);
module.exports = exports['default'];
/***/ },
/* 227 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _reactDom = __webpack_require__(214);
var _reactDom2 = _interopRequireDefault(_reactDom);
/** @api private */
var Scroller = (function (_Component) {
_inherits(Scroller, _Component);
function Scroller() {
_classCallCheck(this, Scroller);
_get(Object.getPrototypeOf(Scroller.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(Scroller, [{
key: 'render',
value: function render() {
return React.createElement(
'div',
{ ref: 'wrapper', className: 'scroller' },
React.createElement(
'div',
null,
this.props.children
)
);
}
}, {
key: 'componentDidMount',
value: function componentDidMount() {
if (typeof jQuery !== 'undefined') {
var element = jQuery(ReactDOM.findDOMNode(this.refs.wrapper));
element.scroller();
window.sss = this.scroller = element.scroller('instance');
}
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
this.scroller.refresh();
}
}, {
key: 'enable',
value: function enable() {
this.scroller.enable();
this.scroller.afterAnimationHook();
}
}, {
key: 'disable',
value: function disable() {
this.scroller.disable();
}
}, {
key: 'resetPosition',
value: function resetPosition(options) {
this.scroller.resetPosition(options);
}
}, {
key: 'resetPosition',
value: function resetPosition(options) {
this.scroller.resetPosition(options);
}
}]);
return Scroller;
})(_react.Component);
;
exports['default'] = Scroller;
module.exports = exports['default'];
/***/ },
/* 228 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _react2 = _interopRequireDefault(_react);
var _default = (function (_React$Component) {
_inherits(_default, _React$Component);
function _default() {
_classCallCheck(this, _default);
_get(Object.getPrototypeOf(_default.prototype), "constructor", this).apply(this, arguments);
}
_createClass(_default, [{
key: "render",
value: function render() {
return _react2["default"].createElement(
"div",
{ className: "page_header" },
_react2["default"].createElement(
"h2",
null,
_react2["default"].createElement(
"span",
{ className: "tagline" },
this.props.page.tagline
),
_react2["default"].createElement(
"span",
{ className: "title" },
this.props.page.title
),
_react2["default"].createElement(
"span",
{ className: "subtitle" },
this.props.page.subtitle
)
)
);
}
}]);
return _default;
})(_react2["default"].Component);
exports["default"] = _default;
;
module.exports = exports["default"];
/***/ },
/* 229 */
/***/ function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var PageText = (function (_Component) {
_inherits(PageText, _Component);
function PageText() {
_classCallCheck(this, PageText);
_get(Object.getPrototypeOf(PageText.prototype), "constructor", this).apply(this, arguments);
}
_createClass(PageText, [{
key: "render",
value: function render() {
return React.createElement(
"div",
{ className: "contentText" },
React.createElement("p", { dangerouslySetInnerHTML: this.text() })
);
}
}, {
key: "text",
value: function text() {
return { __html: this.props.page.text };
}
}]);
return PageText;
})(_react.Component);
exports["default"] = PageText;
;
exports["default"] = PageText;
module.exports = exports["default"];
/***/ },
/* 230 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _react2 = _interopRequireDefault(_react);
var _classnames = __webpack_require__(222);
var _classnames2 = _interopRequireDefault(_classnames);
/**
* Display an element with a background image.
*/
var BackgroundImage = (function (_React$Component) {
_inherits(BackgroundImage, _React$Component);
function BackgroundImage() {
_classCallCheck(this, BackgroundImage);
_get(Object.getPrototypeOf(BackgroundImage.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(BackgroundImage, [{
key: 'render',
value: function render() {
return _react2['default'].createElement('div', { className: this.cssClass(), style: this.style() });
}
}, {
key: 'cssClass',
value: function cssClass() {
return (0, _classnames2['default'])(this.props.className, this.props.loaded ? 'load_image' : null, this.imageCssClass());
}
}, {
key: 'imageCssClass',
value: function imageCssClass() {
return ['image', this.props.imageFileId || 'none'].join('_');
}
}, {
key: 'style',
value: function style() {
return {
backgroundPosition: this.positionCoordinate(0) + '% ' + this.positionCoordinate(1) + '%'
};
}
}, {
key: 'positionCoordinate',
value: function positionCoordinate(index) {
var coordinate = this.props.position[index];
if (typeof coordinate === 'undefined') {
return 50;
}
return coordinate;
}
}], [{
key: 'propTypes',
value: {
/** The id of the image file to display */
imageFileId: _react2['default'].PropTypes.number,
/** Background position */
position: _react2['default'].PropTypes.arrayOf(_react2['default'].PropTypes.number),
/** Additional CSS classes. */
className: _react2['default'].PropTypes.string,
/** Used to lazy load images. */
loaded: _react2['default'].PropTypes.bool
},
enumerable: true
}, {
key: 'defaultProps',
value: {
position: [50, 50]
},
enumerable: true
}]);
return BackgroundImage;
})(_react2['default'].Component);
exports['default'] = BackgroundImage;
;
module.exports = exports['default'];
/***/ },
/* 231 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _react2 = _interopRequireDefault(_react);
var _lazy_background_imageJsx = __webpack_require__(232);
var _lazy_background_imageJsx2 = _interopRequireDefault(_lazy_background_imageJsx);
var PageBackgroundImage = (function (_React$Component) {
_inherits(PageBackgroundImage, _React$Component);
function PageBackgroundImage() {
_classCallCheck(this, PageBackgroundImage);
_get(Object.getPrototypeOf(PageBackgroundImage.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(PageBackgroundImage, [{
key: 'render',
value: function render() {
return _react2['default'].createElement(_lazy_background_imageJsx2['default'], { imageFileId: this.props.page.backgroundImageId,
position: [this.props.page.backgroundImageX, this.props.page.backgroundImageY],
className: 'background background_image' });
}
}]);
return PageBackgroundImage;
})(_react2['default'].Component);
exports['default'] = PageBackgroundImage;
;
module.exports = exports['default'];
/***/ },
/* 232 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _react2 = _interopRequireDefault(_react);
var _create_page_componentJsx = __webpack_require__(216);
var _create_page_componentJsx2 = _interopRequireDefault(_create_page_componentJsx);
var _background_imageJsx = __webpack_require__(230);
var _background_imageJsx2 = _interopRequireDefault(_background_imageJsx);
var LazyBackgroundImage = (function (_React$Component) {
_inherits(LazyBackgroundImage, _React$Component);
_createClass(LazyBackgroundImage, null, [{
key: 'contextTypes',
value: {
pageIsPreloaded: _react2['default'].PropTypes.bool
},
enumerable: true
}]);
function LazyBackgroundImage(props) {
_classCallCheck(this, LazyBackgroundImage);
_get(Object.getPrototypeOf(LazyBackgroundImage.prototype), 'constructor', this).call(this, props);
}
_createClass(LazyBackgroundImage, [{
key: 'render',
value: function render() {
return _react2['default'].createElement(_background_imageJsx2['default'], _extends({}, this.props, { loaded: this.context.pageIsPreloaded }));
}
}]);
return LazyBackgroundImage;
})(_react2['default'].Component);
;
exports['default'] = (0, _create_page_componentJsx2['default'])(LazyBackgroundImage);
module.exports = exports['default'];
/***/ },
/* 233 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _react2 = _interopRequireDefault(_react);
var PageLink = (function (_React$Component) {
_inherits(PageLink, _React$Component);
function PageLink() {
_classCallCheck(this, PageLink);
_get(Object.getPrototypeOf(PageLink.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(PageLink, [{
key: 'render',
value: function render() {
return _react2['default'].createElement(
'a',
{ href: this._href(),
className: this.props.className,
onClick: this._handleClick.bind(this) },
this.props.children
);
}
}, {
key: '_href',
value: function _href() {
if (this._targetPage()) {
return '#' + this._targetPage().permaId;
} else {
return '#missing';
}
}
}, {
key: '_handleClick',
value: function _handleClick(event) {
if (this._targetPage()) {
pageflow.slides.goToByPermaId(this._targetPage().permaId, {
transition: this.props.pageLink.pageTransition
});
}
event.preventDefault();
}
}, {
key: '_targetPage',
value: function _targetPage() {
return this.props.pageLink.targetPage;
}
}]);
return PageLink;
})(_react2['default'].Component);
exports['default'] = PageLink;
;
module.exports = exports['default'];
/***/ },
/* 234 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.PageThumbnail = PageThumbnail;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }
var _classnames = __webpack_require__(222);
var _classnames2 = _interopRequireDefault(_classnames);
var _create_containerJsx = __webpack_require__(194);
var _create_containerJsx2 = _interopRequireDefault(_create_containerJsx);
var _resolve = __webpack_require__(198);
var _resolve2 = _interopRequireDefault(_resolve);
var _utilsCamelize = __webpack_require__(203);
var _utilsCamelize2 = _interopRequireDefault(_utilsCamelize);
function PageThumbnail(props) {
return React.createElement('div', { className: className(props) });
}
;
PageThumbnail.defaultProps = {
imageStyle: 'navigation_thumbnail_large'
};
function className(props) {
return (0, _classnames2['default'])({ load_image: props.lazy && props.loaded }, props.className, typeClassName(props.page), thumbnailClassName(props));
}
function typeClassName(page) {
return page ? 'is_' + page.type.name : 'is_dangling';
}
function thumbnailClassName(props) {
var candidate = firstPresentCandidate(props);
if (candidate) {
return thumbnailCandidateClassName(props, candidate);
}
}
function firstPresentCandidate(props) {
return thumbnailCandidates(props).find(function (candidate) {
var id = thumbnailCandidateId(props, candidate);
var ids = props.fileIds[candidate.collectionName] || [];
return id && ids.includes(id);
});
}
function thumbnailCandidates(props) {
return [customThumbnailCandidate(props)].concat(_toConsumableArray(pageTypeCandidates(props.page)));
}
function customThumbnailCandidate(props) {
return {
id: props.customThumbnailId,
cssClassPrefix: 'pageflow_image_file',
collectionName: 'image_files'
};
}
function pageTypeCandidates(page) {
return page ? page.type.thumbnailCandidates : [];
}
function thumbnailCandidateClassName(props, candidate) {
return [props.lazy ? 'lazy' : null, candidate.cssClassPrefix, props.imageStyle, thumbnailCandidateId(props, candidate)].filter(Boolean).join('_');
}
function thumbnailCandidateId(props, candidate) {
return 'id' in candidate ? candidate.id : props.page[(0, _utilsCamelize2['default'])(candidate.attribute)];
}
exports['default'] = (0, _create_containerJsx2['default'])(PageThumbnail, {
fragments: {
page: {
type: (0, _resolve2['default'])('pageType')
},
fileIds: (0, _resolve2['default'])('fileIds')
}
});
/***/ },
/* 235 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var _react = __webpack_require__(193);
var _react2 = _interopRequireDefault(_react);
var _create_page_componentJsx = __webpack_require__(216);
var _create_page_componentJsx2 = _interopRequireDefault(_create_page_componentJsx);
var _page_thumbnailJsx = __webpack_require__(234);
var _page_thumbnailJsx2 = _interopRequireDefault(_page_thumbnailJsx);
var LazyLoadedPageThumbnail = (function (_React$Component) {
_inherits(LazyLoadedPageThumbnail, _React$Component);
function LazyLoadedPageThumbnail() {
_classCallCheck(this, LazyLoadedPageThumbnail);
_get(Object.getPrototypeOf(LazyLoadedPageThumbnail.prototype), 'constructor', this).apply(this, arguments);
}
_createClass(LazyLoadedPageThumbnail, [{
key: 'render',
value: function render() {
return _react2['default'].createElement(_page_thumbnailJsx2['default'], _extends({}, this.props, { lazy: true, loaded: this.context.pageIsPreloaded }));
}
}], [{
key: 'contextTypes',
value: {
pageIsPreloaded: _react2['default'].PropTypes.bool
},
enumerable: true
}]);
return LazyLoadedPageThumbnail;
})(_react2['default'].Component);
;
exports['default'] = (0, _create_page_componentJsx2['default'])(LazyLoadedPageThumbnail);
module.exports = exports['default'];
/***/ },
/* 236 */
/***/ function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(237);
/***/ },
/* 237 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var React = __webpack_require__(193);
var emptyFunction = function(){};
var assign = __webpack_require__(238);
var classNames = __webpack_require__(239);
//
// Helpers. See Element definition below this section.
//
function createUIEvent(draggable, p) {
// State changes are often (but not always!) async. We want the latest value.
var state = draggable._pendingState || draggable.state;
return {
node: draggable.getDOMNode(),
position: p || {
top: state.clientY,
left: state.clientX
}
};
}
function canDragY(draggable) {
return draggable.props.axis === 'both' ||
draggable.props.axis === 'y';
}
function canDragX(draggable) {
return draggable.props.axis === 'both' ||
draggable.props.axis === 'x';
}
function isFunction(func) {
return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';
}
// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc
function findInArray(array, callback) {
for (var i = 0, length = array.length; i < length; i++) {
if (callback.apply(callback, [array[i], i, array])) return array[i];
}
}
function matchesSelector(el, selector) {
var method = findInArray([
'matches',
'webkitMatchesSelector',
'mozMatchesSelector',
'msMatchesSelector',
'oMatchesSelector'
], function(method){
return isFunction(el[method]);
});
return el[method].call(el, selector);
}
/**
* simple abstraction for dragging events names
* */
var eventsFor = {
touch: {
start: 'touchstart',
move: 'touchmove',
end: 'touchend'
},
mouse: {
start: 'mousedown',
move: 'mousemove',
end: 'mouseup'
}
};
// Default to mouse events
var dragEventFor = eventsFor['mouse'];
/**
* get {clientX, clientY} positions of control
* */
function getControlPosition(e) {
var position = (e.touches && e.touches[0]) || e;
return {
clientX: position.clientX,
clientY: position.clientY
};
}
function addEvent(el, event, handler) {
if (!el) { return; }
if (el.attachEvent) {
el.attachEvent('on' + event, handler);
} else if (el.addEventListener) {
el.addEventListener(event, handler, true);
} else {
el['on' + event] = handler;
}
}
function removeEvent(el, event, handler) {
if (!el) { return; }
if (el.detachEvent) {
el.detachEvent('on' + event, handler);
} else if (el.removeEventListener) {
el.removeEventListener(event, handler, true);
} else {
el['on' + event] = null;
}
}
function outerHeight(node) {
// This is deliberately excluding margin for our calculations, since we are using
// offsetTop which is including margin. See getBoundPosition
var height = node.clientHeight;
var computedStyle = window.getComputedStyle(node);
height += int(computedStyle.borderTopWidth);
height += int(computedStyle.borderBottomWidth);
return height;
}
function outerWidth(node) {
// This is deliberately excluding margin for our calculations, since we are using
// offsetLeft which is including margin. See getBoundPosition
var width = node.clientWidth;
var computedStyle = window.getComputedStyle(node);
width += int(computedStyle.borderLeftWidth);
width += int(computedStyle.borderRightWidth);
return width;
}
function innerHeight(node) {
var height = node.clientHeight;
var computedStyle = window.getComputedStyle(node);
height -= int(computedStyle.paddingTop);
height -= int(computedStyle.paddingBottom);
return height;
}
function innerWidth(node) {
var width = node.clientWidth;
var computedStyle = window.getComputedStyle(node);
width -= int(computedStyle.paddingLeft);
width -= int(computedStyle.paddingRight);
return width;
}
function isNum(num) {
return typeof num === 'number' && !isNaN(num);
}
function int(a) {
return parseInt(a, 10);
}
function getBoundPosition(draggable, clientX, clientY) {
var bounds = JSON.parse(JSON.stringify(draggable.props.bounds));
var node = draggable.getDOMNode();
var parent = node.parentNode;
if (bounds === 'parent') {
var nodeStyle = window.getComputedStyle(node);
var parentStyle = window.getComputedStyle(parent);
// Compute bounds. This is a pain with padding and offsets but this gets it exactly right.
bounds = {
left: -node.offsetLeft + int(parentStyle.paddingLeft) +
int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),
top: -node.offsetTop + int(parentStyle.paddingTop) +
int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),
right: innerWidth(parent) - outerWidth(node) - node.offsetLeft,
bottom: innerHeight(parent) - outerHeight(node) - node.offsetTop
};
}
// Keep x and y below right and bottom limits...
if (isNum(bounds.right)) clientX = Math.min(clientX, bounds.right);
if (isNum(bounds.bottom)) clientY = Math.min(clientY, bounds.bottom);
// But above left and top limits.
if (isNum(bounds.left)) clientX = Math.max(clientX, bounds.left);
if (isNum(bounds.top)) clientY = Math.max(clientY, bounds.top);
return [clientX, clientY];
}
function snapToGrid(grid, pendingX, pendingY) {
var x = Math.round(pendingX / grid[0]) * grid[0];
var y = Math.round(pendingY / grid[1]) * grid[1];
return [x, y];
}
// Useful for preventing blue highlights all over everything when dragging.
var userSelectStyle = ';user-select: none;-webkit-user-select:none;-moz-user-select:none;' +
'-o-user-select:none;-ms-user-select:none;';
function addUserSelectStyles(draggable) {
if (!draggable.props.enableUserSelectHack) return;
var style = document.body.getAttribute('style') || '';
document.body.setAttribute('style', style + userSelectStyle);
}
function removeUserSelectStyles(draggable) {
if (!draggable.props.enableUserSelectHack) return;
var style = document.body.getAttribute('style') || '';
document.body.setAttribute('style', style.replace(userSelectStyle, ''));
}
function createCSSTransform(style) {
// Replace unitless items with px
var x = style.x + 'px';
var y = style.y + 'px';
return {
transform: 'translate(' + x + ',' + y + ')',
WebkitTransform: 'translate(' + x + ',' + y + ')',
OTransform: 'translate(' + x + ',' + y + ')',
msTransform: 'translate(' + x + ',' + y + ')',
MozTransform: 'translate(' + x + ',' + y + ')'
};
}
//
// End Helpers.
//
//
// Define
//
module.exports = React.createClass({
displayName: 'Draggable',
propTypes: {
/**
* `axis` determines which axis the draggable can move.
*
* 'both' allows movement horizontally and vertically.
* 'x' limits movement to horizontal axis.
* 'y' limits movement to vertical axis.
*
* Defaults to 'both'.
*/
axis: React.PropTypes.oneOf(['both', 'x', 'y']),
/**
* `bounds` determines the range of movement available to the element.
* Available values are:
*
* 'parent' restricts movement within the Draggable's parent node.
*
* Alternatively, pass an object with the following properties, all of which are optional:
*
* {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}
*
* All values are in px.
*
* Example:
*
* ```jsx
* var App = React.createClass({
* render: function () {
* return (
*
*
Content
*
* );
* }
* });
* ```
*/
bounds: React.PropTypes.oneOfType([
React.PropTypes.shape({
left: React.PropTypes.Number,
right: React.PropTypes.Number,
top: React.PropTypes.Number,
bottom: React.PropTypes.Number
}),
React.PropTypes.oneOf(['parent', false])
]),
/**
* By default, we add 'user-select:none' attributes to the document body
* to prevent ugly text selection during drag. If this is causing problems
* for your app, set this to `false`.
*/
enableUserSelectHack: React.PropTypes.bool,
/**
* `handle` specifies a selector to be used as the handle that initiates drag.
*
* Example:
*
* ```jsx
* var App = React.createClass({
* render: function () {
* return (
*
*
*
Click me to drag
*
This is some other content
*
*
* );
* }
* });
* ```
*/
handle: React.PropTypes.string,
/**
* `cancel` specifies a selector to be used to prevent drag initialization.
*
* Example:
*
* ```jsx
* var App = React.createClass({
* render: function () {
* return(
*
*
*
You can't drag from here
*
Dragging here works fine
*
*
* );
* }
* });
* ```
*/
cancel: React.PropTypes.string,
/**
* `grid` specifies the x and y that dragging should snap to.
*
* Example:
*
* ```jsx
* var App = React.createClass({
* render: function () {
* return (
*
*
I snap to a 25 x 25 grid
*
* );
* }
* });
* ```
*/
grid: React.PropTypes.arrayOf(React.PropTypes.number),
/**
* `start` specifies the x and y that the dragged item should start at
*
* Example:
*
* ```jsx
* var App = React.createClass({
* render: function () {
* return (
*
*
I start with transformX: 25px and transformY: 25px;
*
* );
* }
* });
* ```
*/
start: React.PropTypes.shape({
x: React.PropTypes.number,
y: React.PropTypes.number
}),
/**
* `moveOnStartChange`, if true (default false) will move the element if the `start`
* property changes.
*/
moveOnStartChange: React.PropTypes.bool,
/**
* `zIndex` specifies the zIndex to use while dragging.
*
* Example:
*
* ```jsx
* var App = React.createClass({
* render: function () {
* return (
*
*
I have a zIndex
*
* );
* }
* });
* ```
*/
zIndex: React.PropTypes.number,
/**
* Called when dragging starts.
* If this function returns the boolean false, dragging will be canceled.
*
* Example:
*
* ```js
* function (event, ui) {}
* ```
*
* `event` is the Event that was triggered.
* `ui` is an object:
*
* ```js
* {
* position: {top: 0, left: 0}
* }
* ```
*/
onStart: React.PropTypes.func,
/**
* Called while dragging.
* If this function returns the boolean false, dragging will be canceled.
*
* Example:
*
* ```js
* function (event, ui) {}
* ```
*
* `event` is the Event that was triggered.
* `ui` is an object:
*
* ```js
* {
* position: {top: 0, left: 0}
* }
* ```
*/
onDrag: React.PropTypes.func,
/**
* Called when dragging stops.
*
* Example:
*
* ```js
* function (event, ui) {}
* ```
*
* `event` is the Event that was triggered.
* `ui` is an object:
*
* ```js
* {
* position: {top: 0, left: 0}
* }
* ```
*/
onStop: React.PropTypes.func,
/**
* A workaround option which can be passed if onMouseDown needs to be accessed,
* since it'll always be blocked (due to that there's internal use of onMouseDown)
*/
onMouseDown: React.PropTypes.func,
},
componentWillReceiveProps: function(newProps) {
// React to changes in the 'start' param.
if (newProps.moveOnStartChange && newProps.start) {
this.setState(this.getInitialState(newProps));
}
},
componentWillUnmount: function() {
// Remove any leftover event handlers
removeEvent(document, dragEventFor['move'], this.handleDrag);
removeEvent(document, dragEventFor['end'], this.handleDragEnd);
removeUserSelectStyles(this);
},
getDefaultProps: function () {
return {
axis: 'both',
bounds: false,
handle: null,
cancel: null,
grid: null,
moveOnStartChange: false,
start: {x: 0, y: 0},
zIndex: NaN,
enableUserSelectHack: true,
onStart: emptyFunction,
onDrag: emptyFunction,
onStop: emptyFunction,
onMouseDown: emptyFunction
};
},
getInitialState: function (props) {
// Handle call from CWRP
props = props || this.props;
return {
// Whether or not we are currently dragging.
dragging: false,
// Offset between start top/left and mouse top/left while dragging.
offsetX: 0, offsetY: 0,
// Current transform x and y.
clientX: props.start.x, clientY: props.start.y
};
},
handleDragStart: function (e) {
// Make it possible to attach event handlers on top of this one
this.props.onMouseDown(e);
// Short circuit if handle or cancel prop was provided and selector doesn't match
if ((this.props.handle && !matchesSelector(e.target, this.props.handle)) ||
(this.props.cancel && matchesSelector(e.target, this.props.cancel))) {
return;
}
// Call event handler. If it returns explicit false, cancel.
var shouldStart = this.props.onStart(e, createUIEvent(this));
if (shouldStart === false) return;
var dragPoint = getControlPosition(e);
// Add a style to the body to disable user-select. This prevents text from
// being selected all over the page.
addUserSelectStyles(this);
// Initiate dragging. Set the current x and y as offsets
// so we know how much we've moved during the drag. This allows us
// to drag elements around even if they have been moved, without issue.
this.setState({
dragging: true,
offsetX: dragPoint.clientX - this.state.clientX,
offsetY: dragPoint.clientY - this.state.clientY
});
// Add event handlers
addEvent(document, dragEventFor['move'], this.handleDrag);
addEvent(document, dragEventFor['end'], this.handleDragEnd);
},
handleDragEnd: function (e) {
// Short circuit if not currently dragging
if (!this.state.dragging) {
return;
}
removeUserSelectStyles(this);
// Turn off dragging
this.setState({
dragging: false
});
// Call event handler
this.props.onStop(e, createUIEvent(this));
// Remove event handlers
removeEvent(document, dragEventFor['move'], this.handleDrag);
removeEvent(document, dragEventFor['end'], this.handleDragEnd);
},
handleDrag: function (e) {
var dragPoint = getControlPosition(e);
// Calculate X and Y
var clientX = dragPoint.clientX - this.state.offsetX;
var clientY = dragPoint.clientY - this.state.offsetY;
// Snap to grid if prop has been provided
if (Array.isArray(this.props.grid)) {
var coords = snapToGrid(this.props.grid, clientX, clientY);
clientX = coords[0], clientY = coords[1];
}
if (this.props.bounds) {
var pos = getBoundPosition(this, clientX, clientY);
clientX = pos[0], clientY = pos[1];
}
// Call event handler. If it returns explicit false, cancel.
var shouldUpdate = this.props.onDrag(e, createUIEvent(this, {
top: clientY,
left: clientX
}));
if (shouldUpdate === false) return this.handleDragEnd();
// Update transform
this.setState({
clientX: clientX,
clientY: clientY
});
},
onMouseDown: function(ev) {
// Prevent 'ghost click' which happens 300ms after touchstart if the event isn't cancelled.
// We don't cancel the event on touchstart because of #37; we might want to make a scrollable item draggable.
// More on ghost clicks: http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/
if (dragEventFor == eventsFor['touch']) {
return ev.preventDefault();
}
return this.handleDragStart.apply(this, arguments);
},
onTouchStart: function(ev) {
// We're on a touch device now, so change the event handlers
dragEventFor = eventsFor['touch'];
return this.handleDragStart.apply(this, arguments);
},
// Intended for use by a parent component. Resets internal state on this component. Useful for
// and other components in case this element is manually resized and start/moveOnStartChange
// don't work for you.
resetState: function() {
this.setState({
offsetX: 0, offsetY: 0, clientX: 0, clientY: 0
});
},
render: function () {
// Create style object. We extend from existing styles so we don't
// remove anything already set (like background, color, etc).
var childStyle = this.props.children.props.style || {};
// Add a CSS transform to move the element around. This allows us to move the element around
// without worrying about whether or not it is relatively or absolutely positioned.
// If the item you are dragging already has a transform set, wrap it in a so
// has a clean slate.
var transform = createCSSTransform({
// Set left if horizontal drag is enabled
x: canDragX(this) ?
this.state.clientX :
0,
// Set top if vertical drag is enabled
y: canDragY(this) ?
this.state.clientY :
0
});
// Workaround IE pointer events; see #51
// https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278
var touchHacks = {
touchAction: 'none'
};
var style = assign({}, childStyle, transform, touchHacks);
// Set zIndex if currently dragging and prop has been provided
if (this.state.dragging && !isNaN(this.props.zIndex)) {
style.zIndex = this.props.zIndex;
}
var className = classNames((this.props.children.props.className || ''), 'react-draggable', {
'react-draggable-dragging': this.state.dragging,
'react-draggable-dragged': this.state.dragged
});
// Reuse the child provided
// This makes it flexible to use whatever element is wanted (div, ul, etc)
return React.cloneElement(React.Children.only(this.props.children), {
style: style,
className: className,
onMouseDown: this.onMouseDown,
onTouchStart: this.onTouchStart,
onMouseUp: this.handleDragEnd,
onTouchEnd: this.handleDragEnd
});
}
});
/***/ },
/* 238 */
/***/ function(module, exports) {
'use strict';
function ToObject(val) {
if (val == null) {
throw new TypeError('Object.assign cannot be called with null or undefined');
}
return Object(val);
}
module.exports = Object.assign || function (target, source) {
var from;
var keys;
var to = ToObject(target);
for (var s = 1; s < arguments.length; s++) {
from = arguments[s];
keys = Object.keys(Object(from));
for (var i = 0; i < keys.length; i++) {
to[keys[i]] = from[keys[i]];
}
}
return to;
};
/***/ },
/* 239 */
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
Copyright (c) 2015 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
function classNames() {
var classes = '';
var arg;
for (var i = 0; i < arguments.length; i++) {
arg = arguments[i];
if (!arg) {
continue;
}
if ('string' === typeof arg || 'number' === typeof arg) {
classes += ' ' + arg;
} else if (Object.prototype.toString.call(arg) === '[object Array]') {
classes += ' ' + classNames.apply(null, arg);
} else if ('object' === typeof arg) {
for (var key in arg) {
if (!arg.hasOwnProperty(key) || !arg[key]) {
continue;
}
classes += ' ' + key;
}
}
}
return classes.substr(1);
}
// safely export classNames for node / browserify
if (typeof module !== 'undefined' && module.exports) {
module.exports = classNames;
}
// safely export classNames for RequireJS
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() {
return classNames;
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}
/***/ }
/******/ ]);