lib/har/viewer/scripts/preview/ref.js in har-0.1.0 vs lib/har/viewer/scripts/preview/ref.js in har-0.1.1
- old
+ new
@@ -1 +1 @@
-require.def("preview/ref",["core/lib"],function(a){var b={resolveJson:function(b,c){function n(o,p,q,r,s){var t,u,v=d in o?o[d]:q;v!==undefined&&(v=(e+v).replace(k,"$2$3"));var w=s||o;if(v!==undefined){f&&(o.__id=v),c.schemas&&!(o instanceof Array)&&(u=v.match(/^(.+\/)[^\.\[]*$/))&&(r=c.schemas[u[1]]);if(g[v]&&o instanceof Array==g[v]instanceof Array)w=g[v],delete w.$ref,t=!0;else{var x=r&&r.prototype;x&&(m.prototype=x,w=new m)}g[v]=w,h&&(h[v]=c.time)}var y=r&&r.properties,z=o.length;for(var A in o){if(A==z)break;if(o.hasOwnProperty(A)){u=o[A];var B=y&&y[A];if(B&&B.format=="date-time"&&typeof u=="string")u=a.fromISOString(u);else if(typeof u=="object"&&u&&!(u instanceof Date)){i=u.$ref;if(i){delete o[A];var C=i.replace(/(#)([^\.\[])/,"$1.$2").match(/(^([^\[]*\/)?[^#\.\[]*)#?([\.\[].*)?/);if(i=C[1]=="$"||C[1]=="this"||C[1]==""?b:g[(e+C[1]).replace(k,"$2$3")])C[3]&&C[3].replace(/(\[([^\]]+)\])|(\.?([^\.\[]+))/g,function(a,b,c,d,e){i=i&&i[c?c.replace(/[\"\'\\]/,""):e]});if(i)u=i;else if(p)u=n(u,!1,u.$ref,B),u._loadObject=c.loader;else{var D;D||j.push(w),D=!0}}else p||(u=n(u,j==o,v&&l(v,A),B,w!=o&&typeof w[A]=="object"&&w[A]))}o[A]=u;if(w!=o&&!w.__isDirty){var E=w[A];w[A]=u,t&&u!==E&&!w._loadObject&&!(u instanceof Date&&E instanceof Date&&u.getTime()==E.getTime())&&(typeof u!="function"||typeof E!="function"||u.toString()!=E.toString())&&g.onUpdate&&g.onUpdate(w,A,E,u)}}}if(t){for(A in w)if(!w.__isDirty&&w.hasOwnProperty(A)&&!o.hasOwnProperty(A)&&A!="__id"&&A!="__clientId"&&!(w instanceof Array&&isNaN(A))){g.onUpdate&&A!="_loadObject"&&A!="_idAttr"&&g.onUpdate(w,A,w[A],undefined),delete w[A];while(w instanceof Array&&w.length&&w[w.length-1]===undefined)w.length--}}else g.onLoad&&g.onLoad(w);return w}c=c||{};var d=c.idAttribute||"id",e=c.idPrefix||"",f=c.assignAbsoluteIds,g=c.index||{},h=c.timeStamps,i,j=[],k=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/,l=this._addProp,m=function(){};b&&typeof b=="object"&&(b=n(b,!1,c.defaultId),n(j,!1));return b},_addProp:function(a,b){return a+(a.match(/#/)?a.length==1?"":".":"#")+b}};return b})
+define("preview/ref",["core/lib"],function(e){var t={resolveJson:function(t,n){function p(d,v,m,g,y){var b,w,E=r in d?d[r]:m;E!==undefined&&(E=(i+E).replace(l,"$2$3"));var S=y||d;if(E!==undefined){s&&(d.__id=E),n.schemas&&!(d instanceof Array)&&(w=E.match(/^(.+\/)[^\.\[]*$/))&&(g=n.schemas[w[1]]);if(o[E]&&d instanceof Array==o[E]instanceof Array)S=o[E],delete S.$ref,b=!0;else{var x=g&&g.prototype;x&&(h.prototype=x,S=new h)}o[E]=S,u&&(u[E]=n.time)}var T=g&&g.properties,N=d.length;for(var C in d){if(C==N)break;if(d.hasOwnProperty(C)){w=d[C];var k=T&&T[C];if(k&&k.format=="date-time"&&typeof w=="string")w=e.fromISOString(w);else if(typeof w=="object"&&w&&!(w instanceof Date)){a=w.$ref;if(a){delete d[C];var L=a.replace(/(#)([^\.\[])/,"$1.$2").match(/(^([^\[]*\/)?[^#\.\[]*)#?([\.\[].*)?/);(a=L[1]=="$"||L[1]=="this"||L[1]==""?t:o[(i+L[1]).replace(l,"$2$3")])&&L[3]&&L[3].replace(/(\[([^\]]+)\])|(\.?([^\.\[]+))/g,function(e,t,n,r,i){a=a&&a[n?n.replace(/[\"\'\\]/,""):i]});if(a)w=a;else if(!v){var A;A||f.push(S),A=!0}else w=p(w,!1,w.$ref,k),w._loadObject=n.loader}else v||(w=p(w,f==d,E&&c(E,C),k,S!=d&&typeof S[C]=="object"&&S[C]))}d[C]=w;if(S!=d&&!S.__isDirty){var O=S[C];S[C]=w,b&&w!==O&&!S._loadObject&&!(w instanceof Date&&O instanceof Date&&w.getTime()==O.getTime())&&(typeof w!="function"||typeof O!="function"||w.toString()!=O.toString())&&o.onUpdate&&o.onUpdate(S,C,O,w)}}}if(b){for(C in S)if(!S.__isDirty&&S.hasOwnProperty(C)&&!d.hasOwnProperty(C)&&C!="__id"&&C!="__clientId"&&!(S instanceof Array&&isNaN(C))){o.onUpdate&&C!="_loadObject"&&C!="_idAttr"&&o.onUpdate(S,C,S[C],undefined),delete S[C];while(S instanceof Array&&S.length&&S[S.length-1]===undefined)S.length--}}else o.onLoad&&o.onLoad(S);return S}n=n||{};var r=n.idAttribute||"id",i=n.idPrefix||"",s=n.assignAbsoluteIds,o=n.index||{},u=n.timeStamps,a,f=[],l=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/,c=this._addProp,h=function(){};return t&&typeof t=="object"&&(t=p(t,!1,n.defaultId),p(f,!1)),t},_addProp:function(e,t){return e+(e.match(/#/)?e.length==1?"":".":"#")+t}};return t});
\ No newline at end of file