/*!
 * SAP UI development toolkit for HTML5 (SAPUI5/OpenUI5)
 * (c) Copyright 2009-2015 SAP SE or an SAP affiliate company.
 * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
 */
sap.ui.define(['jquery.sap.global'],function(q){"use strict";var G={};G.render=function(r,c){var I=/^([L](?:[0-9]|1[0-1]))? ?([M](?:[0-9]|1[0-1]))? ?([S](?:[0-9]|1[0-1]))?$/i;var S=/^([L](?:[1-9]|1[0-2]))? ?([M](?:[1-9]|1[0-2]))? ?([S](?:[1-9]|1[0-2]))?$/i;r.write("<div");r.writeControlData(c);r.addClass("sapUiRespGrid");var M=sap.ui.Device.media.getCurrentRange(sap.ui.Device.media.RANGESETS.SAP_STANDARD).name;r.addClass("sapUiRespGridMedia-Std-"+M);var h=c.getHSpacing();if(h==0.5){h="05";}else if((h!==0)&&(h!==1)&&(h!==2)){h=1;}r.addClass("sapUiRespGridHSpace"+h);var v=c.getVSpacing();if(v==0.5){v="05";}else if((v!==0)&&(v!==1)&&(v!==2)){v=1;}r.addClass("sapUiRespGridVSpace"+v);var p=c.getPosition();if(p){p=p.toUpperCase();if(p===sap.ui.layout.GridPosition.Center.toUpperCase()){r.addClass("sapUiRespGridPosCenter");}else if(p===sap.ui.layout.GridPosition.Right.toUpperCase()){r.addClass("sapUiRespGridPosRight");}}r.writeClasses();var w=c.getWidth();if(w!=="100%"&&w!=="auto"&&w!=="inherit"){if(h==0){w="width: "+w;}else{w="width: -webkit-calc("+w+" - "+h+"rem); width: calc("+w+" - "+h+"rem); ";}r.writeAttribute("style",w);}var R=c._getAccessibleRole();var a;if(R){a={role:R};}r.writeAccessibilityState(c,a);r.write(">");var b=c.getContent();var d=c.getDefaultSpan();var e=c.getDefaultIndent();var D=I.exec(e);var f=["","L3","M6","S12"];var g=S.exec(d);for(var i=0;i<b.length;i++){r.write("<div");var L=c._getLayoutDataForControl(b[i]);if(L){if(L.getLinebreak()===true){r.addClass("sapUiRespGridBreak");}else{if(L.getLinebreakL()===true){r.addClass("sapUiRespGridBreakL");}if(L.getLinebreakM()===true){r.addClass("sapUiRespGridBreakM");}if(L.getLinebreakS()===true){r.addClass("sapUiRespGridBreakS");}}var k;var n=L.getSpan();if(!n||!n.lenght==0){k=g;}else{k=S.exec(n);}if(k){for(var j=1;j<k.length;j++){var o=k[j];if(!o){o=g[j];if(!o){o=f[j];}}var t=L.getSpanL();var u=L.getSpanM();var x=L.getSpanS();o=o.toUpperCase();if((o.substr(0,1)==="L")&&(t>0)&&(t<13)){r.addClass("sapUiRespGridSpanL"+t);}else if((o.substr(0,1)==="M")&&(u>0)&&(u<13)){r.addClass("sapUiRespGridSpanM"+u);}else if((o.substr(0,1)==="S")&&(x>0)&&(x<13)){r.addClass("sapUiRespGridSpanS"+x);}else{r.addClass("sapUiRespGridSpan"+o);}}}var y;var z=L.getIndent();if(!z||z.length==0){y=D;}else{y=I.exec(z);}if(!y){y=D;if(!y){y=undefined;}}if(y){for(var j=1;j<y.length;j++){var A=y[j];if(!A){if(D&&D[j]){A=D[j];}}if(A){A=A.toUpperCase();var B=L.getIndentL();var C=L.getIndentM();var E=L.getIndentS();if((A.substr(0,1)==="L")&&(B>0)&&(B<12)){r.addClass("sapUiRespGridIndentL"+B);}else if((A.substr(0,1)==="M")&&(C>0)&&(C<12)){r.addClass("sapUiRespGridIndentM"+C);}else if((A.substr(0,1)==="S")&&(E>0)&&(E<12)){r.addClass("sapUiRespGridIndentS"+E);}else{if(!(/^(L0)? ?(M0)? ?(S0)?$/.exec(A))){r.addClass("sapUiRespGridIndent"+A);}}}}}var l=L.getVisibleL(),m=L.getVisibleM(),s=L.getVisibleS();if(!l&&m&&s){r.addClass("sapUiRespGridHiddenL");}else if(!l&&!m&&s){r.addClass("sapUiRespGridVisibleS");}else if(l&&!m&&!s){r.addClass("sapUiRespGridVisibleL");}else if(!l&&m&&!s){r.addClass("sapUiRespGridVisibleM");}else if(l&&!m&&s){r.addClass("sapUiRespGridHiddenM");}else if(l&&m&&!s){r.addClass("sapUiRespGridHiddenS");}var F=L.getMoveBackwards();if(F&&F.length>0){var H=I.exec(F);if(H){for(var j=1;j<H.length;j++){var J=H[j];if(J){r.addClass("sapUiRespGridBwd"+J.toUpperCase());}}}}var K=L.getMoveForward();if(K&&K.length>0){var N=I.exec(K);if(N){for(var j=1;j<N.length;j++){var O=N[j];if(O){r.addClass("sapUiRespGridFwd"+O.toUpperCase());}}}}if(L._sStylesInternal){r.addClass(L._sStylesInternal);}}if(!L){var o="";if(g){for(var j=1;j<g.length;j++){o=g[j];if(!o){o=f[j];}r.addClass("sapUiRespGridSpan"+o.toUpperCase());}}else{for(var j=1;j<f.length;j++){o=f[j];r.addClass("sapUiRespGridSpan"+o.toUpperCase());}}var A="";if(D){for(var j=1;j<D.length;j++){A=D[j];if(A&&(A.substr(1,1)!=="0")){r.addClass("sapUiRespGridIndent"+A.toUpperCase());}}}}r.writeClasses();r.write(">");r.renderControl(b[i]);r.write("</div>");}r.write("</div>");};return G;},true);
