| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451 |
- diff --git a/miniprogram_dist/index.js b/miniprogram_dist/index.js
- index 8d561da5a80c402e64acfcbfe54da02f35a9fae3..6a8de767bcc06cd265d8b5899c2968163ae84f21 100644
- --- a/miniprogram_dist/index.js
- +++ b/miniprogram_dist/index.js
- @@ -1,338 +1,115 @@
- -module.exports =
- -/******/ (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] = {
- -/******/ i: moduleId,
- -/******/ l: false,
- -/******/ exports: {}
- -/******/ };
- -/******/
- -/******/ // Execute the module function
- -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
- -/******/
- -/******/ // Flag the module as loaded
- -/******/ module.l = 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;
- -/******/
- -/******/ // define getter function for harmony exports
- -/******/ __webpack_require__.d = function(exports, name, getter) {
- -/******/ if(!__webpack_require__.o(exports, name)) {
- -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
- -/******/ }
- -/******/ };
- -/******/
- -/******/ // define __esModule on exports
- -/******/ __webpack_require__.r = function(exports) {
- -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
- -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
- -/******/ }
- -/******/ Object.defineProperty(exports, '__esModule', { value: true });
- -/******/ };
- -/******/
- -/******/ // create a fake namespace object
- -/******/ // mode & 1: value is a module id, require it
- -/******/ // mode & 2: merge all properties of value into the ns
- -/******/ // mode & 4: return value when already ns object
- -/******/ // mode & 8|1: behave like require
- -/******/ __webpack_require__.t = function(value, mode) {
- -/******/ if(mode & 1) value = __webpack_require__(value);
- -/******/ if(mode & 8) return value;
- -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
- -/******/ var ns = Object.create(null);
- -/******/ __webpack_require__.r(ns);
- -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
- -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
- -/******/ return ns;
- -/******/ };
- -/******/
- -/******/ // getDefaultExport function for compatibility with non-harmony modules
- -/******/ __webpack_require__.n = function(module) {
- -/******/ var getter = module && module.__esModule ?
- -/******/ function getDefault() { return module['default']; } :
- -/******/ function getModuleExports() { return module; };
- -/******/ __webpack_require__.d(getter, 'a', getter);
- -/******/ return getter;
- -/******/ };
- -/******/
- -/******/ // Object.prototype.hasOwnProperty.call
- -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
- -/******/
- -/******/ // __webpack_public_path__
- -/******/ __webpack_require__.p = "";
- -/******/
- -/******/
- -/******/ // Load entry module and return exports
- -/******/ return __webpack_require__(__webpack_require__.s = 0);
- -/******/ })
- -/************************************************************************/
- -/******/ ([
- -/* 0 */
- -/***/ (function(module, exports, __webpack_require__) {
- -
- -"use strict";
- -
- -
- -var _svgIcon = __webpack_require__(1);
- -
- -Component({
- - /**
- - * 组件的属性列表
- - */
- - properties: {
- - name: {
- - type: String,
- - value: ''
- - },
- - color: {
- - type: String,
- - value: ''
- - },
- - size: {
- - type: String
- - }
- - },
- - /**
- - * 组件的初始数据
- - */
- - data: {
- - width: '1em',
- - height: '1em',
- - iconUrl: '',
- - class: ''
- - },
- - lifetimes: {
- - attached: function attached() {
- - this.getDataUri(this.data.name, this.data.color);
- - if (this.data.size) {
- - this.setData({
- - width: this.data.size,
- - height: this.data.size
- - });
- - }
- - }
- - },
- - /**
- - * 组件的方法列表
- - */
- - methods: {
- - getDataUri: function getDataUri(name, color) {
- - var that = this;
- - var url = (0, _svgIcon.getLocalSVG)(name);
- - if (url) {
- - this.setData({
- - iconUrl: url,
- - class: color ? 'icon' : 'default-icon'
- - });
- - } else {
- - (0, _svgIcon.getIconifySVG)(name).then(function (res) {
- - that.setData({
- - iconUrl: res,
- - class: color ? 'icon' : 'default-icon'
- - });
- - }).catch(function (e) {
- - console.log(e);
- - });
- - }
- - }
- - }
- -}); // components/svg-icon/index.js
- -// svg-icon
- -
- -/***/ }),
- -/* 1 */
- -/***/ (function(module, exports, __webpack_require__) {
- -
- -"use strict";
- -
- -
- -exports.__esModule = true;
- -exports.getLocalSVG = getLocalSVG;
- -exports.getIconifySVG = getIconifySVG;
- -exports.iconifySetup = iconifySetup;
- -
- -var _mdiLight = __webpack_require__(2);
- -
- -var _mdiLight2 = _interopRequireDefault(_mdiLight);
- -
- -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- -
- -var ICONIFY_API = ''; // https://github.com/LarchLiu/weapp-svg-icon/blob/main/miniprogram/utils/svgIcon.ts
- -// svg-icon
- -
- -var iconifyPresets = {
- - MdiLight: _mdiLight2.default
- -};
- -var customerSvg = {
- - EmojioneMonotoneMotorcycle: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--emojione-monotone" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 64 64"><path fill="currentColor" d="M13.895 39.35h-2.52c-1.754.23 1.685 1.96 1.685 1.96s1.685-1.239 1.685-1.614c-.001-.375-.85-.346-.85-.346m12.871 11.809c-.466.269-.93.875-1.03 1.346l-.19.894c-.1.472.009 1.028.241 1.236c.232.209.545 0 .694-.461l.86-2.661c.151-.464-.109-.624-.575-.354m12.117-1.016c-.465.271-.93.875-1.029 1.348l-.191.892c-.1.472.01 1.028.242 1.238c.232.208.545.001.695-.463l.859-2.659c.148-.466-.111-.625-.576-.356"></path><path fill="currentColor" d="M52.625 43.558a9.41 9.41 0 0 0-7.074 3.182l-.646-.286c.207-.189.43-.385.689-.59c.41-.322.566-.688.574-1.051l12.426-5.883a3.774 3.774 0 0 0-.602-2.211c1.729-2.172 1.758-4.762 1.758-4.904V30.34h-1.5c-2.23 0-3.977.048-6.145.673c-1.482.428-2.537.888-3.318 1.386c.221-1.014.082-2.19-.785-3.442c0 0-5.709-5.956-12.273-7.799c1.965-1.562 2.613-3.287 2.613-6.885C38.342 7.505 32.745 2 25.865 2c-6.879 0-12.476 5.505-12.476 12.272c0 .49.032.925.087 1.322l-.017.006c-1.198.428 1.03 6.574 2.308 6.636c1.832 4.296 4.56 5.27 6.648 5.27c1.069 0 2.205-.282 3.319-.792l.342 4.041l-2.033 1.078l-.094-.084l-1.413-1.268l-.43-.387h-.581c-4.539 0-8.794 2.188-11.383 5.851l-.205.288c-1.218 1.707-2 2.915-1.781 4.1c.097.521.391.97.83 1.263c.401.27.97.646 1.618 1.074a10.353 10.353 0 0 0-5.775 2.272l1.386.142C3.676 46.732 2 49.563 2 52.779C2 57.873 6.197 62 11.375 62c4.079 0 7.539-2.565 8.829-6.143l.002.089a2.721 2.721 0 0 0 2.74 2.747c.087 0 .176-.003.267-.012l.038-.002l.038-.006l18.366-2.505l1.428-.194l-.141-1.41c-.014-.135-.016-.27-.02-.406a8.956 8.956 0 0 0-.037-.672a15.023 15.023 0 0 1-.061-1.934l.486.201a9.372 9.372 0 0 0-.061 1.025c0 5.094 4.197 9.221 9.375 9.221S62 57.873 62 52.779s-4.197-9.221-9.375-9.221m-7.756-4.788c4.592-2.287 1.193-4.477 7.658-6.342c1.986-.572 3.58-.613 5.723-.613c0 0 0 3.746-3.215 5.475c-6.537 3.516-11.785 3.834-11.785 3.834s-.059-1.519 1.619-2.354m-6.668 5.592a3.665 3.665 0 0 1 1.186 1.915c-1.242.205-1.855 1.041-2.24 1.568c-.012.018-.02.025-.031.041l1.085-3.524M25.382 24.699c-1.012.548-2.037.839-2.968.839c-2.376 0-3.855-1.9-4.767-3.986c3.711-1.563 8.254-4.11 10.052-5.979a2 2 0 0 0 .55.085c1.102 0 1.994-.879 1.994-1.961c0-1.083-.893-1.961-1.994-1.961c-.928 0-1.7.625-1.923 1.47c-2.677-.134-7.309.712-10.907 1.764a7.877 7.877 0 0 1-.031-.697c0-5.682 4.7-10.305 10.476-10.305c5.777 0 10.477 4.623 10.477 10.305c0 4.682-.797 5.097-6.999 8.33a255.278 255.278 0 0 0-3.96 2.096m-1.009 12.437c.09-.222.136-.438.153-.657l6.07-2.73a1.667 1.667 0 0 0 .843-1.848h.01l-.145-1.701l4.137 3.615c-.129-.018-.256-.045-.387-.045c-.252 0-.498.033-.73.1c-1.014.289-2.478.854-3.895 1.4c-.784.303-1.525.588-2.074.781c-1.199.418-1.977 1.377-1.977 2.44v.188a70.492 70.492 0 0 0-2.756-.568c.343-.269.587-.575.751-.975m9.621-1.613l-1.04 4.082l-1.77.416a45.073 45.073 0 0 0-3.307-.979v-.552c0-.466.461-.87.981-1.052c1.309-.458 3.564-1.384 5.136-1.915M19.677 32.92l.743-.311c.142-.061.288-.088.433-.088c.413 0 .803.23.975.619l.641 1.473c.953 2.183.953 2.183-1.975 3.409c-.401.169-.75.237-1.053.237c-1.194 0-1.661-1.07-1.761-1.301c-.771-1.76.375-2.646 1.335-3.128c.024-.383.268-.746.662-.91m-3.614 19.859c0 .212-.035.414-.063.619l1.913-.126a6.314 6.314 0 0 1-.625 2.294l-1.578-1.039a4.58 4.58 0 0 1-.643 1.063l1.723.834a6.56 6.56 0 0 1-1.71 1.682l-.847-1.695a4.64 4.64 0 0 1-1.033.617l1.071 1.537a6.625 6.625 0 0 1-2.394.645l.128-1.882c-.208.028-.414.062-.629.062c-.199 0-.388-.033-.581-.057l.147 1.88a6.625 6.625 0 0 1-2.401-.618l1.057-1.553a4.645 4.645 0 0 1-1.081-.631l-.847 1.695a6.576 6.576 0 0 1-1.71-1.682l1.723-.833a4.6 4.6 0 0 1-.643-1.063l-1.578 1.039a6.314 6.314 0 0 1-.625-2.294l1.913.126c-.028-.205-.063-.407-.063-.619c0-.197.035-.383.059-.572l-1.912.145a6.313 6.313 0 0 1 .628-2.359l1.578 1.039c.155-.371.367-.71.61-1.025l-1.73-.818a6.54 6.54 0 0 1 1.749-1.737l.848 1.695a4.617 4.617 0 0 1 1.081-.633l-1.057-1.553a6.578 6.578 0 0 1 2.333-.614l-.128 1.882c.208-.027.414-.063.629-.063s.421.035.629.063l-.127-1.882a6.594 6.594 0 0 1 1.859.417l-1.659 3.344a2.85 2.85 0 0 0-.701-.098c-1.554 0-2.813 1.238-2.813 2.768s1.259 2.766 2.813 2.766c1.553 0 2.813-1.236 2.813-2.766c0-.8-.349-1.514-.899-2.019l2.145-3.017c.514.401.984.855 1.357 1.391l-1.723.834c.247.313.468.645.627 1.015l1.563-1.054c.361.721.59 1.514.655 2.355l-1.913-.125c.026.205.062.407.062.62m25.33.864c.039.357.021.715.057 1.064l-18.368 2.506a1.581 1.581 0 0 1-.136.006c-.8 0-1.24-.633-1.24-1.295c0 0-.098-6.318-.956-7.871c-.439-.795-2.773-2.322-2.809-2.346c0 0-6.095-3.979-8.11-5.331c-.745-.499.669-2.354 1.543-3.589a12.35 12.35 0 0 1 7.092-4.842c-.31.248-.563.553-.725.908c-1.137.729-1.61 1.592-1.756 2.402c-.291.262-.58.545-.86.867c-.392.448-1.699 2.363 0 2.363c.332 0 .986.044 1.861.133a3.202 3.202 0 0 0 2.455 1.117c.527 0 1.08-.121 1.643-.357l.363-.152c3.213.525 7.029 1.342 10.084 2.486c.297.111.564.219.806.324l-1.556 6.113l-.705-.174a3.614 3.614 0 0 0-1.471-.056c.09-.108.033-.271-.223-.461l-6.418-4.747c-.441-.326-.803-.229-.803.217s.359 1.078.797 1.408l4.144 3.115c.439.33 1.249.6 1.8.6h.156c-1.08.357-1.948 1.215-2.232 2.365l8.163 2.017c.947.233 1.898-.312 2.123-1.224l.307-1.228c2.166-.263 1.76-2.276 3.551-2.276c.691 0 1.299.103 1.83.244c-.427 1.42-.599 3.889-.407 5.694m-.651-9.03l-.652-.287l3.65-1.768a25.284 25.284 0 0 0 2.982-.524l-1.502.937c-.199-.209-.352-.336-.352-.336l-4.126 1.978m8.178 2.84l.496.994l-1.109-.49c.199-.174.392-.355.613-.504m8.393 5.326c0 .212-.035.414-.063.619l1.912-.126a6.314 6.314 0 0 1-.625 2.294l-1.578-1.039a4.546 4.546 0 0 1-.643 1.063l1.723.833a6.525 6.525 0 0 1-1.709 1.682l-.848-1.694c-.318.242-.656.46-1.031.616l1.07 1.537a6.624 6.624 0 0 1-2.395.645l.127-1.882c-.207.028-.414.062-.629.062c-.199 0-.389-.033-.58-.057l.146 1.88a6.62 6.62 0 0 1-2.4-.618l1.057-1.553a4.652 4.652 0 0 1-1.082-.631l-.846 1.695a6.525 6.525 0 0 1-1.709-1.682l1.723-.834a4.559 4.559 0 0 1-.643-1.063l-1.578 1.039a6.294 6.294 0 0 1-.625-2.294l1.057.069l3.623 1.5a2.815 2.815 0 0 0 1.857.703c1.553 0 2.813-1.236 2.813-2.766c0-1.385-1.035-2.521-2.385-2.725l-2.799-1.237c.189-.114.387-.218.594-.302L49.79 46.96a6.59 6.59 0 0 1 2.332-.614l-.127 1.882c.207-.027.414-.063.629-.063s.422.035.629.063l-.127-1.882a6.61 6.61 0 0 1 2.332.614l-1.057 1.553c.377.152.721.361 1.043.601l.828-1.702a6.537 6.537 0 0 1 1.768 1.721l-1.723.833c.246.313.467.646.627 1.016l1.563-1.054c.361.721.59 1.514.654 2.355l-1.911-.123c.027.204.063.406.063.619"></path></svg>',
- - EmojioneMonotoneSportsMedal: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--emojione-monotone" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 64 64"><path fill="currentColor" d="m32.001 27.927l-3.246 9.989H18.251l8.498 6.174l-3.248 9.988l8.5-6.172l8.498 6.172l-3.248-9.988l8.498-6.174H35.245l-3.244-9.989m2.838 15.12l1.752 5.396l-4.59-3.336l-4.594 3.336l1.756-5.396l-4.592-3.336h5.676l1.754-5.396l1.754 5.396h5.674l-4.59 3.336"></path><path fill="currentColor" d="M44.657 26.519v-8.698c0-.364-.199-.67-.481-.86L54 2H35.165l-3.164 4.746L28.837 2H10l9.823 14.96a1.04 1.04 0 0 0-.48.861v8.698C14.862 30.187 12 35.758 12 42c0 11.045 8.955 20 20 20h.001c.681 0 1.354-.035 2.017-.102C44.115 60.887 52 52.365 52 42c0-6.242-2.862-11.813-7.343-15.481M40.826 3h6.328l-8.825 13.239l-3.164-4.746L40.826 3m.667 17.985l.973-1.458c.052.125.082.261.082.404v4.219a.994.994 0 0 1-.297.7C39.251 23.052 35.752 22 32 22a19.87 19.87 0 0 0-10.251 2.851a.996.996 0 0 1-.297-.701v-4.219c0-.143.03-.28.082-.404l.973 1.459h18.986zM16.846 3h6.328l11.324 16.985H28.17L16.846 3M32 59c-9.388 0-17-7.611-17-17s7.612-17 17-17s17 7.611 17 17s-7.612 17-17 17"></path></svg>'
- -};
- -var iconifyPreload = ['carbon:portfolio'];
- -function svgNameSwtich(id) {
- - return id.split(/:|-|_/).filter(Boolean).map(function (s) {
- - return s[0].toUpperCase() + s.slice(1).toLowerCase();
- - }).join('');
- +// Generated by scripts/generate-svg-icons.mjs — DO NOT EDIT.
- +// Minimal iconify data extracted from @iconify-json/ph + @iconify-json/solar.
- +var iconifyPresets = {"Ph":{"prefix":"ph","width":256,"height":256,"icons":{"arrow-right":{"body":"<path fill=\"currentColor\" d=\"m221.66 133.66l-72 72a8 8 0 0 1-11.32-11.32L196.69 136H40a8 8 0 0 1 0-16h156.69l-58.35-58.34a8 8 0 0 1 11.32-11.32l72 72a8 8 0 0 1 0 11.32\"/>"},"arrow-right-bold":{"body":"<path fill=\"currentColor\" d=\"m224.49 136.49l-72 72a12 12 0 0 1-17-17L187 140H40a12 12 0 0 1 0-24h147l-51.49-51.52a12 12 0 0 1 17-17l72 72a12 12 0 0 1-.02 17.01\"/>"},"books-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M48 72h64v112H48Zm142.64-33.61a8 8 0 0 0-9.5-6.21l-46.81 10a8.07 8.07 0 0 0-6.15 9.57L139.79 107l62.46-13.42Z\" opacity=\".2\"/><path d=\"m231.65 194.55l-33.19-157.8a16 16 0 0 0-19-12.39l-46.81 10.06a16.08 16.08 0 0 0-12.3 19l33.19 157.8A16 16 0 0 0 169.16 224a16.3 16.3 0 0 0 3.38-.36l46.81-10.06a16.09 16.09 0 0 0 12.3-19.03M136 50.15v-.09l46.8-10l3.33 15.87L139.33 66Zm6.62 31.47l46.82-10.05l3.34 15.9L146 97.53Zm6.64 31.57l46.82-10.06l13.3 63.24l-46.82 10.06ZM216 197.94l-46.8 10l-3.33-15.87l46.8-10.07l3.33 15.85zM104 32H56a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h48a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16M56 48h48v16H56Zm0 32h48v96H56Zm48 128H56v-16h48z\"/></g>"},"building-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M200 24v208h-48v-48h-48v48H56V24Z\" opacity=\".2\"/><path d=\"M232 224h-24V32h8a8 8 0 0 0 0-16H40a8 8 0 0 0 0 16h8v192H24a8 8 0 0 0 0 16h208a8 8 0 0 0 0-16M64 32h128v192h-32v-40a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v40H64Zm80 192h-32v-32h32ZM88 64a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16H96a8 8 0 0 1-8-8m48 0a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16h-16a8 8 0 0 1-8-8m-48 40a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16H96a8 8 0 0 1-8-8m48 0a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16h-16a8 8 0 0 1-8-8m-48 40a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16H96a8 8 0 0 1-8-8m48 0a8 8 0 0 1 8-8h16a8 8 0 0 1 0 16h-16a8 8 0 0 1-8-8\"/></g>"},"caret-left-bold":{"body":"<path fill=\"currentColor\" d=\"M168.49 199.51a12 12 0 0 1-17 17l-80-80a12 12 0 0 1 0-17l80-80a12 12 0 0 1 17 17L97 128Z\"/>"},"caret-right-bold":{"body":"<path fill=\"currentColor\" d=\"m184.49 136.49l-80 80a12 12 0 0 1-17-17L159 128L87.51 56.49a12 12 0 1 1 17-17l80 80a12 12 0 0 1-.02 17\"/>"},"columns-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M112 48v160a8 8 0 0 1-8 8H64a8 8 0 0 1-8-8V48a8 8 0 0 1 8-8h40a8 8 0 0 1 8 8m80-8h-40a8 8 0 0 0-8 8v160a8 8 0 0 0 8 8h40a8 8 0 0 0 8-8V48a8 8 0 0 0-8-8\" opacity=\".2\"/><path d=\"M104 32H64a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h40a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m0 176H64V48h40Zm88-176h-40a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h40a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m0 176h-40V48h40Z\"/></g>"},"compass-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M128 32a96 96 0 1 0 96 96a96 96 0 0 0-96-96m16 112l-64 32l32-64l64-32Z\" opacity=\".2\"/><path d=\"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m44.42-143.16l-64 32a8.05 8.05 0 0 0-3.58 3.58l-32 64A8 8 0 0 0 80 184a8.1 8.1 0 0 0 3.58-.84l64-32a8.05 8.05 0 0 0 3.58-3.58l32-64a8 8 0 0 0-10.74-10.74M138 138l-40.11 20.11L118 118l40.15-20.07Z\"/></g>"},"compass-fill":{"body":"<path fill=\"currentColor\" d=\"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m51.58 57.79l-32 64a4.08 4.08 0 0 1-1.79 1.79l-64 32a4 4 0 0 1-5.37-5.37l32-64a4.08 4.08 0 0 1 1.79-1.79l64-32a4 4 0 0 1 5.37 5.37\"/>"},"hand-heart-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M16 152h32v56H16a8 8 0 0 1-8-8v-40a8 8 0 0 1 8-8M192.54 40A39.12 39.12 0 0 0 156 64a39.12 39.12 0 0 0-36.54-24C97.67 40 80 58.31 80 80c0 14.56 7 27.71 16.73 40H140a20 20 0 0 1 0 40h4l37.78-8.68C203.82 135.07 232 109.23 232 80c0-21.69-17.67-40-39.46-40\" opacity=\".2\"/><path d=\"M230.33 141.06a24.34 24.34 0 0 0-18.61-4.77C230.5 117.33 240 98.48 240 80c0-26.47-21.29-48-47.46-48A47.58 47.58 0 0 0 156 48.75A47.58 47.58 0 0 0 119.46 32C93.29 32 72 53.53 72 80c0 11 3.24 21.69 10.06 33a31.87 31.87 0 0 0-14.75 8.4L44.69 144H16a16 16 0 0 0-16 16v40a16 16 0 0 0 16 16h104a8 8 0 0 0 1.94-.24l64-16a7 7 0 0 0 1.19-.4L226 182.82l.44-.2a24.6 24.6 0 0 0 3.93-41.56ZM119.46 48a31.15 31.15 0 0 1 29.14 19a8 8 0 0 0 14.8 0a31.15 31.15 0 0 1 29.14-19C209.59 48 224 62.65 224 80c0 19.51-15.79 41.58-45.66 63.9l-11.09 2.55A28 28 0 0 0 140 112h-39.32C92.05 100.36 88 90.12 88 80c0-17.35 14.41-32 31.46-32M16 160h24v40H16Zm203.43 8.21l-38 16.18L119 200H56v-44.69l22.63-22.62A15.86 15.86 0 0 1 89.94 128H140a12 12 0 0 1 0 24h-28a8 8 0 0 0 0 16h32a8.3 8.3 0 0 0 1.79-.2l67-15.41l.31-.08a8.6 8.6 0 0 1 6.3 15.9Z\"/></g>"},"hand-heart-fill":{"body":"<path fill=\"currentColor\" d=\"M230.33 141.06a24.34 24.34 0 0 0-18.61-4.77C230.5 117.33 240 98.48 240 80c0-26.47-21.29-48-47.46-48A47.58 47.58 0 0 0 156 48.75A47.58 47.58 0 0 0 119.46 32C93.29 32 72 53.53 72 80c0 11 3.24 21.69 10.06 33a31.87 31.87 0 0 0-14.75 8.4L44.69 144H16a16 16 0 0 0-16 16v40a16 16 0 0 0 16 16h104a8 8 0 0 0 1.94-.24l64-16a7 7 0 0 0 1.19-.4L226 182.82l.44-.2a24.6 24.6 0 0 0 3.93-41.56Zm-10.9 27.15l-38 16.18L119 200H56v-44.69l22.63-22.62A15.86 15.86 0 0 1 89.94 128H140a12 12 0 0 1 0 24h-28a8 8 0 0 0 0 16h32a8.3 8.3 0 0 0 1.79-.2l67-15.41l.31-.08a8.6 8.6 0 0 1 6.3 15.9Z\"/>"},"heart":{"body":"<path fill=\"currentColor\" d=\"M178 40c-20.65 0-38.73 8.88-50 23.89C116.73 48.88 98.65 40 78 40a62.07 62.07 0 0 0-62 62c0 70 103.79 126.66 108.21 129a8 8 0 0 0 7.58 0C136.21 228.66 240 172 240 102a62.07 62.07 0 0 0-62-62m-50 174.8c-18.26-10.64-96-59.11-96-112.8a46.06 46.06 0 0 1 46-46c19.45 0 35.78 10.36 42.6 27a8 8 0 0 0 14.8 0c6.82-16.67 23.15-27 42.6-27a46.06 46.06 0 0 1 46 46c0 53.61-77.76 102.15-96 112.8\"/>"},"heart-fill":{"body":"<path fill=\"currentColor\" d=\"M240 102c0 70-103.79 126.66-108.21 129a8 8 0 0 1-7.58 0C119.79 228.66 16 172 16 102a62.07 62.07 0 0 1 62-62c20.65 0 38.73 8.88 50 23.89C139.27 48.88 157.35 40 178 40a62.07 62.07 0 0 1 62 62\"/>"},"house-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M216 120v96h-64v-64h-48v64H40v-96a8 8 0 0 1 2.34-5.66l80-80a8 8 0 0 1 11.32 0l80 80A8 8 0 0 1 216 120\" opacity=\".2\"/><path d=\"m219.31 108.68l-80-80a16 16 0 0 0-22.62 0l-80 80A15.87 15.87 0 0 0 32 120v96a8 8 0 0 0 8 8h64a8 8 0 0 0 8-8v-56h32v56a8 8 0 0 0 8 8h64a8 8 0 0 0 8-8v-96a15.87 15.87 0 0 0-4.69-11.32M208 208h-48v-56a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v56H48v-88l80-80l80 80Z\"/></g>"},"house-fill":{"body":"<path fill=\"currentColor\" d=\"M224 120v96a8 8 0 0 1-8 8h-56a8 8 0 0 1-8-8v-52a4 4 0 0 0-4-4h-40a4 4 0 0 0-4 4v52a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8v-96a16 16 0 0 1 4.69-11.31l80-80a16 16 0 0 1 22.62 0l80 80A16 16 0 0 1 224 120\"/>"},"house-line-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M216 116.69V216h-64v-64h-48v64H40v-99.31l82.34-82.35a8 8 0 0 1 11.32 0Z\" opacity=\".2\"/><path d=\"M240 208h-16v-72l2.34 2.34A8 8 0 0 0 237.66 127l-98.35-98.32a16 16 0 0 0-22.62 0L18.34 127a8 8 0 0 0 11.32 11.31L32 136v72H16a8 8 0 0 0 0 16h224a8 8 0 0 0 0-16M48 120l80-80l80 80v88h-48v-56a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v56H48Zm96 88h-32v-48h32Z\"/></g>"},"info":{"body":"<path fill=\"currentColor\" d=\"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m16-40a8 8 0 0 1-8 8a16 16 0 0 1-16-16v-40a8 8 0 0 1 0-16a16 16 0 0 1 16 16v40a8 8 0 0 1 8 8m-32-92a12 12 0 1 1 12 12a12 12 0 0 1-12-12\"/>"},"magnifying-glass":{"body":"<path fill=\"currentColor\" d=\"m229.66 218.34l-50.07-50.06a88.11 88.11 0 1 0-11.31 11.31l50.06 50.07a8 8 0 0 0 11.32-11.32M40 112a72 72 0 1 1 72 72a72.08 72.08 0 0 1-72-72\"/>"},"magnifying-glass-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M192 112a80 80 0 1 1-80-80a80 80 0 0 1 80 80\" opacity=\".2\"/><path d=\"m229.66 218.34l-50.06-50.06a88.21 88.21 0 1 0-11.32 11.31l50.06 50.07a8 8 0 0 0 11.32-11.32M40 112a72 72 0 1 1 72 72a72.08 72.08 0 0 1-72-72\"/></g>"},"map-trifold-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M160 72v144l-64-32V40Z\" opacity=\".2\"/><path d=\"M228.92 49.69a8 8 0 0 0-6.86-1.45l-61.13 15.28l-61.35-30.68a8 8 0 0 0-5.52-.6l-64 16A8 8 0 0 0 24 56v144a8 8 0 0 0 9.94 7.76l61.13-15.28l61.35 30.68a8.15 8.15 0 0 0 3.58.84a8 8 0 0 0 1.94-.24l64-16A8 8 0 0 0 232 200V56a8 8 0 0 0-3.08-6.31M104 52.94l48 24v126.12l-48-24Zm-64 9.31l48-12v127.5l-48 12Zm176 131.5l-48 12V78.25l48-12Z\"/></g>"},"map-trifold-fill":{"body":"<path fill=\"currentColor\" d=\"M228.92 49.69a8 8 0 0 0-6.86-1.45l-61.13 15.28l-61.35-30.68a8 8 0 0 0-5.52-.6l-64 16A8 8 0 0 0 24 56v144a8 8 0 0 0 9.94 7.76l61.13-15.28l61.35 30.68a8.15 8.15 0 0 0 3.58.84a8 8 0 0 0 1.94-.24l64-16A8 8 0 0 0 232 200V56a8 8 0 0 0-3.08-6.31M96 176a8 8 0 0 0-1.94.24L40 189.75V62.25l55.07-13.77l.93.46Zm120 17.75l-55.07 13.77l-.93-.46V80a8 8 0 0 0 1.94-.23L216 66.25Z\"/>"},"mask-happy-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M216 48v55.77C216 174.6 176.6 232 128 232s-88-57.4-88-128.21V48a8 8 0 0 1 10.89-7.47C66 46.41 95.11 55.71 128 55.71s62-9.3 77.11-15.16A8 8 0 0 1 216 48\" opacity=\".2\"/><path d=\"M217 34.8a15.94 15.94 0 0 0-14.82-1.71c-14.03 5.46-42.36 14.62-74.18 14.62s-60.16-9.16-74.21-14.62A16 16 0 0 0 32 48v55.77c0 35.84 9.65 69.65 27.18 95.18c18.16 26.46 42.6 41 68.82 41s50.66-14.57 68.82-41c17.53-25.51 27.18-59.32 27.18-95.16V48a16 16 0 0 0-7-13.2m-9 69c0 32.64-8.66 63.23-24.37 86.13C168.54 211.9 148.79 224 128 224s-40.54-12.1-55.63-34.08C56.66 167 48 136.43 48 103.79V48c15.11 5.87 45.58 15.71 80 15.71s64.9-9.84 80-15.71v55.81Zm-18 18.87a8 8 0 1 1-12 10.66c-2.68-3-8.85-5.33-14-5.33s-11.36 2.34-14 5.33a8 8 0 1 1-12-10.67c5.71-6.38 16.14-10.66 26-10.66s20.25 4.28 26 10.66ZM92 128c-5.19 0-11.36 2.34-14 5.33a8 8 0 1 1-12-10.67C71.75 116.28 82.18 112 92 112s20.25 4.28 26 10.66a8 8 0 1 1-12 10.67c-2.64-2.99-8.81-5.33-14-5.33m76.45 45.19a52.9 52.9 0 0 1-80.9 0a8 8 0 1 1 12.17-10.39a36.89 36.89 0 0 0 56.56 0a8 8 0 0 1 12.17 10.39\"/></g>"},"music-notes-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M208 164a28 28 0 1 1-28-28a28 28 0 0 1 28 28m-156 4a28 28 0 1 0 28 28a28 28 0 0 0-28-28\" opacity=\".2\"/><path d=\"M212.92 17.69a8 8 0 0 0-6.86-1.45l-128 32A8 8 0 0 0 72 56v110.08A36 36 0 1 0 88 196v-85.75l112-28v51.83A36 36 0 1 0 216 164V24a8 8 0 0 0-3.08-6.31M52 216a20 20 0 1 1 20-20a20 20 0 0 1-20 20M88 93.75v-31.5l112-28v31.5ZM180 184a20 20 0 1 1 20-20a20 20 0 0 1-20 20\"/></g>"},"newspaper-clipping-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M216 48H40a8 8 0 0 0-8 8v160l32-16l32 16l32-16l32 16l32-16l32 16V56a8 8 0 0 0-8-8M112 160H64V96h48Z\" opacity=\".2\"/><path d=\"M216 40H40a16 16 0 0 0-16 16v160a8 8 0 0 0 11.58 7.15L64 208.94l28.42 14.21a8 8 0 0 0 7.16 0L128 208.94l28.42 14.21a8 8 0 0 0 7.16 0L192 208.94l28.42 14.21A8 8 0 0 0 232 216V56a16 16 0 0 0-16-16m0 163.06l-20.42-10.22a8 8 0 0 0-7.16 0L160 207.06l-28.42-14.22a8 8 0 0 0-7.16 0L96 207.06l-28.42-14.22a8 8 0 0 0-7.16 0L40 203.06V56h176ZM136 112a8 8 0 0 1 8-8h48a8 8 0 0 1 0 16h-48a8 8 0 0 1-8-8m0 32a8 8 0 0 1 8-8h48a8 8 0 0 1 0 16h-48a8 8 0 0 1-8-8m-72 24h48a8 8 0 0 0 8-8V96a8 8 0 0 0-8-8H64a8 8 0 0 0-8 8v64a8 8 0 0 0 8 8m8-64h32v48H72Z\"/></g>"},"scissors-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M40.2 95.8a28 28 0 1 1 39.6 0a28 28 0 0 1-39.6 0m0 64.4a28 28 0 1 0 39.6 0a28 28 0 0 0-39.6 0\" opacity=\".2\"/><path d=\"M157.73 113.13a8 8 0 0 1 2.09-11.13l67.66-46.3a8 8 0 0 1 9 13.21l-67.67 46.3a7.9 7.9 0 0 1-4.51 1.4a8 8 0 0 1-6.57-3.48m80.87 85.09a8 8 0 0 1-11.12 2.08L136 137.7l-42.51 29.08a36 36 0 1 1-9-13.19L121.83 128l-37.39-25.59a35.86 35.86 0 1 1 9-13.19l143 97.87a8 8 0 0 1 2.16 11.13M80 180a20 20 0 1 0-5.86 14.14A19.85 19.85 0 0 0 80 180m-5.86-89.87a20 20 0 1 0-28.28 0a19.85 19.85 0 0 0 28.28 0\"/></g>"},"shield-check-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M216 56v56c0 96-88 120-88 120s-88-24-88-120V56a8 8 0 0 1 8-8h160a8 8 0 0 1 8 8\" opacity=\".2\"/><path d=\"M208 40H48a16 16 0 0 0-16 16v56c0 52.72 25.52 84.67 46.93 102.19c23.06 18.86 46 25.26 47 25.53a8 8 0 0 0 4.2 0c1-.27 23.91-6.67 47-25.53C198.48 196.67 224 164.72 224 112V56a16 16 0 0 0-16-16m0 72c0 37.07-13.66 67.16-40.6 89.42a129.3 129.3 0 0 1-39.4 22.2a128.3 128.3 0 0 1-38.92-21.81C61.82 179.51 48 149.3 48 112V56h160ZM82.34 141.66a8 8 0 0 1 11.32-11.32L112 148.69l50.34-50.35a8 8 0 0 1 11.32 11.32l-56 56a8 8 0 0 1-11.32 0Z\"/></g>"},"storefront-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M224 96v16a32 32 0 0 1-64 0V96H96v16a32 32 0 0 1-64 0V96l14.34-50.2A8 8 0 0 1 54 40h148a8 8 0 0 1 7.69 5.8Z\" opacity=\".2\"/><path d=\"M231.69 93.81L217.35 43.6A16.07 16.07 0 0 0 202 32H54a16.07 16.07 0 0 0-15.35 11.6L24.31 93.81A8 8 0 0 0 24 96v16a40 40 0 0 0 16 32v72a8 8 0 0 0 8 8h160a8 8 0 0 0 8-8v-72a40 40 0 0 0 16-32V96a8 8 0 0 0-.31-2.19M54 48h148l11.42 40H42.61Zm98 56v8a24 24 0 0 1-48 0v-8ZM51.06 132.2A24 24 0 0 1 40 112v-8h48v8a24 24 0 0 1-35.12 21.26a8 8 0 0 0-1.82-1.06M200 208H56v-56.8a40.6 40.6 0 0 0 8 .8a40 40 0 0 0 32-16a40 40 0 0 0 64 0a40 40 0 0 0 32 16a40.6 40.6 0 0 0 8-.8Zm16-96a24 24 0 0 1-11.07 20.2a8 8 0 0 0-1.8 1.05A24 24 0 0 1 168 112v-8h48Z\"/></g>"},"trophy-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M200 48v63.1c0 39.7-31.75 72.6-71.45 72.9A72 72 0 0 1 56 112V48Z\" opacity=\".2\"/><path d=\"M232 64h-24V48a8 8 0 0 0-8-8H56a8 8 0 0 0-8 8v16H24A16 16 0 0 0 8 80v16a40 40 0 0 0 40 40h3.65A80.13 80.13 0 0 0 120 191.61V216H96a8 8 0 0 0 0 16h64a8 8 0 0 0 0-16h-24v-24.42c31.94-3.23 58.44-25.64 68.08-55.58H208a40 40 0 0 0 40-40V80a16 16 0 0 0-16-16M48 120a24 24 0 0 1-24-24V80h24v32q0 4 .39 8Zm144-8.9c0 35.52-29 64.64-64 64.9a64 64 0 0 1-64-64V56h128ZM232 96a24 24 0 0 1-24 24h-.5a82 82 0 0 0 .5-8.9V80h24Z\"/></g>"},"user-circle-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M224 128a95.76 95.76 0 0 1-31.8 71.37A72 72 0 0 0 128 160a40 40 0 1 0-40-40a40 40 0 0 0 40 40a72 72 0 0 0-64.2 39.37A96 96 0 1 1 224 128\" opacity=\".2\"/><path d=\"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24M74.08 197.5a64 64 0 0 1 107.84 0a87.83 87.83 0 0 1-107.84 0M96 120a32 32 0 1 1 32 32a32 32 0 0 1-32-32m97.76 66.41a79.66 79.66 0 0 0-36.06-28.75a48 48 0 1 0-59.4 0a79.66 79.66 0 0 0-36.06 28.75a88 88 0 1 1 131.52 0\"/></g>"},"user-circle-fill":{"body":"<path fill=\"currentColor\" d=\"M172 120a44 44 0 1 1-44-44a44.05 44.05 0 0 1 44 44m60 8A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104m-16 0a88.09 88.09 0 0 0-91.47-87.93C77.43 41.89 39.87 81.12 40 128.25a87.65 87.65 0 0 0 22.24 58.16A79.7 79.7 0 0 1 84 165.1a4 4 0 0 1 4.83.32a59.83 59.83 0 0 0 78.28 0a4 4 0 0 1 4.83-.32a79.7 79.7 0 0 1 21.79 21.31A87.62 87.62 0 0 0 216 128\"/>"},"user-fill":{"body":"<path fill=\"currentColor\" d=\"M230.93 220a8 8 0 0 1-6.93 4H32a8 8 0 0 1-6.92-12c15.23-26.33 38.7-45.21 66.09-54.16a72 72 0 1 1 73.66 0c27.39 8.95 50.86 27.83 66.09 54.16a8 8 0 0 1 .01 8\"/>"},"user-focus-duotone":{"body":"<g fill=\"currentColor\"><path d=\"M160 112a32 32 0 1 1-32-32a32 32 0 0 1 32 32\" opacity=\".2\"/><path d=\"M224 40v36a8 8 0 0 1-16 0V48h-28a8 8 0 0 1 0-16h36a8 8 0 0 1 8 8m-8 132a8 8 0 0 0-8 8v28h-28a8 8 0 0 0 0 16h36a8 8 0 0 0 8-8v-36a8 8 0 0 0-8-8M76 208H48v-28a8 8 0 0 0-16 0v36a8 8 0 0 0 8 8h36a8 8 0 0 0 0-16M40 84a8 8 0 0 0 8-8V48h28a8 8 0 0 0 0-16H40a8 8 0 0 0-8 8v36a8 8 0 0 0 8 8m136 92a8 8 0 0 1-6.41-3.19a52 52 0 0 0-83.2 0a8 8 0 1 1-12.8-9.62A67.94 67.94 0 0 1 101 141.51a40 40 0 1 1 53.94 0a67.94 67.94 0 0 1 27.43 21.68A8 8 0 0 1 176 176m-48-40a24 24 0 1 0-24-24a24 24 0 0 0 24 24\"/></g>"}}},"Solar":{"prefix":"solar","width":24,"height":24,"icons":{"alt-arrow-left-linear":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M15 5L9 12L15 19\"/>"},"alt-arrow-right-linear":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M9 5L15 12L9 19\"/>"}}}}
- +
- +function svgNameSwitch(id) {
- + return id
- + .split(/:|-|_/)
- + .filter(Boolean)
- + .map(function (s) {
- + return s[0].toUpperCase() + s.slice(1).toLowerCase()
- + })
- + .join('')
- }
- +
- function encodeSvg(svg) {
- - return svg.replace('<svg', ~svg.indexOf('xmlns') ? '<svg' : '<svg xmlns="http://www.w3.org/2000/svg"').replace(/"/g, '\'').replace(/%/g, '%25').replace(/#/g, '%23').replace(/{/g, '%7B').replace(/}/g, '%7D').replace(/</g, '%3C').replace(/>/g, '%3E');
- + return svg
- + .replace('<svg', ~svg.indexOf('xmlns') ? '<svg' : '<svg xmlns="http://www.w3.org/2000/svg"')
- + .replace(/"/g, "'")
- + .replace(/%/g, '%25')
- + .replace(/#/g, '%23')
- + .replace(/{/g, '%7B')
- + .replace(/}/g, '%7D')
- + .replace(/</g, '%3C')
- + .replace(/>/g, '%3E')
- }
- +
- function getDataUri(data) {
- - return 'url("data:image/svg+xml;utf8,' + data + '")';
- + return 'url("data:image/svg+xml;utf8,' + data + '")'
- }
- +
- function presetsIconify(id) {
- - var parts = id.split(':');
- - var prefix = '';
- - var icon = '';
- - if (parts.length === 2) {
- - // prefix:icon.svg
- - prefix = svgNameSwtich(parts[0]);
- - icon = parts[1];
- - }
- - if (parts.length === 1) {
- - parts = parts[0].split('-');
- - if (parts.length > 1) {
- - // prefix-icon.svg
- - prefix = svgNameSwtich(parts.shift());
- - icon = parts.join('-');
- - }
- + var parts = id.split(':')
- + var prefix = ''
- + var icon = ''
- + if (parts.length === 2) {
- + prefix = svgNameSwitch(parts[0])
- + icon = parts[1]
- + } else if (parts.length === 1) {
- + parts = parts[0].split('-')
- + if (parts.length > 1) {
- + prefix = svgNameSwitch(parts.shift())
- + icon = parts.join('-')
- }
- - var setData = iconifyPresets[prefix] ? iconifyPresets[prefix].icons : null;
- - var width = setData && setData.width ? setData.width : 32;
- - var height = setData && setData.height ? setData.height : 32;
- - var iconData = setData && setData.icons && setData.icons[icon] ? setData.icons[icon] : null;
- - if (!iconData) {
- - return '';
- - }
- - var renderData = {
- - attributes: {
- - width: '1em',
- - height: '1em',
- - preserveAspectRatio: 'xMidYMid meet',
- - viewBox: '0 0 ' + width + ' ' + height
- - },
- - body: iconData.body
- - };
- - var svgAttributes = Object.assign({ xmlns: 'http://www.w3.org/2000/svg', 'xmlns:xlink': 'http://www.w3.org/1999/xlink' }, renderData.attributes);
- - var svgAttributesStr = Object.keys(svgAttributes).map(function (attr) {
- - return attr + '="' + svgAttributes[attr] + '"';
- - }).join(' ');
- - // Generate SVG
- - return '<svg ' + svgAttributesStr + '>' + renderData.body + '</svg>';
- + }
- + var setData = iconifyPresets[prefix] || null
- + var width = setData && setData.width ? setData.width : 32
- + var height = setData && setData.height ? setData.height : 32
- + var iconData = setData && setData.icons && setData.icons[icon] ? setData.icons[icon] : null
- + if (!iconData) {
- + return ''
- + }
- + var svgAttributes = {
- + xmlns: 'http://www.w3.org/2000/svg',
- + 'xmlns:xlink': 'http://www.w3.org/1999/xlink',
- + width: '1em',
- + height: '1em',
- + preserveAspectRatio: 'xMidYMid meet',
- + viewBox: '0 0 ' + width + ' ' + height
- + }
- + var svgAttributesStr = Object.keys(svgAttributes)
- + .map(function (attr) {
- + return attr + '="' + svgAttributes[attr] + '"'
- + })
- + .join(' ')
- + return '<svg ' + svgAttributesStr + '>' + iconData.body + '</svg>'
- }
- +
- function getLocalSVG(id) {
- - var name = svgNameSwtich(id);
- - var data = customerSvg[name];
- - if (data) {
- - return getDataUri(encodeSvg(data));
- - } else {
- - data = presetsIconify(id);
- - if (data) {
- - return getDataUri(encodeSvg(data));
- - } else {
- - data = wx.getStorageSync(name);
- - if (data) {
- - return getDataUri(data);
- - }
- - return '';
- - }
- - }
- -}
- -function iconifyApi(id) {
- - return new Promise(function (resolve, reject) {
- - if (ICONIFY_API) {
- - wx.request({
- - url: ICONIFY_API + '/' + id + '.svg',
- - success: function success(res) {
- - if (res.statusCode === 200) resolve(res.data);else reject(res.errMsg);
- - },
- - fail: function fail(err) {
- - reject(err);
- - }
- - });
- - } else {
- - reject('no ICONIFY_API');
- - }
- - });
- + var name = svgNameSwitch(id)
- + var data = presetsIconify(id)
- + if (data) {
- + return getDataUri(encodeSvg(data))
- + }
- + data = wx.getStorageSync(name)
- + if (data) {
- + return getDataUri(data)
- + }
- + return ''
- }
- -function getIconifySVG(id) {
- - return new Promise(function (resolve, reject) {
- - var name = svgNameSwtich(id);
- - iconifyApi(id).then(function (r) {
- - var data = encodeSvg(r);
- - wx.setStorage({
- - key: name,
- - data: data,
- - success: function success(_) {
- - resolve(getDataUri(data));
- - },
- - fail: function fail(err) {
- - reject(err);
- - }
- - });
- - }).catch(function (e) {
- - reject(e);
- - });
- - });
- -}
- -function iconifySetup(api) {
- - if (api) {
- - ICONIFY_API = api;
- - for (var _iterator = iconifyPreload, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
- - var _ref;
- -
- - if (_isArray) {
- - if (_i >= _iterator.length) break;
- - _ref = _iterator[_i++];
- - } else {
- - _i = _iterator.next();
- - if (_i.done) break;
- - _ref = _i.value;
- - }
-
- - var id = _ref;
- -
- - var name = svgNameSwtich(id);
- - console.log(name);
- - var data = wx.getStorageSync(name);
- - if (!data) {
- - getIconifySVG(id).catch(function (e) {
- - console.error(e);
- - });
- - }
- - }
- +Component({
- + properties: {
- + name: {
- + type: String,
- + value: ''
- + },
- + color: {
- + type: String,
- + value: ''
- + },
- + size: {
- + type: String
- }
- -}
- -exports.default = {
- - getLocalSVG: getLocalSVG,
- - getIconifySVG: getIconifySVG,
- - iconifySetup: iconifySetup
- -};
- -
- -/***/ }),
- -/* 2 */
- -/***/ (function(module, exports) {
- -
- -module.exports = require("@iconify-json/mdi-light");
- -
- -/***/ })
- -/******/ ]);
- -//# sourceMappingURL=index.js.map
- \ No newline at end of file
- + },
- + data: {
- + width: '1em',
- + height: '1em',
- + iconUrl: '',
- + class: ''
- + },
- + lifetimes: {
- + attached: function attached() {
- + this.setData({
- + iconUrl: getLocalSVG(this.data.name),
- + class: this.data.color ? 'icon' : 'default-icon'
- + })
- + if (this.data.size) {
- + this.setData({
- + width: this.data.size,
- + height: this.data.size
- + })
- + }
- + }
- + }
- +})
- diff --git a/miniprogram_dist/index.js.map b/miniprogram_dist/index.js.map
- deleted file mode 100644
- index efc117b0e59c1c0429b5d343164a4983bb2c2c05..0000000000000000000000000000000000000000
|