PageSourceSearch

https://cdn.100xgj.com/static/js/layer.js

js 100xgj.com collected 2026-10-04 01:28:22 UTC 42,131 bytes, 1,390 lines download raw bytes

1
2/*!
3 * layer - 通用 Web 弹出层组件
4 * MIT Licensed 
5 */
6
7;!function(window, undefined){
8"use strict";
9
10var isLayui = window.layui && layui.define, $, win, ready = {
11  getPath: function(){
12    var jsPath = document.currentScript ? document.currentScript.src : function(){
13      var js = document.scripts
14      ,last = js.length - 1
15      ,src;
16      for(var i = last; i > 0; i--){
17        if(js[i].readyState === 'interactive'){
18          src = js[i].src;
19          break;
20        }
21      }
22      return src || js[last].src;
23    }()
24    ,GLOBAL = window.LAYUI_GLOBAL || {};
25    return GLOBAL.layer_dir || jsPath.substring(0, jsPath.lastIndexOf('/') + 1);
26  }(),
27
28  config: {}, end: {}, minIndex: 0, minLeft: [],
29  btn: ['确定', '取消'],
30
31  //五种原始层模式
32  type: ['dialog', 'page', 'iframe', 'loading', 'tips'],
33  
34  //获取节点的style属性值
35  getStyle: function(node, name){
36    var style = node.currentStyle ? node.currentStyle : window.getComputedStyle(node, null);
37    return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);
38  },
39  
40  //载入 CSS 依赖
41  link: function(href, fn, cssname){
42    //未设置路径,则不主动加载css
43    if(!layer.path) return;
44    
45    var head = document.getElementsByTagName("head")[0]
46    ,link = document.createElement('link');
47    
48    if(typeof fn === 'string') cssname = fn;
49    
50    var app = (cssname || href).replace(/\.|\//g, '');
51    var id = 'layuicss-'+ app
52    ,STAUTS_NAME = 'creating'
53    ,timeout = 0;
54    
55    link.rel = 'stylesheet';
56    link.href = layer.path + href;
57    link.id = id;
58    
59    if(!document.getElementById(id)){
60      head.appendChild(link);
61    }
62
63    if(typeof fn !== 'function') return;
64
65    //轮询 css 是否加载完毕
66    (function poll(status) {
67      var delay = 100
68      ,getLinkElem = document.getElementById(id); //获取动态插入的 link 元素
69      
70      //如果轮询超过指定秒数,则视为请求文件失败或 css 文件不符合规范
71      if(++timeout > 10 * 1000 / delay){
72        return window.console && console.error(app +'.css: Invalid');
73      };
74      
75      //css 加载就绪
76      if(parseInt(ready.getStyle(getLinkElem, 'width')) === 1989){
77        //如果参数来自于初始轮询(即未加载就绪时的),则移除 link 标签状态
78        if(status === STAUTS_NAME) getLinkElem.removeAttribute('lay-status');
79        //如果 link 标签的状态仍为「创建中」,则继续进入轮询,直到状态改变,则执行回调
80        getLinkElem.getAttribute('lay-status') === STAUTS_NAME ? setTimeout(poll, delay) : fn();
81      } else {
82        getLinkElem.setAttribute('lay-status', STAUTS_NAME);
83        setTimeout(function(){
84          poll(STAUTS_NAME);
85        }, delay);
86      }
87
88      //parseInt(ready.getStyle(document.getElementById(id), 'width')) === 1989 ? fn() : setTimeout(poll, 1000);
89    }());
90
91  }
92};
93
94//默认内置方法。
95var layer = {
96  v: '3.5.1',
97  ie: function(){ //ie版本
98    var agent = navigator.userAgent.toLowerCase();
99    return (!!window.ActiveXObject || "ActiveXObject" in window) ? (
100      (agent.match(/msie\s(\d+)/) || [])[1] || '11' //由于ie11并没有msie的标识
101    ) : false;
102  }(),
103  index: (window.layer && window.layer.v) ? 100000 : 0,
104  path: ready.getPath,
105  config: function(options, fn){
106    options = options || {};
107    layer.cache = ready.config = $.extend({}, ready.config, options);
108    layer.path = ready.config.path || layer.path;
109    typeof options.extend === 'string' && (options.extend = [options.extend]);
110    
111    //如果设置了路径,则加载样式
112    if(ready.config.path) layer.ready();
113    
114    if(!options.extend) return this;
115    
116    isLayui 
117      ? layui.addcss('modules/layer/' + options.extend)
118    : ready.link('theme/' + options.extend);
119    
120    return this;
121  },
122
123  //主体CSS等待事件
124  ready: function(callback){
125    var cssname = 'layer', ver = ''
126    ,path = (isLayui ? 'modules/layer/' : 'theme/') + 'default/layer.css?v='+ layer.v + ver;
127    isLayui ? layui.addcss(path, callback, cssname) : ready.link(path, callback, cssname);
128    return this;
129  },
130  
131  //各种快捷引用
132  alert: function(content, options, yes){
133    var type = typeof options === 'function';
134    if(type) yes = options;
135    return layer.open($.extend({
136      content: content,
137      yes: yes
138    }, type ? {} : options));
139  }, 
140  
141  confirm: function(content, options, yes, cancel){ 
142    var type = typeof options === 'function';
143    if(type){
144      cancel = yes;
145      yes = options;
146    }
147    return layer.open($.extend({
148      content: content,
149      btn: ready.btn,
150      yes: yes,
151      btn2: cancel
152    }, type ? {} : options));
153  },
154  
155  msg: function(content, options, end){ //最常用提示层
156    var type = typeof options === 'function', rskin = ready.config.skin;
157    var skin = (rskin ? rskin + ' ' + rskin + '-msg' : '')||'layui-layer-msg';
158    var anim = doms.anim.length - 1;
159    if(type) end = options;
160    return layer.open($.extend({
161      content: content,
162      time: 3000,
163      shade: false,
164      skin: skin,
165      title: false,
166      closeBtn: false,
167      btn: false,
168      resize: false,
169      end: end
170    }, (type && !ready.config.skin) ? {
171      skin: skin + ' layui-layer-hui',
172      anim: anim
173    } : function(){
174       options = options || {};
175       if(options.icon === -1 || options.icon === undefined && !ready.config.skin){
176         options.skin = skin + ' ' + (options.skin||'layui-layer-hui');
177       }
178       return options;
179    }()));  
180  },
181  
182  load: function(icon, options){
183    return layer.open($.extend({
184      type: 3,
185      icon: icon || 0,
186      resize: false,
187      shade: 0.01
188    }, options));
189  }, 
190  
191  tips: function(content, follow, options){
192    return layer.open($.extend({
193      type: 4,
194      content: [content, follow],
195      closeBtn: false,
196      time: 3000,
197      shade: false,
198      resize: false,
199      fixed: false,
200      maxWidth: 260
201    }, options));
202  }
203};
204
205var Class = function(setings){  
206  var that = this, creat = function(){
207    that.creat();
208  };
209  that.index = ++layer.index;
210  that.config.maxWidth = $(win).width() - 15*2; //初始最大宽度:当前屏幕宽,左右留 15px 边距
211  that.config = $.extend({}, that.config, ready.config, setings);
212  document.body ? creat() : setTimeout(function(){
213    creat();
214  }, 30);
215};
216
217Class.pt = Class.prototype;
218
219//缓存常用字符
220var doms = ['layui-layer', '.layui-layer-title', '.layui-layer-main', '.layui-layer-dialog', 'layui-layer-iframe', 'layui-layer-content', 'layui-layer-btn', 'layui-layer-close'];
221doms.anim = ['layer-anim-00', 'layer-anim-01', 'layer-anim-02', 'layer-anim-03', 'layer-anim-04', 'layer-anim-05', 'layer-anim-06'];
222
223doms.SHADE = 'layui-layer-shade';
224doms.MOVE = 'layui-layer-move';
225
226//默认配置
227Class.pt.config = {
228  type: 0,
229  shade: 0.3,
230  fixed: true,
231  move: doms[1],
232  title: '信息',
233  offset: 'auto',
234  area: 'auto',
235  closeBtn: 1,
236  time: 0, //0表示不自动关闭
237  zIndex: 19891014, 
238  maxWidth: 360,
239  anim: 0,
240  isOutAnim: true, //退出动画
241  minStack: true, //最小化堆叠
242  icon: -1,
243  moveType: 1,
244  resize: true,
245  scrollbar: true, //是否允许浏览器滚动条
246  tips: 2
247};
248
249//容器
250Class.pt.vessel = function(conType, callback){
251  var that = this, times = that.index, config = that.config;
252  var zIndex = config.zIndex + times, titype = typeof config.title === 'object';
253  var ismax = config.maxmin && (config.type === 1 || config.type === 2);
254  var titleHTML = (config.title ? '<div class="layui-layer-title" style="'+ (titype ? config.title[1] : '') +'">' 
255    + (titype ? config.title[0] : config.title) 
256  + '</div>' : '');
257  
258  config.zIndex = zIndex;
259  callback([
260    //遮罩
261    config.shade ? ('<div class="'+ doms.SHADE +'" id="'+ doms.SHADE + times +'" times="'+ times +'" style="'+ ('z-index:'+ (zIndex-1) +'; ') +'"></div>') : '',
262    
263    //主体
264    '<div class="'+ doms[0] + (' layui-layer-'+ready.type[config.type]) + (((config.type == 0 || config.type == 2) && !config.shade) ? ' layui-layer-border' : '') + ' ' + (config.skin||'') +'" id="'+ doms[0] + times +'" type="'+ ready.type[config.type] +'" times="'+ times +'" showtime="'+ config.time +'" conType="'+ (conType ? 'object' : 'string') +'" style="z-index: '+ zIndex +'; width:'+ config.area[0] + ';height:' + config.area[1] + ';position:'+ (config.fixed ? 'fixed;' : 'absolute;') +'">'
265      + (conType && config.type != 2 ? '' : titleHTML)
266      + '<div id="'+ (config.id||'') +'" class="layui-layer-content'+ ((config.type == 0 && config.icon !== -1) ? ' layui-layer-padding' :'') + (config.type == 3 ? ' layui-layer-loading'+config.icon : '') +'">'
267        + (config.type == 0 && config.icon !== -1 ? '<i class="layui-layer-ico layui-layer-ico'+ config.icon +'"></i>' : '')
268        + (config.type == 1 && conType ? '' : (config.content||''))
269      + '</div>'
270      + '<span class="layui-layer-setwin">'+ function(){
271        var closebtn = ismax ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : '';
272        config.closeBtn && (closebtn += '<a class="layui-layer-ico '+ doms[7] +' '+ doms[7] + (config.title ? config.closeBtn : (config.type == 4 ? '1' : '2')) +'" href="javascript:;"></a>');
273        return closebtn;
274      }() + '</span>'
275      + (config.btn ? function(){
276        var button = '';
277        typeof config.btn === 'string' && (config.btn = [config.btn]);
278        for(var i = 0, len = config.btn.length; i < len; i++){
279          button += '<a class="'+ doms[6] +''+ i +'">'+ config.btn[i] +'</a>'
280        }
281        return '<div class="'+ doms[6] +' layui-layer-btn-'+ (config.btnAlign||'') +'">'+ button +'</div>'
282      }() : '')
283      + (config.resize ? '<span class="layui-layer-resize"></span>' : '')
284    + '</div>'
285  ], titleHTML, $('<div class="'+ doms.MOVE +'" id="'+ doms.MOVE +'"></div>'));
286  return that;
287};
288
289//创建骨架
290Class.pt.creat = function(){
291  var that = this
292  ,config = that.config
293  ,times = that.index, nodeIndex
294  ,content = config.content
295  ,conType = typeof content === 'object'
296  ,body = $('body');
297  
298  if(config.id && $('#'+config.id)[0])  return;
299
300  if(typeof config.area === 'string'){
301    config.area = config.area === 'auto' ? ['', ''] : [config.area, ''];
302  }
303  
304  //anim兼容旧版shift
305  if(config.shift){
306    config.anim = config.shift;
307  }
308  
309  if(layer.ie == 6){
310    config.fixed = false;
311  }
312  
313  switch(config.type){
314    case 0:
315      config.btn = ('btn' in config) ? config.btn : ready.btn[0];
316      layer.closeAll('dialog');
317    break;
318    case 2:
319      var content = config.content = conType ? config.content : [config.content||'', 'auto'];
320      config.content = '<iframe scrolling="'+ (config.content[1]||'auto') +'" allowtransparency="true" id="'+ doms[4] +''+ times +'" name="'+ doms[4] +''+ times +'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' + config.content[0] + '"></iframe>';
321    break;
322    case 3:
323      delete config.title;
324      delete config.closeBtn;
325      config.icon === -1 && (config.icon === 0);
326      layer.closeAll('loading');
327    break;
328    case 4:
329      conType || (config.content = [config.content, 'body']);
330      config.follow = config.content[1];
331      config.content = config.content[0] + '<i class="layui-layer-TipsG"></i>';
332      delete config.title;
333      config.tips = typeof config.tips === 'object' ? config.tips : [config.tips, true];
334      config.tipsMore || layer.closeAll('tips');
335    break;
336  }
337  
338  //建立容器
339  that.vessel(conType, function(html, titleHTML, moveElem){
340    body.append(html[0]);
341    conType ? function(){
342      (config.type == 2 || config.type == 4) ? function(){
343        $('body').append(html[1]);
344      }() : function(){
345        if(!content.parents('.'+doms[0])[0]){
346          content.data('display', content.css('display')).show().addClass('layui-layer-wrap').wrap(html[1]);
347          $('#'+ doms[0] + times).find('.'+doms[5]).before(titleHTML);
348        }
349      }();
350    }() : body.append(html[1]);
351    $('#'+ doms.MOVE)[0] || body.append(ready.moveElem = moveElem);
352    
353    that.layero = $('#'+ doms[0] + times);
354    that.shadeo = $('#'+ doms.SHADE + times);
355    
356    config.scrollbar || doms.html.css('overflow', 'hidden').attr('layer-full', times);
357  }).auto(times);
358  
359  //遮罩
360  that.shadeo.css({
361    'background-color': config.shade[1] || '#000'
362    ,'opacity': config.shade[0] || config.shade
363  });
364
365  config.type == 2 && layer.ie == 6 && that.layero.find('iframe').attr('src', content[0]);
366
367  //坐标自适应浏览器窗口尺寸
368  config.type == 4 ? that.tips() : function(){
369    that.offset()
370    //首次弹出时,若 css 尚未加载,则等待 css 加载完毕后,重新设定尺寸
371    parseInt(ready.getStyle(document.getElementById(doms.MOVE), 'z-index')) ||  function(){
372      that.layero.css('visibility', 'hidden');
373      layer.ready(function(){
374        that.offset();
375        that.layero.css('visibility', 'visible');
376      });
377    }();
378  }();
379  
380  //如果是固定定位
381  if(config.fixed){
382    win.on('resize', function(){
383      that.offset();
384      (/^\d+%$/.test(config.area[0]) || /^\d+%$/.test(config.area[1])) && that.auto(times);
385      config.type == 4 && that.tips();
386    });
387  }
388  
389  config.time <= 0 || setTimeout(function(){
390    layer.close(that.index);
391  }
vendor: 16,384 bytes, lines 391-964
391, config.time);
392  that.move().callback();
393  
394  //为兼容jQuery3.0的css动画影响元素尺寸计算
395  if(doms.anim[config.anim]){
396    var animClass = 'layer-anim '+ doms.anim[config.anim];
397    that.layero.addClass(animClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
398      $(this).removeClass(animClass);
399    });
400  };
401  
402  //记录关闭动画
403  if(config.isOutAnim){
404    that.layero.data('isOutAnim', true);
405  }
406};
407
408//自适应
409Class.pt.auto = function(index){
410  var that = this, config = that.config, layero = $('#'+ doms[0] + index);
411  
412  if(config.area[0] === '' && config.maxWidth > 0){
413    //为了修复IE7下一个让人难以理解的bug
414    if(layer.ie && layer.ie < 8 && config.btn){
415      layero.width(layero.innerWidth());
416    }
417    layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth);
418  }
419  
420  var area = [layero.innerWidth(), layero.innerHeight()]
421  ,titHeight = layero.find(doms[1]).outerHeight() || 0
422  ,btnHeight = layero.find('.'+doms[6]).outerHeight() || 0
423  ,setHeight = function(elem){
424    elem = layero.find(elem);
425    elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding-top'))|0));
426  };
427
428  switch(config.type){
429    case 2: 
430      setHeight('iframe');
431    break;
432    default:
433      if(config.area[1] === ''){
434        if(config.maxHeight > 0 && layero.outerHeight() > config.maxHeight){
435          area[1] = config.maxHeight;
436          setHeight('.'+doms[5]);
437        } else if(config.fixed && area[1] >= win.height()){
438          area[1] = win.height();
439          setHeight('.'+doms[5]);
440        }
441      } else {
442        setHeight('.'+doms[5]);
443      }
444    break;
445  };
446  
447  return that;
448};
449
450//计算坐标
451Class.pt.offset = function(){
452  var that = this, config = that.config, layero = that.layero;
453  var area = [layero.outerWidth(), layero.outerHeight()];
454  var type = typeof config.offset === 'object';
455  that.offsetTop = (win.height() - area[1])/2;
456  that.offsetLeft = (win.width() - area[0])/2;
457  
458  if(type){
459    that.offsetTop = config.offset[0];
460    that.offsetLeft = config.offset[1]||that.offsetLeft;
461  } else if(config.offset !== 'auto'){
462    
463    if(config.offset === 't'){ //上
464      that.offsetTop = 0;
465    } else if(config.offset === 'r'){ //右
466      that.offsetLeft = win.width() - area[0];
467    } else if(config.offset === 'b'){ //下
468      that.offsetTop = win.height() - area[1];
469    } else if(config.offset === 'l'){ //å·¦
470      that.offsetLeft = 0;
471    } else if(config.offset === 'lt'){ //左上角
472      that.offsetTop = 0;
473      that.offsetLeft = 0;
474    } else if(config.offset === 'lb'){ //左下角
475      that.offsetTop = win.height() - area[1];
476      that.offsetLeft = 0;
477    } else if(config.offset === 'rt'){ //右上角
478      that.offsetTop = 0;
479      that.offsetLeft = win.width() - area[0];
480    } else if(config.offset === 'rb'){ //右下角
481      that.offsetTop = win.height() - area[1];
482      that.offsetLeft = win.width() - area[0];
483    } else {
484      that.offsetTop = config.offset;
485    }
486    
487  }
488 
489  if(!config.fixed){
490    that.offsetTop = /%$/.test(that.offsetTop) ? 
491      win.height()*parseFloat(that.offsetTop)/100
492    : parseFloat(that.offsetTop);
493    that.offsetLeft = /%$/.test(that.offsetLeft) ? 
494      win.width()*parseFloat(that.offsetLeft)/100
495    : parseFloat(that.offsetLeft);
496    that.offsetTop += win.scrollTop();
497    that.offsetLeft += win.scrollLeft();
498  }
499  
500  if(layero.attr('minLeft')){
501    that.offsetTop = win.height() - (layero.find(doms[1]).outerHeight() || 0);
502    that.offsetLeft = layero.css('left');
503  }
504
505  layero.css({top: that.offsetTop, left: that.offsetLeft});
506};
507
508//Tips
509Class.pt.tips = function(){
510  var that = this, config = that.config, layero = that.layero;
511  var layArea = [layero.outerWidth(), layero.outerHeight()], follow = $(config.follow);
512  if(!follow[0]) follow = $('body');
513  var goal = {
514    width: follow.outerWidth(),
515    height: follow.outerHeight(),
516    top: follow.offset().top,
517    left: follow.offset().left
518  }, tipsG = layero.find('.layui-layer-TipsG');
519  
520  var guide = config.tips[0];
521  config.tips[1] || tipsG.remove();
522  
523  goal.autoLeft = function(){
524    if(goal.left + layArea[0] - win.width() > 0){
525      goal.tipLeft = goal.left + goal.width - layArea[0];
526      tipsG.css({right: 12, left: 'auto'});
527    } else {
528      goal.tipLeft = goal.left;
529    };
530  };
531  
532  //辨别tips的方位
533  goal.where = [function(){ //上        
534    goal.autoLeft();
535    goal.tipTop = goal.top - layArea[1] - 10;
536    tipsG.removeClass('layui-layer-TipsB').addClass('layui-layer-TipsT').css('border-right-color', config.tips[1]);
537  }, function(){ //右
538    goal.tipLeft = goal.left + goal.width + 10;
539    goal.tipTop = goal.top;
540    tipsG.removeClass('layui-layer-TipsL').addClass('layui-layer-TipsR').css('border-bottom-color', config.tips[1]); 
541  }, function(){ //下
542    goal.autoLeft();
543    goal.tipTop = goal.top + goal.height + 10;
544    tipsG.removeClass('layui-layer-TipsT').addClass('layui-layer-TipsB').css('border-right-color', config.tips[1]);
545  }, function(){ //å·¦
546    goal.tipLeft = goal.left - layArea[0] - 10;
547    goal.tipTop = goal.top;
548    tipsG.removeClass('layui-layer-TipsR').addClass('layui-layer-TipsL').css('border-bottom-color', config.tips[1]);
549  }];
550  goal.where[guide-1]();
551  
552  /* 8*2为小三角形占据的空间 */
553  if(guide === 1){
554    goal.top - (win.scrollTop() + layArea[1] + 8*2) < 0 && goal.where[2]();
555  } else if(guide === 2){
556    win.width() - (goal.left + goal.width + layArea[0] + 8*2) > 0 || goal.where[3]()
557  } else if(guide === 3){
558    (goal.top - win.scrollTop() + goal.height + layArea[1] + 8*2) - win.height() > 0 && goal.where[0]();
559  } else if(guide === 4){
560     layArea[0] + 8*2 - goal.left > 0 && goal.where[1]()
561  }
562
563  layero.find('.'+doms[5]).css({
564    'background-color': config.tips[1], 
565    'padding-right': (config.closeBtn ? '30px' : '')
566  });
567  layero.css({
568    left: goal.tipLeft - (config.fixed ? win.scrollLeft() : 0), 
569    top: goal.tipTop  - (config.fixed ? win.scrollTop() : 0)
570  });
571}
572
573//拖拽层
574Class.pt.move = function(){
575  var that = this
576  ,config = that.config
577  ,_DOC = $(document)
578  ,layero = that.layero
579  ,moveElem = layero.find(config.move)
580  ,resizeElem = layero.find('.layui-layer-resize')
581  ,dict = {};
582  
583  if(config.move){
584    moveElem.css('cursor', 'move');
585  }
586
587  moveElem.on('mousedown', function(e){
588    e.preventDefault();
589    if(config.move){
590      dict.moveStart = true;
591      dict.offset = [
592        e.clientX - parseFloat(layero.css('left'))
593        ,e.clientY - parseFloat(layero.css('top'))
594      ];
595      ready.moveElem.css('cursor', 'move').show();
596    }
597  });
598  
599  resizeElem.on('mousedown', function(e){
600    e.preventDefault();
601    dict.resizeStart = true;
602    dict.offset = [e.clientX, e.clientY];
603    dict.area = [
604      layero.outerWidth()
605      ,layero.outerHeight()
606    ];
607    ready.moveElem.css('cursor', 'se-resize').show();
608  });
609  
610  _DOC.on('mousemove', function(e){
611
612    //拖拽移动
613    if(dict.moveStart){
614      var X = e.clientX - dict.offset[0]
615      ,Y = e.clientY - dict.offset[1]
616      ,fixed = layero.css('position') === 'fixed';
617      
618      e.preventDefault();
619      
620      dict.stX = fixed ? 0 : win.scrollLeft();
621      dict.stY = fixed ? 0 : win.scrollTop();
622
623      //控制元素不被拖出窗口外
624      if(!config.moveOut){
625        var setRig = win.width() - layero.outerWidth() + dict.stX
626        ,setBot = win.height() - layero.outerHeight() + dict.stY;  
627        X < dict.stX && (X = dict.stX);
628        X > setRig && (X = setRig); 
629        Y < dict.stY && (Y = dict.stY);
630        Y > setBot && (Y = setBot);
631      }
632      
633      layero.css({
634        left: X
635        ,top: Y
636      });
637    }
638    
639    //Resize
640    if(config.resize && dict.resizeStart){
641      var X = e.clientX - dict.offset[0]
642      ,Y = e.clientY - dict.offset[1];
643      
644      e.preventDefault();
645      
646      layer.style(that.index, {
647        width: dict.area[0] + X
648        ,height: dict.area[1] + Y
649      })
650      dict.isResize = true;
651      config.resizing && config.resizing(layero);
652    }
653  }).on('mouseup', function(e){
654    if(dict.moveStart){
655      delete dict.moveStart;
656      ready.moveElem.hide();
657      config.moveEnd && config.moveEnd(layero);
658    }
659    if(dict.resizeStart){
660      delete dict.resizeStart;
661      ready.moveElem.hide();
662    }
663  });
664  
665  return that;
666};
667
668Class.pt.callback = function(){
669  var that = this, layero = that.layero, config = that.config;
670  that.openLayer();
671  if(config.success){
672    if(config.type == 2){
673      layero.find('iframe').on('load', function(){
674        config.success(layero, that.index);
675      });
676    } else {
677      config.success(layero, that.index);
678    }
679  }
680  layer.ie == 6 && that.IE6(layero);
681  
682  //按钮
683  layero.find('.'+ doms[6]).children('a').on('click', function(){
684    var index = $(this).index();
685    if(index === 0){
686      if(config.yes){
687        config.yes(that.index, layero)
688      } else if(config['btn1']){
689        config['btn1'](that.index, layero)
690      } else {
691        layer.close(that.index);
692      }
693    } else {
694      var close = config['btn'+(index+1)] && config['btn'+(index+1)](that.index, layero);
695      close === false || layer.close(that.index);
696    }
697  });
698  
699  //取消
700  function cancel(){
701    var close = config.cancel && config.cancel(that.index, layero);
702    close === false || layer.close(that.index);
703  }
704  
705  //右上角关闭回调
706  layero.find('.'+ doms[7]).on('click', cancel);
707  
708  //点遮罩关闭
709  if(config.shadeClose){
710    that.shadeo.on('click', function(){
711      layer.close(that.index);
712    });
713  } 
714  
715  //最小化
716  layero.find('.layui-layer-min').on('click', function(){
717    var min = config.min && config.min(layero, that.index);
718    min === false || layer.min(that.index, config);
719  });
720  
721  //全屏/还原
722  layero.find('.layui-layer-max').on('click', function(){
723    if($(this).hasClass('layui-layer-maxmin')){
724      layer.restore(that.index);
725      config.restore && config.restore(layero, that.index);
726    } else {
727      layer.full(that.index, config);
728      setTimeout(function(){
729        config.full && config.full(layero, that.index);
730      }, 100);
731    }
732  });
733
734  config.end && (ready.end[that.index] = config.end);
735};
736
737//for ie6 恢复select
738ready.reselect = function(){
739  $.each($('select'), function(index , value){
740    var sthis = $(this);
741    if(!sthis.parents('.'+doms[0])[0]){
742      (sthis.attr('layer') == 1 && $('.'+doms[0]).length < 1) && sthis.removeAttr('layer').show(); 
743    }
744    sthis = null;
745  });
746}; 
747
748Class.pt.IE6 = function(layero){
749  //隐藏select
750  $('select').each(function(index , value){
751    var sthis = $(this);
752    if(!sthis.parents('.'+doms[0])[0]){
753      sthis.css('display') === 'none' || sthis.attr({'layer' : '1'}).hide();
754    }
755    sthis = null;
756  });
757};
758
759//需依赖原型的对外方法
760Class.pt.openLayer = function(){
761  var that = this;
762  
763  //置顶当前窗口
764  layer.zIndex = that.config.zIndex;
765  layer.setTop = function(layero){
766    var setZindex = function(){
767      layer.zIndex++;
768      layero.css('z-index', layer.zIndex + 1);
769    };
770    layer.zIndex = parseInt(layero[0].style.zIndex);
771    layero.on('mousedown', setZindex);
772    return layer.zIndex;
773  };
774};
775
776//记录宽高坐标,用于还原
777ready.record = function(layero){
778  var area = [
779    layero.width(),
780    layero.height(),
781    layero.position().top, 
782    layero.position().left + parseFloat(layero.css('margin-left'))
783  ];
784  layero.find('.layui-layer-max').addClass('layui-layer-maxmin');
785  layero.attr({area: area});
786};
787
788ready.rescollbar = function(index){
789  if(doms.html.attr('layer-full') == index){
790    if(doms.html[0].style.removeProperty){
791      doms.html[0].style.removeProperty('overflow');
792    } else {
793      doms.html[0].style.removeAttribute('overflow');
794    }
795    doms.html.removeAttr('layer-full');
796  }
797};
798
799/** 内置成员 */
800
801window.layer = layer;
802
803//获取子iframe的DOM
804layer.getChildFrame = function(selector, index){
805  index = index || $('.'+doms[4]).attr('times');
806  return $('#'+ doms[0] + index).find('iframe').contents().find(selector);  
807};
808
809//得到当前iframe层的索引,子iframe时使用
810layer.getFrameIndex = function(name){
811  return $('#'+ name).parents('.'+doms[4]).attr('times');
812};
813
814//iframe层自适应宽高
815layer.iframeAuto = function(index){
816  if(!index) return;
817  var heg = layer.getChildFrame('html', index).outerHeight();
818  var layero = $('#'+ doms[0] + index);
819  var titHeight = layero.find(doms[1]).outerHeight() || 0;
820  var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
821  layero.css({height: heg + titHeight + btnHeight});
822  layero.find('iframe').css({height: heg});
823};
824
825//重置iframe url
826layer.iframeSrc = function(index, url){
827  $('#'+ doms[0] + index).find('iframe').attr('src', url);
828};
829
830//设定层的样式
831layer.style = function(index, options, limit){
832  var layero = $('#'+ doms[0] + index)
833  ,contElem = layero.find('.layui-layer-content')
834  ,type = layero.attr('type')
835  ,titHeight = layero.find(doms[1]).outerHeight() || 0
836  ,btnHeight = layero.find('.'+doms[6]).outerHeight() || 0
837  ,minLeft = layero.attr('minLeft');
838  
839  if(type === ready.type[3] || type === ready.type[4]){
840    return;
841  }
842  
843  if(!limit){
844    if(parseFloat(options.width) <= 260){
845      options.width = 260;
846    };
847    
848    if(parseFloat(options.height) - titHeight - btnHeight <= 64){
849      options.height = 64 + titHeight + btnHeight;
850    };
851  }
852  
853  layero.css(options);
854  btnHeight = layero.find('.'+doms[6]).outerHeight();
855  
856  if(type === ready.type[2]){
857    layero.find('iframe').css({
858      height: parseFloat(options.height) - titHeight - btnHeight
859    });
860  } else {
861    contElem.css({
862      height: parseFloat(options.height) - titHeight - btnHeight
863      - parseFloat(contElem.css('padding-top'))
864      - parseFloat(contElem.css('padding-bottom'))
865    })
866  }
867};
868
869//最小化
870layer.min = function(index, options){
871  options = options || {};
872  var layero = $('#'+ doms[0] + index)
873  ,shadeo = $('#'+ doms.SHADE + index)
874  ,titHeight = layero.find(doms[1]).outerHeight() || 0
875  ,left = layero.attr('minLeft') || (181*ready.minIndex)+'px'
876  ,position = layero.css('position')
877  ,settings = {
878    width: 180
879    ,height: titHeight
880    ,position: 'fixed'
881    ,overflow: 'hidden'
882  };
883  
884  //记录宽高坐标,用于还原
885  ready.record(layero);
886  
887  if(ready.minLeft[0]){
888    left = ready.minLeft[0];
889    ready.minLeft.shift();
890  }
891  
892  //是否堆叠在左下角
893  if(options.minStack){
894    settings.left = left;
895    settings.top = win.height() - titHeight;
896    layero.attr('minLeft') || ready.minIndex++; //初次执行,最小化操作索引自增
897    layero.attr('minLeft', left);
898  }
899  
900  layero.attr('position', position);
901  layer.style(index, settings, true);
902
903  layero.find('.layui-layer-min').hide();
904  layero.attr('type') === 'page' && layero.find(doms[4]).hide();
905  ready.rescollbar(index);
906
907  //隐藏遮罩
908  shadeo.hide();
909};
910
911//还原
912layer.restore = function(index){
913  var layero = $('#'+ doms[0] + index)
914  ,shadeo = $('#'+ doms.SHADE + index)
915  ,area = layero.attr('area').split(',')
916  ,type = layero.attr('type');
917  
918  //恢复原来尺寸
919  layer.style(index, {
920    width: parseFloat(area[0]), 
921    height: parseFloat(area[1]), 
922    top: parseFloat(area[2]), 
923    left: parseFloat(area[3]),
924    position: layero.attr('position'),
925    overflow: 'visible'
926  }, true);
927  
928  layero.find('.layui-layer-max').removeClass('layui-layer-maxmin');
929  layero.find('.layui-layer-min').show();
930  layero.attr('type') === 'page' && layero.find(doms[4]).show();
931  ready.rescollbar(index);
932  
933  //恢复遮罩
934  shadeo.show();
935};
936
937//全屏
938layer.full = function(index){
939  var layero = $('#'+ doms[0] + index), timer;
940  ready.record(layero);
941  if(!doms.html.attr('layer-full')){
942    doms.html.css('overflow','hidden').attr('layer-full', index);
943  }
944  clearTimeout(timer);
945  timer = setTimeout(function(){
946    var isfix = layero.css('position') === 'fixed';
947    layer.style(index, {
948      top: isfix ? 0 : win.scrollTop(),
949      left: isfix ? 0 : win.scrollLeft(),
950      width: win.width(),
951      height: win.height()
952    }, true);
953    layero.find('.layui-layer-min').hide();
954  }, 100);
955};
956
957//改变title
958layer.title = function(name, index){
959  var title = $('#'+ doms[0] + (index||layer.index)).find(doms[1]);
960  title.html(name);
961};
962
963//关闭layer总方法
964layer.close = function(index, callb
964ack){
965  var layero = $('#'+ doms[0] + index), type = layero.attr('type'), closeAnim = 'layer-anim-close';
966  if(!layero[0]) return;
967  var WRAP = 'layui-layer-wrap', remove = function(){
968    if(type === ready.type[1] && layero.attr('conType') === 'object'){
969      layero.children(':not(.'+ doms[5] +')').remove();
970      var wrap = layero.find('.'+WRAP);
971      for(var i = 0; i < 2; i++){
972        wrap.unwrap();
973      }
974      wrap.css('display', wrap.data('display')).removeClass(WRAP);
975    } else {
976      //低版本IE 回收 iframe
977      if(type === ready.type[2]){
978        try {
979          var iframe = $('#'+doms[4]+index)[0];
980          iframe.contentWindow.document.write('');
981          iframe.contentWindow.close();
982          layero.find('.'+doms[5])[0].removeChild(iframe);
983        } catch(e){}
984      }
985      layero[0].innerHTML = '';
986      layero.remove();
987    }
988    typeof ready.end[index] === 'function' && ready.end[index]();
989    delete ready.end[index];
990    typeof callback === 'function' && callback();
991  };
992  
993  if(layero.data('isOutAnim')){
994    layero.addClass('layer-anim '+ closeAnim);
995  }
996  
997  $('#layui-layer-moves, #'+ doms.SHADE + index).remove();
998  layer.ie == 6 && ready.reselect();
999  ready.rescollbar(index); 
1000  if(layero.attr('minLeft')){
1001    ready.minIndex--;
1002    ready.minLeft.push(layero.attr('minLeft'));
1003  }
1004  
1005  if((layer.ie && layer.ie < 10) || !layero.data('isOutAnim')){
1006    remove()
1007  } else {
1008    setTimeout(function(){
1009      remove();
1010    }, 200);
1011  }
1012};
1013
1014//关闭所有层
1015layer.closeAll = function(type, callback){
1016  if(typeof type === 'function'){
1017    callback = type;
1018    type = null;
1019  };
1020  var domsElem = $('.'+doms[0]);
1021  $.each(domsElem, function(_index){
1022    var othis = $(this);
1023    var is = type ? (othis.attr('type') === type) : 1;
1024    is && layer.close(othis.attr('times'), _index === domsElem.length - 1 ? callback : null);
1025    is = null;
1026  });
1027  if(domsElem.length === 0) typeof callback === 'function' && callback();
1028};
1029
1030/** 
1031
1032  拓展模块,layui 开始合并在一起
1033
1034 */
1035
1036var cache = layer.cache||{}, skin = function(type){
1037  return (cache.skin ? (' ' + cache.skin + ' ' + cache.skin + '-'+type) : '');
1038}; 
1039 
1040//仿系统prompt
1041layer.prompt = function(options, yes){
1042  var style = '';
1043  options = options || {};
1044  
1045  if(typeof options === 'function') yes = options;
1046  
1047  if(options.area){
1048    var area = options.area;
1049    style = 'style="width: '+ area[0] +'; height: '+ area[1] + ';"';
1050    delete options.area;
1051  }
1052  var prompt, content = options.formType == 2 ? '<textarea class="layui-layer-input"' + style +'></textarea>' : function(){
1053    return '<input type="'+ (options.formType == 1 ? 'password' : 'text') +'" class="layui-layer-input">';
1054  }();
1055  
1056  var success = options.success;
1057  delete options.success;
1058  
1059  return layer.open($.extend({
1060    type: 1
1061    ,btn: ['&#x786E;&#x5B9A;','&#x53D6;&#x6D88;']
1062    ,content: content
1063    ,skin: 'layui-layer-prompt' + skin('prompt')
1064    ,maxWidth: win.width()
1065    ,success: function(layero){
1066      prompt = layero.find('.layui-layer-input');
1067      prompt.val(options.value || '').focus();
1068      typeof success === 'function' && success(layero);
1069    }
1070    ,resize: false
1071    ,yes: function(index){
1072      var value = prompt.val();
1073      if(value === ''){
1074        prompt.focus();
1075      } else if(value.length > (options.maxlength||500)) {
1076        layer.tips('&#x6700;&#x591A;&#x8F93;&#x5165;'+ (options.maxlength || 500) +'&#x4E2A;&#x5B57;&#x6570;', prompt, {tips: 1});
1077      } else {
1078        yes && yes(value, index, prompt);
1079      }
1080    }
1081  }, options));
1082};
1083
1084//tab层
1085layer.tab = function(options){
1086  options = options || {};
1087  
1088  var tab = options.tab || {}
1089  ,THIS = 'layui-this'
1090  ,success = options.success;
1091  
1092  delete options.success;
1093  
1094  return layer.open($.extend({
1095    type: 1,
1096    skin: 'layui-layer-tab' + skin('tab'),
1097    resize: false,
1098    title: function(){
1099      var len = tab.length, ii = 1, str = '';
1100      if(len > 0){
1101        str = '<span class="'+ THIS +'">'+ tab[0].title +'</span>';
1102        for(; ii < len; ii++){
1103          str += '<span>'+ tab[ii].title +'</span>';
1104        }
1105      }
1106      return str;
1107    }(),
1108    content: '<ul class="layui-layer-tabmain">'+ function(){
1109      var len = tab.length, ii = 1, str = '';
1110      if(len > 0){
1111        str = '<li class="layui-layer-tabli '+ THIS +'">'+ (tab[0].content || 'no content') +'</li>';
1112        for(; ii < len; ii++){
1113          str += '<li class="layui-layer-tabli">'+ (tab[ii].content || 'no  content') +'</li>';
1114        }
1115      }
1116      return str;
1117    }() +'</ul>',
1118    success: function(layero){
1119      var btn = layero.find('.layui-layer-title').children();
1120      var main = layero.find('.layui-layer-tabmain').children();
1121      btn.on('mousedown', function(e){
1122        e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
1123        var othis = $(this), index = othis.index();
1124        othis.addClass(THIS).siblings().removeClass(THIS);
1125        main.eq(index).show().siblings().hide();
1126        typeof options.change === 'function' && options.change(index);
1127      });
1128      typeof success === 'function' && success(layero);
1129    }
1130  }, options));
1131};
1132
1133//相册层
1134layer.photos = function(options, loop, key){
1135  var dict = {};
1136  options = options || {};
1137  if(!options.photos) return;
1138  
1139  //若 photos 并非选择器或 jQuery 对象,则为普通 object
1140  var isObject = !(typeof options.photos === 'string' || options.photos instanceof $)
1141  ,photos = isObject ? options.photos : {}
1142  ,data = photos.data || []
1143  ,start = photos.start || 0;
1144  
1145  dict.imgIndex = (start|0) + 1;
1146  options.img = options.img || 'img';
1147  
1148  var success = options.success;
1149  delete options.success;
1150  
1151  //如果 options.photos 不是一个对象
1152  if(!isObject){ //页面直接获取
1153    var parent = $(options.photos), pushData = function(){
1154      data = [];
1155      parent.find(options.img).each(function(index){
1156        var othis = $(this);
1157        othis.attr('layer-index', index);
1158        data.push({
1159          alt: othis.attr('alt'),
1160          pid: othis.attr('layer-pid'),
1161          src: othis.attr('layer-src') || othis.attr('src'),
1162          thumb: othis.attr('src')
1163        });
1164      });
1165    };
1166    
1167    pushData();
1168    
1169    if (data.length === 0) return;
1170    
1171    loop || parent.on('click', options.img, function(){
1172      pushData();
1173      var othis = $(this), index = othis.attr('layer-index'); 
1174      layer.photos($.extend(options, {
1175        photos: {
1176          start: index,
1177          data: data,
1178          tab: options.tab
1179        },
1180        full: options.full
1181      }), true);
1182    });
1183    
1184    //不直接弹出
1185    if(!loop) return;
1186    
1187  } else if (data.length === 0){
1188    return layer.msg('&#x6CA1;&#x6709;&#x56FE;&#x7247;');
1189  }
1190  
1191  //上一张
1192  dict.imgprev = function(key){
1193    dict.imgIndex--;
1194    if(dict.imgIndex < 1){
1195      dict.imgIndex = data.length;
1196    }
1197    dict.tabimg(key);
1198  };
1199  
1200  //下一张
1201  dict.imgnext = function(key,errorMsg){
1202    dict.imgIndex++;
1203    if(dict.imgIndex > data.length){
1204      dict.imgIndex = 1;
1205      if (errorMsg) {return};
1206    }
1207    dict.tabimg(key)
1208  };
1209  
1210  //方向键
1211  dict.keyup = function(event){
1212    if(!dict.end){
1213      var code = event.keyCode;
1214      event.preventDefault();
1215      if(code === 37){
1216        dict.imgprev(true);
1217      } else if(code === 39) {
1218        dict.imgnext(true);
1219      } else if(code === 27) {
1220        layer.close(dict.index);
1221      }
1222    }
1223  }
1224  
1225  //切换
1226  dict.tabimg = function(key){
1227    if(data.length <= 1) return;
1228    photos.start = dict.imgIndex - 1;
1229    layer.close(dict.index);
1230    return layer.photos(options, true, key);
1231    setTimeout(function(){
1232      layer.photos(options, true, key);
1233    }, 200);
1234  }
1235  
1236  //一些动作
1237  dict.event = function(){
1238    /*
1239    dict.bigimg.hover(function(){
1240      dict.imgsee.show();
1241    }, function(){
1242      dict.imgsee.hide();
1243    });
1244    */
1245    
1246    dict.bigimg.find('.layui-layer-imgprev').on('click', function(event){
1247      event.preventDefault();
1248      dict.imgprev(true);
1249    });  
1250    
1251    dict.bigimg.find('.layui-layer-imgnext').on('click', function(event){     
1252      event.preventDefault();
1253      dict.imgnext(true);
1254    });
1255    
1256    $(document).on('keyup', dict.keyup);
1257  };
1258  
1259  //图片预加载
1260  function loadImage(url, callback, error) {   
1261    var img = new Image();
1262    img.src = url; 
1263    if(img.complete){
1264      return callback(img);
1265    }
1266    img.onload = function(){
1267      img.onload = null;
1268      callback(img);
1269    };
1270    img.onerror = function(e){
1271      img.onerror = null;
1272      error(e);
1273    };  
1274  };
1275  
1276  dict.loadi = layer.load(1, {
1277    shade: 'shade' in options ? false : 0.9,
1278    scrollbar: false
1279  });
1280
1281  loadImage(data[start].src, function(img){
1282    layer.close(dict.loadi);
1283    
1284    //切换图片时不出现动画
1285    if(key) options.anim = -1;
1286    
1287    //弹出图片层
1288    dict.index = layer.open($.extend({
1289      type: 1,
1290      id: 'layui-layer-photos',
1291      area: function(){
1292        var imgarea = [img.width, img.height];
1293        var winarea = [$(window).width() - 100, $(window).height() - 100];
1294        
1295        //如果 实际图片的宽或者高比 屏幕大(那么进行缩放)
1296        if(!options.full && (imgarea[0]>winarea[0]||imgarea[1]>winarea[1])){
1297          var wh = [imgarea[0]/winarea[0],imgarea[1]/winarea[1]];//取宽度缩放比例、高度缩放比例
1298          if(wh[0] > wh[1]){//取缩放比例最大的进行缩放
1299            imgarea[0] = imgarea[0]/wh[0];
1300            imgarea[1] = imgarea[1]/wh[0];
1301          } else if(wh[0] < wh[1]){
1302            imgarea[0] = imgarea[0]/wh[1];
1303            imgarea[1] = imgarea[1]/wh[1];
1304          }
1305        }
1306        
1307        return [imgarea[0]+'px', imgarea[1]+'px']; 
1308      }(),
1309      title: false,
1310      shade: 0.9,
1311      shadeClose: true,
1312      closeBtn: false,
1313      move: '.layui-layer-phimg img',
1314      moveType: 1,
1315      scrollbar: false,
1316      moveOut: true,
1317      anim: 5,
1318      isOutAnim: false,
1319      skin: 'layui-layer-photos' + skin('photos'),
1320      content: '<div class="layui-layer-phimg">'
1321        +'<img src="'+ data[start].src +'" alt="'+ (data[start].alt||'') +'" layer-pid="'+ data[start].pid +'">'
1322        +function(){
1323          if(data.length > 1){
1324            return '<div class="layui-layer-imgsee">'
1325              +'<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>'
1326              +'<div class="layui-layer-imgbar" style="display:'+ (key ? 'block' : '') +'"><span class="layui-layer-imgtit"><a href="javascript:;">'+ (data[start].alt || '') +'</a><em>'+ dict.imgIndex +' / '+ data.length +'</em></span></div>'
1327            +'</div>'
1328          }
1329          return '';
1330        }()
1331      +'</div>',
1332      success: function(layero, index){
1333        dict.bigimg = layero.find('.layui-layer-phimg');
1334        dict.imgsee = layero.find('.layui-layer-imgbar');
1335        dict.event(layero);
1336        options.tab && options.tab(data[start], layero);
1337        typeof success === 'function' && success(layero);
1338      }, end: function(){
1339        dict.end = true;
1340        $(document).off('keyup', dict.keyup);
1341      }
1342    }, options));
1343  }, function(){
1344    layer.close(dict.loadi);
1345    layer.msg('&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;', {
1346      time: 30000, 
1347      btn: ['&#x4E0B;&#x4E00;&#x5F20;', '&#x4E0D;&#x770B;&#x4E86;'], 
1348      yes: function(){
1349        data.length > 1 && dict.imgnext(true,true);
1350      }
1351    });
1352  });
1353};
1354
1355//主入口
1356ready.run = function(_$){
1357  $ = _$;
1358  win = $(window);
1359  doms.html = $('html');
1360  layer.open = function(deliver){
1361    var o = new Class(deliver);
1362    return o.index;
1363  };
1364};
1365
1366//加载方式
1367window.layui && layui.define ? (
1368  layer.ready()
1369  ,layui.define('jquery', function(exports){ //layui 加载
1370    layer.path = layui.cache.dir;
1371    ready.run(layui.$);
1372
1373    //暴露模块
1374    window.layer = layer;
1375    exports('layer', layer);
1376  })
1377) : (
1378  (typeof define === 'function' && define.amd) ? define(['jquery'], function(){ //requirejs 加载
1379    ready.run(window.jQuery);
1380    return layer;
1381  }) : function(){ //普通 script 标签加载
1382    layer.ready();
1383    ready.run(window.jQuery);
1384  }()
1385);
1386
1387}(window);
1388
1389
1390

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.