2 lines
3.1 KiB
JavaScript
2 lines
3.1 KiB
JavaScript
/*! This file is auto-generated */
|
|
this.wp=this.wp||{},this.wp.blockSerializationDefaultParser=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s="./node_modules/@wordpress/block-serialization-default-parser/build-module/index.js")}({"./node_modules/@wordpress/block-serialization-default-parser/build-module/index.js":function(e,n,t){"use strict";let r,o,u,s;t.r(n),t.d(n,"parse",(function(){return f}));const l=/<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function i(e,n,t,r,o){return{blockName:e,attrs:n,innerBlocks:t,innerHTML:r,innerContent:o}}function c(e){return i(null,{},[],e,[e])}const f=e=>{r=e,o=0,u=[],s=[],l.lastIndex=0;do{}while(a());return u};function a(){const e=function(){const e=l.exec(r);if(null===e)return["no-more-tokens"];const n=e.index,[t,o,u,s,i,,c]=e,f=t.length,a=!!o,p=!!c,b=(u||"core/")+s,d=!!i,k=d?function(e){try{return JSON.parse(e)}catch(e){return null}}(i):{};if(p)return["void-block",b,k,n,f];if(a)return["block-closer",b,null,n,f];return["block-opener",b,k,n,f]}(),[n,t,f,a,k]=e,h=s.length,v=a>o?o:null;switch(n){case"no-more-tokens":if(0===h)return p(),!1;if(1===h)return d(),!1;for(;0<s.length;)d();return!1;case"void-block":return 0===h?(null!==v&&u.push(c(r.substr(v,a-v))),u.push(i(t,f,[],"",[])),o=a+k,!0):(b(i(t,f,[],"",[]),a,k),o=a+k,!0);case"block-opener":return s.push(function(e,n,t,r,o){return{block:e,tokenStart:n,tokenLength:t,prevOffset:r||n+t,leadingHtmlStart:o}}(i(t,f,[],"",[]),a,k,a+k,v)),o=a+k,!0;case"block-closer":if(0===h)return p(),!1;if(1===h)return d(a),o=a+k,!0;const e=s.pop(),n=r.substr(e.prevOffset,a-e.prevOffset);return e.block.innerHTML+=n,e.block.innerContent.push(n),e.prevOffset=a+k,b(e.block,e.tokenStart,e.tokenLength,a+k),o=a+k,!0;default:return p(),!1}}function p(e){const n=e||r.length-o;0!==n&&u.push(c(r.substr(o,n)))}function b(e,n,t,o){const u=s[s.length-1];u.block.innerBlocks.push(e);const l=r.substr(u.prevOffset,n-u.prevOffset);l&&(u.block.innerHTML+=l,u.block.innerContent.push(l)),u.block.innerContent.push(null),u.prevOffset=o||n+t}function d(e){const{block:n,leadingHtmlStart:t,prevOffset:o,tokenStart:l}=s.pop(),i=e?r.substr(o,e-o):r.substr(o);i&&(n.innerHTML+=i,n.innerContent.push(i)),null!==t&&u.push(c(r.substr(t,l-t))),u.push(n)}}}); |