9
|
1 |
this["wp"] = this["wp"] || {}; this["wp"]["formatLibrary"] = |
|
2 |
/******/ (function(modules) { // webpackBootstrap |
|
3 |
/******/ // The module cache |
|
4 |
/******/ var installedModules = {}; |
|
5 |
/******/ |
|
6 |
/******/ // The require function |
|
7 |
/******/ function __webpack_require__(moduleId) { |
|
8 |
/******/ |
|
9 |
/******/ // Check if module is in cache |
|
10 |
/******/ if(installedModules[moduleId]) { |
|
11 |
/******/ return installedModules[moduleId].exports; |
|
12 |
/******/ } |
|
13 |
/******/ // Create a new module (and put it into the cache) |
|
14 |
/******/ var module = installedModules[moduleId] = { |
|
15 |
/******/ i: moduleId, |
|
16 |
/******/ l: false, |
|
17 |
/******/ exports: {} |
|
18 |
/******/ }; |
|
19 |
/******/ |
|
20 |
/******/ // Execute the module function |
|
21 |
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
|
22 |
/******/ |
|
23 |
/******/ // Flag the module as loaded |
|
24 |
/******/ module.l = true; |
|
25 |
/******/ |
|
26 |
/******/ // Return the exports of the module |
|
27 |
/******/ return module.exports; |
|
28 |
/******/ } |
|
29 |
/******/ |
|
30 |
/******/ |
|
31 |
/******/ // expose the modules object (__webpack_modules__) |
|
32 |
/******/ __webpack_require__.m = modules; |
|
33 |
/******/ |
|
34 |
/******/ // expose the module cache |
|
35 |
/******/ __webpack_require__.c = installedModules; |
|
36 |
/******/ |
|
37 |
/******/ // define getter function for harmony exports |
|
38 |
/******/ __webpack_require__.d = function(exports, name, getter) { |
|
39 |
/******/ if(!__webpack_require__.o(exports, name)) { |
|
40 |
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); |
|
41 |
/******/ } |
|
42 |
/******/ }; |
|
43 |
/******/ |
|
44 |
/******/ // define __esModule on exports |
|
45 |
/******/ __webpack_require__.r = function(exports) { |
|
46 |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
|
47 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
|
48 |
/******/ } |
|
49 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
|
50 |
/******/ }; |
|
51 |
/******/ |
|
52 |
/******/ // create a fake namespace object |
|
53 |
/******/ // mode & 1: value is a module id, require it |
|
54 |
/******/ // mode & 2: merge all properties of value into the ns |
|
55 |
/******/ // mode & 4: return value when already ns object |
|
56 |
/******/ // mode & 8|1: behave like require |
|
57 |
/******/ __webpack_require__.t = function(value, mode) { |
|
58 |
/******/ if(mode & 1) value = __webpack_require__(value); |
|
59 |
/******/ if(mode & 8) return value; |
|
60 |
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; |
|
61 |
/******/ var ns = Object.create(null); |
|
62 |
/******/ __webpack_require__.r(ns); |
|
63 |
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); |
|
64 |
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); |
|
65 |
/******/ return ns; |
|
66 |
/******/ }; |
|
67 |
/******/ |
|
68 |
/******/ // getDefaultExport function for compatibility with non-harmony modules |
|
69 |
/******/ __webpack_require__.n = function(module) { |
|
70 |
/******/ var getter = module && module.__esModule ? |
|
71 |
/******/ function getDefault() { return module['default']; } : |
|
72 |
/******/ function getModuleExports() { return module; }; |
|
73 |
/******/ __webpack_require__.d(getter, 'a', getter); |
|
74 |
/******/ return getter; |
|
75 |
/******/ }; |
|
76 |
/******/ |
|
77 |
/******/ // Object.prototype.hasOwnProperty.call |
|
78 |
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; |
|
79 |
/******/ |
|
80 |
/******/ // __webpack_public_path__ |
|
81 |
/******/ __webpack_require__.p = ""; |
|
82 |
/******/ |
|
83 |
/******/ |
|
84 |
/******/ // Load entry module and return exports |
18
|
85 |
/******/ return __webpack_require__(__webpack_require__.s = "t1DA"); |
9
|
86 |
/******/ }) |
|
87 |
/************************************************************************/ |
|
88 |
/******/ ({ |
|
89 |
|
18
|
90 |
/***/ "1Yn1": |
16
|
91 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
92 |
|
|
93 |
"use strict"; |
18
|
94 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
95 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
96 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
97 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
98 |
|
|
99 |
|
|
100 |
/** |
|
101 |
* WordPress dependencies |
|
102 |
*/ |
16
|
103 |
|
18
|
104 |
const code = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
105 |
viewBox: "0 0 24 24", |
|
106 |
xmlns: "http://www.w3.org/2000/svg" |
|
107 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
108 |
d: "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z" |
|
109 |
})); |
|
110 |
/* harmony default export */ __webpack_exports__["a"] = (code); |
|
111 |
|
|
112 |
|
|
113 |
/***/ }), |
|
114 |
|
|
115 |
/***/ "1ZqX": |
|
116 |
/***/ (function(module, exports) { |
|
117 |
|
|
118 |
(function() { module.exports = window["wp"]["data"]; }()); |
16
|
119 |
|
|
120 |
/***/ }), |
|
121 |
|
18
|
122 |
/***/ "Bpkj": |
9
|
123 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
124 |
|
|
125 |
"use strict"; |
18
|
126 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
127 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
128 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
129 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
16
|
130 |
|
|
131 |
|
18
|
132 |
/** |
|
133 |
* WordPress dependencies |
|
134 |
*/ |
16
|
135 |
|
18
|
136 |
const link = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
137 |
xmlns: "http://www.w3.org/2000/svg", |
|
138 |
viewBox: "0 0 24 24" |
|
139 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
140 |
d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z" |
|
141 |
})); |
|
142 |
/* harmony default export */ __webpack_exports__["a"] = (link); |
|
143 |
|
16
|
144 |
|
18
|
145 |
/***/ }), |
|
146 |
|
|
147 |
/***/ "Crq9": |
|
148 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
149 |
|
|
150 |
"use strict"; |
|
151 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
152 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
153 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
154 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
155 |
|
16
|
156 |
|
|
157 |
/** |
|
158 |
* WordPress dependencies |
|
159 |
*/ |
18
|
160 |
|
|
161 |
const formatStrikethrough = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
162 |
xmlns: "http://www.w3.org/2000/svg", |
|
163 |
viewBox: "0 0 24 24" |
|
164 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
165 |
d: "M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z" |
|
166 |
})); |
|
167 |
/* harmony default export */ __webpack_exports__["a"] = (formatStrikethrough); |
|
168 |
|
|
169 |
|
|
170 |
/***/ }), |
|
171 |
|
|
172 |
/***/ "GRId": |
|
173 |
/***/ (function(module, exports) { |
|
174 |
|
|
175 |
(function() { module.exports = window["wp"]["element"]; }()); |
|
176 |
|
|
177 |
/***/ }), |
|
178 |
|
|
179 |
/***/ "Mmq9": |
|
180 |
/***/ (function(module, exports) { |
|
181 |
|
|
182 |
(function() { module.exports = window["wp"]["url"]; }()); |
|
183 |
|
|
184 |
/***/ }), |
|
185 |
|
|
186 |
/***/ "Mp0b": |
|
187 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
16
|
188 |
|
18
|
189 |
"use strict"; |
|
190 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
191 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
192 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
193 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
194 |
|
|
195 |
|
|
196 |
/** |
|
197 |
* WordPress dependencies |
|
198 |
*/ |
|
199 |
|
|
200 |
const linkOff = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
201 |
xmlns: "http://www.w3.org/2000/svg", |
|
202 |
viewBox: "0 0 24 24" |
|
203 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
204 |
d: "M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z" |
|
205 |
})); |
|
206 |
/* harmony default export */ __webpack_exports__["a"] = (linkOff); |
|
207 |
|
|
208 |
|
|
209 |
/***/ }), |
|
210 |
|
|
211 |
/***/ "Tqx9": |
|
212 |
/***/ (function(module, exports) { |
|
213 |
|
|
214 |
(function() { module.exports = window["wp"]["primitives"]; }()); |
|
215 |
|
|
216 |
/***/ }), |
16
|
217 |
|
18
|
218 |
/***/ "YLtl": |
|
219 |
/***/ (function(module, exports) { |
|
220 |
|
|
221 |
(function() { module.exports = window["lodash"]; }()); |
|
222 |
|
|
223 |
/***/ }), |
|
224 |
|
|
225 |
/***/ "axFQ": |
|
226 |
/***/ (function(module, exports) { |
|
227 |
|
|
228 |
(function() { module.exports = window["wp"]["blockEditor"]; }()); |
|
229 |
|
|
230 |
/***/ }), |
|
231 |
|
|
232 |
/***/ "btIw": |
|
233 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
234 |
|
|
235 |
"use strict"; |
|
236 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
237 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
238 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
239 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
240 |
|
|
241 |
|
|
242 |
/** |
|
243 |
* WordPress dependencies |
|
244 |
*/ |
16
|
245 |
|
18
|
246 |
const keyboardReturn = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
247 |
xmlns: "http://www.w3.org/2000/svg", |
|
248 |
viewBox: "-2 -2 24 24" |
|
249 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
250 |
d: "M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z" |
|
251 |
})); |
|
252 |
/* harmony default export */ __webpack_exports__["a"] = (keyboardReturn); |
|
253 |
|
|
254 |
|
|
255 |
/***/ }), |
|
256 |
|
|
257 |
/***/ "gdqT": |
|
258 |
/***/ (function(module, exports) { |
|
259 |
|
|
260 |
(function() { module.exports = window["wp"]["a11y"]; }()); |
|
261 |
|
|
262 |
/***/ }), |
|
263 |
|
|
264 |
/***/ "iClF": |
|
265 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
266 |
|
|
267 |
"use strict"; |
|
268 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
269 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
270 |
/** |
|
271 |
* WordPress dependencies |
|
272 |
*/ |
|
273 |
|
|
274 |
/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */ |
16
|
275 |
|
|
276 |
/** |
|
277 |
* Return an SVG icon. |
|
278 |
* |
|
279 |
* @param {IconProps} props icon is the SVG component to render |
|
280 |
* size is a number specifiying the icon size in pixels |
|
281 |
* Other props will be passed to wrapped SVG component |
|
282 |
* |
|
283 |
* @return {JSX.Element} Icon component |
|
284 |
*/ |
|
285 |
|
18
|
286 |
function Icon({ |
|
287 |
icon, |
|
288 |
size = 24, |
|
289 |
...props |
|
290 |
}) { |
|
291 |
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["cloneElement"])(icon, { |
16
|
292 |
width: size, |
18
|
293 |
height: size, |
|
294 |
...props |
|
295 |
}); |
9
|
296 |
} |
|
297 |
|
16
|
298 |
/* harmony default export */ __webpack_exports__["a"] = (Icon); |
|
299 |
|
|
300 |
|
9
|
301 |
/***/ }), |
|
302 |
|
18
|
303 |
/***/ "l3Sj": |
|
304 |
/***/ (function(module, exports) { |
16
|
305 |
|
18
|
306 |
(function() { module.exports = window["wp"]["i18n"]; }()); |
9
|
307 |
|
|
308 |
/***/ }), |
|
309 |
|
18
|
310 |
/***/ "oMoS": |
16
|
311 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
312 |
|
|
313 |
"use strict"; |
18
|
314 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
16
|
315 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
18
|
316 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
16
|
317 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
318 |
|
|
319 |
|
|
320 |
/** |
|
321 |
* WordPress dependencies |
|
322 |
*/ |
|
323 |
|
18
|
324 |
const button = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
325 |
viewBox: "0 0 24 24", |
|
326 |
xmlns: "http://www.w3.org/2000/svg" |
16
|
327 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
18
|
328 |
d: "M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z" |
16
|
329 |
})); |
18
|
330 |
/* harmony default export */ __webpack_exports__["a"] = (button); |
16
|
331 |
|
|
332 |
|
|
333 |
/***/ }), |
|
334 |
|
18
|
335 |
/***/ "qRz9": |
16
|
336 |
/***/ (function(module, exports) { |
|
337 |
|
18
|
338 |
(function() { module.exports = window["wp"]["richText"]; }()); |
16
|
339 |
|
|
340 |
/***/ }), |
|
341 |
|
18
|
342 |
/***/ "rmEH": |
16
|
343 |
/***/ (function(module, exports) { |
|
344 |
|
18
|
345 |
(function() { module.exports = window["wp"]["htmlEntities"]; }()); |
16
|
346 |
|
|
347 |
/***/ }), |
|
348 |
|
18
|
349 |
/***/ "t1DA": |
9
|
350 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
351 |
|
|
352 |
"use strict"; |
16
|
353 |
// ESM COMPAT FLAG |
9
|
354 |
__webpack_require__.r(__webpack_exports__); |
|
355 |
|
18
|
356 |
// EXTERNAL MODULE: external ["wp","richText"] |
|
357 |
var external_wp_richText_ = __webpack_require__("qRz9"); |
9
|
358 |
|
18
|
359 |
// EXTERNAL MODULE: external ["wp","element"] |
|
360 |
var external_wp_element_ = __webpack_require__("GRId"); |
9
|
361 |
|
18
|
362 |
// EXTERNAL MODULE: external ["wp","i18n"] |
|
363 |
var external_wp_i18n_ = __webpack_require__("l3Sj"); |
9
|
364 |
|
18
|
365 |
// EXTERNAL MODULE: external ["wp","blockEditor"] |
|
366 |
var external_wp_blockEditor_ = __webpack_require__("axFQ"); |
16
|
367 |
|
18
|
368 |
// EXTERNAL MODULE: external ["wp","primitives"] |
|
369 |
var external_wp_primitives_ = __webpack_require__("Tqx9"); |
16
|
370 |
|
|
371 |
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-bold.js |
|
372 |
|
|
373 |
|
|
374 |
/** |
|
375 |
* WordPress dependencies |
|
376 |
*/ |
|
377 |
|
18
|
378 |
const formatBold = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { |
16
|
379 |
xmlns: "http://www.w3.org/2000/svg", |
|
380 |
viewBox: "0 0 24 24" |
18
|
381 |
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { |
16
|
382 |
d: "M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z" |
|
383 |
})); |
|
384 |
/* harmony default export */ var format_bold = (formatBold); |
9
|
385 |
|
|
386 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/bold/index.js |
|
387 |
|
|
388 |
|
|
389 |
/** |
|
390 |
* WordPress dependencies |
|
391 |
*/ |
|
392 |
|
|
393 |
|
|
394 |
|
|
395 |
|
18
|
396 |
const bold_name = 'core/bold'; |
16
|
397 |
|
18
|
398 |
const title = Object(external_wp_i18n_["__"])('Bold'); |
16
|
399 |
|
18
|
400 |
const bold = { |
9
|
401 |
name: bold_name, |
18
|
402 |
title, |
9
|
403 |
tagName: 'strong', |
|
404 |
className: null, |
16
|
405 |
|
18
|
406 |
edit({ |
|
407 |
isActive, |
|
408 |
value, |
|
409 |
onChange, |
|
410 |
onFocus |
|
411 |
}) { |
16
|
412 |
function onToggle() { |
18
|
413 |
onChange(Object(external_wp_richText_["toggleFormat"])(value, { |
9
|
414 |
type: bold_name |
|
415 |
})); |
16
|
416 |
} |
|
417 |
|
|
418 |
function onClick() { |
|
419 |
onToggle(); |
|
420 |
onFocus(); |
|
421 |
} |
9
|
422 |
|
18
|
423 |
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], { |
9
|
424 |
type: "primary", |
|
425 |
character: "b", |
|
426 |
onUse: onToggle |
18
|
427 |
}), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], { |
9
|
428 |
name: "bold", |
16
|
429 |
icon: format_bold, |
|
430 |
title: title, |
|
431 |
onClick: onClick, |
9
|
432 |
isActive: isActive, |
|
433 |
shortcutType: "primary", |
|
434 |
shortcutCharacter: "b" |
18
|
435 |
}), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__unstableRichTextInputEvent"], { |
9
|
436 |
inputType: "formatBold", |
|
437 |
onInput: onToggle |
|
438 |
})); |
|
439 |
} |
18
|
440 |
|
9
|
441 |
}; |
|
442 |
|
16
|
443 |
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/code.js |
18
|
444 |
var code = __webpack_require__("1Yn1"); |
16
|
445 |
|
9
|
446 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/code/index.js |
|
447 |
|
|
448 |
|
|
449 |
/** |
|
450 |
* WordPress dependencies |
|
451 |
*/ |
|
452 |
|
|
453 |
|
|
454 |
|
|
455 |
|
18
|
456 |
const code_name = 'core/code'; |
16
|
457 |
|
18
|
458 |
const code_title = Object(external_wp_i18n_["__"])('Inline code'); |
16
|
459 |
|
18
|
460 |
const code_code = { |
9
|
461 |
name: code_name, |
16
|
462 |
title: code_title, |
9
|
463 |
tagName: 'code', |
|
464 |
className: null, |
18
|
465 |
|
|
466 |
__unstableInputRule(value) { |
|
467 |
const BACKTICK = '`'; |
|
468 |
const { |
|
469 |
start, |
|
470 |
text |
|
471 |
} = value; |
|
472 |
const characterBefore = text.slice(start - 1, start); // Quick check the text for the necessary character. |
16
|
473 |
|
|
474 |
if (characterBefore !== BACKTICK) { |
|
475 |
return value; |
|
476 |
} |
|
477 |
|
18
|
478 |
const textBefore = text.slice(0, start - 1); |
|
479 |
const indexBefore = textBefore.lastIndexOf(BACKTICK); |
16
|
480 |
|
|
481 |
if (indexBefore === -1) { |
|
482 |
return value; |
|
483 |
} |
|
484 |
|
18
|
485 |
const startIndex = indexBefore; |
|
486 |
const endIndex = start - 2; |
16
|
487 |
|
|
488 |
if (startIndex === endIndex) { |
|
489 |
return value; |
|
490 |
} |
|
491 |
|
18
|
492 |
value = Object(external_wp_richText_["remove"])(value, startIndex, startIndex + 1); |
|
493 |
value = Object(external_wp_richText_["remove"])(value, endIndex, endIndex + 1); |
|
494 |
value = Object(external_wp_richText_["applyFormat"])(value, { |
16
|
495 |
type: code_name |
|
496 |
}, startIndex, endIndex); |
|
497 |
return value; |
|
498 |
}, |
9
|
499 |
|
18
|
500 |
edit({ |
|
501 |
value, |
|
502 |
onChange, |
|
503 |
onFocus, |
|
504 |
isActive |
|
505 |
}) { |
16
|
506 |
function onClick() { |
18
|
507 |
onChange(Object(external_wp_richText_["toggleFormat"])(value, { |
9
|
508 |
type: code_name |
|
509 |
})); |
16
|
510 |
onFocus(); |
|
511 |
} |
|
512 |
|
18
|
513 |
return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], { |
16
|
514 |
icon: code["a" /* default */], |
|
515 |
title: code_title, |
|
516 |
onClick: onClick, |
|
517 |
isActive: isActive |
|
518 |
}); |
9
|
519 |
} |
18
|
520 |
|
9
|
521 |
}; |
|
522 |
|
18
|
523 |
// EXTERNAL MODULE: external ["wp","components"] |
|
524 |
var external_wp_components_ = __webpack_require__("tI+e"); |
16
|
525 |
|
|
526 |
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js |
18
|
527 |
var keyboard_return = __webpack_require__("btIw"); |
9
|
528 |
|
|
529 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/image/index.js |
|
530 |
|
|
531 |
|
|
532 |
/** |
|
533 |
* WordPress dependencies |
|
534 |
*/ |
|
535 |
|
|
536 |
|
|
537 |
|
|
538 |
|
|
539 |
|
|
540 |
|
18
|
541 |
const ALLOWED_MEDIA_TYPES = ['image']; |
|
542 |
const image_name = 'core/image'; |
16
|
543 |
|
18
|
544 |
const image_title = Object(external_wp_i18n_["__"])('Inline image'); |
9
|
545 |
|
18
|
546 |
const image_image = { |
9
|
547 |
name: image_name, |
16
|
548 |
title: image_title, |
18
|
549 |
keywords: [Object(external_wp_i18n_["__"])('photo'), Object(external_wp_i18n_["__"])('media')], |
9
|
550 |
object: true, |
|
551 |
tagName: 'img', |
|
552 |
className: null, |
|
553 |
attributes: { |
|
554 |
className: 'class', |
|
555 |
style: 'style', |
|
556 |
url: 'src', |
|
557 |
alt: 'alt' |
|
558 |
}, |
18
|
559 |
edit: Edit |
|
560 |
}; |
9
|
561 |
|
18
|
562 |
function InlineUI({ |
|
563 |
value, |
|
564 |
onChange, |
|
565 |
activeObjectAttributes, |
|
566 |
contentRef |
|
567 |
}) { |
|
568 |
const { |
|
569 |
style |
|
570 |
} = activeObjectAttributes; |
|
571 |
const [width, setWidth] = Object(external_wp_element_["useState"])(style === null || style === void 0 ? void 0 : style.replace(/\D/g, '')); |
|
572 |
const anchorRef = Object(external_wp_richText_["useAnchorRef"])({ |
|
573 |
ref: contentRef, |
|
574 |
value, |
|
575 |
settings: image_image |
|
576 |
}); |
|
577 |
return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], { |
|
578 |
position: "bottom center", |
|
579 |
focusOnMount: false, |
|
580 |
anchorRef: anchorRef, |
|
581 |
className: "block-editor-format-toolbar__image-popover" |
|
582 |
}, Object(external_wp_element_["createElement"])("form", { |
|
583 |
className: "block-editor-format-toolbar__image-container-content", |
|
584 |
onSubmit: event => { |
|
585 |
const newReplacements = value.replacements.slice(); |
|
586 |
newReplacements[value.start] = { |
|
587 |
type: image_name, |
|
588 |
attributes: { ...activeObjectAttributes, |
|
589 |
style: `width: ${width}px;` |
9
|
590 |
} |
18
|
591 |
}; |
|
592 |
onChange({ ...value, |
|
593 |
replacements: newReplacements |
|
594 |
}); |
|
595 |
event.preventDefault(); |
|
596 |
} |
|
597 |
}, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], { |
|
598 |
className: "block-editor-format-toolbar__image-container-value", |
|
599 |
type: "number", |
|
600 |
label: Object(external_wp_i18n_["__"])('Width'), |
|
601 |
value: width, |
|
602 |
min: 1, |
|
603 |
onChange: newWidth => setWidth(newWidth) |
|
604 |
}), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { |
|
605 |
icon: keyboard_return["a" /* default */], |
|
606 |
label: Object(external_wp_i18n_["__"])('Apply'), |
|
607 |
type: "submit" |
|
608 |
}))); |
|
609 |
} |
9
|
610 |
|
18
|
611 |
function Edit({ |
|
612 |
value, |
|
613 |
onChange, |
|
614 |
onFocus, |
|
615 |
isObjectActive, |
|
616 |
activeObjectAttributes, |
|
617 |
contentRef |
|
618 |
}) { |
|
619 |
const [isModalOpen, setIsModalOpen] = Object(external_wp_element_["useState"])(false); |
9
|
620 |
|
18
|
621 |
function openModal() { |
|
622 |
setIsModalOpen(true); |
|
623 |
} |
|
624 |
|
|
625 |
function closeModal() { |
|
626 |
setIsModalOpen(false); |
|
627 |
} |
9
|
628 |
|
18
|
629 |
return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUploadCheck"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], { |
|
630 |
icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { |
|
631 |
xmlns: "http://www.w3.org/2000/svg", |
|
632 |
viewBox: "0 0 24 24" |
|
633 |
}, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { |
|
634 |
d: "M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z" |
|
635 |
})), |
|
636 |
title: image_title, |
|
637 |
onClick: openModal, |
|
638 |
isActive: isObjectActive |
|
639 |
}), isModalOpen && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaUpload"], { |
|
640 |
allowedTypes: ALLOWED_MEDIA_TYPES, |
|
641 |
onSelect: ({ |
|
642 |
id, |
|
643 |
url, |
|
644 |
alt, |
|
645 |
width: imgWidth |
|
646 |
}) => { |
|
647 |
closeModal(); |
|
648 |
onChange(Object(external_wp_richText_["insertObject"])(value, { |
|
649 |
type: image_name, |
|
650 |
attributes: { |
|
651 |
className: `wp-image-${id}`, |
|
652 |
style: `width: ${Math.min(imgWidth, 150)}px;`, |
|
653 |
url, |
|
654 |
alt |
9
|
655 |
} |
18
|
656 |
})); |
|
657 |
onFocus(); |
|
658 |
}, |
|
659 |
onClose: closeModal, |
|
660 |
render: ({ |
|
661 |
open |
|
662 |
}) => { |
|
663 |
open(); |
|
664 |
return null; |
|
665 |
} |
|
666 |
}), isObjectActive && Object(external_wp_element_["createElement"])(InlineUI, { |
|
667 |
value: value, |
|
668 |
onChange: onChange, |
|
669 |
activeObjectAttributes: activeObjectAttributes, |
|
670 |
contentRef: contentRef |
|
671 |
})); |
|
672 |
} |
9
|
673 |
|
16
|
674 |
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-italic.js |
|
675 |
|
|
676 |
|
|
677 |
/** |
|
678 |
* WordPress dependencies |
|
679 |
*/ |
|
680 |
|
18
|
681 |
const formatItalic = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { |
16
|
682 |
xmlns: "http://www.w3.org/2000/svg", |
|
683 |
viewBox: "0 0 24 24" |
18
|
684 |
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { |
16
|
685 |
d: "M12.5 5L10 19h1.9l2.5-14z" |
|
686 |
})); |
|
687 |
/* harmony default export */ var format_italic = (formatItalic); |
|
688 |
|
9
|
689 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/italic/index.js |
|
690 |
|
|
691 |
|
|
692 |
/** |
|
693 |
* WordPress dependencies |
|
694 |
*/ |
|
695 |
|
|
696 |
|
|
697 |
|
|
698 |
|
18
|
699 |
const italic_name = 'core/italic'; |
16
|
700 |
|
18
|
701 |
const italic_title = Object(external_wp_i18n_["__"])('Italic'); |
16
|
702 |
|
18
|
703 |
const italic = { |
9
|
704 |
name: italic_name, |
16
|
705 |
title: italic_title, |
9
|
706 |
tagName: 'em', |
|
707 |
className: null, |
16
|
708 |
|
18
|
709 |
edit({ |
|
710 |
isActive, |
|
711 |
value, |
|
712 |
onChange, |
|
713 |
onFocus |
|
714 |
}) { |
16
|
715 |
function onToggle() { |
18
|
716 |
onChange(Object(external_wp_richText_["toggleFormat"])(value, { |
9
|
717 |
type: italic_name |
|
718 |
})); |
16
|
719 |
} |
|
720 |
|
|
721 |
function onClick() { |
|
722 |
onToggle(); |
|
723 |
onFocus(); |
|
724 |
} |
9
|
725 |
|
18
|
726 |
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], { |
9
|
727 |
type: "primary", |
|
728 |
character: "i", |
|
729 |
onUse: onToggle |
18
|
730 |
}), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], { |
9
|
731 |
name: "italic", |
16
|
732 |
icon: format_italic, |
|
733 |
title: italic_title, |
|
734 |
onClick: onClick, |
9
|
735 |
isActive: isActive, |
|
736 |
shortcutType: "primary", |
|
737 |
shortcutCharacter: "i" |
18
|
738 |
}), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__unstableRichTextInputEvent"], { |
9
|
739 |
inputType: "formatItalic", |
|
740 |
onInput: onToggle |
|
741 |
})); |
|
742 |
} |
18
|
743 |
|
9
|
744 |
}; |
|
745 |
|
18
|
746 |
// EXTERNAL MODULE: external ["wp","url"] |
|
747 |
var external_wp_url_ = __webpack_require__("Mmq9"); |
16
|
748 |
|
18
|
749 |
// EXTERNAL MODULE: external ["wp","htmlEntities"] |
|
750 |
var external_wp_htmlEntities_ = __webpack_require__("rmEH"); |
16
|
751 |
|
|
752 |
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link-off.js |
18
|
753 |
var link_off = __webpack_require__("Mp0b"); |
16
|
754 |
|
|
755 |
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link.js |
18
|
756 |
var library_link = __webpack_require__("Bpkj"); |
16
|
757 |
|
18
|
758 |
// EXTERNAL MODULE: external ["wp","a11y"] |
|
759 |
var external_wp_a11y_ = __webpack_require__("gdqT"); |
16
|
760 |
|
18
|
761 |
// EXTERNAL MODULE: external "lodash" |
|
762 |
var external_lodash_ = __webpack_require__("YLtl"); |
9
|
763 |
|
|
764 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/utils.js |
|
765 |
/** |
|
766 |
* External dependencies |
|
767 |
*/ |
|
768 |
|
|
769 |
/** |
|
770 |
* WordPress dependencies |
|
771 |
*/ |
|
772 |
|
|
773 |
|
|
774 |
/** |
|
775 |
* Check for issues with the provided href. |
|
776 |
* |
|
777 |
* @param {string} href The href. |
|
778 |
* |
|
779 |
* @return {boolean} Is the href invalid? |
|
780 |
*/ |
|
781 |
|
|
782 |
function isValidHref(href) { |
|
783 |
if (!href) { |
|
784 |
return false; |
|
785 |
} |
|
786 |
|
18
|
787 |
const trimmedHref = href.trim(); |
9
|
788 |
|
|
789 |
if (!trimmedHref) { |
|
790 |
return false; |
|
791 |
} // Does the href start with something that looks like a URL protocol? |
|
792 |
|
|
793 |
|
|
794 |
if (/^\S+:/.test(trimmedHref)) { |
18
|
795 |
const protocol = Object(external_wp_url_["getProtocol"])(trimmedHref); |
9
|
796 |
|
18
|
797 |
if (!Object(external_wp_url_["isValidProtocol"])(protocol)) { |
9
|
798 |
return false; |
|
799 |
} // Add some extra checks for http(s) URIs, since these are the most common use-case. |
|
800 |
// This ensures URIs with an http protocol have exactly two forward slashes following the protocol. |
|
801 |
|
|
802 |
|
18
|
803 |
if (Object(external_lodash_["startsWith"])(protocol, 'http') && !/^https?:\/\/[^\/\s]/i.test(trimmedHref)) { |
9
|
804 |
return false; |
|
805 |
} |
|
806 |
|
18
|
807 |
const authority = Object(external_wp_url_["getAuthority"])(trimmedHref); |
9
|
808 |
|
18
|
809 |
if (!Object(external_wp_url_["isValidAuthority"])(authority)) { |
9
|
810 |
return false; |
|
811 |
} |
|
812 |
|
18
|
813 |
const path = Object(external_wp_url_["getPath"])(trimmedHref); |
9
|
814 |
|
18
|
815 |
if (path && !Object(external_wp_url_["isValidPath"])(path)) { |
9
|
816 |
return false; |
|
817 |
} |
|
818 |
|
18
|
819 |
const queryString = Object(external_wp_url_["getQueryString"])(trimmedHref); |
9
|
820 |
|
18
|
821 |
if (queryString && !Object(external_wp_url_["isValidQueryString"])(queryString)) { |
9
|
822 |
return false; |
|
823 |
} |
|
824 |
|
18
|
825 |
const fragment = Object(external_wp_url_["getFragment"])(trimmedHref); |
9
|
826 |
|
18
|
827 |
if (fragment && !Object(external_wp_url_["isValidFragment"])(fragment)) { |
9
|
828 |
return false; |
|
829 |
} |
|
830 |
} // Validate anchor links. |
|
831 |
|
|
832 |
|
18
|
833 |
if (Object(external_lodash_["startsWith"])(trimmedHref, '#') && !Object(external_wp_url_["isValidFragment"])(trimmedHref)) { |
9
|
834 |
return false; |
|
835 |
} |
|
836 |
|
|
837 |
return true; |
|
838 |
} |
|
839 |
/** |
|
840 |
* Generates the format object that will be applied to the link text. |
|
841 |
* |
16
|
842 |
* @param {Object} options |
|
843 |
* @param {string} options.url The href of the link. |
|
844 |
* @param {string} options.type The type of the link. |
|
845 |
* @param {string} options.id The ID of the link. |
|
846 |
* @param {boolean} options.opensInNewWindow Whether this link will open in a new window. |
9
|
847 |
* |
|
848 |
* @return {Object} The final format object. |
|
849 |
*/ |
|
850 |
|
18
|
851 |
function createLinkFormat({ |
|
852 |
url, |
|
853 |
type, |
|
854 |
id, |
|
855 |
opensInNewWindow |
|
856 |
}) { |
|
857 |
const format = { |
9
|
858 |
type: 'core/link', |
|
859 |
attributes: { |
18
|
860 |
url |
9
|
861 |
} |
|
862 |
}; |
16
|
863 |
if (type) format.attributes.type = type; |
|
864 |
if (id) format.attributes.id = id; |
9
|
865 |
|
|
866 |
if (opensInNewWindow) { |
|
867 |
format.attributes.target = '_blank'; |
|
868 |
format.attributes.rel = 'noreferrer noopener'; |
|
869 |
} |
|
870 |
|
|
871 |
return format; |
|
872 |
} |
|
873 |
|
|
874 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/inline.js |
|
875 |
|
|
876 |
|
|
877 |
/** |
|
878 |
* WordPress dependencies |
|
879 |
*/ |
|
880 |
|
|
881 |
|
|
882 |
|
|
883 |
|
|
884 |
|
|
885 |
|
|
886 |
/** |
|
887 |
* Internal dependencies |
|
888 |
*/ |
|
889 |
|
|
890 |
|
|
891 |
|
16
|
892 |
|
18
|
893 |
function InlineLinkUI({ |
|
894 |
isActive, |
|
895 |
activeAttributes, |
|
896 |
addingLink, |
|
897 |
value, |
|
898 |
onChange, |
|
899 |
speak, |
|
900 |
stopAddingLink, |
|
901 |
contentRef |
|
902 |
}) { |
16
|
903 |
/** |
|
904 |
* Pending settings to be applied to the next link. When inserting a new |
|
905 |
* link, toggle values cannot be applied immediately, because there is not |
|
906 |
* yet a link for them to apply to. Thus, they are maintained in a state |
|
907 |
* value until the time that the link can be inserted or edited. |
|
908 |
* |
|
909 |
* @type {[Object|undefined,Function]} |
|
910 |
*/ |
18
|
911 |
const [nextLinkValue, setNextLinkValue] = Object(external_wp_element_["useState"])(); |
|
912 |
const linkValue = { |
16
|
913 |
url: activeAttributes.url, |
|
914 |
type: activeAttributes.type, |
|
915 |
id: activeAttributes.id, |
18
|
916 |
opensInNewTab: activeAttributes.target === '_blank', |
|
917 |
...nextLinkValue |
|
918 |
}; |
16
|
919 |
|
|
920 |
function onChangeLink(nextValue) { |
|
921 |
// Merge with values from state, both for the purpose of assigning the |
|
922 |
// next state value, and for use in constructing the new link format if |
|
923 |
// the link is ready to be applied. |
18
|
924 |
nextValue = { ...nextLinkValue, |
|
925 |
...nextValue |
|
926 |
}; // LinkControl calls `onChange` immediately upon the toggling a setting. |
16
|
927 |
|
18
|
928 |
const didToggleSetting = linkValue.opensInNewTab !== nextValue.opensInNewTab && linkValue.url === nextValue.url; // If change handler was called as a result of a settings change during |
16
|
929 |
// link insertion, it must be held in state until the link is ready to |
|
930 |
// be applied. |
|
931 |
|
18
|
932 |
const didToggleSettingForNewLink = didToggleSetting && nextValue.url === undefined; // If link will be assigned, the state value can be considered flushed. |
16
|
933 |
// Otherwise, persist the pending changes. |
|
934 |
|
|
935 |
setNextLinkValue(didToggleSettingForNewLink ? nextValue : undefined); |
|
936 |
|
|
937 |
if (didToggleSettingForNewLink) { |
|
938 |
return; |
9
|
939 |
} |
16
|
940 |
|
18
|
941 |
const newUrl = Object(external_wp_url_["prependHTTP"])(nextValue.url); |
|
942 |
const format = createLinkFormat({ |
16
|
943 |
url: newUrl, |
|
944 |
type: nextValue.type, |
|
945 |
id: nextValue.id !== undefined && nextValue.id !== null ? String(nextValue.id) : undefined, |
|
946 |
opensInNewWindow: nextValue.opensInNewTab |
|
947 |
}); |
|
948 |
|
18
|
949 |
if (Object(external_wp_richText_["isCollapsed"])(value) && !isActive) { |
|
950 |
const newText = nextValue.title || newUrl; |
|
951 |
const toInsert = Object(external_wp_richText_["applyFormat"])(Object(external_wp_richText_["create"])({ |
16
|
952 |
text: newText |
|
953 |
}), format, 0, newText.length); |
18
|
954 |
onChange(Object(external_wp_richText_["insert"])(value, toInsert)); |
16
|
955 |
} else { |
18
|
956 |
const newValue = Object(external_wp_richText_["applyFormat"])(value, format); |
16
|
957 |
newValue.start = newValue.end; |
|
958 |
newValue.activeFormats = []; |
|
959 |
onChange(newValue); |
|
960 |
} // Focus should only be shifted back to the formatted segment when the |
|
961 |
// URL is submitted. |
|
962 |
|
|
963 |
|
|
964 |
if (!didToggleSetting) { |
|
965 |
stopAddingLink(); |
9
|
966 |
} |
16
|
967 |
|
|
968 |
if (!isValidHref(newUrl)) { |
18
|
969 |
speak(Object(external_wp_i18n_["__"])('Warning: the link has been inserted but may have errors. Please test it.'), 'assertive'); |
16
|
970 |
} else if (isActive) { |
18
|
971 |
speak(Object(external_wp_i18n_["__"])('Link edited.'), 'assertive'); |
16
|
972 |
} else { |
18
|
973 |
speak(Object(external_wp_i18n_["__"])('Link inserted.'), 'assertive'); |
9
|
974 |
} |
16
|
975 |
} |
|
976 |
|
18
|
977 |
const anchorRef = Object(external_wp_richText_["useAnchorRef"])({ |
|
978 |
ref: contentRef, |
|
979 |
value, |
|
980 |
settings: link_link |
|
981 |
}); // The focusOnMount prop shouldn't evolve during render of a Popover |
|
982 |
// otherwise it causes a render of the content. |
|
983 |
|
|
984 |
const focusOnMount = Object(external_wp_element_["useRef"])(addingLink ? 'firstElement' : false); |
|
985 |
return Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], { |
16
|
986 |
anchorRef: anchorRef, |
18
|
987 |
focusOnMount: focusOnMount.current, |
16
|
988 |
onClose: stopAddingLink, |
|
989 |
position: "bottom center" |
18
|
990 |
}, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalLinkControl"], { |
16
|
991 |
value: linkValue, |
|
992 |
onChange: onChangeLink, |
|
993 |
forceIsEditingLink: addingLink |
|
994 |
})); |
|
995 |
} |
|
996 |
|
18
|
997 |
/* harmony default export */ var inline = (Object(external_wp_components_["withSpokenMessages"])(InlineLinkUI)); |
9
|
998 |
|
|
999 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/index.js |
|
1000 |
|
|
1001 |
|
|
1002 |
/** |
|
1003 |
* WordPress dependencies |
|
1004 |
*/ |
|
1005 |
|
|
1006 |
|
|
1007 |
|
|
1008 |
|
|
1009 |
|
|
1010 |
|
16
|
1011 |
|
|
1012 |
|
9
|
1013 |
/** |
|
1014 |
* Internal dependencies |
|
1015 |
*/ |
|
1016 |
|
|
1017 |
|
18
|
1018 |
const link_name = 'core/link'; |
|
1019 |
|
|
1020 |
const link_title = Object(external_wp_i18n_["__"])('Link'); |
|
1021 |
|
|
1022 |
function link_Edit({ |
|
1023 |
isActive, |
|
1024 |
activeAttributes, |
|
1025 |
value, |
|
1026 |
onChange, |
|
1027 |
onFocus, |
|
1028 |
contentRef |
|
1029 |
}) { |
|
1030 |
const [addingLink, setAddingLink] = Object(external_wp_element_["useState"])(false); |
|
1031 |
|
|
1032 |
function addLink() { |
|
1033 |
const text = Object(external_wp_richText_["getTextContent"])(Object(external_wp_richText_["slice"])(value)); |
|
1034 |
|
|
1035 |
if (text && Object(external_wp_url_["isURL"])(text)) { |
|
1036 |
onChange(Object(external_wp_richText_["applyFormat"])(value, { |
|
1037 |
type: link_name, |
|
1038 |
attributes: { |
|
1039 |
url: text |
|
1040 |
} |
|
1041 |
})); |
|
1042 |
} else if (text && Object(external_wp_url_["isEmail"])(text)) { |
|
1043 |
onChange(Object(external_wp_richText_["applyFormat"])(value, { |
|
1044 |
type: link_name, |
|
1045 |
attributes: { |
|
1046 |
url: `mailto:${text}` |
|
1047 |
} |
|
1048 |
})); |
|
1049 |
} else { |
|
1050 |
setAddingLink(true); |
|
1051 |
} |
|
1052 |
} |
|
1053 |
|
|
1054 |
function stopAddingLink() { |
|
1055 |
setAddingLink(false); |
|
1056 |
onFocus(); |
|
1057 |
} |
16
|
1058 |
|
18
|
1059 |
function onRemoveFormat() { |
|
1060 |
onChange(Object(external_wp_richText_["removeFormat"])(value, link_name)); |
|
1061 |
Object(external_wp_a11y_["speak"])(Object(external_wp_i18n_["__"])('Link removed.'), 'assertive'); |
|
1062 |
} |
16
|
1063 |
|
18
|
1064 |
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], { |
|
1065 |
type: "primary", |
|
1066 |
character: "k", |
|
1067 |
onUse: addLink |
|
1068 |
}), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], { |
|
1069 |
type: "primaryShift", |
|
1070 |
character: "k", |
|
1071 |
onUse: onRemoveFormat |
|
1072 |
}), isActive && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], { |
|
1073 |
name: "link", |
|
1074 |
icon: link_off["a" /* default */], |
|
1075 |
title: Object(external_wp_i18n_["__"])('Unlink'), |
|
1076 |
onClick: onRemoveFormat, |
|
1077 |
isActive: isActive, |
|
1078 |
shortcutType: "primaryShift", |
|
1079 |
shortcutCharacter: "k" |
|
1080 |
}), !isActive && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], { |
|
1081 |
name: "link", |
|
1082 |
icon: library_link["a" /* default */], |
|
1083 |
title: link_title, |
|
1084 |
onClick: addLink, |
|
1085 |
isActive: isActive, |
|
1086 |
shortcutType: "primary", |
|
1087 |
shortcutCharacter: "k" |
|
1088 |
}), (addingLink || isActive) && Object(external_wp_element_["createElement"])(inline, { |
|
1089 |
addingLink: addingLink, |
|
1090 |
stopAddingLink: stopAddingLink, |
|
1091 |
isActive: isActive, |
|
1092 |
activeAttributes: activeAttributes, |
|
1093 |
value: value, |
|
1094 |
onChange: onChange, |
|
1095 |
contentRef: contentRef |
|
1096 |
})); |
|
1097 |
} |
|
1098 |
|
|
1099 |
const link_link = { |
9
|
1100 |
name: link_name, |
16
|
1101 |
title: link_title, |
9
|
1102 |
tagName: 'a', |
|
1103 |
className: null, |
|
1104 |
attributes: { |
|
1105 |
url: 'href', |
16
|
1106 |
type: 'data-type', |
|
1107 |
id: 'data-id', |
9
|
1108 |
target: 'target' |
|
1109 |
}, |
16
|
1110 |
|
18
|
1111 |
__unstablePasteRule(value, { |
|
1112 |
html, |
|
1113 |
plainText |
|
1114 |
}) { |
|
1115 |
if (Object(external_wp_richText_["isCollapsed"])(value)) { |
16
|
1116 |
return value; |
|
1117 |
} |
|
1118 |
|
18
|
1119 |
const pastedText = (html || plainText).replace(/<[^>]+>/g, '').trim(); // A URL was pasted, turn the selection into a link |
16
|
1120 |
|
18
|
1121 |
if (!Object(external_wp_url_["isURL"])(pastedText)) { |
16
|
1122 |
return value; |
|
1123 |
} // Allows us to ask for this information when we get a report. |
|
1124 |
|
|
1125 |
|
|
1126 |
window.console.log('Created link:\n\n', pastedText); |
18
|
1127 |
return Object(external_wp_richText_["applyFormat"])(value, { |
16
|
1128 |
type: link_name, |
|
1129 |
attributes: { |
18
|
1130 |
url: Object(external_wp_htmlEntities_["decodeEntities"])(pastedText) |
16
|
1131 |
} |
|
1132 |
}); |
|
1133 |
}, |
9
|
1134 |
|
18
|
1135 |
edit: link_Edit |
9
|
1136 |
}; |
|
1137 |
|
18
|
1138 |
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/format-strikethrough.js |
|
1139 |
var format_strikethrough = __webpack_require__("Crq9"); |
16
|
1140 |
|
9
|
1141 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/strikethrough/index.js |
|
1142 |
|
|
1143 |
|
|
1144 |
/** |
|
1145 |
* WordPress dependencies |
|
1146 |
*/ |
|
1147 |
|
|
1148 |
|
|
1149 |
|
|
1150 |
|
18
|
1151 |
const strikethrough_name = 'core/strikethrough'; |
16
|
1152 |
|
18
|
1153 |
const strikethrough_title = Object(external_wp_i18n_["__"])('Strikethrough'); |
16
|
1154 |
|
18
|
1155 |
const strikethrough = { |
9
|
1156 |
name: strikethrough_name, |
16
|
1157 |
title: strikethrough_title, |
9
|
1158 |
tagName: 's', |
|
1159 |
className: null, |
16
|
1160 |
|
18
|
1161 |
edit({ |
|
1162 |
isActive, |
|
1163 |
value, |
|
1164 |
onChange, |
|
1165 |
onFocus |
|
1166 |
}) { |
16
|
1167 |
function onClick() { |
18
|
1168 |
onChange(Object(external_wp_richText_["toggleFormat"])(value, { |
9
|
1169 |
type: strikethrough_name |
|
1170 |
})); |
16
|
1171 |
onFocus(); |
|
1172 |
} |
|
1173 |
|
18
|
1174 |
return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], { |
|
1175 |
icon: format_strikethrough["a" /* default */], |
16
|
1176 |
title: strikethrough_title, |
|
1177 |
onClick: onClick, |
|
1178 |
isActive: isActive |
|
1179 |
}); |
9
|
1180 |
} |
18
|
1181 |
|
9
|
1182 |
}; |
|
1183 |
|
|
1184 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/underline/index.js |
|
1185 |
|
|
1186 |
|
|
1187 |
/** |
|
1188 |
* WordPress dependencies |
|
1189 |
*/ |
|
1190 |
|
|
1191 |
|
|
1192 |
|
18
|
1193 |
const underline_name = 'core/underline'; |
|
1194 |
const underline = { |
9
|
1195 |
name: underline_name, |
18
|
1196 |
title: Object(external_wp_i18n_["__"])('Underline'), |
9
|
1197 |
tagName: 'span', |
|
1198 |
className: null, |
|
1199 |
attributes: { |
|
1200 |
style: 'style' |
|
1201 |
}, |
|
1202 |
|
18
|
1203 |
edit({ |
|
1204 |
value, |
|
1205 |
onChange |
|
1206 |
}) { |
|
1207 |
const onToggle = () => { |
|
1208 |
onChange(Object(external_wp_richText_["toggleFormat"])(value, { |
9
|
1209 |
type: underline_name, |
|
1210 |
attributes: { |
|
1211 |
style: 'text-decoration: underline;' |
|
1212 |
} |
|
1213 |
})); |
|
1214 |
}; |
|
1215 |
|
18
|
1216 |
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextShortcut"], { |
9
|
1217 |
type: "primary", |
|
1218 |
character: "u", |
|
1219 |
onUse: onToggle |
18
|
1220 |
}), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__unstableRichTextInputEvent"], { |
9
|
1221 |
inputType: "formatUnderline", |
|
1222 |
onInput: onToggle |
|
1223 |
})); |
|
1224 |
} |
18
|
1225 |
|
9
|
1226 |
}; |
|
1227 |
|
16
|
1228 |
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js |
18
|
1229 |
var icon = __webpack_require__("iClF"); |
16
|
1230 |
|
|
1231 |
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/text-color.js |
18
|
1232 |
var text_color = __webpack_require__("uGfJ"); |
16
|
1233 |
|
18
|
1234 |
// EXTERNAL MODULE: external ["wp","data"] |
|
1235 |
var external_wp_data_ = __webpack_require__("1ZqX"); |
16
|
1236 |
|
|
1237 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/text-color/inline.js |
|
1238 |
|
|
1239 |
|
18
|
1240 |
/** |
|
1241 |
* External dependencies |
|
1242 |
*/ |
|
1243 |
|
|
1244 |
/** |
|
1245 |
* WordPress dependencies |
|
1246 |
*/ |
|
1247 |
|
|
1248 |
|
|
1249 |
|
|
1250 |
|
|
1251 |
|
|
1252 |
/** |
|
1253 |
* Internal dependencies |
|
1254 |
*/ |
|
1255 |
|
|
1256 |
|
|
1257 |
function getActiveColor(formatName, formatValue, colors) { |
|
1258 |
const activeColorFormat = Object(external_wp_richText_["getActiveFormat"])(formatValue, formatName); |
|
1259 |
|
|
1260 |
if (!activeColorFormat) { |
|
1261 |
return; |
|
1262 |
} |
|
1263 |
|
|
1264 |
const styleColor = activeColorFormat.attributes.style; |
|
1265 |
|
|
1266 |
if (styleColor) { |
|
1267 |
return styleColor.replace(new RegExp(`^color:\\s*`), ''); |
|
1268 |
} |
|
1269 |
|
|
1270 |
const currentClass = activeColorFormat.attributes.class; |
|
1271 |
|
|
1272 |
if (currentClass) { |
|
1273 |
const colorSlug = currentClass.replace(/.*has-([^\s]*)-color.*/, '$1'); |
|
1274 |
return Object(external_wp_blockEditor_["getColorObjectByAttributeValues"])(colors, colorSlug).color; |
|
1275 |
} |
|
1276 |
} |
|
1277 |
|
|
1278 |
const ColorPicker = ({ |
|
1279 |
name, |
|
1280 |
value, |
|
1281 |
onChange |
|
1282 |
}) => { |
|
1283 |
const colors = Object(external_wp_data_["useSelect"])(select => { |
|
1284 |
const { |
|
1285 |
getSettings |
|
1286 |
} = select(external_wp_blockEditor_["store"]); |
|
1287 |
return Object(external_lodash_["get"])(getSettings(), ['colors'], []); |
|
1288 |
}); |
|
1289 |
const onColorChange = Object(external_wp_element_["useCallback"])(color => { |
|
1290 |
if (color) { |
|
1291 |
const colorObject = Object(external_wp_blockEditor_["getColorObjectByColorValue"])(colors, color); |
|
1292 |
onChange(Object(external_wp_richText_["applyFormat"])(value, { |
|
1293 |
type: name, |
|
1294 |
attributes: colorObject ? { |
|
1295 |
class: Object(external_wp_blockEditor_["getColorClassName"])('color', colorObject.slug) |
|
1296 |
} : { |
|
1297 |
style: `color:${color}` |
|
1298 |
} |
|
1299 |
})); |
|
1300 |
} else { |
|
1301 |
onChange(Object(external_wp_richText_["removeFormat"])(value, name)); |
|
1302 |
} |
|
1303 |
}, [colors, onChange]); |
|
1304 |
const activeColor = Object(external_wp_element_["useMemo"])(() => getActiveColor(name, value, colors), [name, value, colors]); |
|
1305 |
return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["ColorPalette"], { |
|
1306 |
value: activeColor, |
|
1307 |
onChange: onColorChange |
|
1308 |
}); |
|
1309 |
}; |
|
1310 |
|
|
1311 |
function InlineColorUI({ |
|
1312 |
name, |
|
1313 |
value, |
|
1314 |
onChange, |
|
1315 |
onClose, |
|
1316 |
contentRef |
|
1317 |
}) { |
|
1318 |
const anchorRef = Object(external_wp_richText_["useAnchorRef"])({ |
|
1319 |
ref: contentRef, |
|
1320 |
value, |
|
1321 |
settings: textColor |
|
1322 |
}); |
|
1323 |
return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["URLPopover"], { |
|
1324 |
value: value, |
|
1325 |
onClose: onClose, |
|
1326 |
className: "components-inline-color-popover", |
|
1327 |
anchorRef: anchorRef |
|
1328 |
}, Object(external_wp_element_["createElement"])(ColorPicker, { |
|
1329 |
name: name, |
|
1330 |
value: value, |
|
1331 |
onChange: onChange |
|
1332 |
})); |
|
1333 |
} |
|
1334 |
|
|
1335 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/text-color/index.js |
16
|
1336 |
|
|
1337 |
|
|
1338 |
/** |
|
1339 |
* External dependencies |
|
1340 |
*/ |
|
1341 |
|
|
1342 |
/** |
|
1343 |
* WordPress dependencies |
|
1344 |
*/ |
|
1345 |
|
|
1346 |
|
|
1347 |
|
|
1348 |
|
|
1349 |
|
|
1350 |
|
|
1351 |
/** |
|
1352 |
* Internal dependencies |
|
1353 |
*/ |
|
1354 |
|
|
1355 |
|
18
|
1356 |
const text_color_name = 'core/text-color'; |
16
|
1357 |
|
18
|
1358 |
const text_color_title = Object(external_wp_i18n_["__"])('Text color'); |
16
|
1359 |
|
18
|
1360 |
const EMPTY_ARRAY = []; |
16
|
1361 |
|
18
|
1362 |
function TextColorEdit({ |
|
1363 |
value, |
|
1364 |
onChange, |
|
1365 |
isActive, |
|
1366 |
activeAttributes, |
|
1367 |
contentRef |
|
1368 |
}) { |
|
1369 |
const allowCustomControl = Object(external_wp_blockEditor_["useSetting"])('color.custom'); |
|
1370 |
const colors = Object(external_wp_blockEditor_["useSetting"])('color.palette') || EMPTY_ARRAY; |
|
1371 |
const [isAddingColor, setIsAddingColor] = Object(external_wp_element_["useState"])(false); |
|
1372 |
const enableIsAddingColor = Object(external_wp_element_["useCallback"])(() => setIsAddingColor(true), [setIsAddingColor]); |
|
1373 |
const disableIsAddingColor = Object(external_wp_element_["useCallback"])(() => setIsAddingColor(false), [setIsAddingColor]); |
|
1374 |
const colorIndicatorStyle = Object(external_wp_element_["useMemo"])(() => { |
|
1375 |
const activeColor = getActiveColor(text_color_name, value, colors); |
16
|
1376 |
|
|
1377 |
if (!activeColor) { |
|
1378 |
return undefined; |
|
1379 |
} |
|
1380 |
|
|
1381 |
return { |
|
1382 |
backgroundColor: activeColor |
|
1383 |
}; |
|
1384 |
}, [value, colors]); |
18
|
1385 |
const hasColorsToChoose = !Object(external_lodash_["isEmpty"])(colors) || !allowCustomControl; |
16
|
1386 |
|
|
1387 |
if (!hasColorsToChoose && !isActive) { |
|
1388 |
return null; |
|
1389 |
} |
|
1390 |
|
18
|
1391 |
return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], { |
16
|
1392 |
key: isActive ? 'text-color' : 'text-color-not-active', |
|
1393 |
className: "format-library-text-color-button", |
|
1394 |
name: isActive ? 'text-color' : undefined, |
18
|
1395 |
icon: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(icon["a" /* default */], { |
16
|
1396 |
icon: text_color["a" /* default */] |
18
|
1397 |
}), isActive && Object(external_wp_element_["createElement"])("span", { |
16
|
1398 |
className: "format-library-text-color-button__indicator", |
|
1399 |
style: colorIndicatorStyle |
|
1400 |
})), |
|
1401 |
title: text_color_title // If has no colors to choose but a color is active remove the color onClick |
|
1402 |
, |
18
|
1403 |
onClick: hasColorsToChoose ? enableIsAddingColor : () => onChange(Object(external_wp_richText_["removeFormat"])(value, text_color_name)) |
|
1404 |
}), isAddingColor && Object(external_wp_element_["createElement"])(InlineColorUI, { |
16
|
1405 |
name: text_color_name, |
|
1406 |
onClose: disableIsAddingColor, |
|
1407 |
activeAttributes: activeAttributes, |
|
1408 |
value: value, |
18
|
1409 |
onChange: onChange, |
|
1410 |
contentRef: contentRef |
16
|
1411 |
})); |
|
1412 |
} |
|
1413 |
|
18
|
1414 |
const textColor = { |
16
|
1415 |
name: text_color_name, |
|
1416 |
title: text_color_title, |
|
1417 |
tagName: 'span', |
|
1418 |
className: 'has-inline-color', |
|
1419 |
attributes: { |
|
1420 |
style: 'style', |
|
1421 |
class: 'class' |
|
1422 |
}, |
|
1423 |
edit: TextColorEdit |
|
1424 |
}; |
|
1425 |
|
|
1426 |
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/subscript.js |
|
1427 |
|
|
1428 |
|
|
1429 |
/** |
|
1430 |
* WordPress dependencies |
|
1431 |
*/ |
|
1432 |
|
18
|
1433 |
const subscript = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { |
16
|
1434 |
xmlns: "http://www.w3.org/2000/svg", |
|
1435 |
viewBox: "0 0 24 24" |
18
|
1436 |
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { |
16
|
1437 |
d: "M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z" |
|
1438 |
})); |
|
1439 |
/* harmony default export */ var library_subscript = (subscript); |
|
1440 |
|
|
1441 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/subscript/index.js |
|
1442 |
|
|
1443 |
|
|
1444 |
/** |
|
1445 |
* WordPress dependencies |
|
1446 |
*/ |
|
1447 |
|
|
1448 |
|
|
1449 |
|
|
1450 |
|
18
|
1451 |
const subscript_name = 'core/subscript'; |
16
|
1452 |
|
18
|
1453 |
const subscript_title = Object(external_wp_i18n_["__"])('Subscript'); |
16
|
1454 |
|
18
|
1455 |
const subscript_subscript = { |
16
|
1456 |
name: subscript_name, |
|
1457 |
title: subscript_title, |
|
1458 |
tagName: 'sub', |
|
1459 |
className: null, |
|
1460 |
|
18
|
1461 |
edit({ |
|
1462 |
isActive, |
|
1463 |
value, |
|
1464 |
onChange, |
|
1465 |
onFocus |
|
1466 |
}) { |
16
|
1467 |
function onToggle() { |
18
|
1468 |
onChange(Object(external_wp_richText_["toggleFormat"])(value, { |
16
|
1469 |
type: subscript_name |
|
1470 |
})); |
|
1471 |
} |
|
1472 |
|
|
1473 |
function onClick() { |
|
1474 |
onToggle(); |
|
1475 |
onFocus(); |
|
1476 |
} |
|
1477 |
|
18
|
1478 |
return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], { |
16
|
1479 |
icon: library_subscript, |
|
1480 |
title: subscript_title, |
|
1481 |
onClick: onClick, |
|
1482 |
isActive: isActive |
|
1483 |
}); |
|
1484 |
} |
18
|
1485 |
|
16
|
1486 |
}; |
|
1487 |
|
|
1488 |
// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/superscript.js |
|
1489 |
|
|
1490 |
|
|
1491 |
/** |
|
1492 |
* WordPress dependencies |
|
1493 |
*/ |
|
1494 |
|
18
|
1495 |
const superscript = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { |
16
|
1496 |
xmlns: "http://www.w3.org/2000/svg", |
|
1497 |
viewBox: "0 0 24 24" |
18
|
1498 |
}, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { |
16
|
1499 |
d: "M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z" |
|
1500 |
})); |
|
1501 |
/* harmony default export */ var library_superscript = (superscript); |
|
1502 |
|
|
1503 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/superscript/index.js |
|
1504 |
|
|
1505 |
|
|
1506 |
/** |
|
1507 |
* WordPress dependencies |
|
1508 |
*/ |
|
1509 |
|
|
1510 |
|
|
1511 |
|
|
1512 |
|
18
|
1513 |
const superscript_name = 'core/superscript'; |
16
|
1514 |
|
18
|
1515 |
const superscript_title = Object(external_wp_i18n_["__"])('Superscript'); |
16
|
1516 |
|
18
|
1517 |
const superscript_superscript = { |
16
|
1518 |
name: superscript_name, |
|
1519 |
title: superscript_title, |
|
1520 |
tagName: 'sup', |
|
1521 |
className: null, |
|
1522 |
|
18
|
1523 |
edit({ |
|
1524 |
isActive, |
|
1525 |
value, |
|
1526 |
onChange, |
|
1527 |
onFocus |
|
1528 |
}) { |
16
|
1529 |
function onToggle() { |
18
|
1530 |
onChange(Object(external_wp_richText_["toggleFormat"])(value, { |
16
|
1531 |
type: superscript_name |
|
1532 |
})); |
|
1533 |
} |
|
1534 |
|
|
1535 |
function onClick() { |
|
1536 |
onToggle(); |
|
1537 |
onFocus(); |
|
1538 |
} |
|
1539 |
|
18
|
1540 |
return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], { |
16
|
1541 |
icon: library_superscript, |
|
1542 |
title: superscript_title, |
|
1543 |
onClick: onClick, |
|
1544 |
isActive: isActive |
|
1545 |
}); |
|
1546 |
} |
18
|
1547 |
|
|
1548 |
}; |
|
1549 |
|
|
1550 |
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/button.js |
|
1551 |
var library_button = __webpack_require__("oMoS"); |
|
1552 |
|
|
1553 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/keyboard/index.js |
|
1554 |
|
|
1555 |
|
|
1556 |
/** |
|
1557 |
* WordPress dependencies |
|
1558 |
*/ |
|
1559 |
|
|
1560 |
|
|
1561 |
|
|
1562 |
|
|
1563 |
const keyboard_name = 'core/keyboard'; |
|
1564 |
|
|
1565 |
const keyboard_title = Object(external_wp_i18n_["__"])('Keyboard input'); |
|
1566 |
|
|
1567 |
const keyboard = { |
|
1568 |
name: keyboard_name, |
|
1569 |
title: keyboard_title, |
|
1570 |
tagName: 'kbd', |
|
1571 |
className: null, |
|
1572 |
|
|
1573 |
edit({ |
|
1574 |
isActive, |
|
1575 |
value, |
|
1576 |
onChange, |
|
1577 |
onFocus |
|
1578 |
}) { |
|
1579 |
function onToggle() { |
|
1580 |
onChange(Object(external_wp_richText_["toggleFormat"])(value, { |
|
1581 |
type: keyboard_name |
|
1582 |
})); |
|
1583 |
} |
|
1584 |
|
|
1585 |
function onClick() { |
|
1586 |
onToggle(); |
|
1587 |
onFocus(); |
|
1588 |
} |
|
1589 |
|
|
1590 |
return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichTextToolbarButton"], { |
|
1591 |
icon: library_button["a" /* default */], |
|
1592 |
title: keyboard_title, |
|
1593 |
onClick: onClick, |
|
1594 |
isActive: isActive |
|
1595 |
}); |
|
1596 |
} |
|
1597 |
|
16
|
1598 |
}; |
|
1599 |
|
9
|
1600 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/default-formats.js |
|
1601 |
/** |
|
1602 |
* Internal dependencies |
|
1603 |
*/ |
|
1604 |
|
|
1605 |
|
|
1606 |
|
|
1607 |
|
|
1608 |
|
|
1609 |
|
|
1610 |
|
16
|
1611 |
|
|
1612 |
|
|
1613 |
|
18
|
1614 |
|
|
1615 |
/* harmony default export */ var default_formats = ([bold, code_code, image_image, italic, link_link, strikethrough, underline, textColor, subscript_subscript, superscript_superscript, keyboard]); |
9
|
1616 |
|
|
1617 |
// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/index.js |
|
1618 |
/** |
|
1619 |
* WordPress dependencies |
|
1620 |
*/ |
|
1621 |
|
|
1622 |
/** |
|
1623 |
* Internal dependencies |
|
1624 |
*/ |
|
1625 |
|
|
1626 |
|
18
|
1627 |
default_formats.forEach(({ |
|
1628 |
name, |
|
1629 |
...settings |
|
1630 |
}) => Object(external_wp_richText_["registerFormatType"])(name, settings)); |
9
|
1631 |
|
|
1632 |
|
|
1633 |
/***/ }), |
|
1634 |
|
18
|
1635 |
/***/ "tI+e": |
9
|
1636 |
/***/ (function(module, exports) { |
|
1637 |
|
18
|
1638 |
(function() { module.exports = window["wp"]["components"]; }()); |
9
|
1639 |
|
|
1640 |
/***/ }), |
|
1641 |
|
18
|
1642 |
/***/ "uGfJ": |
9
|
1643 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
1644 |
|
|
1645 |
"use strict"; |
18
|
1646 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); |
|
1647 |
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); |
|
1648 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); |
|
1649 |
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); |
|
1650 |
|
16
|
1651 |
|
18
|
1652 |
/** |
|
1653 |
* WordPress dependencies |
|
1654 |
*/ |
16
|
1655 |
|
18
|
1656 |
const textColor = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { |
|
1657 |
xmlns: "http://www.w3.org/2000/svg", |
|
1658 |
viewBox: "0 0 24 24" |
|
1659 |
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { |
|
1660 |
d: "M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z" |
|
1661 |
})); |
|
1662 |
/* harmony default export */ __webpack_exports__["a"] = (textColor); |
16
|
1663 |
|
9
|
1664 |
|
|
1665 |
/***/ }) |
|
1666 |
|
|
1667 |
/******/ }); |