pandorafms/pandora_console/include/javascript/diff2html-ui.min.js

1 line
951 KiB
JavaScript
Raw Normal View History

2021-10-19 21:11:09 +02:00
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var a in n)("object"==typeof exports?exports:e)[a]=n[a]}}(this,(function(){return e={696:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertChangesToDMP=function(e){for(var t,n,a=[],r=0;r<e.length;r++)n=(t=e[r]).added?1:t.removed?-1:0,a.push([n,t.value]);return a}},5826:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertChangesToXML=function(e){for(var t=[],n=0;n<e.length;n++){var a=e[n];a.added?t.push("<ins>"):a.removed&&t.push("<del>"),t.push(a.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")),a.added?t.push("</ins>"):a.removed&&t.push("</del>")}return t.join("")}},6976:(e,t,n)=>{"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.diffArrays=function(e,t,n){return r.diff(e,t,n)},t.arrayDiff=void 0;var r=new(((a=n(5913))&&a.__esModule?a:{default:a}).default);t.arrayDiff=r,r.tokenize=function(e){return e.slice()},r.join=r.removeEmpty=function(e){return e}},5913:(e,t)=>{"use strict";function n(){}function a(e,t,n,a,r){for(var i=0,o=t.length,s=0,l=0;i<o;i++){var c=t[i];if(c.removed){if(c.value=e.join(a.slice(l,l+c.count)),l+=c.count,i&&t[i-1].added){var _=t[i-1];t[i-1]=t[i],t[i]=_}}else{if(!c.added&&r){var d=n.slice(s,s+c.count);d=d.map((function(e,t){var n=a[l+t];return n.length>e.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(s,s+c.count));s+=c.count,c.added||(l+=c.count)}}var u=t[o-1];return o>1&&"string"==typeof u.value&&(u.added||u.removed)&&e.equals("",u.value)&&(t[o-2].value+=u.value,t.pop()),t}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.callback;"function"==typeof n&&(i=n,n={}),this.options=n;var o=this;function s(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,_=1,d=l+c,u=[{newPos:-1,components:[]}],p=this.extractCommon(u[0],t,e,0);if(u[0].newPos+1>=l&&p+1>=c)return s([{value:this.join(t),count:t.length}]);function m(){for(var n=-1*_;n<=_;n+=2){var i=void 0,d=u[n-1],p=u[n+1],m=(p?p.newPos:0)-n;d&&(u[n-1]=void 0);var g=d&&d.newPos+1<l,E=p&&0<=m&&m<c;if(g||E){if(!g||E&&d.newPos<p.newPos?(i=r(p),o.pushComponent(i.components,void 0,!0)):((i=d).newPos++,o.pushComponent(i.components,!0,void 0)),m=o.extractCommon(i,t,e,n),i.newPos+1>=l&&m+1>=c)return s(a(o,i.components,t,e,o.useLongestToken));u[n]=i}else u[n]=void 0}_++}if(i)!function e(){setTimeout((function(){if(_>d)return i();m()||e()}),0)}();else for(;_<=d;){var g=m();if(g)return g}},pushComponent:function(e,t,n){var a=e[e.length-1];a&&a.added===t&&a.removed===n?e[e.length-1]={count:a.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,a){for(var r=t.length,i=n.length,o=e.newPos,s=o-a,l=0;o+1<r&&s+1<i&&this.equals(t[o+1],n[s+1]);)o++,s++,l++;return l&&e.components.push({count:l}),e.newPos=o,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},7630:(e,t,n)=>{"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.diffChars=function(e,t,n){return r.diff(e,t,n)},t.characterDiff=void 0;var r=new(((a=n(5913))&&a.__esModule?a:{default:a}).default);t.characterDiff=r},4852:(e,t,n)=>{"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.diffCss=function(e,t,n){return r.diff(e,t,n)},t.cssDiff=void 0;var r=new(((a=n(5913))&&a.__esModule?a:{default:a}).default);t.cssDiff=r,r.tokenize=function(e){r