WordPress/wp-includes/js/dist/shortcode.min.js

2 lines
3.2 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 11:43:29 -04:00
!function(){var t={9756:function(t){t.exports=function(t,e){var n,r,s=0;function o(){var o,i,c=n,u=arguments.length;t:for(;c;){if(c.args.length===arguments.length){for(i=0;i<u;i++)if(c.args[i]!==arguments[i]){c=c.next;continue t}return c!==n&&(c===r&&(r=c.prev),c.prev.next=c.next,c.next&&(c.next.prev=c.prev),c.next=n,c.prev=null,n.prev=c,n=c),c.val}c=c.next}for(o=new Array(u),i=0;i<u;i++)o[i]=arguments[i];return c={args:o,val:t.apply(null,o)},n?(n.prev=c,c.next=n):r=c,s===e.maxSize?(r=r.prev).next=null:s++,n=c,c.val}return e=e||{},o.clear=function(){n=null,r=null,s=0},o}}},e={};function n(r){var s=e[r];if(void 0!==s)return s.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};!function(){"use strict";var t=n(9756);function e(t){return new RegExp("\\[(\\[?)("+t+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}const s=n.n(t)()((t=>{const e={},n=[],r=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;let s;for(t=t.replace(/[\u00a0\u200b]/g," ");s=r.exec(t);)s[1]?e[s[1].toLowerCase()]=s[2]:s[3]?e[s[3].toLowerCase()]=s[4]:s[5]?e[s[5].toLowerCase()]=s[6]:s[7]?n.push(s[7]):s[8]?n.push(s[8]):s[9]&&n.push(s[9]);return{named:e,numeric:n}}));function o(t){let e;return e=t[4]?"self-closing":t[6]?"closed":"single",new i({tag:t[2],attrs:t[3],type:e,content:t[5]})}const i=Object.assign((function(t){const{tag:e,attrs:n,type:r,content:o}=t||{};if(Object.assign(this,{tag:e,type:r,content:o}),this.attrs={named:{},numeric:[]},!n)return;const i=["named","numeric"];"string"==typeof n?this.attrs=s(n):n.length===i.length&&i.every(((t,e)=>t===n[e]))?this.attrs=n:Object.entries(n).forEach((t=>{let[e,n]=t;this.set(e,n)}))}),{next:function t(n,r){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const i=e(n);i.lastIndex=s;const c=i.exec(r);if(!c)return;if("["===c[1]&&"]"===c[7])return t(n,r,i.lastIndex);const u={index:c.index,content:c[0],shortcode:o(c)};return c[1]&&(u.content=u.content.slice(1),u.index++),c[7]&&(u.content=u.content.slice(0,-1)),u},replace:function(t,n,r){return n.replace(e(t),(function(t,e,n,s,i,c,u,a){if("["===e&&"]"===a)return t;const l=r(o(arguments));return l||""===l?e+l+a:t}))},string:function(t){return new i(t).string()},regexp:e,attrs:s,fromMatch:o});Object.assign(i.prototype,{get(t){return this.attrs["number"==typeof t?"numeric":"named"][t]},set(t,e){return this.attrs["number"==typeof t?"numeric":"named"][t]=e,this},string(){let t="["+this.tag;return this.attrs.numeric.forEach((e=>{/\s/.test(e)?t+=' "'+e+'"':t+=" "+e})),Object.entries(this.attrs.named).forEach((e=>{let[n,r]=e;t+=" "+n+'="'+r+'"'})),"single"===this.type?t+"]":"self-closing"===this.type?t+" /]":(t+="]",this.content&&(t+=this.content),t+"[/"+this.tag+"]")}}),r.default=i}(),(window.wp=window.wp||{}).shortcode=r.default}();