(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && define.amd)
define(["react"], factory);
else if(typeof exports === 'object')
exports["EmojiPicker"] = factory(require("react"));
else
root["EmojiPicker"] = factory(root["react"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_3__) {
return /******/ (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__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _components = __webpack_require__(1);
Object.defineProperty(exports, 'Picker', {
enumerable: true,
get: function get() {
return _components.Picker;
}
});
Object.defineProperty(exports, 'Emoji', {
enumerable: true,
get: function get() {
return _components.Emoji;
}
});
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _anchors = __webpack_require__(2);
Object.defineProperty(exports, 'Anchors', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_anchors).default;
}
});
var _category = __webpack_require__(15);
Object.defineProperty(exports, 'Category', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_category).default;
}
});
var _emoji = __webpack_require__(16);
Object.defineProperty(exports, 'Emoji', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_emoji).default;
}
});
var _picker = __webpack_require__(18);
Object.defineProperty(exports, 'Picker', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_picker).default;
}
});
var _preview = __webpack_require__(20);
Object.defineProperty(exports, 'Preview', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_preview).default;
}
});
var _search = __webpack_require__(21);
Object.defineProperty(exports, 'Search', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_search).default;
}
});
var _skins = __webpack_require__(23);
Object.defineProperty(exports, 'Skins', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_skins).default;
}
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/***/ },
/* 2 */
/***/ 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 _react = __webpack_require__(3);
var _react2 = _interopRequireDefault(_react);
var _svgInlineReact = __webpack_require__(4);
var _svgInlineReact2 = _interopRequireDefault(_svgInlineReact);
var _svgs = __webpack_require__(5);
var SVGs = _interopRequireWildcard(_svgs);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
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 _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
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 Anchors = function (_React$Component) {
_inherits(Anchors, _React$Component);
function Anchors(props) {
_classCallCheck(this, Anchors);
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Anchors).call(this, props));
_this.state = {
selected: props.categories[0].name
};
return _this;
}
_createClass(Anchors, [{
key: 'render',
value: function render() {
var _props = this.props;
var categories = _props.categories;
var onAnchorClick = _props.onAnchorClick;
var selected = this.state.selected;
return _react2.default.createElement(
'div',
{ className: 'emoji-picker-anchors' },
categories.map(function (category, i) {
var name = category.name;
return _react2.default.createElement(
'span',
{
key: name,
title: name,
onClick: function onClick() {
return onAnchorClick(category, i);
},
className: 'emoji-picker-anchor ' + (name == selected ? 'emoji-picker-anchor-selected' : '')
},
_react2.default.createElement(_svgInlineReact2.default, { src: SVGs[name] }),
_react2.default.createElement('span', { className: 'emoji-picker-anchor-bar' })
);
})
);
}
}]);
return Anchors;
}(_react2.default.Component);
exports.default = Anchors;
Anchors.propTypes = {
categories: _react2.default.PropTypes.array,
onAnchorClick: _react2.default.PropTypes.func
};
Anchors.defaultProps = {
categories: [],
onAnchorClick: function onAnchorClick() {}
};
/***/ },
/* 3 */
/***/ function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
/***/ },
/* 4 */
/***/ 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__(3);
var _react2 = _interopRequireDefault(_react);
var DOMParser = typeof window !== 'undefined' && window.DOMParser;
var process = process || {};
process.env = process.env || {};
var parserAvailable = typeof DOMParser !== 'undefined' && DOMParser.prototype != null && DOMParser.prototype.parseFromString != null;
if ("production" !== process.env.NODE_ENV && !parserAvailable) {
console.info(': `raw` prop works only when `window.DOMParser` exists.');
}
function isParsable(src) {
// kinda naive but meh, ain't gonna use full-blown parser for this
return parserAvailable && typeof src === 'string' && src.trim().substr(0, 4) === '