1(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[74016],{71736:e=>{e.exports=function(e){var t={};function n(s){if(t[s])return t[s].exports;var r=t[s]={i:s,l:!1,exports:{}};return e[s].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:s})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s=1)}([function(e,t,n){"use strict";n.r(t);var s=0,r=1,i=2,o=3,l=4;class h{constructor(e,t,n){this.startInOld=e,this.startInNew=t,this.size=n}get endInOld(){return this.startInOld+this.size}get endInNew(){return this.startInNew+this.size}}class d{constructor(){this.blockSize=0,this.repeatingWordsAccuracy=0,this.ignoreWhitespaceDifferences=!1}}const c=/^\s*<\/?[^>]+>\s*$/,a=/<[^\s>]+/,u=/^(\s| )+$/,f=/[\w\#@]+/,p=["<img"];function w(e){return!p.some((t=>null!==e&&e.startsWith(t)))&&c.test(e)}function I(e,t,n){return["<",t,' class="',n,'">',e,"</",t,">"].join("")}function g(e){return"<"===e}function W(e){return"&"===e}function O(e){return";"===e}function x(e){return u.test(e)}function m(e){return f.test(e)}function N(e,t,n){return e.push(t),e.length>n&&e.shift(),e.length!==n?null:e.join("")}class b{constructor(e,t,n,s,r,i,o){this.oldWords=e,this.newWords=t,this.startInOld=n,this.endInOld=s,this.startInNew=r,this.endInNew=i,this.options=o}indexNewWords(){this.wordIndices=new Map;let e=[];for(let t=this.startInNew;t<this.endInNew;t++){let n=N(e,this.normalizeForIndex(this.newWords[t]),this.options.blockSize);null!==n&&(this.wordIndices.has(n)?this.wordIndices.get(n).push(t):this.wordIndices.set(n,[t]))}}normalizeForIndex(e){return e=function(e){return w(e)?function(e){return a.exec(e)[0]+(e.endsWith("/>")?"/>":">")}(e):e}(e),this.options.IgnoreWhiteSpaceDifferences&&x(e)?" ":e}findMatch(){if(this.indexNewWords(),this.removeRepeatingWords(),0===this.wordIndices.length)return null;let e=this.startInOld,t=this.startInNew,n=0,s=new Map;const r=this.options.blockSize;let i=[];for(let o=this.startInOld;o<this.endInOld;o++){let l=N(i,this.normalizeForIndex(this.oldWords[o]),r);if(null===l)continue;let h=new Map;if(this.wordIndices.has(l)){for(let i of this.wordIndices.get(l)){let l=(s.has(i-1)?s.get(i-1):0)+1;h.set(i,l),l>n&&(e=o-l-r+2,t=i-l-r+2,n=l)}s=h}else s=h}return 0!==n?new h(e,t,n+r-1):null}removeRepeatingWords(){let e=this.newWords.length+this.options.repeatingWordsAccuracy,t=Array.from(this.wordIndices.entr
1ies()).filter((t=>t[1].length>e)).map((e=>e[0]));for(let n of t)this.wordIndices.delete(n)}}class k{constructor(e,t,n,s,r){this.action=e,this.startInOld=t,this.endInOld=n,this.startInNew=s,this.endInNew=r}}var M=0,D=1,T=2,v=3;function y(e,t){let n={mode:M,currentWord:[],words:[]},s=function(e,t){let n=new Map;if(null===t)return n;for(let s of t){let t;for(;null!==(t=s.exec(e));){if(n.has(t.index))throw new Error("One or more block expressions result in a text sequence that overlaps. Current expression: "+s.toString());n.set(t.index,t.index+t[0].length)}}return n}(e,t),r=!!s.size,i=!1,o=-1;for(let h=0;h<e.length;h++){var l=e[h];if(r){o===index&&(o=-1,i=!1);let e=0;if(s.has(index)&&(i=!0,o=e=s.get(index)),i){n.currentWord.push(l),n.mode=M;continue}}switch(n.mode){case M:g(l)?_(n,"<",D):W(l)?_(n,l,v):x(l)?_(n,l,T):m(l)&&(0===n.currentWord.length||m(n.currentWord[n.currentWord.length-1]))?n.currentWord.push(l):_(n,l,M);break;case D:">"===l?(n.currentWord.push(l),n.words.push(n.currentWord.join("")),n.currentWord=[],n.mode=x(l)?T:M):n.currentWord.push(l);break;case T:g(l)?_(n,l,D):W(l)?_(n,l,v):x(l)?n.currentWord.push(l):_(n,l,M);break;case v:if(g(l))_(n,l,D);else if(x(l))_(n,l,T);else if(O(l)){let e=!0;if(0!==n.currentWord.length&&(n.currentWord.push(l),n.words.push(n.currentWord.join("")),n.words.length>2&&x(n.words[n.words.length-2])&&x(n.words[n.words.length-1]))){let t=n.words[n.words.length-2],s=n.words[n.words.length-1];n.words.splice(n.words.length-2,2),n.currentWord=[(t+s).split()],n.mode=T,e=!1}e&&(n.currentWord=[],n.mode=M)}else m(l)?n.currentWord.push(l):_(n,l,M)}}return 0!==n.currentWord.length&&n.words.push(n.currentWord.join("")),n.words}function _(e,t,n){0!==e.currentWord.length&&e.words.push(e.currentWord.join("")),e.currentWord=[t],e.mode=n}const j=new Map([["</strong>",0],["</em>",0],["</b>",0],["</i>",0],["</big>",0],["</small>",0],["</u>",0],["</sub>",0],["</strike>",0],["</s>",0]]),S=/<((strong)|(b)|(i)|(em)|(big)|(small)|(u)|(sub)|(sup)|(strike)|(s))[\>\s]+/gi;class A{constructor(e,t){this.content=[],this.newText=t,this.oldText=e,this.specialTagDiffStack=[],this.newWords=[],this.oldWords=[],this.matchGranularity=0,this.blockExpressions=[],this.repeatingWordsAccuracy=1,this.ignoreWhiteSpaceDifferences=!1,this.orphanMatchThreshold=0}build(){if(this.oldText===this.newText)return this.newText;this.splitInputsIntoWords(),this.matchGranularity=Math.min(4,this.oldWords.length,this.newWords.length);let e=this.operations();for(let t of e)this.performOperation(t);return this.content.join("")}addBlockExpression(e){this.blockExpressions.push(e)}splitInputsIntoWords(){this.oldWords=y(this.oldText,this.blockExpressions),this.oldText=null,this.newWords=y(this.newText,this.blockExpressions),this.newText=null}performOperation(e){switch(e.action){case s:this.processEqualOperation(e);break;case r:this.processDeleteOperation(e,"diffdel");break;case i:this.processInsertOperation(e,"diffins");break;case o:break;case l:this.processReplaceOperation(e)}}processReplaceOperation(e){this.processDeleteOperation(e,"diffmod"),this.processInsertOperation(e,"diffmod")}processInsertOperation(e,t){let n=this.newWords.filter(((t,n)=>n>=e.startInNew&&n<e.endInNew));this.insertTag("ins",t,n)}processDeleteOperation(e,t){let n=this.oldWords.filter(((t,n)=>n>=e.startInOld&&n<e.endInOld));this.insertTag("del",t,n)}processEqualOperation(e){let t=this.newWords.filter(((t,n)=>n>=e.startInNew&&n<e.endInNew));this.content.push(t.join(""))}insertTag(e,t,n){for(;n.length;){let s=this.extractConsecutiveWords(n,(e=>!w(e))),r="",i=!1;if(0!==s.length){let n=I(s.join(""),e,t);this.content.push(n)}else{if(S.test(n[0])){if(this.specialTagDiffStack.push(n[0]),r='<ins class="mod">',"del"===e)for(n.shift();n.length>0&&S.test(n[0]);)n.shift()}else if(j.has(n[0])){let t=0===this.specialTagDiffStack.length?null:this.specialTagDiffStack.pop();if(null!==t&&t===n[0].replace(/\//g,"")&&(r="</ins>",i=!0),"del"===e)for(n.shift();n.length>0&&j.has(n[0]);)n.shift()}if(0===n.length&&0===r.length)break;i?this.content.push(r+this.extractConsecutiveWords(n,w).join("")):this.content.push(this.extractConsecutiveWords(n,w).join("")+r)}}}extractConsecutiveWords(e,t){let n=null;for(let s=0;s<e.length;
1s++){let r=e[s];if(0===s&&" "===r&&(e[s]=" "),!t(r)){n=s;break}}if(null!==n){let t=e.filter(((e,t)=>t>=0&&t<n));return n>0&&e.splice(0,n),t}{let t=e.filter(((t,n)=>n>=0&&n<e.length));return e.splice(0,e.length),t}}operations(){let e=0,t=0,n=[],d=this.matchingBlocks();d.push(new h(this.oldWords.length,this.newWords.length,0));let c=this.removeOrphans(d);for(let h of c){let d,c=e===h.startInOld,a=t===h.startInNew;(d=c||a?c&&!a?i:c?o:r:l)!==o&&n.push(new k(d,e,h.startInOld,t,h.startInNew)),0!==h.length&&n.push(new k(s,h.startInOld,h.endInOld,h.startInNew,h.endInNew)),e=h.endInOld,t=h.endInNew}return n}*removeOrphans(e){let t=null,n=null;for(let s of e){if(null===n){t=new h(0,0,0),n=s;continue}if(t.endInOld===n.startInOld&&t.endInNew===n.startInNew||n.endInOld===s.startInOld&&n.endInNew===s.startInNew){yield n,t=n,n=s;continue}let e=(e,t)=>e+t.length,r=this.oldWords.slice(t.endInOld,s.startInOld).reduce(e,0),i=this.newWords.slice(t.endInNew,s.startInNew).reduce(e,0);this.newWords.slice(n.startInNew,n.endInNew).reduce(e,0)>Math.max(r,i)*this.orphanMatchThreshold&&(yield n),t=n,n=s}yield n}matchingBlocks(){let e=[];return this.findMatchingBlocks(0,this.oldWords.length,0,this.newWords.length,e),e}findMatchingBlocks(e,t,n,s,r){let i=this.findMatch(e,t,n,s);null!==i&&(e<i.startInOld&&n<i.startInNew&&this.findMatchingBlocks(e,i.startInOld,n,i.startInNew,r),r.push(i),i.endInOld<t&&i.endInNew<s&&this.findMatchingBlocks(i.endInOld,t,i.endInNew,s,r))}findMatch(e,t,n,s){for(let r=this.matchGranularity;r>0;r--){let i=new d;i.blockSize=r,i.repeatingWordsAccuracy=this.repeatingWordsAccuracy,i.ignoreWhitespaceDifferences=this.ignoreWhiteSpaceDifferences;let o=new b(this.oldWords,this.newWords,e,t,n,s,i).findMatch();if(null!==o)return o}return null}}A.execute=function(e,t){return new A(e,t).build()},t.default=A},function(e,t,n){e.exports=n(0)}])}}]); 2//# sourceMappingURL=htmldiff-js.8a6eda64.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.