1 line
3.4 KiB
JavaScript
1 line
3.4 KiB
JavaScript
|
this.wp=this.wp||{},this.wp.blockSerializationDefaultParser=function(t){var r={};function e(n){if(r[n])return r[n].exports;var u=r[n]={i:n,l:!1,exports:{}};return t[n].call(u.exports,u,u.exports,e),u.l=!0,u.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var u in t)e.d(n,u,function(r){return t[r]}.bind(null,u));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=175)}({175:function(t,r,e){"use strict";e.r(r),e.d(r,"parse",function(){return s});var n,u,o,i,c=e(26),l=/<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?!}\s+-->)[^])+?}\s+)?(\/)?-->/g;function f(t,r,e,n){return{blockName:t,attrs:r,innerBlocks:e,innerHTML:n}}function a(t){return f(null,{},[],t)}var s=function(t){n=t,u=0,o=[],i=[],l.lastIndex=0;do{}while(p());return o};function p(){var t=function(){var t=l.exec(n);if(null===t)return["no-more-tokens"];var r=t.index,e=Object(c.a)(t,6),u=e[0],o=e[1],i=e[2],f=e[3],a=e[4],s=e[5],p=u.length,b=!!o,v=!!s,d=(i||"core/")+f,h=!!a,k=h?function(t){try{return JSON.parse(t)}catch(t){return null}}(a):{};if(v)return["void-block",d,k,r,p];if(b)return["block-closer",d,null,r,p];return["block-opener",d,k,r,p]}(),r=Object(c.a)(t,5),e=r[0],s=r[1],p=r[2],h=r[3],k=r[4],y=i.length,O=h>u?u:null;switch(e){case"no-more-tokens":if(0===y)return b(),!1;if(1===y)return d(),!1;for(;0<i.length;)d();return!1;case"void-block":return 0===y?(null!==O&&o.push(a(n.substr(O,h-O))),o.push(f(s,p,[],"")),u=h+k,!0):(v(f(s,p,[],""),h,k),u=h+k,!0);case"block-opener":return i.push(function(t,r,e,n,u){return{block:t,tokenStart:r,tokenLength:e,prevOffset:n||r+e,leadingHtmlStart:u}}(f(s,p,[],""),h,k,h+k,O)),u=h+k,!0;case"block-closer":if(0===y)return b(),!1;if(1===y)return d(h),u=h+k,!0;var g=i.pop();return g.block.innerHTML+=n.substr(g.prevOffset,h-g.prevOffset),g.prevOffset=h+k,v(g.block,g.tokenStart,g.tokenLength,h+k),u=h+k,!0;default:return b(),!1}}function b(t){var r=t||n.length-u;0!==r&&o.push(a(n.substr(u,r)))}function v(t,r,e,u){var o=i[i.length-1];o.block.innerBlocks.push(t),o.block.innerHTML+=n.substr(o.prevOffset,r-o.prevOffset),o.prevOffset=u||r+e}function d(t){var r=i.pop(),e=r.block,u=r.leadingHtmlStart,c=r.prevOffset,l=r.tokenStart;e.innerHTML+=t?n.substr(c,t-c):n.substr(c),null!==u&&o.push(a(n.substr(u,l-u))),o.push(e)}},26:function(t,r,e){"use strict";var n=e(34);var u=e(35);function o(t,r){return Object(n.a)(t)||function(t,r){var e=[],n=!0,u=!1,o=void 0;try{for(var i,c=t[Symbol.iterator]();!(n=(i=c.next()).done)&&(e.push(i.value),!r||e.length!==r);n=!0);}catch(t){u=!0,o=t}finally{try{n||null==c.return||c.return()}finally{if(u)throw o}}return e}(t,r)||Object(u.a)()}e.d(r,"a",function(){return o})},34:function(t,r,e){"use strict";function n(t){if(Array.isArray(t))return t}e.d(r,"a",function(){return n})},35:function(t,r,e){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}e.d(r,"a",function(){return n})}});
|