Conditions | 3 |
Paths | 0 |
Total Lines | 671 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
1 | /** |
||
11 | (function() {var $JSCompiler_alias_VOID$$ = void 0, $JSCompiler_alias_TRUE$$ = !0, $JSCompiler_alias_NULL$$ = null, $JSCompiler_alias_FALSE$$ = !1, $JSCompiler_prototypeAlias$$, $goog$global$$ = this; |
||
|
|||
12 | function $goog$exportPath_$$($name$$57_parts$$, $opt_object$$, $cur_opt_objectToExportTo$$) { |
||
13 | $name$$57_parts$$ = $name$$57_parts$$.split("."); |
||
14 | $cur_opt_objectToExportTo$$ = $cur_opt_objectToExportTo$$ || $goog$global$$; |
||
15 | !($name$$57_parts$$[0] in $cur_opt_objectToExportTo$$) && $cur_opt_objectToExportTo$$.execScript && $cur_opt_objectToExportTo$$.execScript("var " + $name$$57_parts$$[0]); |
||
16 | for(var $part$$;$name$$57_parts$$.length && ($part$$ = $name$$57_parts$$.shift());) { |
||
17 | !$name$$57_parts$$.length && $opt_object$$ !== $JSCompiler_alias_VOID$$ ? $cur_opt_objectToExportTo$$[$part$$] = $opt_object$$ : $cur_opt_objectToExportTo$$ = $cur_opt_objectToExportTo$$[$part$$] ? $cur_opt_objectToExportTo$$[$part$$] : $cur_opt_objectToExportTo$$[$part$$] = {} |
||
18 | } |
||
19 | } |
||
20 | function $goog$typeOf$$($value$$39$$) { |
||
21 | var $s$$2$$ = typeof $value$$39$$; |
||
22 | if("object" == $s$$2$$) { |
||
23 | if($value$$39$$) { |
||
24 | if($value$$39$$ instanceof Array) { |
||
25 | return"array" |
||
26 | } |
||
27 | if($value$$39$$ instanceof Object) { |
||
28 | return $s$$2$$ |
||
29 | } |
||
30 | var $className$$1$$ = Object.prototype.toString.call($value$$39$$); |
||
31 | if("[object Window]" == $className$$1$$) { |
||
32 | return"object" |
||
33 | } |
||
34 | if("[object Array]" == $className$$1$$ || "number" == typeof $value$$39$$.length && "undefined" != typeof $value$$39$$.splice && "undefined" != typeof $value$$39$$.propertyIsEnumerable && !$value$$39$$.propertyIsEnumerable("splice")) { |
||
35 | return"array" |
||
36 | } |
||
37 | if("[object Function]" == $className$$1$$ || "undefined" != typeof $value$$39$$.call && "undefined" != typeof $value$$39$$.propertyIsEnumerable && !$value$$39$$.propertyIsEnumerable("call")) { |
||
38 | return"function" |
||
39 | } |
||
40 | }else { |
||
41 | return"null" |
||
42 | } |
||
43 | }else { |
||
44 | if("function" == $s$$2$$ && "undefined" == typeof $value$$39$$.call) { |
||
45 | return"object" |
||
46 | } |
||
47 | } |
||
48 | return $s$$2$$ |
||
49 | } |
||
50 | function $goog$isArray$$($val$$3$$) { |
||
51 | return"array" == $goog$typeOf$$($val$$3$$) |
||
52 | } |
||
53 | function $goog$isString$$($val$$6$$) { |
||
54 | return"string" == typeof $val$$6$$ |
||
55 | } |
||
56 | function $goog$isObject$$($val$$10$$) { |
||
57 | var $type$$51$$ = typeof $val$$10$$; |
||
58 | return"object" == $type$$51$$ && $val$$10$$ != $JSCompiler_alias_NULL$$ || "function" == $type$$51$$ |
||
59 | } |
||
60 | var $goog$UID_PROPERTY_$$ = "closure_uid_" + Math.floor(2147483648 * Math.random()).toString(36), $goog$uidCounter_$$ = 0; |
||
61 | function $goog$bindNative_$$($fn$$, $selfObj$$1$$, $var_args$$24$$) { |
||
62 | return $fn$$.call.apply($fn$$.bind, arguments) |
||
63 | } |
||
64 | function $goog$bindJs_$$($fn$$1$$, $selfObj$$2$$, $var_args$$25$$) { |
||
65 | if(!$fn$$1$$) { |
||
66 | throw Error(); |
||
67 | } |
||
68 | if(2 < arguments.length) { |
||
69 | var $boundArgs$$ = Array.prototype.slice.call(arguments, 2); |
||
70 | return function() { |
||
71 | var $newArgs$$ = Array.prototype.slice.call(arguments); |
||
72 | Array.prototype.unshift.apply($newArgs$$, $boundArgs$$); |
||
73 | return $fn$$1$$.apply($selfObj$$2$$, $newArgs$$) |
||
74 | } |
||
75 | } |
||
76 | return function() { |
||
77 | return $fn$$1$$.apply($selfObj$$2$$, arguments) |
||
78 | } |
||
79 | } |
||
80 | function $goog$bind$$($fn$$2$$, $selfObj$$3$$, $var_args$$26$$) { |
||
81 | $goog$bind$$ = Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? $goog$bindNative_$$ : $goog$bindJs_$$; |
||
82 | return $goog$bind$$.apply($JSCompiler_alias_NULL$$, arguments) |
||
83 | } |
||
84 | function $goog$exportSymbol$$($publicPath$$, $object$$) { |
||
85 | $goog$exportPath_$$($publicPath$$, $object$$, $JSCompiler_alias_VOID$$) |
||
86 | } |
||
87 | function $goog$inherits$$($childCtor$$, $parentCtor$$) { |
||
88 | function $tempCtor$$() { |
||
89 | } |
||
90 | $tempCtor$$.prototype = $parentCtor$$.prototype; |
||
91 | $childCtor$$.$superClass_$ = $parentCtor$$.prototype; |
||
92 | $childCtor$$.prototype = new $tempCtor$$ |
||
93 | } |
||
94 | ;function $goog$string$subs$$($str$$12$$, $var_args$$29$$) { |
||
95 | for(var $i$$5$$ = 1;$i$$5$$ < arguments.length;$i$$5$$++) { |
||
96 | var $replacement$$ = String(arguments[$i$$5$$]).replace(/\$/g, "$$$$"), $str$$12$$ = $str$$12$$.replace(/\%s/, $replacement$$) |
||
97 | } |
||
98 | return $str$$12$$ |
||
99 | } |
||
100 | var $goog$string$amperRe_$$ = /&/g, $goog$string$ltRe_$$ = /</g, $goog$string$gtRe_$$ = />/g, $goog$string$quotRe_$$ = /\"/g, $goog$string$allRe_$$ = /[&<>\"]/, $goog$string$specialEscapeChars_$$ = {"\x00":"\\0", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t", "\x0B":"\\x0B", '"':'\\"', "\\":"\\\\"}, $goog$string$jsEscapeCache_$$ = {"'":"\\'"}; |
||
101 | function $goog$string$StringBuffer$$($opt_a1$$, $var_args$$31$$) { |
||
102 | $opt_a1$$ != $JSCompiler_alias_NULL$$ && this.append.apply(this, arguments) |
||
103 | } |
||
104 | $goog$string$StringBuffer$$.prototype.$buffer_$ = ""; |
||
105 | $goog$string$StringBuffer$$.prototype.append = function $$goog$string$StringBuffer$$$$append$($a1$$, $opt_a2$$, $var_args$$32$$) { |
||
106 | this.$buffer_$ += $a1$$; |
||
107 | if($opt_a2$$ != $JSCompiler_alias_NULL$$) { |
||
108 | for(var $i$$12$$ = 1;$i$$12$$ < arguments.length;$i$$12$$++) { |
||
109 | this.$buffer_$ += arguments[$i$$12$$] |
||
110 | } |
||
111 | } |
||
112 | return this |
||
113 | }; |
||
114 | $goog$string$StringBuffer$$.prototype.toString = function $$goog$string$StringBuffer$$$$toString$() { |
||
115 | return this.$buffer_$ |
||
116 | }; |
||
117 | function $goog$object$forEach$$($obj$$21$$, $f$$, $opt_obj$$1$$) { |
||
118 | for(var $key$$15$$ in $obj$$21$$) { |
||
119 | $f$$.call($opt_obj$$1$$, $obj$$21$$[$key$$15$$], $key$$15$$, $obj$$21$$) |
||
120 | } |
||
121 | } |
||
122 | function $goog$object$getValues$$($obj$$30$$) { |
||
123 | var $res$$2$$ = [], $i$$13$$ = 0, $key$$23$$; |
||
124 | for($key$$23$$ in $obj$$30$$) { |
||
125 | $res$$2$$[$i$$13$$++] = $obj$$30$$[$key$$23$$] |
||
126 | } |
||
127 | return $res$$2$$ |
||
128 | } |
||
129 | function $goog$object$getKeys$$($obj$$31$$) { |
||
130 | var $res$$3$$ = [], $i$$14$$ = 0, $key$$24$$; |
||
131 | for($key$$24$$ in $obj$$31$$) { |
||
132 | $res$$3$$[$i$$14$$++] = $key$$24$$ |
||
133 | } |
||
134 | return $res$$3$$ |
||
135 | } |
||
136 | var $goog$object$PROTOTYPE_FIELDS_$$ = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "); |
||
137 | function $goog$object$extend$$($target$$39$$, $var_args$$34$$) { |
||
138 | for(var $key$$38$$, $source$$2$$, $i$$17$$ = 1;$i$$17$$ < arguments.length;$i$$17$$++) { |
||
139 | $source$$2$$ = arguments[$i$$17$$]; |
||
140 | for($key$$38$$ in $source$$2$$) { |
||
141 | $target$$39$$[$key$$38$$] = $source$$2$$[$key$$38$$] |
||
142 | } |
||
143 | for(var $j$$1$$ = 0;$j$$1$$ < $goog$object$PROTOTYPE_FIELDS_$$.length;$j$$1$$++) { |
||
144 | $key$$38$$ = $goog$object$PROTOTYPE_FIELDS_$$[$j$$1$$], Object.prototype.hasOwnProperty.call($source$$2$$, $key$$38$$) && ($target$$39$$[$key$$38$$] = $source$$2$$[$key$$38$$]) |
||
145 | } |
||
146 | } |
||
147 | } |
||
148 | ;function $goog$debug$Error$$($opt_msg$$) { |
||
149 | Error.captureStackTrace ? Error.captureStackTrace(this, $goog$debug$Error$$) : this.stack = Error().stack || ""; |
||
150 | $opt_msg$$ && (this.message = String($opt_msg$$)) |
||
151 | } |
||
152 | $goog$inherits$$($goog$debug$Error$$, Error); |
||
153 | function $goog$asserts$AssertionError$$($messagePattern$$, $messageArgs$$) { |
||
154 | $messageArgs$$.unshift($messagePattern$$); |
||
155 | $goog$debug$Error$$.call(this, $goog$string$subs$$.apply($JSCompiler_alias_NULL$$, $messageArgs$$)); |
||
156 | $messageArgs$$.shift(); |
||
157 | this.$messagePattern$ = $messagePattern$$ |
||
158 | } |
||
159 | $goog$inherits$$($goog$asserts$AssertionError$$, $goog$debug$Error$$); |
||
160 | function $goog$asserts$assert$$($condition$$1$$, $opt_message$$8$$, $var_args$$37$$) { |
||
161 | if(!$condition$$1$$) { |
||
162 | var $givenArgs$$inline_6$$ = Array.prototype.slice.call(arguments, 2), $message$$inline_9$$ = "Assertion failed"; |
||
163 | if($opt_message$$8$$) { |
||
164 | var $message$$inline_9$$ = $message$$inline_9$$ + (": " + $opt_message$$8$$), $args$$inline_10$$ = $givenArgs$$inline_6$$ |
||
165 | } |
||
166 | throw new $goog$asserts$AssertionError$$("" + $message$$inline_9$$, $args$$inline_10$$ || []); |
||
167 | } |
||
168 | } |
||
169 | ;var $goog$array$ARRAY_PROTOTYPE_$$ = Array.prototype, $goog$array$indexOf$$ = $goog$array$ARRAY_PROTOTYPE_$$.indexOf ? function($arr$$10$$, $obj$$49$$, $opt_fromIndex$$6$$) { |
||
170 | $goog$asserts$assert$$($arr$$10$$.length != $JSCompiler_alias_NULL$$); |
||
171 | return $goog$array$ARRAY_PROTOTYPE_$$.indexOf.call($arr$$10$$, $obj$$49$$, $opt_fromIndex$$6$$) |
||
172 | } : function($arr$$11$$, $obj$$50$$, $fromIndex_i$$20_opt_fromIndex$$7$$) { |
||
173 | $fromIndex_i$$20_opt_fromIndex$$7$$ = $fromIndex_i$$20_opt_fromIndex$$7$$ == $JSCompiler_alias_NULL$$ ? 0 : 0 > $fromIndex_i$$20_opt_fromIndex$$7$$ ? Math.max(0, $arr$$11$$.length + $fromIndex_i$$20_opt_fromIndex$$7$$) : $fromIndex_i$$20_opt_fromIndex$$7$$; |
||
174 | if($goog$isString$$($arr$$11$$)) { |
||
175 | return!$goog$isString$$($obj$$50$$) || 1 != $obj$$50$$.length ? -1 : $arr$$11$$.indexOf($obj$$50$$, $fromIndex_i$$20_opt_fromIndex$$7$$) |
||
176 | } |
||
177 | for(;$fromIndex_i$$20_opt_fromIndex$$7$$ < $arr$$11$$.length;$fromIndex_i$$20_opt_fromIndex$$7$$++) { |
||
178 | if($fromIndex_i$$20_opt_fromIndex$$7$$ in $arr$$11$$ && $arr$$11$$[$fromIndex_i$$20_opt_fromIndex$$7$$] === $obj$$50$$) { |
||
179 | return $fromIndex_i$$20_opt_fromIndex$$7$$ |
||
180 | } |
||
181 | } |
||
182 | return-1 |
||
183 | }, $goog$array$forEach$$ = $goog$array$ARRAY_PROTOTYPE_$$.forEach ? function($arr$$14$$, $f$$7$$, $opt_obj$$6$$) { |
||
184 | $goog$asserts$assert$$($arr$$14$$.length != $JSCompiler_alias_NULL$$); |
||
185 | $goog$array$ARRAY_PROTOTYPE_$$.forEach.call($arr$$14$$, $f$$7$$, $opt_obj$$6$$) |
||
186 | } : function($arr$$15$$, $f$$8$$, $opt_obj$$7$$) { |
||
187 | for(var $l$$2$$ = $arr$$15$$.length, $arr2$$ = $goog$isString$$($arr$$15$$) ? $arr$$15$$.split("") : $arr$$15$$, $i$$22$$ = 0;$i$$22$$ < $l$$2$$;$i$$22$$++) { |
||
188 | $i$$22$$ in $arr2$$ && $f$$8$$.call($opt_obj$$7$$, $arr2$$[$i$$22$$], $i$$22$$, $arr$$15$$) |
||
189 | } |
||
190 | }; |
||
191 | var $twig$bind$$ = $goog$bind$$, $goog$UID_PROPERTY_$$ = "twig_ui_" + Math.floor(2147483648 * Math.random()).toString(36); |
||
192 | function $twig$empty$$($value$$57$$) { |
||
193 | return $JSCompiler_alias_NULL$$ === $value$$57$$ || $JSCompiler_alias_FALSE$$ === $value$$57$$ || $JSCompiler_alias_VOID$$ === $value$$57$$ || 0 === $value$$57$$ ? $JSCompiler_alias_TRUE$$ : $twig$countable$$($value$$57$$) ? 0 === $twig$count$$($value$$57$$) : $JSCompiler_alias_FALSE$$ |
||
194 | } |
||
195 | function $twig$extend$$($target$$41$$, $var_args$$51$$) { |
||
196 | $goog$object$extend$$.apply($JSCompiler_alias_NULL$$, Array.prototype.slice.call(arguments, 0)); |
||
197 | return $target$$41$$ |
||
198 | } |
||
199 | function $twig$countable$$($v$$1$$) { |
||
200 | return $goog$isArray$$($v$$1$$) || $goog$isString$$($v$$1$$) || $goog$isObject$$($v$$1$$) |
||
201 | } |
||
202 | function $twig$count$$($JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$) { |
||
203 | if($goog$isArray$$($JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$)) { |
||
204 | $JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$ = $JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$.length |
||
205 | }else { |
||
206 | if($goog$isString$$($JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$)) { |
||
207 | $JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$ = $JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$.length |
||
208 | }else { |
||
209 | if($goog$isObject$$($JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$)) { |
||
210 | var $rv$$inline_13$$ = 0, $key$$inline_14$$; |
||
211 | for($key$$inline_14$$ in $JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$) { |
||
212 | $rv$$inline_13$$++ |
||
213 | } |
||
214 | $JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$ = $rv$$inline_13$$ |
||
215 | }else { |
||
216 | $JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$ = ("number" === typeof $JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$ ? $JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$.toString() : "").length |
||
217 | } |
||
218 | } |
||
219 | } |
||
220 | return $JSCompiler_temp$$2_JSCompiler_temp$$3_JSCompiler_temp$$4_v$$2$$ |
||
221 | } |
||
222 | function $twig$forEach$$($v$$3$$, $func$$3$$, $opt_this$$2$$) { |
||
223 | $goog$isArray$$($v$$3$$) ? $goog$array$forEach$$($v$$3$$, $func$$3$$, $opt_this$$2$$) : $goog$object$forEach$$($v$$3$$, $func$$3$$, $opt_this$$2$$) |
||
224 | } |
||
225 | function $twig$pregQuote$$($string$$2$$) { |
||
226 | return $string$$2$$.replace(/[\.\\+*?\[\]<>(){}^$=!|:-]/g, "\\$&") |
||
227 | } |
||
228 | ;function $twig$Template$$($env$$) { |
||
229 | this.env_ = $env$$; |
||
230 | this.$blocks_$ = []; |
||
231 | this.$traits_$ = {} |
||
232 | } |
||
233 | $JSCompiler_prototypeAlias$$ = $twig$Template$$.prototype; |
||
234 | $JSCompiler_prototypeAlias$$.$getBlocks$ = function $$JSCompiler_prototypeAlias$$$$getBlocks$$() { |
||
235 | return this.$blocks_$ |
||
236 | }; |
||
237 | $JSCompiler_prototypeAlias$$.$setBlocks$ = function $$JSCompiler_prototypeAlias$$$$setBlocks$$($blocks$$) { |
||
238 | this.$blocks_$ = $blocks$$ |
||
239 | }; |
||
240 | $JSCompiler_prototypeAlias$$.$setTraits$ = function $$JSCompiler_prototypeAlias$$$$setTraits$$($traits$$) { |
||
241 | this.$traits_$ = $traits$$ |
||
242 | }; |
||
243 | $JSCompiler_prototypeAlias$$.getParent = function $$JSCompiler_prototypeAlias$$$getParent$($context_parent$$2$$) { |
||
244 | $context_parent$$2$$ = this.getParent_($context_parent$$2$$); |
||
245 | return $JSCompiler_alias_FALSE$$ === $context_parent$$2$$ ? $JSCompiler_alias_FALSE$$ : this.env_.$createTemplate$($context_parent$$2$$) |
||
246 | }; |
||
247 | $JSCompiler_prototypeAlias$$.$renderParentBlock$ = function $$JSCompiler_prototypeAlias$$$$renderParentBlock$$($name$$60$$, $context$$1$$, $opt_blocks$$) { |
||
248 | if($name$$60$$ in this.$traits_$) { |
||
249 | var $parent$$3_sb$$2$$ = new $goog$string$StringBuffer$$; |
||
250 | this.$traits_$[$name$$60$$]($parent$$3_sb$$2$$, $context$$1$$, $opt_blocks$$ || {}); |
||
251 | return $parent$$3_sb$$2$$.toString() |
||
252 | } |
||
253 | $parent$$3_sb$$2$$ = this.getParent($context$$1$$); |
||
254 | if($JSCompiler_alias_FALSE$$ !== $parent$$3_sb$$2$$) { |
||
255 | return $parent$$3_sb$$2$$.$renderBlock$($name$$60$$, $context$$1$$, $opt_blocks$$) |
||
256 | } |
||
257 | throw Error("The template '" + this.$getTemplateName$() + "' has no parent, and no trait defining the block '" + $name$$60$$ + "'."); |
||
258 | }; |
||
259 | $JSCompiler_prototypeAlias$$.$renderBlock$ = function $$JSCompiler_prototypeAlias$$$$renderBlock$$($name$$61$$, $context$$2$$, $opt_blocks$$1$$) { |
||
260 | if($opt_blocks$$1$$ && $name$$61$$ in $opt_blocks$$1$$) { |
||
261 | var $parent$$4_sb$$3$$ = new $goog$string$StringBuffer$$, $block$$ = $opt_blocks$$1$$[$name$$61$$]; |
||
262 | delete $opt_blocks$$1$$[$name$$61$$]; |
||
263 | $block$$($parent$$4_sb$$3$$, $context$$2$$, $opt_blocks$$1$$); |
||
264 | return $parent$$4_sb$$3$$.toString() |
||
265 | } |
||
266 | if($name$$61$$ in this.$blocks_$) { |
||
267 | return $parent$$4_sb$$3$$ = new $goog$string$StringBuffer$$, this.$blocks_$[$name$$61$$]($parent$$4_sb$$3$$, $context$$2$$, $opt_blocks$$1$$ || $JSCompiler_alias_NULL$$), $parent$$4_sb$$3$$.toString() |
||
268 | } |
||
269 | $parent$$4_sb$$3$$ = this.getParent($context$$2$$); |
||
270 | return $JSCompiler_alias_FALSE$$ !== $parent$$4_sb$$3$$ ? $parent$$4_sb$$3$$.$renderBlock$($name$$61$$, $context$$2$$, $opt_blocks$$1$$) : "" |
||
271 | }; |
||
272 | $JSCompiler_prototypeAlias$$.$render$ = function $$JSCompiler_prototypeAlias$$$$render$$($opt_context$$5$$, $opt_blocks$$2$$) { |
||
273 | var $sb$$4$$ = new $goog$string$StringBuffer$$; |
||
274 | this.render_($sb$$4$$, $opt_context$$5$$ || {}, $opt_blocks$$2$$ || {}); |
||
275 | return $sb$$4$$.toString() |
||
276 | }; |
||
277 | $JSCompiler_prototypeAlias$$.$callMacro$ = function $$JSCompiler_prototypeAlias$$$$callMacro$$($template$$, $macro$$, $args$$3$$, $opt_namedNames$$) { |
||
278 | if(!$template$$["get" + $macro$$]) { |
||
279 | throw Error("The macro " + $macro$$ + " is not defined in " + $template$$.$getTemplateName$() + "."); |
||
280 | } |
||
281 | if($opt_namedNames$$ === $JSCompiler_alias_VOID$$) { |
||
282 | return $template$$["get" + $macro$$].apply($template$$, $args$$3$$) |
||
283 | } |
||
284 | throw Error("Positional arguments, or default values in macro arguments are not supported, yet."); |
||
285 | }; |
||
286 | function $twig$Markup$$($content$$) { |
||
287 | this.$content_$ = $content$$ |
||
288 | } |
||
289 | $twig$Markup$$.prototype.toString = function $$twig$Markup$$$$toString$() { |
||
290 | return this.$content_$ |
||
291 | }; |
||
292 | function $twig$filter$escape$$($env$$2_s$$inline_16_str$$inline_165$$, $sb$$inline_17_value$$60$$, $i$$inline_18_opt_type$$5$$, $JSCompiler_temp_const$$155_opt_charset$$, $JSCompiler_temp_const$$154_opt_autoescape$$) { |
||
293 | if($JSCompiler_temp_const$$154_opt_autoescape$$ && $sb$$inline_17_value$$60$$ instanceof $twig$Markup$$) { |
||
294 | return $sb$$inline_17_value$$60$$.toString() |
||
295 | } |
||
296 | $sb$$inline_17_value$$60$$ = $sb$$inline_17_value$$60$$ == $JSCompiler_alias_NULL$$ ? "" : String($sb$$inline_17_value$$60$$); |
||
297 | if($twig$filter$escape$Type$JAVASCRIPT$$ === $i$$inline_18_opt_type$$5$$) { |
||
298 | $env$$2_s$$inline_16_str$$inline_165$$ = String($sb$$inline_17_value$$60$$); |
||
299 | if($env$$2_s$$inline_16_str$$inline_165$$.quote) { |
||
300 | $sb$$inline_17_value$$60$$ = $env$$2_s$$inline_16_str$$inline_165$$.quote() |
||
301 | }else { |
||
302 | $sb$$inline_17_value$$60$$ = ['"']; |
||
303 | for($i$$inline_18_opt_type$$5$$ = 0;$i$$inline_18_opt_type$$5$$ < $env$$2_s$$inline_16_str$$inline_165$$.length;$i$$inline_18_opt_type$$5$$++) { |
||
304 | var $JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$ = $env$$2_s$$inline_16_str$$inline_165$$.charAt($i$$inline_18_opt_type$$5$$), $cc$$inline_20_rv$$inline_162$$ = $JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$.charCodeAt(0), $JSCompiler_temp_const$$155_opt_charset$$ = $sb$$inline_17_value$$60$$, $JSCompiler_temp_const$$154_opt_autoescape$$ = $i$$inline_18_opt_type$$5$$ + 1, $JSCompiler_temp$$156_cc$$inline_163$$; |
||
305 | if(!($JSCompiler_temp$$156_cc$$inline_163$$ = $goog$string$specialEscapeChars_$$[$JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$])) { |
||
306 | if(!(31 < $cc$$inline_20_rv$$inline_162$$ && 127 > $cc$$inline_20_rv$$inline_162$$)) { |
||
307 | if($JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$ in $goog$string$jsEscapeCache_$$) { |
||
308 | $JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$ = $goog$string$jsEscapeCache_$$[$JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$] |
||
309 | }else { |
||
310 | if($JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$ in $goog$string$specialEscapeChars_$$) { |
||
311 | $JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$ = $goog$string$jsEscapeCache_$$[$JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$] = $goog$string$specialEscapeChars_$$[$JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$] |
||
312 | }else { |
||
313 | $cc$$inline_20_rv$$inline_162$$ = $JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$; |
||
314 | $JSCompiler_temp$$156_cc$$inline_163$$ = $JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$.charCodeAt(0); |
||
315 | if(31 < $JSCompiler_temp$$156_cc$$inline_163$$ && 127 > $JSCompiler_temp$$156_cc$$inline_163$$) { |
||
316 | $cc$$inline_20_rv$$inline_162$$ = $JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$ |
||
317 | }else { |
||
318 | if(256 > $JSCompiler_temp$$156_cc$$inline_163$$) { |
||
319 | if($cc$$inline_20_rv$$inline_162$$ = "\\x", 16 > $JSCompiler_temp$$156_cc$$inline_163$$ || 256 < $JSCompiler_temp$$156_cc$$inline_163$$) { |
||
320 | $cc$$inline_20_rv$$inline_162$$ += "0" |
||
321 | } |
||
322 | }else { |
||
323 | $cc$$inline_20_rv$$inline_162$$ = "\\u", 4096 > $JSCompiler_temp$$156_cc$$inline_163$$ && ($cc$$inline_20_rv$$inline_162$$ += "0") |
||
324 | } |
||
325 | $cc$$inline_20_rv$$inline_162$$ += $JSCompiler_temp$$156_cc$$inline_163$$.toString(16).toUpperCase() |
||
326 | } |
||
327 | $JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$ = $goog$string$jsEscapeCache_$$[$JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$] = $cc$$inline_20_rv$$inline_162$$ |
||
328 | } |
||
329 | } |
||
330 | } |
||
331 | $JSCompiler_temp$$156_cc$$inline_163$$ = $JSCompiler_temp$$157_c$$inline_161_ch$$inline_19$$ |
||
332 | } |
||
333 | $JSCompiler_temp_const$$155_opt_charset$$[$JSCompiler_temp_const$$154_opt_autoescape$$] = $JSCompiler_temp$$156_cc$$inline_163$$ |
||
334 | } |
||
335 | $sb$$inline_17_value$$60$$.push('"'); |
||
336 | $sb$$inline_17_value$$60$$ = $sb$$inline_17_value$$60$$.join("") |
||
337 | } |
||
338 | return $sb$$inline_17_value$$60$$.substring(1, $sb$$inline_17_value$$60$$.length - 1) |
||
339 | } |
||
340 | if(!$i$$inline_18_opt_type$$5$$ || $twig$filter$escape$Type$HTML$$ === $i$$inline_18_opt_type$$5$$) { |
||
341 | return $env$$2_s$$inline_16_str$$inline_165$$ = $sb$$inline_17_value$$60$$, $goog$string$allRe_$$.test($env$$2_s$$inline_16_str$$inline_165$$) && (-1 != $env$$2_s$$inline_16_str$$inline_165$$.indexOf("&") && ($env$$2_s$$inline_16_str$$inline_165$$ = $env$$2_s$$inline_16_str$$inline_165$$.replace($goog$string$amperRe_$$, "&")), -1 != $env$$2_s$$inline_16_str$$inline_165$$.indexOf("<") && ($env$$2_s$$inline_16_str$$inline_165$$ = $env$$2_s$$inline_16_str$$inline_165$$.replace($goog$string$ltRe_$$, |
||
342 | "<")), -1 != $env$$2_s$$inline_16_str$$inline_165$$.indexOf(">") && ($env$$2_s$$inline_16_str$$inline_165$$ = $env$$2_s$$inline_16_str$$inline_165$$.replace($goog$string$gtRe_$$, ">")), -1 != $env$$2_s$$inline_16_str$$inline_165$$.indexOf('"') && ($env$$2_s$$inline_16_str$$inline_165$$ = $env$$2_s$$inline_16_str$$inline_165$$.replace($goog$string$quotRe_$$, """))), $env$$2_s$$inline_16_str$$inline_165$$ |
||
343 | } |
||
344 | if($twig$filter$escape$Type$URL$$ === $i$$inline_18_opt_type$$5$$) { |
||
345 | return encodeURIComponent($sb$$inline_17_value$$60$$) |
||
346 | } |
||
347 | throw Error("The type '" + $i$$inline_18_opt_type$$5$$ + "' is not supported."); |
||
348 | } |
||
349 | var $twig$filter$escape$Type$HTML$$ = "html", $twig$filter$escape$Type$JAVASCRIPT$$ = "js", $twig$filter$escape$Type$URL$$ = "url"; |
||
350 | function $twig$Environment$$() { |
||
351 | this.$extensions_$ = {}; |
||
352 | this.$filters_$ = {}; |
||
353 | this.$functions_$ = {}; |
||
354 | this.$tests_$ = {}; |
||
355 | this.$createdTemplates_$ = {}; |
||
356 | this.$globals_$ = {}; |
||
357 | this.$runtimeInitialized$ = $JSCompiler_alias_FALSE$$; |
||
358 | this.$charset_$ = "UTF-8" |
||
359 | } |
||
360 | $JSCompiler_prototypeAlias$$ = $twig$Environment$$.prototype; |
||
361 | $JSCompiler_prototypeAlias$$.$render$ = function $$JSCompiler_prototypeAlias$$$$render$$($ctor$$2$$, $opt_context$$6$$) { |
||
362 | var $template$$1$$ = this.$createTemplate$($ctor$$2$$); |
||
363 | return $template$$1$$.$render$.call($template$$1$$, $twig$extend$$({}, this.$globals_$, $opt_context$$6$$ || {})) |
||
364 | }; |
||
365 | $JSCompiler_prototypeAlias$$.filter = function $$JSCompiler_prototypeAlias$$$filter$($name$$62$$, $arg1$$, $var_args$$53$$) { |
||
366 | if(!($name$$62$$ in this.$filters_$)) { |
||
367 | throw Error("The filter '" + $name$$62$$ + "' does not exist."); |
||
368 | } |
||
369 | return this.$filters_$[$name$$62$$].apply($JSCompiler_alias_NULL$$, Array.prototype.slice.call(arguments, 1)) |
||
370 | }; |
||
371 | $JSCompiler_prototypeAlias$$.$invoke$ = function $$JSCompiler_prototypeAlias$$$$invoke$$($name$$63$$, $arg1$$1$$, $var_args$$54$$) { |
||
372 | if(!($name$$63$$ in this.$functions_$)) { |
||
373 | throw Error("The function '" + $name$$63$$ + "' does not exist."); |
||
374 | } |
||
375 | return this.$functions_$[$name$$63$$].apply($JSCompiler_alias_NULL$$, Array.prototype.slice.call(arguments, 1)) |
||
376 | }; |
||
377 | $JSCompiler_prototypeAlias$$.test = function $$JSCompiler_prototypeAlias$$$test$($name$$64$$, $arg1$$2$$, $var_args$$55$$) { |
||
378 | if(!($name$$64$$ in this.$tests_$)) { |
||
379 | throw Error("The test '" + $name$$64$$ + "' does not exist."); |
||
380 | } |
||
381 | return this.$tests_$[$name$$64$$].apply($JSCompiler_alias_NULL$$, Array.prototype.slice.call(arguments, 1)) |
||
382 | }; |
||
383 | $JSCompiler_prototypeAlias$$.escape = function $$JSCompiler_prototypeAlias$$$escape$($value$$71$$, $opt_type$$6$$, $opt_charset$$1$$, $opt_autoescape$$1$$) { |
||
384 | return $twig$filter$escape$$(0, $value$$71$$, $opt_type$$6$$, 0, $opt_autoescape$$1$$) |
||
385 | }; |
||
386 | $JSCompiler_prototypeAlias$$.$macro$ = function $$JSCompiler_prototypeAlias$$$$macro$$($templateCtor$$, $macroName$$, $var_args$$56$$) { |
||
387 | var $template$$2$$ = this.$createTemplate$($templateCtor$$), $macro$$1$$ = $template$$2$$["get" + $macroName$$]; |
||
388 | if(!$macro$$1$$) { |
||
389 | throw Error("The macro '" + $macroName$$ + "' does not exist on template '" + $template$$2$$.$getTemplateName$() + "'."); |
||
390 | } |
||
391 | return $macro$$1$$.apply($template$$2$$, Array.prototype.slice.call(arguments, 2)).toString() |
||
392 | }; |
||
393 | $JSCompiler_prototypeAlias$$.$setFilter$ = function $$JSCompiler_prototypeAlias$$$$setFilter$$($name$$65$$, $filter$$) { |
||
394 | this.$filters_$[$name$$65$$] = $filter$$ |
||
395 | }; |
||
396 | $JSCompiler_prototypeAlias$$.$setFunction$ = function $$JSCompiler_prototypeAlias$$$$setFunction$$($name$$66$$, $func$$4$$) { |
||
397 | this.$functions_$[$name$$66$$] = $func$$4$$ |
||
398 | }; |
||
399 | $JSCompiler_prototypeAlias$$.$setTest$ = function $$JSCompiler_prototypeAlias$$$$setTest$$($name$$67$$, $func$$5$$) { |
||
400 | this.$tests_$[$name$$67$$] = $func$$5$$ |
||
401 | }; |
||
402 | $JSCompiler_prototypeAlias$$.$setGlobals$ = function $$JSCompiler_prototypeAlias$$$$setGlobals$$($globals$$) { |
||
403 | this.$globals_$ = $globals$$ |
||
404 | }; |
||
405 | $JSCompiler_prototypeAlias$$.$setGlobal$ = function $$JSCompiler_prototypeAlias$$$$setGlobal$$($key$$43$$, $value$$72$$) { |
||
406 | this.$globals_$[$key$$43$$] = $value$$72$$ |
||
407 | }; |
||
408 | $JSCompiler_prototypeAlias$$.$getGlobals$ = function $$JSCompiler_prototypeAlias$$$$getGlobals$$() { |
||
409 | return this.$globals_$ |
||
410 | }; |
||
411 | $JSCompiler_prototypeAlias$$.$initRuntime$ = function $$JSCompiler_prototypeAlias$$$$initRuntime$$() { |
||
412 | this.$runtimeInitialized$ = $JSCompiler_alias_TRUE$$; |
||
413 | $goog$object$forEach$$(this.$extensions_$, function($extension$$) { |
||
414 | $extension$$.$initRuntime$() |
||
415 | }, this) |
||
416 | }; |
||
417 | $JSCompiler_prototypeAlias$$.$hasExtension$ = function $$JSCompiler_prototypeAlias$$$$hasExtension$$($name$$68$$) { |
||
418 | return $name$$68$$ in this.$extensions_$ |
||
419 | }; |
||
420 | $JSCompiler_prototypeAlias$$.getExtension = function $$JSCompiler_prototypeAlias$$$getExtension$($name$$69$$) { |
||
421 | if(!($name$$69$$ in this.$extensions_$)) { |
||
422 | throw Error('The "' + $name$$69$$ + '" extension is not enabled.'); |
||
423 | } |
||
424 | return this.$extensions_$[$name$$69$$] |
||
425 | }; |
||
426 | $JSCompiler_prototypeAlias$$.$addExtension$ = function $$JSCompiler_prototypeAlias$$$$addExtension$$($extension$$1$$) { |
||
427 | this.$extensions_$[$extension$$1$$.getName()] = $extension$$1$$ |
||
428 | }; |
||
429 | $JSCompiler_prototypeAlias$$.$removeExtension$ = function $$JSCompiler_prototypeAlias$$$$removeExtension$$($name$$70$$) { |
||
430 | delete this.$extensions_$[$name$$70$$] |
||
431 | }; |
||
432 | $JSCompiler_prototypeAlias$$.$setExtensions$ = function $$JSCompiler_prototypeAlias$$$$setExtensions$$($extensions$$) { |
||
433 | $goog$object$forEach$$($extensions$$, function($extension$$2$$) { |
||
434 | this.$addExtension$($extension$$2$$) |
||
435 | }) |
||
436 | }; |
||
437 | $JSCompiler_prototypeAlias$$.$getExtensions$ = function $$JSCompiler_prototypeAlias$$$$getExtensions$$() { |
||
438 | return this.$extensions_$ |
||
439 | }; |
||
440 | $JSCompiler_prototypeAlias$$.$createTemplate$ = function $$JSCompiler_prototypeAlias$$$$createTemplate$$($ctor$$3_template$$3$$) { |
||
441 | var $uid$$ = $ctor$$3_template$$3$$[$goog$UID_PROPERTY_$$] || ($ctor$$3_template$$3$$[$goog$UID_PROPERTY_$$] = ++$goog$uidCounter_$$); |
||
442 | if($uid$$ in this.$createdTemplates_$) { |
||
443 | return this.$createdTemplates_$[$uid$$] |
||
444 | } |
||
445 | $JSCompiler_alias_FALSE$$ === this.$runtimeInitialized$ && this.$initRuntime$(); |
||
446 | $ctor$$3_template$$3$$ = new $ctor$$3_template$$3$$(this); |
||
447 | return this.$createdTemplates_$[$uid$$] = $ctor$$3_template$$3$$ |
||
448 | }; |
||
449 | window.Twig = new $twig$Environment$$; |
||
450 | $goog$exportSymbol$$("goog.provide", function($name$$55$$) { |
||
451 | $goog$exportPath_$$($name$$55$$) |
||
452 | }); |
||
453 | $goog$exportSymbol$$("goog.require", function() { |
||
454 | }); |
||
455 | $goog$exportSymbol$$("twig.attr", function($obj$$58$$, $attr_f$$inline_23$$, $opt_args$$1$$, $accessType_opt_accessType$$, $isTest_opt_isTest$$) { |
||
456 | $accessType_opt_accessType$$ = $accessType_opt_accessType$$ || "any"; |
||
457 | $isTest_opt_isTest$$ = $isTest_opt_isTest$$ !== $JSCompiler_alias_VOID$$ ? $isTest_opt_isTest$$ : $JSCompiler_alias_FALSE$$; |
||
458 | if(!$goog$isObject$$($obj$$58$$) && !$goog$isArray$$($obj$$58$$)) { |
||
459 | return $isTest_opt_isTest$$ ? $JSCompiler_alias_FALSE$$ : $JSCompiler_alias_NULL$$ |
||
460 | } |
||
461 | if($attr_f$$inline_23$$ in $obj$$58$$) { |
||
462 | if("array" !== $accessType_opt_accessType$$ && "function" == $goog$typeOf$$($obj$$58$$[$attr_f$$inline_23$$])) { |
||
463 | return $isTest_opt_isTest$$ ? $JSCompiler_alias_TRUE$$ : $obj$$58$$[$attr_f$$inline_23$$].apply($obj$$58$$, $opt_args$$1$$ || []) |
||
464 | } |
||
465 | if("method" !== $accessType_opt_accessType$$) { |
||
466 | return $isTest_opt_isTest$$ ? $JSCompiler_alias_TRUE$$ : $obj$$58$$[$attr_f$$inline_23$$] |
||
467 | } |
||
468 | } |
||
469 | if("array" === $accessType_opt_accessType$$ || $goog$isArray$$($obj$$58$$)) { |
||
470 | return $isTest_opt_isTest$$ ? $JSCompiler_alias_FALSE$$ : $JSCompiler_alias_NULL$$ |
||
471 | } |
||
472 | var $attr_f$$inline_23$$ = $attr_f$$inline_23$$.toLowerCase(), $getter$$ = "get" + $attr_f$$inline_23$$, $isser$$ = "is" + $attr_f$$inline_23$$, $functionName_key$$inline_25$$; |
||
473 | a: { |
||
474 | $attr_f$$inline_23$$ = function $$attr_f$$inline_23$$$($v$$, $k$$) { |
||
475 | $k$$ = $k$$.toLowerCase(); |
||
476 | return $k$$ === $getter$$ || $k$$ === $isser$$ |
||
477 | }; |
||
478 | for($functionName_key$$inline_25$$ in $obj$$58$$) { |
||
479 | if($attr_f$$inline_23$$.call($JSCompiler_alias_VOID$$, 0, $functionName_key$$inline_25$$)) { |
||
480 | break a |
||
481 | } |
||
482 | } |
||
483 | $functionName_key$$inline_25$$ = $JSCompiler_alias_VOID$$ |
||
484 | } |
||
485 | return $functionName_key$$inline_25$$ && "function" == $goog$typeOf$$($obj$$58$$[$functionName_key$$inline_25$$]) ? $isTest_opt_isTest$$ ? $JSCompiler_alias_TRUE$$ : $obj$$58$$[$functionName_key$$inline_25$$].apply($obj$$58$$, $opt_args$$1$$ || []) : $isTest_opt_isTest$$ ? $JSCompiler_alias_FALSE$$ : $JSCompiler_alias_NULL$$ |
||
486 | }); |
||
487 | $goog$exportSymbol$$("twig.bind", $twig$bind$$); |
||
488 | $goog$exportSymbol$$("twig.inherits", $goog$inherits$$); |
||
489 | $goog$exportSymbol$$("twig.extend", $twig$extend$$); |
||
490 | $goog$exportSymbol$$("twig.spaceless", function($s$$15$$) { |
||
491 | return $s$$15$$.replace(/>[\s\xa0]+</g, "><").replace(/^[\s\xa0]+|[\s\xa0]+$/g, "") |
||
492 | }); |
||
493 | $goog$exportSymbol$$("twig.range", function($start$$6$$, $end$$2$$) { |
||
494 | for(var $rs$$ = [];$start$$6$$ <= $end$$2$$;$start$$6$$ += 1) { |
||
495 | $rs$$.push($start$$6$$) |
||
496 | } |
||
497 | return $rs$$ |
||
498 | }); |
||
499 | $goog$exportSymbol$$("twig.contains", function($haystack$$, $needle$$) { |
||
500 | var $JSCompiler_temp$$159_JSCompiler_temp$$160_key$$inline_169$$; |
||
501 | if($goog$isArray$$($haystack$$)) { |
||
502 | $JSCompiler_temp$$159_JSCompiler_temp$$160_key$$inline_169$$ = 0 <= $goog$array$indexOf$$($haystack$$, $needle$$) |
||
503 | }else { |
||
504 | if($goog$isString$$($haystack$$)) { |
||
505 | $JSCompiler_temp$$159_JSCompiler_temp$$160_key$$inline_169$$ = -1 != $haystack$$.indexOf($needle$$) && ("" !== $needle$$ || "" === $haystack$$) |
||
506 | }else { |
||
507 | a: { |
||
508 | for($JSCompiler_temp$$159_JSCompiler_temp$$160_key$$inline_169$$ in $haystack$$) { |
||
509 | if($haystack$$[$JSCompiler_temp$$159_JSCompiler_temp$$160_key$$inline_169$$] == $needle$$) { |
||
510 | $JSCompiler_temp$$159_JSCompiler_temp$$160_key$$inline_169$$ = $JSCompiler_alias_TRUE$$; |
||
511 | break a |
||
512 | } |
||
513 | } |
||
514 | $JSCompiler_temp$$159_JSCompiler_temp$$160_key$$inline_169$$ = $JSCompiler_alias_FALSE$$ |
||
515 | } |
||
516 | } |
||
517 | } |
||
518 | return $JSCompiler_temp$$159_JSCompiler_temp$$160_key$$inline_169$$ |
||
519 | }); |
||
520 | $goog$exportSymbol$$("twig.countable", $twig$countable$$); |
||
521 | $goog$exportSymbol$$("twig.count", $twig$count$$); |
||
522 | $goog$exportSymbol$$("twig.forEach", $twig$forEach$$); |
||
523 | $goog$exportSymbol$$("twig.empty", $twig$empty$$); |
||
524 | $goog$exportSymbol$$("twig.createObj", function($var_args$$52$$) { |
||
525 | for(var $rs$$1$$ = {}, $i$$48$$ = 0;$i$$48$$ < arguments.length;$i$$48$$ += 2) { |
||
526 | $rs$$1$$[arguments[$i$$48$$]] = arguments[$i$$48$$ + 1] |
||
527 | } |
||
528 | return $rs$$1$$ |
||
529 | }); |
||
530 | $goog$exportSymbol$$("twig.pregQuote", $twig$pregQuote$$); |
||
531 | $goog$exportSymbol$$("twig.filter.capitalize", function($env$$1$$, $str$$46$$) { |
||
532 | return $str$$46$$.charAt(0).toUpperCase() + $str$$46$$.substring(1) |
||
533 | }); |
||
534 | $goog$exportSymbol$$("twig.filter.escape", $twig$filter$escape$$); |
||
535 | $goog$exportSymbol$$("twig.filter.first", function($env$$6$$, $value$$65$$) { |
||
536 | return $goog$isArray$$($value$$65$$) ? $value$$65$$[0] : $goog$isObject$$($value$$65$$) ? $value$$65$$[Object.keys($value$$65$$)[0]] : $goog$isString$$($value$$65$$) ? $value$$65$$.charAt(0) : "" |
||
537 | }); |
||
538 | $goog$exportSymbol$$("twig.filter.length", function($env$$3$$, $value$$61$$) { |
||
539 | return $twig$count$$($value$$61$$) |
||
540 | }); |
||
541 | $goog$exportSymbol$$("twig.filter.def", function($value$$59$$, $opt_default$$) { |
||
542 | return $twig$empty$$($value$$59$$) ? $opt_default$$ || "" : $value$$59$$ |
||
543 | }); |
||
544 | $goog$exportSymbol$$("twig.filter.replace", function($str$$45$$, $map$$) { |
||
545 | for(var $key$$42$$ in $map$$) { |
||
546 | var $escapedKey$$; |
||
547 | $escapedKey$$ = $twig$pregQuote$$($key$$42$$); |
||
548 | $str$$45$$ = $str$$45$$.replace(RegExp($escapedKey$$, "g"), $map$$[$key$$42$$]) |
||
549 | } |
||
550 | return $str$$45$$ |
||
551 | }); |
||
552 | $goog$exportSymbol$$("twig.filter.join", function($value$$62$$, $opt_glue$$) { |
||
553 | var $glue$$ = $opt_glue$$ || "", $buffer$$8$$ = new $goog$string$StringBuffer$$, $first$$1$$ = $JSCompiler_alias_TRUE$$; |
||
554 | $twig$forEach$$($value$$62$$, function($v$$4$$) { |
||
555 | $first$$1$$ || $buffer$$8$$.append($glue$$); |
||
556 | $first$$1$$ = $JSCompiler_alias_FALSE$$; |
||
557 | $buffer$$8$$.append($v$$4$$) |
||
558 | }); |
||
559 | return $buffer$$8$$.toString() |
||
560 | }); |
||
561 | $goog$exportSymbol$$("twig.filter.keys", $goog$object$getKeys$$); |
||
562 | $goog$exportSymbol$$("twig.filter.upper", function($env$$4$$, $value$$63$$) { |
||
563 | return $value$$63$$.toUpperCase() |
||
564 | }); |
||
565 | $goog$exportSymbol$$("twig.filter.lower", function($env$$5$$, $value$$64$$) { |
||
566 | return $value$$64$$.toLowerCase() |
||
567 | }); |
||
568 | $goog$exportSymbol$$("twig.filter.nl2br", function($str$$47$$) { |
||
569 | return $str$$47$$.replace(/\n/g, "<br />") |
||
570 | }); |
||
571 | $goog$exportSymbol$$("twig.filter.abs", function($n$$5$$) { |
||
572 | return Math.abs($n$$5$$) |
||
573 | }); |
||
574 | $goog$exportSymbol$$("twig.filter.title", function($env$$8$$, $value$$67$$) { |
||
575 | return $value$$67$$.split(" ").map(function($word$$) { |
||
576 | return $word$$.charAt(0).toUpperCase() + $word$$.substr(1).toLowerCase() |
||
577 | }).join(" ") |
||
578 | }); |
||
579 | $goog$exportSymbol$$("twig.filter.trim", function($value$$68$$, $opt_charactermask$$) { |
||
580 | var $mask$$5$$ = "\n "; |
||
581 | $opt_charactermask$$ && ($mask$$5$$ = $twig$pregQuote$$($opt_charactermask$$)); |
||
582 | $value$$68$$ = $value$$68$$.replace(RegExp("^[" + $mask$$5$$ + "]+"), ""); |
||
583 | return $value$$68$$ = $value$$68$$.replace(RegExp("[" + $mask$$5$$ + "]+$"), "") |
||
584 | }); |
||
585 | $goog$exportSymbol$$("twig.filter.json_encode", function($value$$69$$) { |
||
586 | return JSON.stringify($value$$69$$) |
||
587 | }); |
||
588 | $goog$exportSymbol$$("twig.filter.last", function($env$$7$$, $value$$66$$) { |
||
589 | if($goog$isArray$$($value$$66$$)) { |
||
590 | return $value$$66$$[$value$$66$$.length - 1] |
||
591 | } |
||
592 | if($goog$isObject$$($value$$66$$)) { |
||
593 | var $keys$$1$$ = Object.keys($value$$66$$); |
||
594 | return $value$$66$$[$keys$$1$$[$keys$$1$$.length - 1]] |
||
595 | } |
||
596 | return $goog$isString$$($value$$66$$) ? $value$$66$$.charAt($value$$66$$.length - 1) : "" |
||
597 | }); |
||
598 | $goog$exportSymbol$$("twig.filter.reverse", function($env$$9$$, $value$$70$$) { |
||
599 | if($goog$isArray$$($value$$70$$)) { |
||
600 | return $value$$70$$.reverse() |
||
601 | } |
||
602 | if($goog$isObject$$($value$$70$$)) { |
||
603 | for(var $reverse$$ = {}, $reverseKeys$$ = $goog$object$getKeys$$($value$$70$$).reverse(), $i$$49$$ = 0;$i$$49$$ < $reverseKeys$$.length;$i$$49$$++) { |
||
604 | $reverse$$[$reverseKeys$$[$i$$49$$]] = $value$$70$$[$reverseKeys$$[$i$$49$$]] |
||
605 | } |
||
606 | return $reverse$$ |
||
607 | } |
||
608 | return $goog$isString$$($value$$70$$) ? $value$$70$$.split("").reverse().join("") : $value$$70$$ |
||
609 | }); |
||
610 | $goog$exportSymbol$$("twig.filter.batch", function($array$$15$$, $batchSize$$, $opt_filler$$) { |
||
611 | for(var $batches$$ = Array(Math.ceil($array$$15$$.length / $batchSize$$)), $iterations$$ = $batches$$.length * $batchSize$$, $i$$50$$ = 0;$i$$50$$ < $iterations$$;$i$$50$$++) { |
||
612 | var $batchIndex$$ = Math.floor($i$$50$$ / $batchSize$$); |
||
613 | "undefined" === typeof $batches$$[$batchIndex$$] && ($batches$$[$batchIndex$$] = []); |
||
614 | "undefined" !== typeof $array$$15$$[$i$$50$$] ? $batches$$[$batchIndex$$].push($array$$15$$[$i$$50$$]) : $goog$isString$$($opt_filler$$) && $batches$$[$batchIndex$$].push($opt_filler$$) |
||
615 | } |
||
616 | return $batches$$ |
||
617 | }); |
||
618 | $goog$exportSymbol$$("twig.filter.merge", function($value1$$6$$, $value2$$6$$) { |
||
619 | var $merged$$ = []; |
||
620 | if($goog$isArray$$($value1$$6$$) && $goog$isArray$$($value2$$6$$)) { |
||
621 | for(var $arr$$inline_29_res$$inline_39$$ = $merged$$ = $value1$$6$$.concat($value2$$6$$), $key$$inline_40_seen$$inline_32$$ = {}, $cursorInsert$$inline_33$$ = 0, $cursorRead$$inline_34$$ = 0;$cursorRead$$inline_34$$ < $arr$$inline_29_res$$inline_39$$.length;) { |
||
622 | var $current$$inline_35$$ = $arr$$inline_29_res$$inline_39$$[$cursorRead$$inline_34$$++], $key$$inline_36$$ = $goog$isObject$$($current$$inline_35$$) ? "o" + ($current$$inline_35$$[$goog$UID_PROPERTY_$$] || ($current$$inline_35$$[$goog$UID_PROPERTY_$$] = ++$goog$uidCounter_$$)) : (typeof $current$$inline_35$$).charAt(0) + $current$$inline_35$$; |
||
623 | Object.prototype.hasOwnProperty.call($key$$inline_40_seen$$inline_32$$, $key$$inline_36$$) || ($key$$inline_40_seen$$inline_32$$[$key$$inline_36$$] = $JSCompiler_alias_TRUE$$, $arr$$inline_29_res$$inline_39$$[$cursorInsert$$inline_33$$++] = $current$$inline_35$$) |
||
624 | } |
||
625 | $arr$$inline_29_res$$inline_39$$.length = $cursorInsert$$inline_33$$ |
||
626 | }else { |
||
627 | if($goog$isObject$$($value1$$6$$) && $goog$isObject$$($value2$$6$$)) { |
||
628 | $arr$$inline_29_res$$inline_39$$ = {}; |
||
629 | for($key$$inline_40_seen$$inline_32$$ in $value1$$6$$) { |
||
630 | $arr$$inline_29_res$$inline_39$$[$key$$inline_40_seen$$inline_32$$] = $value1$$6$$[$key$$inline_40_seen$$inline_32$$] |
||
631 | } |
||
632 | $merged$$ = $arr$$inline_29_res$$inline_39$$; |
||
633 | $goog$object$forEach$$($value2$$6$$, function($element$$6$$, $index$$52$$) { |
||
634 | $merged$$[$index$$52$$] = $element$$6$$ |
||
635 | }) |
||
636 | } |
||
637 | } |
||
638 | return $merged$$ |
||
639 | }); |
||
640 | $goog$exportSymbol$$("twig.functions.max", function($value$$73$$) { |
||
641 | return $goog$isArray$$($value$$73$$) ? Math.max.apply($JSCompiler_alias_NULL$$, $value$$73$$) : $goog$isObject$$($value$$73$$) ? Math.max.apply($JSCompiler_alias_NULL$$, $goog$object$getValues$$($value$$73$$)) : Math.max.apply($JSCompiler_alias_NULL$$, arguments) |
||
642 | }); |
||
643 | $goog$exportSymbol$$("twig.functions.min", function($value$$74$$) { |
||
644 | return $goog$isArray$$($value$$74$$) ? Math.min.apply($JSCompiler_alias_NULL$$, $value$$74$$) : $goog$isObject$$($value$$74$$) ? Math.min.apply($JSCompiler_alias_NULL$$, $goog$object$getValues$$($value$$74$$)) : Math.min.apply($JSCompiler_alias_NULL$$, arguments) |
||
645 | }); |
||
646 | $goog$exportSymbol$$("twig.functions.random", function($env$$10$$, $value$$75$$) { |
||
647 | return $goog$isArray$$($value$$75$$) || $goog$isString$$($value$$75$$) ? $value$$75$$[Math.floor(Math.random() * $value$$75$$.length)] : "number" == typeof $value$$75$$ ? Math.floor(Math.random() * $value$$75$$) : $value$$75$$ === $JSCompiler_alias_NULL$$ || "undefined" === typeof $value$$75$$ ? Math.floor(2147483647 * Math.random()) : "" |
||
648 | }); |
||
649 | $goog$exportSymbol$$("twig.StringBuffer", $goog$string$StringBuffer$$); |
||
650 | $goog$string$StringBuffer$$.prototype.append = $goog$string$StringBuffer$$.prototype.append; |
||
651 | $goog$string$StringBuffer$$.prototype.toString = $goog$string$StringBuffer$$.prototype.toString; |
||
652 | $goog$exportSymbol$$("twig.Environment", $twig$Environment$$); |
||
653 | $twig$Environment$$.prototype.createTemplate = $twig$Environment$$.prototype.$createTemplate$; |
||
654 | $twig$Environment$$.prototype.filter = $twig$Environment$$.prototype.filter; |
||
655 | $twig$Environment$$.prototype.invoke = $twig$Environment$$.prototype.$invoke$; |
||
656 | $twig$Environment$$.prototype.test = $twig$Environment$$.prototype.test; |
||
657 | $twig$Environment$$.prototype.escape = $twig$Environment$$.prototype.escape; |
||
658 | $twig$Environment$$.prototype.macro = $twig$Environment$$.prototype.$macro$; |
||
659 | $twig$Environment$$.prototype.setFilter = $twig$Environment$$.prototype.$setFilter$; |
||
660 | $twig$Environment$$.prototype.setFunction = $twig$Environment$$.prototype.$setFunction$; |
||
661 | $twig$Environment$$.prototype.setTest = $twig$Environment$$.prototype.$setTest$; |
||
662 | $twig$Environment$$.prototype.render = $twig$Environment$$.prototype.$render$; |
||
663 | $twig$Environment$$.prototype.getGlobals = $twig$Environment$$.prototype.$getGlobals$; |
||
664 | $twig$Environment$$.prototype.setGlobals = $twig$Environment$$.prototype.$setGlobals$; |
||
665 | $twig$Environment$$.prototype.setGlobal = $twig$Environment$$.prototype.$setGlobal$; |
||
666 | $twig$Environment$$.prototype.initRuntime = $twig$Environment$$.prototype.$initRuntime$; |
||
667 | $twig$Environment$$.prototype.hasExtension = $twig$Environment$$.prototype.$hasExtension$; |
||
668 | $twig$Environment$$.prototype.getExtension = $twig$Environment$$.prototype.getExtension; |
||
669 | $twig$Environment$$.prototype.addExtension = $twig$Environment$$.prototype.$addExtension$; |
||
670 | $twig$Environment$$.prototype.removeExtension = $twig$Environment$$.prototype.$removeExtension$; |
||
671 | $twig$Environment$$.prototype.setExtensions = $twig$Environment$$.prototype.$setExtensions$; |
||
672 | $twig$Environment$$.prototype.getExtensions = $twig$Environment$$.prototype.$getExtensions$; |
||
673 | $goog$exportSymbol$$("twig.Template", $twig$Template$$); |
||
674 | $twig$Template$$.prototype.setTraits = $twig$Template$$.prototype.$setTraits$; |
||
675 | $twig$Template$$.prototype.setBlocks = $twig$Template$$.prototype.$setBlocks$; |
||
676 | $twig$Template$$.prototype.getBlocks = $twig$Template$$.prototype.$getBlocks$; |
||
677 | $twig$Template$$.prototype.renderParentBlock = $twig$Template$$.prototype.$renderParentBlock$; |
||
678 | $twig$Template$$.prototype.renderBlock = $twig$Template$$.prototype.$renderBlock$; |
||
679 | $twig$Template$$.prototype.callMacro = $twig$Template$$.prototype.$callMacro$; |
||
680 | $goog$exportSymbol$$("twig.Markup", $twig$Markup$$); |
||
681 | })(); |
||
682 |