Nenhuma Descrição

format-library.js 56KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820
  1. /******/ (function() { // webpackBootstrap
  2. /******/ "use strict";
  3. /******/ // The require scope
  4. /******/ var __webpack_require__ = {};
  5. /******/
  6. /************************************************************************/
  7. /******/ /* webpack/runtime/make namespace object */
  8. /******/ !function() {
  9. /******/ // define __esModule on exports
  10. /******/ __webpack_require__.r = function(exports) {
  11. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  12. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  13. /******/ }
  14. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  15. /******/ };
  16. /******/ }();
  17. /******/
  18. /************************************************************************/
  19. var __webpack_exports__ = {};
  20. // ESM COMPAT FLAG
  21. __webpack_require__.r(__webpack_exports__);
  22. ;// CONCATENATED MODULE: external ["wp","richText"]
  23. var external_wp_richText_namespaceObject = window["wp"]["richText"];
  24. ;// CONCATENATED MODULE: external ["wp","element"]
  25. var external_wp_element_namespaceObject = window["wp"]["element"];
  26. ;// CONCATENATED MODULE: external ["wp","i18n"]
  27. var external_wp_i18n_namespaceObject = window["wp"]["i18n"];
  28. ;// CONCATENATED MODULE: external ["wp","blockEditor"]
  29. var external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
  30. ;// CONCATENATED MODULE: external ["wp","primitives"]
  31. var external_wp_primitives_namespaceObject = window["wp"]["primitives"];
  32. ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-bold.js
  33. /**
  34. * WordPress dependencies
  35. */
  36. const formatBold = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  37. xmlns: "http://www.w3.org/2000/svg",
  38. viewBox: "0 0 24 24"
  39. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  40. 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"
  41. }));
  42. /* harmony default export */ var format_bold = (formatBold);
  43. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/bold/index.js
  44. /**
  45. * WordPress dependencies
  46. */
  47. const bold_name = 'core/bold';
  48. const title = (0,external_wp_i18n_namespaceObject.__)('Bold');
  49. const bold = {
  50. name: bold_name,
  51. title,
  52. tagName: 'strong',
  53. className: null,
  54. edit(_ref) {
  55. let {
  56. isActive,
  57. value,
  58. onChange,
  59. onFocus
  60. } = _ref;
  61. function onToggle() {
  62. onChange((0,external_wp_richText_namespaceObject.toggleFormat)(value, {
  63. type: bold_name,
  64. title
  65. }));
  66. }
  67. function onClick() {
  68. onChange((0,external_wp_richText_namespaceObject.toggleFormat)(value, {
  69. type: bold_name
  70. }));
  71. onFocus();
  72. }
  73. return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextShortcut, {
  74. type: "primary",
  75. character: "b",
  76. onUse: onToggle
  77. }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, {
  78. name: "bold",
  79. icon: format_bold,
  80. title: title,
  81. onClick: onClick,
  82. isActive: isActive,
  83. shortcutType: "primary",
  84. shortcutCharacter: "b"
  85. }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableRichTextInputEvent, {
  86. inputType: "formatBold",
  87. onInput: onToggle
  88. }));
  89. }
  90. };
  91. ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/code.js
  92. /**
  93. * WordPress dependencies
  94. */
  95. const code = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  96. viewBox: "0 0 24 24",
  97. xmlns: "http://www.w3.org/2000/svg"
  98. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  99. 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"
  100. }));
  101. /* harmony default export */ var library_code = (code);
  102. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/code/index.js
  103. /**
  104. * WordPress dependencies
  105. */
  106. const code_name = 'core/code';
  107. const code_title = (0,external_wp_i18n_namespaceObject.__)('Inline code');
  108. const code_code = {
  109. name: code_name,
  110. title: code_title,
  111. tagName: 'code',
  112. className: null,
  113. __unstableInputRule(value) {
  114. const BACKTICK = '`';
  115. const {
  116. start,
  117. text
  118. } = value;
  119. const characterBefore = text.slice(start - 1, start); // Quick check the text for the necessary character.
  120. if (characterBefore !== BACKTICK) {
  121. return value;
  122. }
  123. const textBefore = text.slice(0, start - 1);
  124. const indexBefore = textBefore.lastIndexOf(BACKTICK);
  125. if (indexBefore === -1) {
  126. return value;
  127. }
  128. const startIndex = indexBefore;
  129. const endIndex = start - 2;
  130. if (startIndex === endIndex) {
  131. return value;
  132. }
  133. value = (0,external_wp_richText_namespaceObject.remove)(value, startIndex, startIndex + 1);
  134. value = (0,external_wp_richText_namespaceObject.remove)(value, endIndex, endIndex + 1);
  135. value = (0,external_wp_richText_namespaceObject.applyFormat)(value, {
  136. type: code_name
  137. }, startIndex, endIndex);
  138. return value;
  139. },
  140. edit(_ref) {
  141. let {
  142. value,
  143. onChange,
  144. onFocus,
  145. isActive
  146. } = _ref;
  147. function onClick() {
  148. onChange((0,external_wp_richText_namespaceObject.toggleFormat)(value, {
  149. type: code_name,
  150. title: code_title
  151. }));
  152. onFocus();
  153. }
  154. return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, {
  155. icon: library_code,
  156. title: code_title,
  157. onClick: onClick,
  158. isActive: isActive,
  159. role: "menuitemcheckbox"
  160. });
  161. }
  162. };
  163. ;// CONCATENATED MODULE: external ["wp","components"]
  164. var external_wp_components_namespaceObject = window["wp"]["components"];
  165. ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js
  166. /**
  167. * WordPress dependencies
  168. */
  169. const keyboardReturn = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  170. xmlns: "http://www.w3.org/2000/svg",
  171. viewBox: "-2 -2 24 24"
  172. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  173. 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"
  174. }));
  175. /* harmony default export */ var keyboard_return = (keyboardReturn);
  176. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/image/index.js
  177. /**
  178. * WordPress dependencies
  179. */
  180. const ALLOWED_MEDIA_TYPES = ['image'];
  181. const image_name = 'core/image';
  182. const image_title = (0,external_wp_i18n_namespaceObject.__)('Inline image');
  183. const image_image = {
  184. name: image_name,
  185. title: image_title,
  186. keywords: [(0,external_wp_i18n_namespaceObject.__)('photo'), (0,external_wp_i18n_namespaceObject.__)('media')],
  187. object: true,
  188. tagName: 'img',
  189. className: null,
  190. attributes: {
  191. className: 'class',
  192. style: 'style',
  193. url: 'src',
  194. alt: 'alt'
  195. },
  196. edit: Edit
  197. };
  198. function InlineUI(_ref) {
  199. let {
  200. value,
  201. onChange,
  202. activeObjectAttributes,
  203. contentRef
  204. } = _ref;
  205. const {
  206. style
  207. } = activeObjectAttributes;
  208. const [width, setWidth] = (0,external_wp_element_namespaceObject.useState)(style === null || style === void 0 ? void 0 : style.replace(/\D/g, ''));
  209. const anchorRef = (0,external_wp_richText_namespaceObject.useAnchorRef)({
  210. ref: contentRef,
  211. value,
  212. settings: image_image
  213. });
  214. return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover, {
  215. position: "bottom center",
  216. focusOnMount: false,
  217. anchorRef: anchorRef,
  218. className: "block-editor-format-toolbar__image-popover"
  219. }, (0,external_wp_element_namespaceObject.createElement)("form", {
  220. className: "block-editor-format-toolbar__image-container-content",
  221. onSubmit: event => {
  222. const newReplacements = value.replacements.slice();
  223. newReplacements[value.start] = {
  224. type: image_name,
  225. attributes: { ...activeObjectAttributes,
  226. style: width ? `width: ${width}px;` : ''
  227. }
  228. };
  229. onChange({ ...value,
  230. replacements: newReplacements
  231. });
  232. event.preventDefault();
  233. }
  234. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
  235. className: "block-editor-format-toolbar__image-container-value",
  236. type: "number",
  237. label: (0,external_wp_i18n_namespaceObject.__)('Width'),
  238. value: width,
  239. min: 1,
  240. onChange: newWidth => setWidth(newWidth)
  241. }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
  242. icon: keyboard_return,
  243. label: (0,external_wp_i18n_namespaceObject.__)('Apply'),
  244. type: "submit"
  245. })));
  246. }
  247. function Edit(_ref2) {
  248. let {
  249. value,
  250. onChange,
  251. onFocus,
  252. isObjectActive,
  253. activeObjectAttributes,
  254. contentRef
  255. } = _ref2;
  256. const [isModalOpen, setIsModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
  257. function openModal() {
  258. setIsModalOpen(true);
  259. }
  260. function closeModal() {
  261. setIsModalOpen(false);
  262. }
  263. return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, {
  264. icon: (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
  265. xmlns: "http://www.w3.org/2000/svg",
  266. viewBox: "0 0 24 24"
  267. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, {
  268. 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"
  269. })),
  270. title: image_title,
  271. onClick: openModal,
  272. isActive: isObjectActive
  273. }), isModalOpen && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.MediaUpload, {
  274. allowedTypes: ALLOWED_MEDIA_TYPES,
  275. onSelect: _ref3 => {
  276. let {
  277. id,
  278. url,
  279. alt,
  280. width: imgWidth
  281. } = _ref3;
  282. closeModal();
  283. onChange((0,external_wp_richText_namespaceObject.insertObject)(value, {
  284. type: image_name,
  285. attributes: {
  286. className: `wp-image-${id}`,
  287. style: `width: ${Math.min(imgWidth, 150)}px;`,
  288. url,
  289. alt
  290. }
  291. }));
  292. onFocus();
  293. },
  294. onClose: closeModal,
  295. render: _ref4 => {
  296. let {
  297. open
  298. } = _ref4;
  299. open();
  300. return null;
  301. }
  302. }), isObjectActive && (0,external_wp_element_namespaceObject.createElement)(InlineUI, {
  303. value: value,
  304. onChange: onChange,
  305. activeObjectAttributes: activeObjectAttributes,
  306. contentRef: contentRef
  307. }));
  308. }
  309. ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-italic.js
  310. /**
  311. * WordPress dependencies
  312. */
  313. const formatItalic = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  314. xmlns: "http://www.w3.org/2000/svg",
  315. viewBox: "0 0 24 24"
  316. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  317. d: "M12.5 5L10 19h1.9l2.5-14z"
  318. }));
  319. /* harmony default export */ var format_italic = (formatItalic);
  320. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/italic/index.js
  321. /**
  322. * WordPress dependencies
  323. */
  324. const italic_name = 'core/italic';
  325. const italic_title = (0,external_wp_i18n_namespaceObject.__)('Italic');
  326. const italic = {
  327. name: italic_name,
  328. title: italic_title,
  329. tagName: 'em',
  330. className: null,
  331. edit(_ref) {
  332. let {
  333. isActive,
  334. value,
  335. onChange,
  336. onFocus
  337. } = _ref;
  338. function onToggle() {
  339. onChange((0,external_wp_richText_namespaceObject.toggleFormat)(value, {
  340. type: italic_name,
  341. title: italic_title
  342. }));
  343. }
  344. function onClick() {
  345. onChange((0,external_wp_richText_namespaceObject.toggleFormat)(value, {
  346. type: italic_name
  347. }));
  348. onFocus();
  349. }
  350. return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextShortcut, {
  351. type: "primary",
  352. character: "i",
  353. onUse: onToggle
  354. }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, {
  355. name: "italic",
  356. icon: format_italic,
  357. title: italic_title,
  358. onClick: onClick,
  359. isActive: isActive,
  360. shortcutType: "primary",
  361. shortcutCharacter: "i"
  362. }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableRichTextInputEvent, {
  363. inputType: "formatItalic",
  364. onInput: onToggle
  365. }));
  366. }
  367. };
  368. ;// CONCATENATED MODULE: external ["wp","url"]
  369. var external_wp_url_namespaceObject = window["wp"]["url"];
  370. ;// CONCATENATED MODULE: external ["wp","htmlEntities"]
  371. var external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
  372. ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/link-off.js
  373. /**
  374. * WordPress dependencies
  375. */
  376. const linkOff = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  377. xmlns: "http://www.w3.org/2000/svg",
  378. viewBox: "0 0 24 24"
  379. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  380. 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"
  381. }));
  382. /* harmony default export */ var link_off = (linkOff);
  383. ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/link.js
  384. /**
  385. * WordPress dependencies
  386. */
  387. const link_link = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  388. xmlns: "http://www.w3.org/2000/svg",
  389. viewBox: "0 0 24 24"
  390. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  391. 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"
  392. }));
  393. /* harmony default export */ var library_link = (link_link);
  394. ;// CONCATENATED MODULE: external ["wp","a11y"]
  395. var external_wp_a11y_namespaceObject = window["wp"]["a11y"];
  396. ;// CONCATENATED MODULE: external ["wp","data"]
  397. var external_wp_data_namespaceObject = window["wp"]["data"];
  398. ;// CONCATENATED MODULE: external "lodash"
  399. var external_lodash_namespaceObject = window["lodash"];
  400. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/utils.js
  401. /**
  402. * External dependencies
  403. */
  404. /**
  405. * WordPress dependencies
  406. */
  407. /**
  408. * Check for issues with the provided href.
  409. *
  410. * @param {string} href The href.
  411. *
  412. * @return {boolean} Is the href invalid?
  413. */
  414. function isValidHref(href) {
  415. if (!href) {
  416. return false;
  417. }
  418. const trimmedHref = href.trim();
  419. if (!trimmedHref) {
  420. return false;
  421. } // Does the href start with something that looks like a URL protocol?
  422. if (/^\S+:/.test(trimmedHref)) {
  423. const protocol = (0,external_wp_url_namespaceObject.getProtocol)(trimmedHref);
  424. if (!(0,external_wp_url_namespaceObject.isValidProtocol)(protocol)) {
  425. return false;
  426. } // Add some extra checks for http(s) URIs, since these are the most common use-case.
  427. // This ensures URIs with an http protocol have exactly two forward slashes following the protocol.
  428. if ((0,external_lodash_namespaceObject.startsWith)(protocol, 'http') && !/^https?:\/\/[^\/\s]/i.test(trimmedHref)) {
  429. return false;
  430. }
  431. const authority = (0,external_wp_url_namespaceObject.getAuthority)(trimmedHref);
  432. if (!(0,external_wp_url_namespaceObject.isValidAuthority)(authority)) {
  433. return false;
  434. }
  435. const path = (0,external_wp_url_namespaceObject.getPath)(trimmedHref);
  436. if (path && !(0,external_wp_url_namespaceObject.isValidPath)(path)) {
  437. return false;
  438. }
  439. const queryString = (0,external_wp_url_namespaceObject.getQueryString)(trimmedHref);
  440. if (queryString && !(0,external_wp_url_namespaceObject.isValidQueryString)(queryString)) {
  441. return false;
  442. }
  443. const fragment = (0,external_wp_url_namespaceObject.getFragment)(trimmedHref);
  444. if (fragment && !(0,external_wp_url_namespaceObject.isValidFragment)(fragment)) {
  445. return false;
  446. }
  447. } // Validate anchor links.
  448. if ((0,external_lodash_namespaceObject.startsWith)(trimmedHref, '#') && !(0,external_wp_url_namespaceObject.isValidFragment)(trimmedHref)) {
  449. return false;
  450. }
  451. return true;
  452. }
  453. /**
  454. * Generates the format object that will be applied to the link text.
  455. *
  456. * @param {Object} options
  457. * @param {string} options.url The href of the link.
  458. * @param {string} options.type The type of the link.
  459. * @param {string} options.id The ID of the link.
  460. * @param {boolean} options.opensInNewWindow Whether this link will open in a new window.
  461. *
  462. * @return {Object} The final format object.
  463. */
  464. function createLinkFormat(_ref) {
  465. let {
  466. url,
  467. type,
  468. id,
  469. opensInNewWindow
  470. } = _ref;
  471. const format = {
  472. type: 'core/link',
  473. attributes: {
  474. url
  475. }
  476. };
  477. if (type) format.attributes.type = type;
  478. if (id) format.attributes.id = id;
  479. if (opensInNewWindow) {
  480. format.attributes.target = '_blank';
  481. format.attributes.rel = 'noreferrer noopener';
  482. }
  483. return format;
  484. }
  485. /* eslint-disable jsdoc/no-undefined-types */
  486. /**
  487. * Get the start and end boundaries of a given format from a rich text value.
  488. *
  489. *
  490. * @param {RichTextValue} value the rich text value to interrogate.
  491. * @param {string} format the identifier for the target format (e.g. `core/link`, `core/bold`).
  492. * @param {number?} startIndex optional startIndex to seek from.
  493. * @param {number?} endIndex optional endIndex to seek from.
  494. * @return {Object} object containing start and end values for the given format.
  495. */
  496. /* eslint-enable jsdoc/no-undefined-types */
  497. function getFormatBoundary(value, format) {
  498. let startIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : value.start;
  499. let endIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : value.end;
  500. const EMPTY_BOUNDARIES = {
  501. start: null,
  502. end: null
  503. };
  504. const {
  505. formats
  506. } = value;
  507. let targetFormat;
  508. let initialIndex;
  509. if (!(formats !== null && formats !== void 0 && formats.length)) {
  510. return EMPTY_BOUNDARIES;
  511. } // Clone formats to avoid modifying source formats.
  512. const newFormats = formats.slice();
  513. const formatAtStart = (0,external_lodash_namespaceObject.find)(newFormats[startIndex], {
  514. type: format.type
  515. });
  516. const formatAtEnd = (0,external_lodash_namespaceObject.find)(newFormats[endIndex], {
  517. type: format.type
  518. });
  519. const formatAtEndMinusOne = (0,external_lodash_namespaceObject.find)(newFormats[endIndex - 1], {
  520. type: format.type
  521. });
  522. if (!!formatAtStart) {
  523. // Set values to conform to "start"
  524. targetFormat = formatAtStart;
  525. initialIndex = startIndex;
  526. } else if (!!formatAtEnd) {
  527. // Set values to conform to "end"
  528. targetFormat = formatAtEnd;
  529. initialIndex = endIndex;
  530. } else if (!!formatAtEndMinusOne) {
  531. // This is an edge case which will occur if you create a format, then place
  532. // the caret just before the format and hit the back ARROW key. The resulting
  533. // value object will have start and end +1 beyond the edge of the format boundary.
  534. targetFormat = formatAtEndMinusOne;
  535. initialIndex = endIndex - 1;
  536. } else {
  537. return EMPTY_BOUNDARIES;
  538. }
  539. const index = newFormats[initialIndex].indexOf(targetFormat);
  540. const walkingArgs = [newFormats, initialIndex, targetFormat, index]; // Walk the startIndex "backwards" to the leading "edge" of the matching format.
  541. startIndex = walkToStart(...walkingArgs); // Walk the endIndex "forwards" until the trailing "edge" of the matching format.
  542. endIndex = walkToEnd(...walkingArgs); // Safe guard: start index cannot be less than 0.
  543. startIndex = startIndex < 0 ? 0 : startIndex; // // Return the indicies of the "edges" as the boundaries.
  544. return {
  545. start: startIndex,
  546. end: endIndex
  547. };
  548. }
  549. /**
  550. * Walks forwards/backwards towards the boundary of a given format within an
  551. * array of format objects. Returns the index of the boundary.
  552. *
  553. * @param {Array} formats the formats to search for the given format type.
  554. * @param {number} initialIndex the starting index from which to walk.
  555. * @param {Object} targetFormatRef a reference to the format type object being sought.
  556. * @param {number} formatIndex the index at which we expect the target format object to be.
  557. * @param {string} direction either 'forwards' or 'backwards' to indicate the direction.
  558. * @return {number} the index of the boundary of the given format.
  559. */
  560. function walkToBoundary(formats, initialIndex, targetFormatRef, formatIndex, direction) {
  561. let index = initialIndex;
  562. const directions = {
  563. forwards: 1,
  564. backwards: -1
  565. };
  566. const directionIncrement = directions[direction] || 1; // invalid direction arg default to forwards
  567. const inverseDirectionIncrement = directionIncrement * -1;
  568. while (formats[index] && formats[index][formatIndex] === targetFormatRef) {
  569. // Increment/decrement in the direction of operation.
  570. index = index + directionIncrement;
  571. } // Restore by one in inverse direction of operation
  572. // to avoid out of bounds.
  573. index = index + inverseDirectionIncrement;
  574. return index;
  575. }
  576. const walkToStart = (0,external_lodash_namespaceObject.partialRight)(walkToBoundary, 'backwards');
  577. const walkToEnd = (0,external_lodash_namespaceObject.partialRight)(walkToBoundary, 'forwards');
  578. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/use-link-instance-key.js
  579. // Weakly referenced map allows unused ids to be garbage collected.
  580. const weakMap = new WeakMap(); // Incrementing zero-based ID value.
  581. let id = -1;
  582. const prefix = 'link-control-instance';
  583. function getKey(_id) {
  584. return `${prefix}-${_id}`;
  585. }
  586. /**
  587. * Builds a unique link control key for the given object reference.
  588. *
  589. * @param {Object} instance an unique object reference specific to this link control instance.
  590. * @return {string} the unique key to use for this link control.
  591. */
  592. function useLinkInstanceKey(instance) {
  593. if (!instance) {
  594. return;
  595. }
  596. if (weakMap.has(instance)) {
  597. return getKey(weakMap.get(instance));
  598. }
  599. id += 1;
  600. weakMap.set(instance, id);
  601. return getKey(id);
  602. }
  603. /* harmony default export */ var use_link_instance_key = (useLinkInstanceKey);
  604. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/inline.js
  605. /**
  606. * WordPress dependencies
  607. */
  608. /**
  609. * Internal dependencies
  610. */
  611. function InlineLinkUI(_ref) {
  612. let {
  613. isActive,
  614. activeAttributes,
  615. addingLink,
  616. value,
  617. onChange,
  618. speak,
  619. stopAddingLink,
  620. contentRef
  621. } = _ref;
  622. const richLinkTextValue = getRichTextValueFromSelection(value, isActive); // Get the text content minus any HTML tags.
  623. const richTextText = richLinkTextValue.text;
  624. /**
  625. * Pending settings to be applied to the next link. When inserting a new
  626. * link, toggle values cannot be applied immediately, because there is not
  627. * yet a link for them to apply to. Thus, they are maintained in a state
  628. * value until the time that the link can be inserted or edited.
  629. *
  630. * @type {[Object|undefined,Function]}
  631. */
  632. const [nextLinkValue, setNextLinkValue] = (0,external_wp_element_namespaceObject.useState)();
  633. const {
  634. createPageEntity,
  635. userCanCreatePages
  636. } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  637. const {
  638. getSettings
  639. } = select(external_wp_blockEditor_namespaceObject.store);
  640. const _settings = getSettings();
  641. return {
  642. createPageEntity: _settings.__experimentalCreatePageEntity,
  643. userCanCreatePages: _settings.__experimentalUserCanCreatePages
  644. };
  645. }, []);
  646. const linkValue = {
  647. url: activeAttributes.url,
  648. type: activeAttributes.type,
  649. id: activeAttributes.id,
  650. opensInNewTab: activeAttributes.target === '_blank',
  651. title: richTextText,
  652. ...nextLinkValue
  653. };
  654. function removeLink() {
  655. const newValue = (0,external_wp_richText_namespaceObject.removeFormat)(value, 'core/link');
  656. onChange(newValue);
  657. stopAddingLink();
  658. speak((0,external_wp_i18n_namespaceObject.__)('Link removed.'), 'assertive');
  659. }
  660. function onChangeLink(nextValue) {
  661. // Merge with values from state, both for the purpose of assigning the
  662. // next state value, and for use in constructing the new link format if
  663. // the link is ready to be applied.
  664. nextValue = { ...nextLinkValue,
  665. ...nextValue
  666. }; // LinkControl calls `onChange` immediately upon the toggling a setting.
  667. const didToggleSetting = linkValue.opensInNewTab !== nextValue.opensInNewTab && linkValue.url === nextValue.url; // If change handler was called as a result of a settings change during
  668. // link insertion, it must be held in state until the link is ready to
  669. // be applied.
  670. const didToggleSettingForNewLink = didToggleSetting && nextValue.url === undefined; // If link will be assigned, the state value can be considered flushed.
  671. // Otherwise, persist the pending changes.
  672. setNextLinkValue(didToggleSettingForNewLink ? nextValue : undefined);
  673. if (didToggleSettingForNewLink) {
  674. return;
  675. }
  676. const newUrl = (0,external_wp_url_namespaceObject.prependHTTP)(nextValue.url);
  677. const linkFormat = createLinkFormat({
  678. url: newUrl,
  679. type: nextValue.type,
  680. id: nextValue.id !== undefined && nextValue.id !== null ? String(nextValue.id) : undefined,
  681. opensInNewWindow: nextValue.opensInNewTab
  682. });
  683. const newText = nextValue.title || newUrl;
  684. if ((0,external_wp_richText_namespaceObject.isCollapsed)(value) && !isActive) {
  685. // Scenario: we don't have any actively selected text or formats.
  686. const toInsert = (0,external_wp_richText_namespaceObject.applyFormat)((0,external_wp_richText_namespaceObject.create)({
  687. text: newText
  688. }), linkFormat, 0, newText.length);
  689. onChange((0,external_wp_richText_namespaceObject.insert)(value, toInsert));
  690. } else {
  691. // Scenario: we have any active text selection or an active format.
  692. let newValue;
  693. if (newText === richTextText) {
  694. // If we're not updating the text then ignore.
  695. newValue = (0,external_wp_richText_namespaceObject.applyFormat)(value, linkFormat);
  696. } else {
  697. // Create new RichText value for the new text in order that we
  698. // can apply formats to it.
  699. newValue = (0,external_wp_richText_namespaceObject.create)({
  700. text: newText
  701. }); // Apply the new Link format to this new text value.
  702. newValue = (0,external_wp_richText_namespaceObject.applyFormat)(newValue, linkFormat, 0, newText.length); // Update the original (full) RichTextValue replacing the
  703. // target text with the *new* RichTextValue containing:
  704. // 1. The new text content.
  705. // 2. The new link format.
  706. // Note original formats will be lost when applying this change.
  707. // That is expected behaviour.
  708. // See: https://github.com/WordPress/gutenberg/pull/33849#issuecomment-936134179.
  709. newValue = (0,external_wp_richText_namespaceObject.replace)(value, richTextText, newValue);
  710. }
  711. newValue.start = newValue.end;
  712. newValue.activeFormats = [];
  713. onChange(newValue);
  714. } // Focus should only be shifted back to the formatted segment when the
  715. // URL is submitted.
  716. if (!didToggleSetting) {
  717. stopAddingLink();
  718. }
  719. if (!isValidHref(newUrl)) {
  720. speak((0,external_wp_i18n_namespaceObject.__)('Warning: the link has been inserted but may have errors. Please test it.'), 'assertive');
  721. } else if (isActive) {
  722. speak((0,external_wp_i18n_namespaceObject.__)('Link edited.'), 'assertive');
  723. } else {
  724. speak((0,external_wp_i18n_namespaceObject.__)('Link inserted.'), 'assertive');
  725. }
  726. }
  727. const anchorRef = (0,external_wp_richText_namespaceObject.useAnchorRef)({
  728. ref: contentRef,
  729. value,
  730. settings: build_module_link_link
  731. }); // Generate a string based key that is unique to this anchor reference.
  732. // This is used to force re-mount the LinkControl component to avoid
  733. // potential stale state bugs caused by the component not being remounted
  734. // See https://github.com/WordPress/gutenberg/pull/34742.
  735. const forceRemountKey = use_link_instance_key(anchorRef); // The focusOnMount prop shouldn't evolve during render of a Popover
  736. // otherwise it causes a render of the content.
  737. const focusOnMount = (0,external_wp_element_namespaceObject.useRef)(addingLink ? 'firstElement' : false);
  738. async function handleCreate(pageTitle) {
  739. const page = await createPageEntity({
  740. title: pageTitle,
  741. status: 'draft'
  742. });
  743. return {
  744. id: page.id,
  745. type: page.type,
  746. title: page.title.rendered,
  747. url: page.link,
  748. kind: 'post-type'
  749. };
  750. }
  751. function createButtonText(searchTerm) {
  752. return (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)(
  753. /* translators: %s: search term. */
  754. (0,external_wp_i18n_namespaceObject.__)('Create Page: <mark>%s</mark>'), searchTerm), {
  755. mark: (0,external_wp_element_namespaceObject.createElement)("mark", null)
  756. });
  757. }
  758. return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover, {
  759. anchorRef: anchorRef,
  760. focusOnMount: focusOnMount.current,
  761. onClose: stopAddingLink,
  762. position: "bottom center"
  763. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLinkControl, {
  764. key: forceRemountKey,
  765. value: linkValue,
  766. onChange: onChangeLink,
  767. onRemove: removeLink,
  768. forceIsEditingLink: addingLink,
  769. hasRichPreviews: true,
  770. createSuggestion: createPageEntity && handleCreate,
  771. withCreateSuggestion: userCanCreatePages,
  772. createSuggestionButtonText: createButtonText,
  773. hasTextControl: true
  774. }));
  775. }
  776. function getRichTextValueFromSelection(value, isActive) {
  777. // Default to the selection ranges on the RichTextValue object.
  778. let textStart = value.start;
  779. let textEnd = value.end; // If the format is currently active then the rich text value
  780. // should always be taken from the bounds of the active format
  781. // and not the selected text.
  782. if (isActive) {
  783. const boundary = getFormatBoundary(value, {
  784. type: 'core/link'
  785. });
  786. textStart = boundary.start; // Text *selection* always extends +1 beyond the edge of the format.
  787. // We account for that here.
  788. textEnd = boundary.end + 1;
  789. } // Get a RichTextValue containing the selected text content.
  790. return (0,external_wp_richText_namespaceObject.slice)(value, textStart, textEnd);
  791. }
  792. /* harmony default export */ var inline = ((0,external_wp_components_namespaceObject.withSpokenMessages)(InlineLinkUI));
  793. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/link/index.js
  794. /**
  795. * WordPress dependencies
  796. */
  797. /**
  798. * Internal dependencies
  799. */
  800. const link_name = 'core/link';
  801. const link_title = (0,external_wp_i18n_namespaceObject.__)('Link');
  802. function link_Edit(_ref) {
  803. let {
  804. isActive,
  805. activeAttributes,
  806. value,
  807. onChange,
  808. onFocus,
  809. contentRef
  810. } = _ref;
  811. const [addingLink, setAddingLink] = (0,external_wp_element_namespaceObject.useState)(false);
  812. function addLink() {
  813. const text = (0,external_wp_richText_namespaceObject.getTextContent)((0,external_wp_richText_namespaceObject.slice)(value));
  814. if (text && (0,external_wp_url_namespaceObject.isURL)(text) && isValidHref(text)) {
  815. onChange((0,external_wp_richText_namespaceObject.applyFormat)(value, {
  816. type: link_name,
  817. attributes: {
  818. url: text
  819. }
  820. }));
  821. } else if (text && (0,external_wp_url_namespaceObject.isEmail)(text)) {
  822. onChange((0,external_wp_richText_namespaceObject.applyFormat)(value, {
  823. type: link_name,
  824. attributes: {
  825. url: `mailto:${text}`
  826. }
  827. }));
  828. } else {
  829. setAddingLink(true);
  830. }
  831. }
  832. function stopAddingLink() {
  833. setAddingLink(false);
  834. onFocus();
  835. }
  836. function onRemoveFormat() {
  837. onChange((0,external_wp_richText_namespaceObject.removeFormat)(value, link_name));
  838. (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)('Link removed.'), 'assertive');
  839. }
  840. return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextShortcut, {
  841. type: "primary",
  842. character: "k",
  843. onUse: addLink
  844. }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextShortcut, {
  845. type: "primaryShift",
  846. character: "k",
  847. onUse: onRemoveFormat
  848. }), isActive && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, {
  849. name: "link",
  850. icon: link_off,
  851. title: (0,external_wp_i18n_namespaceObject.__)('Unlink'),
  852. onClick: onRemoveFormat,
  853. isActive: isActive,
  854. shortcutType: "primaryShift",
  855. shortcutCharacter: "k"
  856. }), !isActive && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, {
  857. name: "link",
  858. icon: library_link,
  859. title: link_title,
  860. onClick: addLink,
  861. isActive: isActive,
  862. shortcutType: "primary",
  863. shortcutCharacter: "k"
  864. }), (addingLink || isActive) && (0,external_wp_element_namespaceObject.createElement)(inline, {
  865. addingLink: addingLink,
  866. stopAddingLink: stopAddingLink,
  867. isActive: isActive,
  868. activeAttributes: activeAttributes,
  869. value: value,
  870. onChange: onChange,
  871. contentRef: contentRef
  872. }));
  873. }
  874. const build_module_link_link = {
  875. name: link_name,
  876. title: link_title,
  877. tagName: 'a',
  878. className: null,
  879. attributes: {
  880. url: 'href',
  881. type: 'data-type',
  882. id: 'data-id',
  883. target: 'target'
  884. },
  885. __unstablePasteRule(value, _ref2) {
  886. let {
  887. html,
  888. plainText
  889. } = _ref2;
  890. if ((0,external_wp_richText_namespaceObject.isCollapsed)(value)) {
  891. return value;
  892. }
  893. const pastedText = (html || plainText).replace(/<[^>]+>/g, '').trim(); // A URL was pasted, turn the selection into a link.
  894. if (!(0,external_wp_url_namespaceObject.isURL)(pastedText)) {
  895. return value;
  896. } // Allows us to ask for this information when we get a report.
  897. window.console.log('Created link:\n\n', pastedText);
  898. return (0,external_wp_richText_namespaceObject.applyFormat)(value, {
  899. type: link_name,
  900. attributes: {
  901. url: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(pastedText)
  902. }
  903. });
  904. },
  905. edit: link_Edit
  906. };
  907. ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-strikethrough.js
  908. /**
  909. * WordPress dependencies
  910. */
  911. const formatStrikethrough = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  912. xmlns: "http://www.w3.org/2000/svg",
  913. viewBox: "0 0 24 24"
  914. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  915. 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"
  916. }));
  917. /* harmony default export */ var format_strikethrough = (formatStrikethrough);
  918. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/strikethrough/index.js
  919. /**
  920. * WordPress dependencies
  921. */
  922. const strikethrough_name = 'core/strikethrough';
  923. const strikethrough_title = (0,external_wp_i18n_namespaceObject.__)('Strikethrough');
  924. const strikethrough = {
  925. name: strikethrough_name,
  926. title: strikethrough_title,
  927. tagName: 's',
  928. className: null,
  929. edit(_ref) {
  930. let {
  931. isActive,
  932. value,
  933. onChange,
  934. onFocus
  935. } = _ref;
  936. function onClick() {
  937. onChange((0,external_wp_richText_namespaceObject.toggleFormat)(value, {
  938. type: strikethrough_name,
  939. title: strikethrough_title
  940. }));
  941. onFocus();
  942. }
  943. return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, {
  944. icon: format_strikethrough,
  945. title: strikethrough_title,
  946. onClick: onClick,
  947. isActive: isActive,
  948. role: "menuitemcheckbox"
  949. });
  950. }
  951. };
  952. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/underline/index.js
  953. /**
  954. * WordPress dependencies
  955. */
  956. const underline_name = 'core/underline';
  957. const underline_title = (0,external_wp_i18n_namespaceObject.__)('Underline');
  958. const underline = {
  959. name: underline_name,
  960. title: underline_title,
  961. tagName: 'span',
  962. className: null,
  963. attributes: {
  964. style: 'style'
  965. },
  966. edit(_ref) {
  967. let {
  968. value,
  969. onChange
  970. } = _ref;
  971. const onToggle = () => {
  972. onChange((0,external_wp_richText_namespaceObject.toggleFormat)(value, {
  973. type: underline_name,
  974. attributes: {
  975. style: 'text-decoration: underline;'
  976. },
  977. title: underline_title
  978. }));
  979. };
  980. return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextShortcut, {
  981. type: "primary",
  982. character: "u",
  983. onUse: onToggle
  984. }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableRichTextInputEvent, {
  985. inputType: "formatUnderline",
  986. onInput: onToggle
  987. }));
  988. }
  989. };
  990. ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
  991. /**
  992. * WordPress dependencies
  993. */
  994. /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
  995. /**
  996. * Return an SVG icon.
  997. *
  998. * @param {IconProps} props icon is the SVG component to render
  999. * size is a number specifiying the icon size in pixels
  1000. * Other props will be passed to wrapped SVG component
  1001. *
  1002. * @return {JSX.Element} Icon component
  1003. */
  1004. function Icon(_ref) {
  1005. let {
  1006. icon,
  1007. size = 24,
  1008. ...props
  1009. } = _ref;
  1010. return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
  1011. width: size,
  1012. height: size,
  1013. ...props
  1014. });
  1015. }
  1016. /* harmony default export */ var icon = (Icon);
  1017. ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/text-color.js
  1018. /**
  1019. * WordPress dependencies
  1020. */
  1021. const textColor = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  1022. xmlns: "http://www.w3.org/2000/svg",
  1023. viewBox: "0 0 24 24"
  1024. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  1025. 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"
  1026. }));
  1027. /* harmony default export */ var text_color = (textColor);
  1028. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/text-color/inline.js
  1029. /**
  1030. * External dependencies
  1031. */
  1032. /**
  1033. * WordPress dependencies
  1034. */
  1035. /**
  1036. * Internal dependencies
  1037. */
  1038. function parseCSS() {
  1039. let css = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  1040. return css.split(';').reduce((accumulator, rule) => {
  1041. if (rule) {
  1042. const [property, value] = rule.split(':');
  1043. if (property === 'color') accumulator.color = value;
  1044. if (property === 'background-color' && value !== transparentValue) accumulator.backgroundColor = value;
  1045. }
  1046. return accumulator;
  1047. }, {});
  1048. }
  1049. function parseClassName() {
  1050. let className = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  1051. let colorSettings = arguments.length > 1 ? arguments[1] : undefined;
  1052. return className.split(' ').reduce((accumulator, name) => {
  1053. // `colorSlug` could contain dashes, so simply match the start and end.
  1054. if (name.startsWith('has-') && name.endsWith('-color')) {
  1055. const colorSlug = name.replace(/^has-/, '').replace(/-color$/, '');
  1056. const colorObject = (0,external_wp_blockEditor_namespaceObject.getColorObjectByAttributeValues)(colorSettings, colorSlug);
  1057. accumulator.color = colorObject.color;
  1058. }
  1059. return accumulator;
  1060. }, {});
  1061. }
  1062. function getActiveColors(value, name, colorSettings) {
  1063. const activeColorFormat = (0,external_wp_richText_namespaceObject.getActiveFormat)(value, name);
  1064. if (!activeColorFormat) {
  1065. return {};
  1066. }
  1067. return { ...parseCSS(activeColorFormat.attributes.style),
  1068. ...parseClassName(activeColorFormat.attributes.class, colorSettings)
  1069. };
  1070. }
  1071. function setColors(value, name, colorSettings, colors) {
  1072. const {
  1073. color,
  1074. backgroundColor
  1075. } = { ...getActiveColors(value, name, colorSettings),
  1076. ...colors
  1077. };
  1078. if (!color && !backgroundColor) {
  1079. return (0,external_wp_richText_namespaceObject.removeFormat)(value, name);
  1080. }
  1081. const styles = [];
  1082. const classNames = [];
  1083. const attributes = {};
  1084. if (backgroundColor) {
  1085. styles.push(['background-color', backgroundColor].join(':'));
  1086. } else {
  1087. // Override default browser color for mark element.
  1088. styles.push(['background-color', transparentValue].join(':'));
  1089. }
  1090. if (color) {
  1091. const colorObject = (0,external_wp_blockEditor_namespaceObject.getColorObjectByColorValue)(colorSettings, color);
  1092. if (colorObject) {
  1093. classNames.push((0,external_wp_blockEditor_namespaceObject.getColorClassName)('color', colorObject.slug));
  1094. } else {
  1095. styles.push(['color', color].join(':'));
  1096. }
  1097. }
  1098. if (styles.length) attributes.style = styles.join(';');
  1099. if (classNames.length) attributes.class = classNames.join(' ');
  1100. return (0,external_wp_richText_namespaceObject.applyFormat)(value, {
  1101. type: name,
  1102. attributes
  1103. });
  1104. }
  1105. function ColorPicker(_ref) {
  1106. let {
  1107. name,
  1108. property,
  1109. value,
  1110. onChange
  1111. } = _ref;
  1112. const colors = (0,external_wp_data_namespaceObject.useSelect)(select => {
  1113. const {
  1114. getSettings
  1115. } = select(external_wp_blockEditor_namespaceObject.store);
  1116. return (0,external_lodash_namespaceObject.get)(getSettings(), ['colors'], []);
  1117. }, []);
  1118. const onColorChange = (0,external_wp_element_namespaceObject.useCallback)(color => {
  1119. onChange(setColors(value, name, colors, {
  1120. [property]: color
  1121. }));
  1122. }, [colors, onChange, property]);
  1123. const activeColors = (0,external_wp_element_namespaceObject.useMemo)(() => getActiveColors(value, name, colors), [name, value, colors]);
  1124. return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ColorPalette, {
  1125. value: activeColors[property],
  1126. onChange: onColorChange
  1127. });
  1128. }
  1129. function InlineColorUI(_ref2) {
  1130. let {
  1131. name,
  1132. value,
  1133. onChange,
  1134. onClose,
  1135. contentRef
  1136. } = _ref2;
  1137. /*
  1138. As you change the text color by typing a HEX value into a field,
  1139. the return value of document.getSelection jumps to the field you're editing,
  1140. not the highlighted text. Given that useAnchorRef uses document.getSelection,
  1141. it will return null, since it can't find the <mark> element within the HEX input.
  1142. This caches the last truthy value of the selection anchor reference.
  1143. */
  1144. const anchorRef = (0,external_wp_blockEditor_namespaceObject.useCachedTruthy)((0,external_wp_richText_namespaceObject.useAnchorRef)({
  1145. ref: contentRef,
  1146. value,
  1147. settings: text_color_textColor
  1148. }));
  1149. return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover, {
  1150. onClose: onClose,
  1151. className: "components-inline-color-popover",
  1152. anchorRef: anchorRef
  1153. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TabPanel, {
  1154. tabs: [{
  1155. name: 'color',
  1156. title: (0,external_wp_i18n_namespaceObject.__)('Text')
  1157. }, {
  1158. name: 'backgroundColor',
  1159. title: (0,external_wp_i18n_namespaceObject.__)('Background')
  1160. }]
  1161. }, tab => (0,external_wp_element_namespaceObject.createElement)(ColorPicker, {
  1162. name: name,
  1163. property: tab.name,
  1164. value: value,
  1165. onChange: onChange
  1166. })));
  1167. }
  1168. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/text-color/index.js
  1169. /**
  1170. * External dependencies
  1171. */
  1172. /**
  1173. * WordPress dependencies
  1174. */
  1175. /**
  1176. * Internal dependencies
  1177. */
  1178. const transparentValue = 'rgba(0, 0, 0, 0)';
  1179. const text_color_name = 'core/text-color';
  1180. const text_color_title = (0,external_wp_i18n_namespaceObject.__)('Highlight');
  1181. const EMPTY_ARRAY = [];
  1182. function getComputedStyleProperty(element, property) {
  1183. const {
  1184. ownerDocument
  1185. } = element;
  1186. const {
  1187. defaultView
  1188. } = ownerDocument;
  1189. const style = defaultView.getComputedStyle(element);
  1190. const value = style.getPropertyValue(property);
  1191. if (property === 'background-color' && value === transparentValue && element.parentElement) {
  1192. return getComputedStyleProperty(element.parentElement, property);
  1193. }
  1194. return value;
  1195. }
  1196. function fillComputedColors(element, _ref) {
  1197. let {
  1198. color,
  1199. backgroundColor
  1200. } = _ref;
  1201. if (!color && !backgroundColor) {
  1202. return;
  1203. }
  1204. return {
  1205. color: color || getComputedStyleProperty(element, 'color'),
  1206. backgroundColor: backgroundColor === transparentValue ? getComputedStyleProperty(element, 'background-color') : backgroundColor
  1207. };
  1208. }
  1209. function TextColorEdit(_ref2) {
  1210. let {
  1211. value,
  1212. onChange,
  1213. isActive,
  1214. activeAttributes,
  1215. contentRef
  1216. } = _ref2;
  1217. const allowCustomControl = (0,external_wp_blockEditor_namespaceObject.useSetting)('color.custom');
  1218. const colors = (0,external_wp_blockEditor_namespaceObject.useSetting)('color.palette') || EMPTY_ARRAY;
  1219. const [isAddingColor, setIsAddingColor] = (0,external_wp_element_namespaceObject.useState)(false);
  1220. const enableIsAddingColor = (0,external_wp_element_namespaceObject.useCallback)(() => setIsAddingColor(true), [setIsAddingColor]);
  1221. const disableIsAddingColor = (0,external_wp_element_namespaceObject.useCallback)(() => setIsAddingColor(false), [setIsAddingColor]);
  1222. const colorIndicatorStyle = (0,external_wp_element_namespaceObject.useMemo)(() => fillComputedColors(contentRef.current, getActiveColors(value, text_color_name, colors)), [value, colors]);
  1223. const hasColorsToChoose = !(0,external_lodash_namespaceObject.isEmpty)(colors) || !allowCustomControl;
  1224. if (!hasColorsToChoose && !isActive) {
  1225. return null;
  1226. }
  1227. return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, {
  1228. className: "format-library-text-color-button",
  1229. isActive: isActive,
  1230. icon: (0,external_wp_element_namespaceObject.createElement)(icon, {
  1231. icon: text_color,
  1232. style: colorIndicatorStyle
  1233. }),
  1234. title: text_color_title // If has no colors to choose but a color is active remove the color onClick.
  1235. ,
  1236. onClick: hasColorsToChoose ? enableIsAddingColor : () => onChange((0,external_wp_richText_namespaceObject.removeFormat)(value, text_color_name)),
  1237. role: "menuitemcheckbox"
  1238. }), isAddingColor && (0,external_wp_element_namespaceObject.createElement)(InlineColorUI, {
  1239. name: text_color_name,
  1240. onClose: disableIsAddingColor,
  1241. activeAttributes: activeAttributes,
  1242. value: value,
  1243. onChange: onChange,
  1244. contentRef: contentRef
  1245. }));
  1246. }
  1247. const text_color_textColor = {
  1248. name: text_color_name,
  1249. title: text_color_title,
  1250. tagName: 'mark',
  1251. className: 'has-inline-color',
  1252. attributes: {
  1253. style: 'style',
  1254. class: 'class'
  1255. },
  1256. /*
  1257. * Since this format relies on the <mark> tag, it's important to
  1258. * prevent the default yellow background color applied by most
  1259. * browsers. The solution is to detect when this format is used with a
  1260. * text color but no background color, and in such cases to override
  1261. * the default styling with a transparent background.
  1262. *
  1263. * @see https://github.com/WordPress/gutenberg/pull/35516
  1264. */
  1265. __unstableFilterAttributeValue(key, value) {
  1266. if (key !== 'style') return value; // We should not add a background-color if it's already set.
  1267. if (value && value.includes('background-color')) return value;
  1268. const addedCSS = ['background-color', transparentValue].join(':'); // Prepend `addedCSS` to avoid a double `;;` as any the existing CSS
  1269. // rules will already include a `;`.
  1270. return value ? [addedCSS, value].join(';') : addedCSS;
  1271. },
  1272. edit: TextColorEdit
  1273. };
  1274. ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/subscript.js
  1275. /**
  1276. * WordPress dependencies
  1277. */
  1278. const subscript = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  1279. xmlns: "http://www.w3.org/2000/svg",
  1280. viewBox: "0 0 24 24"
  1281. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  1282. 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"
  1283. }));
  1284. /* harmony default export */ var library_subscript = (subscript);
  1285. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/subscript/index.js
  1286. /**
  1287. * WordPress dependencies
  1288. */
  1289. const subscript_name = 'core/subscript';
  1290. const subscript_title = (0,external_wp_i18n_namespaceObject.__)('Subscript');
  1291. const subscript_subscript = {
  1292. name: subscript_name,
  1293. title: subscript_title,
  1294. tagName: 'sub',
  1295. className: null,
  1296. edit(_ref) {
  1297. let {
  1298. isActive,
  1299. value,
  1300. onChange,
  1301. onFocus
  1302. } = _ref;
  1303. function onToggle() {
  1304. onChange((0,external_wp_richText_namespaceObject.toggleFormat)(value, {
  1305. type: subscript_name,
  1306. title: subscript_title
  1307. }));
  1308. }
  1309. function onClick() {
  1310. onToggle();
  1311. onFocus();
  1312. }
  1313. return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, {
  1314. icon: library_subscript,
  1315. title: subscript_title,
  1316. onClick: onClick,
  1317. isActive: isActive,
  1318. role: "menuitemcheckbox"
  1319. });
  1320. }
  1321. };
  1322. ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/superscript.js
  1323. /**
  1324. * WordPress dependencies
  1325. */
  1326. const superscript = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  1327. xmlns: "http://www.w3.org/2000/svg",
  1328. viewBox: "0 0 24 24"
  1329. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  1330. 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"
  1331. }));
  1332. /* harmony default export */ var library_superscript = (superscript);
  1333. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/superscript/index.js
  1334. /**
  1335. * WordPress dependencies
  1336. */
  1337. const superscript_name = 'core/superscript';
  1338. const superscript_title = (0,external_wp_i18n_namespaceObject.__)('Superscript');
  1339. const superscript_superscript = {
  1340. name: superscript_name,
  1341. title: superscript_title,
  1342. tagName: 'sup',
  1343. className: null,
  1344. edit(_ref) {
  1345. let {
  1346. isActive,
  1347. value,
  1348. onChange,
  1349. onFocus
  1350. } = _ref;
  1351. function onToggle() {
  1352. onChange((0,external_wp_richText_namespaceObject.toggleFormat)(value, {
  1353. type: superscript_name,
  1354. title: superscript_title
  1355. }));
  1356. }
  1357. function onClick() {
  1358. onToggle();
  1359. onFocus();
  1360. }
  1361. return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, {
  1362. icon: library_superscript,
  1363. title: superscript_title,
  1364. onClick: onClick,
  1365. isActive: isActive,
  1366. role: "menuitemcheckbox"
  1367. });
  1368. }
  1369. };
  1370. ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/button.js
  1371. /**
  1372. * WordPress dependencies
  1373. */
  1374. const button_button = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  1375. viewBox: "0 0 24 24",
  1376. xmlns: "http://www.w3.org/2000/svg"
  1377. }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  1378. 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"
  1379. }));
  1380. /* harmony default export */ var library_button = (button_button);
  1381. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/keyboard/index.js
  1382. /**
  1383. * WordPress dependencies
  1384. */
  1385. const keyboard_name = 'core/keyboard';
  1386. const keyboard_title = (0,external_wp_i18n_namespaceObject.__)('Keyboard input');
  1387. const keyboard = {
  1388. name: keyboard_name,
  1389. title: keyboard_title,
  1390. tagName: 'kbd',
  1391. className: null,
  1392. edit(_ref) {
  1393. let {
  1394. isActive,
  1395. value,
  1396. onChange,
  1397. onFocus
  1398. } = _ref;
  1399. function onToggle() {
  1400. onChange((0,external_wp_richText_namespaceObject.toggleFormat)(value, {
  1401. type: keyboard_name,
  1402. title: keyboard_title
  1403. }));
  1404. }
  1405. function onClick() {
  1406. onToggle();
  1407. onFocus();
  1408. }
  1409. return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.RichTextToolbarButton, {
  1410. icon: library_button,
  1411. title: keyboard_title,
  1412. onClick: onClick,
  1413. isActive: isActive,
  1414. role: "menuitemcheckbox"
  1415. });
  1416. }
  1417. };
  1418. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/default-formats.js
  1419. /**
  1420. * Internal dependencies
  1421. */
  1422. /* harmony default export */ var default_formats = ([bold, code_code, image_image, italic, build_module_link_link, strikethrough, underline, text_color_textColor, subscript_subscript, superscript_superscript, keyboard]);
  1423. ;// CONCATENATED MODULE: ./node_modules/@wordpress/format-library/build-module/index.js
  1424. /**
  1425. * WordPress dependencies
  1426. */
  1427. /**
  1428. * Internal dependencies
  1429. */
  1430. default_formats.forEach(_ref => {
  1431. let {
  1432. name,
  1433. ...settings
  1434. } = _ref;
  1435. return (0,external_wp_richText_namespaceObject.registerFormatType)(name, settings);
  1436. });
  1437. (window.wp = window.wp || {}).formatLibrary = __webpack_exports__;
  1438. /******/ })()
  1439. ;