1 line
122 KiB
JavaScript
1 line
122 KiB
JavaScript
|
!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){},{}],2:[function(require,module,exports){!function(root,factory){"object"==typeof exports&&"object"==typeof module?module.exports=factory():"function"==typeof define&&define.amd?define([],factory):"object"==typeof exports?exports.JsDiff=factory():root.JsDiff=factory()}(this,function(){return function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:!1};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.p="",__webpack_require__(0)}([function(module,exports,__webpack_require__){"use strict";exports.__esModule=!0,exports.canonicalize=exports.convertChangesToXML=exports.convertChangesToDMP=exports.merge=exports.parsePatch=exports.applyPatches=exports.applyPatch=exports.createPatch=exports.createTwoFilesPatch=exports.structuredPatch=exports.diffArrays=exports.diffJson=exports.diffCss=exports.diffSentences=exports.diffTrimmedLines=exports.diffLines=exports.diffWordsWithSpace=exports.diffWords=exports.diffChars=exports.Diff=void 0;var _base2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__(1)),_character=__webpack_require__(2),_word=__webpack_require__(3),_line=__webpack_require__(5),_sentence=__webpack_require__(6),_css=__webpack_require__(7),_json=__webpack_require__(8),_array=__webpack_require__(9),_apply=__webpack_require__(10),_parse=__webpack_require__(11),_merge=__webpack_require__(13),_create=__webpack_require__(14),_dmp=__webpack_require__(16),_xml=__webpack_require__(17);exports.Diff=_base2.default,exports.diffChars=_character.diffChars,exports.diffWords=_word.diffWords,exports.diffWordsWithSpace=_word.diffWordsWithSpace,exports.diffLines=_line.diffLines,exports.diffTrimmedLines=_line.diffTrimmedLines,exports.diffSentences=_sentence.diffSentences,exports.diffCss=_css.diffCss,exports.diffJson=_json.diffJson,exports.diffArrays=_array.diffArrays,exports.structuredPatch=_create.structuredPatch,exports.createTwoFilesPatch=_create.createTwoFilesPatch,exports.createPatch=_create.createPatch,exports.applyPatch=_apply.applyPatch,exports.applyPatches=_apply.applyPatches,exports.parsePatch=_parse.parsePatch,exports.merge=_merge.merge,exports.convertChangesToDMP=_dmp.convertChangesToDMP,exports.convertChangesToXML=_xml.convertChangesToXML,exports.canonicalize=_json.canonicalize},function(module,exports){"use strict";function Diff(){}function buildValues(diff,components,newString,oldString,useLongestToken){for(var componentPos=0,componentLen=components.length,newPos=0,oldPos=0;componentPos<componentLen;componentPos++){var component=components[componentPos];if(component.removed){if(component.value=diff.join(oldString.slice(oldPos,oldPos+component.count)),oldPos+=component.count,componentPos&&components[componentPos-1].added){var tmp=components[componentPos-1];components[componentPos-1]=components[componentPos],components[componentPos]=tmp}}else{if(!component.added&&useLongestToken){var value=newString.slice(newPos,newPos+component.count);value=value.map(function(value,i){var oldValue=oldString[oldPos+i];return oldValue.length>value.length?oldValue:value}),component.value=diff.join(value)}else component.value=diff.join(newString.slice(newPos,newPos+component.count));newPos+=component.count,component.added||(oldPos+=component.count)}}var lastComponent=components[componentLen-1];return componentLen>1&&(lastComponen
|