PluginProbe ʕ •ᴥ•ʔ
SiteOrigin CSS / 1.2.1
SiteOrigin CSS v1.2.1
1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.10 1.5.11 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0
so-css / lib / codemirror / addon / search / search.min.js
so-css / lib / codemirror / addon / search Last commit date
jump-to-line.js 8 years ago jump-to-line.min.js 8 years ago match-highlighter.js 8 years ago match-highlighter.min.js 8 years ago matchesonscrollbar.css 8 years ago matchesonscrollbar.js 8 years ago matchesonscrollbar.min.js 8 years ago search.js 8 years ago search.min.js 8 years ago searchcursor.js 8 years ago searchcursor.min.js 8 years ago
search.min.js
1 lines
1 !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],e):e(CodeMirror)}(function(e){"use strict";function n(e,n){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(n){e.lastIndex=n.pos;var o=e.exec(n.string);if(o&&o.index==n.pos)return n.pos+=o[0].length||1,"searching";o?n.pos=o.index:n.skipToEnd()}}}function o(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function t(e){return e.state.search||(e.state.search=new o)}function r(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,n,o){return e.getSearchCursor(n,o,{caseFold:r(n),multiline:!0})}function a(e,n,o,t,r){e.openDialog(n,t,{value:o,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){y(e)},onKeyDown:r})}function s(e,n,o,t,r){e.openDialog?e.openDialog(n,r,{value:t,selectValueOnOpen:!0}):r(prompt(o,t))}function c(e,n,o,t){e.openConfirm?e.openConfirm(n,t):confirm(o)&&t[0]()}function l(e){return e.replace(/\\(.)/g,function(e,n){return"n"==n?"\n":"r"==n?"\r":n})}function u(e){var n=e.match(/^\/(.*)\/([a-z]*)$/);if(n)try{e=new RegExp(n[1],-1==n[2].indexOf("i")?"":"i")}catch(e){}else e=l(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function f(e,o,t){o.queryText=t,o.query=u(t),e.removeOverlay(o.overlay,r(o.query)),o.overlay=n(o.query,r(o.query)),e.addOverlay(o.overlay),e.showMatchesOnScrollbar&&(o.annotate&&(o.annotate.clear(),o.annotate=null),o.annotate=e.showMatchesOnScrollbar(o.query,r(o.query)))}function p(n,o,r,i){var c=t(n);if(c.query)return d(n,o);var l=n.getSelection()||c.lastQuery;if(l instanceof RegExp&&"x^"==l.source&&(l=null),r&&n.openDialog){var u=null,p=function(o,t){e.e_stop(t),o&&(o!=c.queryText&&(f(n,c,o),c.posFrom=c.posTo=n.getCursor()),u&&(u.style.opacity=1),d(n,t.shiftKey,function(e,o){var t;o.line<3&&document.querySelector&&(t=n.display.wrapper.querySelector(".CodeMirror-dialog"))&&t.getBoundingClientRect().bottom-4>n.cursorCoords(o,"window").top&&((u=t).style.opacity=.4)}))};a(n,h,l,p,function(o,r){var i=e.keyName(o),a=n.getOption("extraKeys"),s=a&&a[i]||e.keyMap[n.getOption("keyMap")][i];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(o),f(n,t(n),r),n.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(o),p(r,o))}),i&&l&&(f(n,c,l),d(n,o))}else s(n,h,"Search for:",l,function(e){e&&!c.query&&n.operation(function(){f(n,c,e),c.posFrom=c.posTo=n.getCursor(),d(n,o)})})}function d(n,o,r){n.operation(function(){var a=t(n),s=i(n,a.query,o?a.posFrom:a.posTo);(s.find(o)||(s=i(n,a.query,o?e.Pos(n.lastLine()):e.Pos(n.firstLine(),0)),s.find(o)))&&(n.setSelection(s.from(),s.to()),n.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),r&&r(s.from(),s.to()))})}function y(e){e.operation(function(){var n=t(e);n.lastQuery=n.query,n.query&&(n.query=n.queryText=null,e.removeOverlay(n.overlay),n.annotate&&(n.annotate.clear(),n.annotate=null))})}function m(e,n,o){e.operation(function(){for(var t=i(e,n);t.findNext();)if("string"!=typeof n){var r=e.getRange(t.from(),t.to()).match(n);t.replace(o.replace(/\$(\d)/g,function(e,n){return r[n]}))}else t.replace(o)})}function g(e,n){if(!e.getOption("readOnly")){var o=e.getSelection()||t(e).lastQuery,r='<span class="CodeMirror-search-label">'+(n?"Replace all:":"Replace:")+"</span>";s(e,r+v,r,o,function(o){o&&(o=u(o),s(e,x,"Replace with:","",function(t){if(t=l(t),n)m(e,o,t);else{y(e);var r=i(e,o,e.getCursor("from")),a=function(){var n,l=r.from();!(n=r.findNext())&&(r=i(e,o),!(n=r.findNext())||l&&r.from().line==l.line&&r.from().ch==l.ch)||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()}),c(e,C,"Replace?",[function(){s(n)},a,function(){m(e,o,t)}]))},s=function(e){r.replace("string"==typeof o?t:t.replace(/\$(\d)/g,function(n,o){return e[o]})),a()};a()}}))})}}var h='<span class="CodeMirror-search-label">Search:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',v=' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',x='<span class="CodeMirror-search-label">With:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',C='<span class="CodeMirror-search-label">Replace?</span> <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>';e.commands.find=function(e){y(e),p(e)},e.commands.findPersistent=function(e){y(e),p(e,!1,!0)},e.commands.findPersistentNext=function(e){p(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){p(e,!0,!0,!0)},e.commands.findNext=p,e.commands.findPrev=function(e){p(e,!0)},e.commands.clearSearch=y,e.commands.replace=g,e.commands.replaceAll=function(e){g(e,!0)}});